From 9ea40359390f0c27ecd33d84072968f257cb7942 Mon Sep 17 00:00:00 2001 From: bianjie Date: Wed, 15 Apr 2020 19:44:40 +0800 Subject: [PATCH 01/15] Add htlc --- src/client.ts | 5 ++ src/modules/asset.ts | 6 +-- src/modules/htlc.ts | 117 +++++++++++++++++++++++++++++++++++++++++++ src/modules/index.ts | 2 +- src/modules/utils.ts | 12 ++--- src/types/asset.ts | 22 +++++++- src/types/htlc.ts | 95 +++++++++++++++++++++++++++++++++++ src/types/index.ts | 1 + test/asset.test.ts | 2 +- test/basetest.ts | 32 +++++++++++- test/htlc.test.ts | 101 +++++++++++++++++++++++++++++++++++++ 11 files changed, 380 insertions(+), 15 deletions(-) create mode 100644 src/modules/htlc.ts create mode 100644 src/types/htlc.ts create mode 100644 test/htlc.test.ts diff --git a/src/client.ts b/src/client.ts index 106535fe..dd0d4881 100644 --- a/src/client.ts +++ b/src/client.ts @@ -61,7 +61,11 @@ export class Client { /** Tendermint module */ tendermint: modules.Tendermint; + /** Htlc module */ + htlc: modules.Htlc + /** IRISHub SDK Constructor */ + constructor(config: DefaultClientConfig) { this.config = config; if (!this.config.rpcConfig) this.config.rpcConfig = {}; @@ -103,6 +107,7 @@ export class Client { this.random = new modules.Random(this); this.auth = new modules.Auth(this); this.tendermint = new modules.Tendermint(this); + this.htlc = new modules.Htlc(this); // Set default encrypt/decrypt methods if (!this.config.keyDAO.encrypt || !this.config.keyDAO.decrypt) { diff --git a/src/modules/asset.ts b/src/modules/asset.ts index 86369c2f..5df599ba 100644 --- a/src/modules/asset.ts +++ b/src/modules/asset.ts @@ -25,12 +25,12 @@ export class Asset { * @returns * @since v0.17 */ - queryToken(symbol: string): Promise { + queryToken(symbol: string): Promise { if (is.empty(symbol)) { throw new SdkError('symbol can not be empty'); } - return this.client.rpcClient.abciQuery('custom/asset/token', { - Symbol: this.getCoinName(symbol), + return this.client.rpcClient.abciQuery('custom/asset/token', { + TokenId: this.getCoinName(symbol), }); } diff --git a/src/modules/htlc.ts b/src/modules/htlc.ts new file mode 100644 index 00000000..e27a63b9 --- /dev/null +++ b/src/modules/htlc.ts @@ -0,0 +1,117 @@ +import { Client } from '../client'; +import * as types from '../types'; +import {Crypto} from "../utils/crypto"; +import {SdkError} from "../errors"; +import {MsgClaimHTLC, MsgCreateHTLC, MsgRefundHTLC} from "../types/htlc"; +import {Utils} from "../utils"; +const is = require("is_js"); + +class Consts { + static readonly SecretLength = 32 // the length for the secret + static readonly HashLockLength = 32 // the length for the hash lock + static readonly MaxLengthForAddressOnOtherChain = 128 // maximal length for the address on other chains + static readonly MinTimeLock = 50 // minimal time span for HTLC + static readonly MaxTimeLock = 25480 // maximal time span for HTLC +} + +export class Htlc { + client: Client; + constructor(client: Client) { + this.client = client; + } + + /** + * Query details of an Htlc + * @param hashLock hash lock + * @returns { promise} + */ + queryHTLC(hashLock: string): Promise { + return this.client.rpcClient.abciQuery( + 'custom/htlc/htlc', + { + HashLock: Buffer.from(hashLock, 'hex').toString('base64') + } + ).then(res => { + res.secret = Buffer.from(res.secret, 'base64').toString('hex') + return res + }) + } + + /** + * Claim an opened Htlc + */ + async claim( + baseTx: types.BaseTx, + hashLock: string, + secret: string + ): Promise { + secret = Buffer.from(secret, 'hex').toString('base64') + hashLock = Buffer.from(hashLock, 'hex').toString('base64') + const msgs: types.Msg[] = [ + new MsgClaimHTLC(this.client.keys.show(baseTx.from), secret, hashLock) + ] + return this.client.tx.buildAndSend(msgs, baseTx); + } + + /** + * Create an Htlc + * @param + * @returns { Promise } + */ + async create( + baseTx: types.BaseTx, + to: string, + receiverOnOtherChain: string, + amount: types.Coin[], + secret: string, + lockTime: string, + hashLock: string, + timestamp?: string, + ): Promise { + if (!Crypto.checkAddress(to, this.client.config.bech32Prefix.AccAddr)) { + throw new SdkError('Invalid bech32 address, prefix of address should be: ' + this.client.config.bech32Prefix.AccAddr); + } + if (!is.empty(secret) && secret.length != Consts.SecretLength * 2) { + throw new SdkError(`the secret must be ${Consts.SecretLength} bytes long`) + } + let ts: number = parseInt(timestamp + '') + if (isNaN(ts)) timestamp = '0' + if (is.empty(hashLock)) { + if(is.empty(secret)) { + secret = Buffer.of(...Array.from({length: Consts.SecretLength}, () => Math.round(Math.random() * 255))).toString('hex'); + } + if (!isNaN(ts) && ts > 0) { + let hex: string = ts.toString(16); + secret += Array(16 - hex.length + 1).join('0') + hex + } + hashLock = Buffer.from(Utils.sha256(secret), 'hex').toString('base64') + } else { + hashLock = Buffer.from(hashLock, 'hex').toString('base64') + } + const from = this.client.keys.show(baseTx.from); + const msgs: types.Msg[] = [ + new MsgCreateHTLC(from, to, receiverOnOtherChain, amount, lockTime, hashLock, timestamp + '') + ]; + return this.client.tx.buildAndSend(msgs, baseTx).then(res => { + let result: types.CreateHTLCResult = res + result.secret = secret + result.hashLock = Buffer.from(hashLock, 'base64').toString('hex') + return result + }); + } + + /** + * Refund from an expired Htlc + */ + async refund( + baseTx: types.BaseTx, + hashLock: string + ): Promise { + hashLock = Buffer.from(hashLock, 'hex').toString('base64') + const msgs: types.Msg[] = [ + new MsgRefundHTLC(this.client.keys.show(baseTx.from), hashLock) + ] + return this.client.tx.buildAndSend(msgs, baseTx); + } + +} diff --git a/src/modules/index.ts b/src/modules/index.ts index 740550f5..da6e20ed 100644 --- a/src/modules/index.ts +++ b/src/modules/index.ts @@ -13,4 +13,4 @@ export * from './random'; export * from './asset'; export * from './utils'; export * from './tendermint'; - +export * from './htlc'; \ No newline at end of file diff --git a/src/modules/utils.ts b/src/modules/utils.ts index 0736306d..bc5bc6af 100644 --- a/src/modules/utils.ts +++ b/src/modules/utils.ts @@ -35,19 +35,19 @@ export class Utils { const amt = this.math.bignumber!(coin.amount); const token = this.tokenMap.get(coin.denom); if (token) { - if (coin.denom === token.min_unit) return coin; + if (coin.denom === token.min_unit_alias) return coin; return { - denom: token.min_unit, + denom: token.min_unit_alias, amount: this.math.multiply!( amt, - this.math.pow!(10, token.scale) + this.math.pow!(10, token.decimal) ).toString(), }; } // If token not found in local memory, then query from the blockchain return this.client.asset.queryToken(coin.denom).then(token => { - this.tokenMap.set(coin.denom, token); + this.tokenMap.set(coin.denom, token.base_token); return this.toMinCoin(coin); }); } @@ -84,14 +84,14 @@ export class Utils { denom: token.symbol, amount: this.math.divide!( amt, - this.math.pow!(10, token.scale) + this.math.pow!(10, token.decimal) ).toString(), }; } // If token not found in local memory, then query from the blockchain return this.client.asset.queryToken(coin.denom).then(token => { - this.tokenMap.set(coin.denom, token); + this.tokenMap.set(coin.denom, token.base_token); return this.toMainCoin(coin); }); } diff --git a/src/types/asset.ts b/src/types/asset.ts index a2d2fa9a..024c43ed 100644 --- a/src/types/asset.ts +++ b/src/types/asset.ts @@ -3,14 +3,32 @@ import { Coin } from './types'; export interface Token { symbol: string; name: string; - scale: number; - min_unit: string; + decimal: number; + min_unit_alias: string; initial_supply: string; max_supply: string; mintable: boolean; owner: string; } +export interface fToken { + base_token: { + id: string; + family: string; + source: string; + gateway: string; + symbol: string; + name: string; + decimal: number; + canonical_symbol: string; + min_unit_alias: string; + initial_supply: string; + max_supply: string; + mintable: boolean; + owner: string; + } +} + export interface TokenFees { exist: boolean; issue_fee: Coin; diff --git a/src/types/htlc.ts b/src/types/htlc.ts new file mode 100644 index 00000000..05c627b5 --- /dev/null +++ b/src/types/htlc.ts @@ -0,0 +1,95 @@ +import { Coin, Msg, Tag } from './types'; + +/** @TODO document */ +export class MsgCreateHTLC implements Msg { + type: string; + value: { + sender: string, + to: string, + receiver_on_other_chain: string, + amount: Coin[], + time_lock: string, + hash_lock: string, + timestamp: string, + }; + constructor( + sender: string, + to: string, + receiverOnOtherChain: string, + amount: Coin[], + lockTime: string, + hashLock: string, + timestamp: string, + ) { + this.type = 'irishub/htlc/MsgCreateHTLC'; + this.value = { + sender: sender, + to: to, + receiver_on_other_chain: receiverOnOtherChain, + amount: amount, + time_lock: lockTime, + hash_lock: hashLock, + timestamp: timestamp, + }; + } + getSignBytes(): object { + return this; + } +} + +export class MsgClaimHTLC implements Msg { + type: string; + value: { + sender: string, + secret: string + hash_lock: string, + }; + constructor(sender: string, secret: string, hashLock: string) { + this.type = 'irishub/htlc/MsgClaimHTLC'; + this.value = { + sender: sender, + secret: secret, + hash_lock: hashLock + }; + } + getSignBytes(): object { + return this; + } +} + +export class MsgRefundHTLC implements Msg { + type: string; + value: { + sender: string, + hash_lock: string, + }; + constructor(sender: string, hashLock: string) { + this.type = 'irishub/htlc/MsgRefundHTLC'; + this.value = { + sender: sender, + hash_lock: hashLock + }; + } + getSignBytes(): object { + return this; + } +} + +export interface queryHTLCResult { + sender: string; + to: string; + receiver_on_other_chain: string; + amount: Coin[]; + secret: string; + timestamp: number; + expire_height: number; + state: string; +} + +export interface CreateHTLCResult { + hash: string; + tags?: Tag[]; + height?: number; + secret?: string; + hashLock?: string; +} \ No newline at end of file diff --git a/src/types/index.ts b/src/types/index.ts index 9ac277c3..14cbef1f 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -19,3 +19,4 @@ export * from './block'; export * from './block-result'; export * from './validator'; export * from './query-builder'; +export * from './htlc'; \ No newline at end of file diff --git a/test/asset.test.ts b/test/asset.test.ts index 3bb3c3b6..36716caa 100644 --- a/test/asset.test.ts +++ b/test/asset.test.ts @@ -8,7 +8,7 @@ describe('Asset Tests', () => { 'query token', async () => { try { - console.log(await BaseTest.getClient().asset.queryToken('iris')); + console.log(await BaseTest.getDevClient().asset.queryToken('iris')); } catch (error) { console.log(JSON.stringify(error)); } diff --git a/test/basetest.ts b/test/basetest.ts index 048f59c8..12475c89 100644 --- a/test/basetest.ts +++ b/test/basetest.ts @@ -27,8 +27,13 @@ export class BaseTest { from: Consts.keyName, password: Consts.keyPassword, mode: types.BroadcastMode.Commit, + fee: { amount: '1', denom: 'iris' } }; - + static testTx: types.BaseTx = { + from: "node0", + password: "12345678", + mode: types.BroadcastMode.Commit + } static getClient(): Client { const client = iris .newClient({ @@ -45,7 +50,30 @@ export class BaseTest { Consts.keyPassword, 'balcony reopen dumb battle smile crisp snake truth expose bird thank peasant best opera faint scorpion debate skill ethics fossil dinner village news logic' ); - + return client; + } + static getDevClient(): Client{ + const client = iris.newClient({ + node: 'http://irisnet-rpc.dev.rainbow.one', + network: iris.Network.Testnet, + chainId: 'rainbow-dev', + gas: '100000' + }).withKeyDAO(new TestKeyDAO()) + .withRpcConfig({timeout: Consts.timeout}); + client.keys.recover(this.testTx.from, this.testTx.password, + 'razor educate ostrich pave permit comic collect square believe decade scan day frozen language make winter lyrics spice dawn deliver jaguar arrest decline success'); + return client; + } + static getQaClient(): Client{ + const client = iris.newClient({ + node: 'http://irisnet-rpc.qa.rainbow.one', + network: iris.Network.Testnet, + chainId: 'rainbow-qa', + gas: '100000' + }).withKeyDAO(new TestKeyDAO()) + .withRpcConfig({timeout: Consts.timeout}); + client.keys.recover(this.testTx.from, this.testTx.password, + 'arrow ignore inquiry lottery high ship crash leopard liar example never oval final fancy resist nuclear trip novel poem fine odor soccer bus lumber'); return client; } } diff --git a/test/htlc.test.ts b/test/htlc.test.ts new file mode 100644 index 00000000..433e9bb0 --- /dev/null +++ b/test/htlc.test.ts @@ -0,0 +1,101 @@ +import {BaseTest} from "./basetest"; +import * as types from '../src/types'; + +describe('test', () => { + var originalTimeout; + beforeEach(function() { + originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; + jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000000; + }); + test('example', async () => { + const target = 'faa1gwr3espfjtz9su9x40p635dgfvm4ph9v6ydky5' + let secret = undefined + let sleep = function(ms: number) { + return new Promise(resolve => setTimeout(resolve, ms)) + } + let qaClient = BaseTest.getQaClient(); + let devClient = BaseTest.getDevClient(); + await devClient.bank.queryAccount(target).then(res => console.log({"address": res.address, "coins": res.coins})).catch(e => console.error(e)) + let devHtlc: types.CreateHTLCResult = await devClient.htlc.create( + BaseTest.testTx, + target, + "qa", + [{ + denom: 'iris-atto', + amount: '3000000000000000000', + }], + '', '1000', ''); + console.info(devHtlc.secret) + console.info(devHtlc.hashLock) + await qaClient.bank.queryAccount(target).then(res => console.log({"address": res.address, "coins": res.coins})).catch(e => console.error(e)) + let qaHtlc: types.CreateHTLCResult = await qaClient.htlc.create( + BaseTest.testTx, + target, + "dev", + [{ + denom: 'iris-atto', + amount: '7000000000000000000', + }], + '', '100', devHtlc.hashLock + ''); + setTimeout(()=>{ + qaClient.htlc.claim(BaseTest.testTx, devHtlc.hashLock + '', devHtlc.secret + '').then(res => console.info(res)) + }, 10000) + while(!secret) { + try { + var queryHTLCResult = await qaClient.htlc.queryHTLC(devHtlc.hashLock+''); + console.log(queryHTLCResult) + secret = queryHTLCResult.secret + } catch (e) { + console.log('not found secret in qa htlc') + } + await sleep(3000) + } + devClient.htlc.claim(BaseTest.testTx, devHtlc.hashLock + '', secret).then(res => console.info(res)) + await sleep(5000) + await devClient.bank.queryAccount(target).then(res => console.log({"address": res.address, "coins": res.coins})).catch(e => console.error(e)) + await qaClient.bank.queryAccount(target).then(res => console.log({"address": res.address, "coins": res.coins})).catch(e => console.error(e)) + }) +}) + +describe('htlc', () => { + test('query htlc', async () => { + await BaseTest.getDevClient().htlc.queryHTLC('8ae0378a625cc8eda88ae35be2e3aae506298182d39fea3c0ce8f6e30cffdab4') + .then(res => { + console.log(JSON.stringify(res)); + }).catch(error => { + console.log(error); + }); + }); + test('create htlc', async () => { + BaseTest.getQaClient().htlc.create( + BaseTest.testTx, + "faa14utpczlzcefq7rtf6h5cp6zxj7lxp5z2yvlmgl", + "", + [{ + denom: 'iris-atto', + amount: '3000000000000000000', + }], + '', '1000', '6e8765153ae2964d66a213a2c0c152153a480695d9c393eb34e79c8458897f01', '' + ).then(res => { + console.log(JSON.stringify(res)); + }).catch(error => { + console.log(error); + }); + }); + test('claim htlc', async () => { + await BaseTest.getDevClient().htlc.claim(BaseTest.testTx, "8ae0378a625cc8eda88ae35be2e3aae506298182d39fea3c0ce8f6e30cffdab4", "17cfe0385ad68e820bcaa78f7b3883485153c715a63f349703cc6cf4736b0531") + .then(res => { + console.log(JSON.stringify(res)); + }).catch(error => { + console.log(error); + }); + }); + test('refund htlc', async () => { + await BaseTest.getDevClient().htlc.refund(BaseTest.testTx, "4131689eaf58210992841a9aabe37980225def96ae8f85849b18a95ce7746769") + .then(res => { + console.log(JSON.stringify(res)); + }).catch(error => { + console.log(error); + }); + }); +}); \ No newline at end of file From 8e02ad95d61835bbc028fa82455797dba909059c Mon Sep 17 00:00:00 2001 From: bianjie Date: Thu, 16 Apr 2020 19:05:06 +0800 Subject: [PATCH 02/15] modify bank unittest --- test/bank.test.ts | 186 +++++++++++++++++++++++++++++++--------------- test/basetest.ts | 9 +-- 2 files changed, 127 insertions(+), 68 deletions(-) diff --git a/test/bank.test.ts b/test/bank.test.ts index 06a6edf1..19da4926 100644 --- a/test/bank.test.ts +++ b/test/bank.test.ts @@ -1,107 +1,171 @@ import * as types from '../src/types'; import { BaseTest } from './basetest'; +import {Client} from "../src/client"; +import {SdkError} from "../src/errors"; const timeout = 10000; +let txExpect = function(res: any) { + console.log(JSON.stringify(res)); + expect(res).not.toBeNull(); + expect(res.hash).not.toBeNull(); + expect(res.tags).not.toBeNull(); +} describe('Bank Tests', () => { describe('Send', () => { - test( - 'send coins', + test('send coins ok', async () => { - const amount: types.Coin[] = [ - { + const target: string = 'faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7'; + const amount: types.Coin[] = [{ denom: 'iris-atto', amount: '1000000000000000000', - }, - ]; - - await BaseTest.getClient() - .bank.send( - 'faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7', - amount, - BaseTest.baseTx - ) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { + }]; + let client: Client = BaseTest.getClient(); + await client.bank.send(target, amount, BaseTest.baseTx + ).then(res => { + txExpect(res); + expect(res.tags == undefined? '': res.tags.filter(kv=>kv.key=='sender')[0].value).toEqual(client.keys.show(BaseTest.baseTx.from)); + expect(res.tags == undefined? '': res.tags.filter(kv=>kv.key=='recipient')[0].value).toEqual(target); + }).catch(error => { console.log(error); + expect(error).toBeNull(); }); - }, - timeout - ); + }, timeout); + test('send coins failed as fund not enough', + async () => { + const target: string = 'faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7'; + const amount: types.Coin[] = [{ + denom: 'iris-atto', + amount: '100000000000000000000000000000000000', + }]; + let client: Client = BaseTest.getClient(); + await client.bank.send(target, amount, BaseTest.baseTx + ).catch(error => { + console.log(error); + expect(error).not.toBeNull(); + expect(error.code).toEqual(10); // the message of code: 10 is "subtracting [100000000000000000000000000000000000iris-atto] from [1729814657319195035637027iris-atto,99999999999000000000000000000kbambo-min,995kflower-min,13700000000000000000000000000kfly-min,999899000mondex.sun-min] yields negative coin(s)" + }); + }, timeout); + test('send coins failed as unknown token', + async () => { + const target: string = 'faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7'; + const amount: types.Coin[] = [{ + denom: 'iris-attoooooooooooooooooo', + amount: '1000000000000000000', + }]; + let client: Client = BaseTest.getClient(); + await client.bank.send(target, amount, BaseTest.baseTx + ).catch(error => { + console.log(error); + expect(error).not.toBeNull(); + expect(error.code).toEqual(6); + }); + }, timeout); + test('send coins failed as target address wrong', + async () => { + const target: string = 'faa1nl2dxgelxu9ektxypyul8cdjp0x3k'; + const amount: types.Coin[] = [{ + denom: 'iris-atto', + amount: '1000000000000000000', + }]; + await BaseTest.getClient().bank.send(target, amount, BaseTest.baseTx).catch(error => { + console.log(error); + expect(() => {throw error}).toThrowError(new SdkError('Invalid bech32 address')); + }) + }, timeout); }); describe('Burn', () => { - test( - 'burn coins', + test('burn coins ok', async () => { - const amount: types.Coin[] = [ - { + const amount: types.Coin[] = [{ denom: 'iris-atto', - amount: '1000000000000000000', - }, - ]; - - await BaseTest.getClient() - .bank.burn(amount, BaseTest.baseTx) + amount: '100000000000000000', + }]; + await BaseTest.getClient().bank.burn(amount, BaseTest.baseTx) .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { + txExpect(res); + expect(res.tags == undefined? '': res.tags.filter(kv=>kv.key=='burnAmount')[0].value).toEqual(`${amount[0].amount}${amount[0].denom}`); + }).catch(error => { console.log(error); + expect(error).toBeNull(); }); - }, - timeout - ); - }); + }, timeout); + test('burn coins failed as unknown token', + async () => { + const amount: types.Coin[] = [{ + denom: 'iris-at', + amount: '100000000000000000', + }]; + await BaseTest.getClient().bank.burn(amount, BaseTest.baseTx).catch(error => { + console.log(error); + expect(() => {throw error}).toThrowError(new SdkError('Bad Request', 6)); + }); + }, timeout); + test('burn coins failed as fund not enough', + async () => { + const amount: types.Coin[] = [{ + denom: 'iris-atto', + amount: '100000000000000000000000000000000000', + }]; + await BaseTest.getClient().bank.burn(amount, BaseTest.baseTx).catch(error => { + console.log(error); + expect(() => {throw error}).toThrowError(SdkError); + }); + }, timeout); +}); describe('Set Memo Regexp', () => { - test( - 'set memo regexp', + test('set memo regexp ok', async () => { - await BaseTest.getClient() - .bank.setMemoRegexp('test*', BaseTest.baseTx) + let reg = 'test*'; + await BaseTest.getClient().bank.setMemoRegexp(reg, BaseTest.baseTx) .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { + txExpect(res); + expect(res.tags == undefined? '': res.tags.filter(kv=>kv.key=='memoRegexp')[0].value).toEqual(reg); + }).catch(error => { console.log(error); + expect(error).toBeNull(); }); - }, - timeout - ); + }, timeout); + test('set memo regexp failed as memo too length', + async () => { + let reg = 'test11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111*'; + await BaseTest.getClient().bank.setMemoRegexp(reg, BaseTest.baseTx).catch(error => { + console.log(error); + expect(() => {throw error}).toThrowError(SdkError); + }); + }, timeout); }); describe('Query Token Stats', () => { - test( - 'query single token stats', + test('query single token stats', async () => { await BaseTest.getClient() .bank.queryTokenStats('iris') .then(res => { console.log(JSON.stringify(res)); - }) - .catch(error => { + expect(res).not.toBeNull(); + expect(res).toHaveLength(1); + }).catch(error => { console.log(error); + expect(error).toBeNull(); }); - }, - timeout - ); + }, timeout); - test( - 'query all token stats', + test('query all token stats', async () => { await BaseTest.getClient() .bank.queryTokenStats() .then(res => { console.log(JSON.stringify(res)); - }) - .catch(error => { + expect(res).not.toBeNull(); + expect(res.total_supply.length).toBeGreaterThan(0); + expect(res.bonded_tokens).toBeNull(); + }).catch(error => { console.log(error); + expect(error).toBeNull(); }); - }, - timeout - ); + }, timeout); }); }); diff --git a/test/basetest.ts b/test/basetest.ts index 12475c89..dc95f0b2 100644 --- a/test/basetest.ts +++ b/test/basetest.ts @@ -29,11 +29,6 @@ export class BaseTest { mode: types.BroadcastMode.Commit, fee: { amount: '1', denom: 'iris' } }; - static testTx: types.BaseTx = { - from: "node0", - password: "12345678", - mode: types.BroadcastMode.Commit - } static getClient(): Client { const client = iris .newClient({ @@ -60,7 +55,7 @@ export class BaseTest { gas: '100000' }).withKeyDAO(new TestKeyDAO()) .withRpcConfig({timeout: Consts.timeout}); - client.keys.recover(this.testTx.from, this.testTx.password, + client.keys.recover(this.baseTx.from, this.baseTx.password, 'razor educate ostrich pave permit comic collect square believe decade scan day frozen language make winter lyrics spice dawn deliver jaguar arrest decline success'); return client; } @@ -72,7 +67,7 @@ export class BaseTest { gas: '100000' }).withKeyDAO(new TestKeyDAO()) .withRpcConfig({timeout: Consts.timeout}); - client.keys.recover(this.testTx.from, this.testTx.password, + client.keys.recover(this.baseTx.from, this.baseTx.password, 'arrow ignore inquiry lottery high ship crash leopard liar example never oval final fancy resist nuclear trip novel poem fine odor soccer bus lumber'); return client; } From f3ca233b3f782a38c62952cc614fbc46f0db51c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2020 16:26:54 +0000 Subject: [PATCH 03/15] Bump jquery from 3.4.1 to 3.5.0 Bumps [jquery](https://github.com/jquery/jquery) from 3.4.1 to 3.5.0. - [Release notes](https://github.com/jquery/jquery/releases) - [Commits](https://github.com/jquery/jquery/compare/3.4.1...3.5.0) Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 87c73a08..8cbaaa78 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3517,9 +3517,9 @@ jest@^25.1.0: jest-cli "^25.1.0" jquery@^3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.4.1.tgz#714f1f8d9dde4bdfa55764ba37ef214630d80ef2" - integrity sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw== + version "3.5.0" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.5.0.tgz#9980b97d9e4194611c36530e7dc46a58d7340fc9" + integrity sha512-Xb7SVYMvygPxbFMpTFQiHh1J7HClEaThguL15N/Gg37Lri/qKyhRGZYzHRyLH8Stq3Aow0LsHO2O2ci86fCrNQ== "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" From 0dd0e5d4edc9368f6d33a4fbb1bf9498e6039401 Mon Sep 17 00:00:00 2001 From: zhangyelong Date: Wed, 1 Jul 2020 14:35:08 +0800 Subject: [PATCH 04/15] add query withdraw address --- src/modules/distribution.ts | 15 +++++++++++++++ test/distribution.test.ts | 17 +++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/src/modules/distribution.ts b/src/modules/distribution.ts index 726bcab8..6e3bbc53 100644 --- a/src/modules/distribution.ts +++ b/src/modules/distribution.ts @@ -41,6 +41,21 @@ export class Distribution { ); } + /** + * Get the address of which the delegator receives the rewards + * @param delegatorAddress Bech32 account address + * @returns + * @since v0.17 + */ + queryWithdrawAddr(delegatorAddress: string): Promise { + return this.client.rpcClient.abciQuery( + 'custom/distr/withdraw_addr', + { + delegator_address: delegatorAddress, + } + ); + } + /** * Set another address to receive the rewards instead of using the delegator address * @param withdrawAddress Bech32 account address diff --git a/test/distribution.test.ts b/test/distribution.test.ts index b33bba05..047ac884 100644 --- a/test/distribution.test.ts +++ b/test/distribution.test.ts @@ -18,6 +18,23 @@ describe('Distribution Tests', () => { ); }); + describe('Query Withdraw Address', () => { + test( + 'query withdraw-addr', + async () => { + await BaseTest.getClient().distribution + .queryWithdrawAddr('iaa1gvq24a5vn7twjupf3l2t7pnd9l4fm7uwwm4ujp') + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + } + ); + }); + + describe('Set Withdraw Address', () => { test( 'set withdraw address', From a45631da158043bf3633a4731b090086c5a0184d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 19 Jul 2020 08:05:14 +0000 Subject: [PATCH 05/15] Bump lodash from 4.17.15 to 4.17.19 Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19) Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8cbaaa78..fa0d2042 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3729,9 +3729,9 @@ lodash.sortby@^4.7.0: integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= lodash@^4.17.13, lodash@^4.17.15: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" - integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + version "4.17.19" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" + integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== lolex@^5.0.0: version "5.1.2" From 4badb7af4ac0951179af4f28fe5231b3addcb1e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Aug 2020 11:04:23 +0000 Subject: [PATCH 06/15] Bump elliptic from 6.5.2 to 6.5.3 Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3) Signed-off-by: dependabot[bot] --- yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8cbaaa78..90d9b4a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1437,9 +1437,9 @@ bip66@^1.1.5: safe-buffer "^5.0.1" bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.11.8, bn.js@^4.4.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" - integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + version "4.11.9" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" + integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== boxen@^3.0.0: version "3.2.0" @@ -2173,9 +2173,9 @@ electron-to-chromium@^1.3.349: integrity sha512-qW4YHMfOFjvx0jkSK2vjaHoLjk1+uJIV5tqtLDo7P5y3/kM8KQP23YBU0Y5fCSW4jIbDvEzeHDaY4+4vEaqqOw== elliptic@^6.0.0, elliptic@^6.4.0, elliptic@^6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" - integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== + version "6.5.3" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" + integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== dependencies: bn.js "^4.4.0" brorand "^1.0.1" From 438738bd40569a0d33fedd539451106a750b9367 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Nov 2020 03:12:05 +0000 Subject: [PATCH 07/15] Bump highlight.js from 9.18.1 to 9.18.5 Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 9.18.1 to 9.18.5. - [Release notes](https://github.com/highlightjs/highlight.js/releases) - [Changelog](https://github.com/highlightjs/highlight.js/blob/9.18.5/CHANGES.md) - [Commits](https://github.com/highlightjs/highlight.js/compare/9.18.1...9.18.5) Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9e5d3716..908e4d65 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2751,9 +2751,9 @@ hash.js@^1.0.0, hash.js@^1.0.3: minimalistic-assert "^1.0.1" highlight.js@^9.17.1: - version "9.18.1" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.1.tgz#ed21aa001fe6252bb10a3d76d47573c6539fe13c" - integrity sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg== + version "9.18.5" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.5.tgz#d18a359867f378c138d6819edfc2a8acd5f29825" + integrity sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA== hmac-drbg@^1.0.0: version "1.0.1" From fbe70f5d8907d19f8f8d89a8db9ffa84de35c938 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 29 Nov 2020 08:38:10 +0000 Subject: [PATCH 08/15] Bump dot-prop from 4.2.0 to 4.2.1 Bumps [dot-prop](https://github.com/sindresorhus/dot-prop) from 4.2.0 to 4.2.1. - [Release notes](https://github.com/sindresorhus/dot-prop/releases) - [Commits](https://github.com/sindresorhus/dot-prop/compare/v4.2.0...v4.2.1) Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 908e4d65..b7f05cc3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2129,9 +2129,9 @@ domexception@^1.0.1: webidl-conversions "^4.0.2" dot-prop@^4.1.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" - integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ== + version "4.2.1" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.1.tgz#45884194a71fc2cda71cbb4bceb3a4dd2f433ba4" + integrity sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ== dependencies: is-obj "^1.0.0" From 19c0e172a992d43fc9d17ddeba2dc361b790365b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 12 Dec 2020 05:51:30 +0000 Subject: [PATCH 09/15] Bump ini from 1.3.5 to 1.3.8 Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8) Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index b7f05cc3..7d0b8c1a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2844,9 +2844,9 @@ inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== ini@^1.3.4, ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== inquirer@^7.0.0: version "7.0.4" From 37fb4cb2a276751c75b10de72a52e548bfb1a13b Mon Sep 17 00:00:00 2001 From: hangTaishan Date: Tue, 26 Jan 2021 14:34:35 +0800 Subject: [PATCH 10/15] #merge develop into master --- README.md | 262 + build/.eslintrc.json | 19 + build/index.js | 1 + build/webpack.common.js | 54 + build/webpack.config.js | 13 + build/webpack.development.js | 4 + build/webpack.node.js | 6 + build/webpack.production.js | 4 + build/webpack.web.js | 6 + dist/LICENSE | 201 + dist/README.md | 267 + dist/package.json | 81 + dist/src/client.d.ts | 26 +- dist/src/client.js | 393 +- dist/src/client.js.map | 1 - dist/src/errors.d.ts | 46 +- dist/src/errors.js | 201 +- dist/src/errors.js.map | 1 - dist/src/helper/index.d.ts | 3 + dist/src/helper/index.js | 44 + dist/src/helper/modelCreator.d.ts | 3 + dist/src/helper/modelCreator.js | 49 + dist/src/helper/txHelper.d.ts | 7 + dist/src/helper/txHelper.js | 61 + dist/src/helper/txModelCreator.d.ts | 13 + dist/src/helper/txModelCreator.js | 150 + dist/src/import.d.js | 1 + dist/src/index.d.ts | 6 +- dist/src/index.js | 59 +- dist/src/index.js.map | 1 - dist/src/modules/asset.d.ts | 46 - dist/src/modules/asset.js | 76 - dist/src/modules/asset.js.map | 1 - dist/src/modules/auth.d.ts | 11 +- dist/src/modules/auth.js | 159 +- dist/src/modules/auth.js.map | 1 - dist/src/modules/bank.d.ts | 65 +- dist/src/modules/bank.js | 327 +- dist/src/modules/bank.js.map | 1 - dist/src/modules/coinswap.d.ts | 98 + dist/src/modules/coinswap.js | 620 + dist/src/modules/distribution.d.ts | 76 +- dist/src/modules/distribution.js | 419 +- dist/src/modules/distribution.js.map | 1 - dist/src/modules/gov.js | 412 +- dist/src/modules/gov.js.map | 1 - dist/src/modules/index.d.ts | 5 +- dist/src/modules/index.js | 258 +- dist/src/modules/index.js.map | 1 - dist/src/modules/keys.d.ts | 25 +- dist/src/modules/keys.js | 438 +- dist/src/modules/keys.js.map | 1 - dist/src/modules/nft.d.ts | 107 + dist/src/modules/nft.js | 413 + dist/src/modules/oracle.js | 116 +- dist/src/modules/oracle.js.map | 1 - dist/src/modules/protobuf.d.ts | 61 + dist/src/modules/protobuf.js | 336 + dist/src/modules/random.d.ts | 8 - dist/src/modules/random.js | 163 +- dist/src/modules/random.js.map | 1 - dist/src/modules/service.js | 806 +- dist/src/modules/service.js.map | 1 - dist/src/modules/slashing.js | 153 +- dist/src/modules/slashing.js.map | 1 - dist/src/modules/stake.d.ts | 36 - dist/src/modules/stake.js | 142 - dist/src/modules/stake.js.map | 1 - dist/src/modules/staking.d.ts | 224 +- dist/src/modules/staking.js | 708 +- dist/src/modules/staking.js.map | 1 - dist/src/modules/tendermint.d.ts | 14 +- dist/src/modules/tendermint.js | 312 +- dist/src/modules/tendermint.js.map | 1 - dist/src/modules/token.d.ts | 88 + dist/src/modules/token.js | 336 + dist/src/modules/tx.d.ts | 49 +- dist/src/modules/tx.js | 686 +- dist/src/modules/tx.js.map | 1 - dist/src/modules/utils.d.ts | 3 + dist/src/modules/utils.js | 334 +- dist/src/modules/utils.js.map | 1 - dist/src/nets/event-listener.js | 836 +- dist/src/nets/event-listener.js.map | 1 - dist/src/nets/rpc-client.d.ts | 16 +- dist/src/nets/rpc-client.js | 265 +- dist/src/nets/rpc-client.js.map | 1 - dist/src/nets/ws-client.d.ts | 2 +- dist/src/nets/ws-client.js | 245 +- dist/src/nets/ws-client.js.map | 1 - dist/src/types/abci-query.d.ts | 2 +- dist/src/types/abci-query.js | 4 +- dist/src/types/abci-query.js.map | 1 - dist/src/types/asset.d.ts | 16 - dist/src/types/asset.js | 3 - dist/src/types/asset.js.map | 1 - dist/src/types/auth.d.ts | 24 +- dist/src/types/auth.js | 28 +- dist/src/types/auth.js.map | 1 - dist/src/types/bank.d.ts | 63 +- dist/src/types/bank.js | 187 +- dist/src/types/bank.js.map | 1 - dist/src/types/block-result.js | 4 +- dist/src/types/block-result.js.map | 1 - dist/src/types/block.js | 4 +- dist/src/types/block.js.map | 1 - dist/src/types/coinswap.d.ts | 45 + dist/src/types/coinswap.js | 129 + dist/src/types/constants.d.ts | 6 +- dist/src/types/constants.js | 58 +- dist/src/types/constants.js.map | 1 - dist/src/types/distribution.d.ts | 97 +- dist/src/types/distribution.js | 336 +- dist/src/types/distribution.js.map | 1 - dist/src/types/events.js | 23 +- dist/src/types/events.js.map | 1 - dist/src/types/gov.d.ts | 15 +- dist/src/types/gov.js | 384 +- dist/src/types/gov.js.map | 1 - dist/src/types/index.d.ts | 6 +- dist/src/types/index.js | 346 +- dist/src/types/index.js.map | 1 - dist/src/types/keystore.d.ts | 16 + dist/src/types/keystore.js | 50 +- dist/src/types/keystore.js.map | 1 - dist/src/types/nft.d.ts | 119 + dist/src/types/nft.js | 393 + dist/src/types/oracle.js | 4 +- dist/src/types/oracle.js.map | 1 - dist/src/types/params.js | 4 +- dist/src/types/params.js.map | 1 - .../src/types/proto-types/confio/proofs_pb.js | 3744 +++++ .../cosmos/auth/v1beta1/auth_pb.js | 815 ++ .../cosmos/auth/v1beta1/genesis_pb.js | 254 + .../cosmos/auth/v1beta1/query_grpc_web_pb.js | 246 + .../cosmos/auth/v1beta1/query_pb.js | 646 + .../cosmos/bank/v1beta1/bank_pb.js | 1531 ++ .../cosmos/bank/v1beta1/genesis_pb.js | 572 + .../cosmos/bank/v1beta1/query_grpc_web_pb.js | 486 + .../cosmos/bank/v1beta1/query_pb.js | 1742 +++ .../cosmos/bank/v1beta1/tx_grpc_web_pb.js | 242 + .../proto-types/cosmos/bank/v1beta1/tx_pb.js | 744 + .../cosmos/base/abci/v1beta1/abci_pb.js | 2582 ++++ .../cosmos/base/kv/v1beta1/kv_pb.js | 429 + .../base/query/v1beta1/pagination_pb.js | 487 + .../v1beta1/reflection_grpc_web_pb.js | 239 + .../base/reflection/v1beta1/reflection_pb.js | 648 + .../base/snapshots/v1beta1/snapshot_pb.js | 536 + .../base/store/v1beta1/commit_info_pb.js | 638 + .../cosmos/base/store/v1beta1/snapshot_pb.js | 710 + .../tendermint/v1beta1/query_grpc_web_pb.js | 571 + .../base/tendermint/v1beta1/query_pb.js | 3113 ++++ .../cosmos/base/v1beta1/coin_pb.js | 685 + .../capability/v1beta1/capability_pb.js | 533 + .../cosmos/capability/v1beta1/genesis_pb.js | 434 + .../cosmos/crisis/v1beta1/genesis_pb.js | 192 + .../cosmos/crisis/v1beta1/tx_grpc_web_pb.js | 158 + .../cosmos/crisis/v1beta1/tx_pb.js | 352 + .../cosmos/crypto/ed25519/keys_pb.js | 369 + .../cosmos/crypto/multisig/keys_pb.js | 231 + .../crypto/multisig/v1beta1/multisig_pb.js | 425 + .../cosmos/crypto/secp256k1/keys_pb.js | 369 + .../proto-types/cosmos/crypto/sm2/keys_pb.js | 369 + .../distribution/v1beta1/distribution_pb.js | 2563 ++++ .../cosmos/distribution/v1beta1/genesis_pb.js | 2182 +++ .../distribution/v1beta1/query_grpc_web_pb.js | 806 ++ .../cosmos/distribution/v1beta1/query_pb.js | 3157 +++++ .../distribution/v1beta1/tx_grpc_web_pb.js | 400 + .../cosmos/distribution/v1beta1/tx_pb.js | 1239 ++ .../cosmos/evidence/v1beta1/evidence_pb.js | 282 + .../cosmos/evidence/v1beta1/genesis_pb.js | 199 + .../evidence/v1beta1/query_grpc_web_pb.js | 244 + .../cosmos/evidence/v1beta1/query_pb.js | 778 + .../cosmos/evidence/v1beta1/tx_grpc_web_pb.js | 162 + .../cosmos/evidence/v1beta1/tx_pb.js | 400 + .../cosmos/genutil/v1beta1/genesis_pb.js | 219 + .../cosmos/gov/v1beta1/genesis_pb.js | 490 + .../proto-types/cosmos/gov/v1beta1/gov_pb.js | 2168 +++ .../cosmos/gov/v1beta1/query_grpc_web_pb.js | 724 + .../cosmos/gov/v1beta1/query_pb.js | 3178 +++++ .../cosmos/gov/v1beta1/tx_grpc_web_pb.js | 326 + .../proto-types/cosmos/gov/v1beta1/tx_pb.js | 1140 ++ .../cosmos/mint/v1beta1/genesis_pb.js | 243 + .../cosmos/mint/v1beta1/mint_pb.js | 501 + .../cosmos/mint/v1beta1/query_grpc_web_pb.js | 322 + .../cosmos/mint/v1beta1/query_pb.js | 915 ++ .../cosmos/params/v1beta1/params_pb.js | 471 + .../params/v1beta1/query_grpc_web_pb.js | 162 + .../cosmos/params/v1beta1/query_pb.js | 376 + .../cosmos/slashing/v1beta1/genesis_pb.js | 902 ++ .../slashing/v1beta1/query_grpc_web_pb.js | 324 + .../cosmos/slashing/v1beta1/query_pb.js | 1050 ++ .../cosmos/slashing/v1beta1/slashing_pb.js | 709 + .../cosmos/slashing/v1beta1/tx_grpc_web_pb.js | 158 + .../cosmos/slashing/v1beta1/tx_pb.js | 292 + .../cosmos/staking/v1beta1/genesis_pb.js | 730 + .../staking/v1beta1/query_grpc_web_pb.js | 1204 ++ .../cosmos/staking/v1beta1/query_pb.js | 5442 +++++++ .../cosmos/staking/v1beta1/staking_pb.js | 4840 +++++++ .../cosmos/staking/v1beta1/tx_grpc_web_pb.js | 488 + .../cosmos/staking/v1beta1/tx_pb.js | 2150 +++ .../cosmos/tx/signing/v1beta1/signing_pb.js | 1156 ++ .../cosmos/tx/v1beta1/service_grpc_web_pb.js | 406 + .../cosmos/tx/v1beta1/service_pb.js | 1703 +++ .../proto-types/cosmos/tx/v1beta1/tx_pb.js | 2672 ++++ .../upgrade/v1beta1/query_grpc_web_pb.js | 322 + .../cosmos/upgrade/v1beta1/query_pb.js | 946 ++ .../cosmos/upgrade/v1beta1/upgrade_pb.js | 750 + .../cosmos/vesting/v1beta1/tx_grpc_web_pb.js | 160 + .../cosmos/vesting/v1beta1/tx_pb.js | 444 + .../cosmos/vesting/v1beta1/vesting_pb.js | 1241 ++ .../proto-types/cosmos_proto/cosmos_pb.js | 95 + .../types/proto-types/gogoproto/gogo_pb.js | 2019 +++ .../proto-types/google/api/annotations_pb.js | 45 + .../types/proto-types/google/api/http_pb.js | 1003 ++ .../proto-types/google/api/httpbody_pb.js | 283 + .../proto-types/google/protobuf/any_pb.js | 274 + .../applications/transfer/v1/genesis_pb.js | 282 + .../transfer/v1/query_grpc_web_pb.js | 325 + .../ibc/applications/transfer/v1/query_pb.js | 1050 ++ .../applications/transfer/v1/transfer_pb.js | 623 + .../transfer/v1/tx_grpc_web_pb.js | 163 + .../ibc/applications/transfer/v1/tx_pb.js | 518 + .../ibc/core/channel/v1/channel_pb.js | 1863 +++ .../ibc/core/channel/v1/genesis_pb.js | 761 + .../ibc/core/channel/v1/query_grpc_web_pb.js | 1129 ++ .../ibc/core/channel/v1/query_pb.js | 6303 +++++++++ .../ibc/core/channel/v1/tx_grpc_web_pb.js | 883 ++ .../proto-types/ibc/core/channel/v1/tx_pb.js | 4505 ++++++ .../ibc/core/client/v1/client_pb.js | 1281 ++ .../ibc/core/client/v1/genesis_pb.js | 860 ++ .../ibc/core/client/v1/query_grpc_web_pb.js | 487 + .../ibc/core/client/v1/query_pb.js | 2113 +++ .../ibc/core/client/v1/tx_grpc_web_pb.js | 403 + .../proto-types/ibc/core/client/v1/tx_pb.js | 1625 +++ .../ibc/core/commitment/v1/commitment_pb.js | 731 + .../ibc/core/connection/v1/connection_pb.js | 1533 ++ .../ibc/core/connection/v1/genesis_pb.js | 284 + .../core/connection/v1/query_grpc_web_pb.js | 489 + .../ibc/core/connection/v1/query_pb.js | 2299 +++ .../ibc/core/connection/v1/tx_grpc_web_pb.js | 405 + .../ibc/core/connection/v1/tx_pb.js | 2362 ++++ .../ibc/core/types/v1/genesis_pb.js | 298 + .../lightclients/localhost/v1/localhost_pb.js | 222 + .../solomachine/v1/solomachine_pb.js | 3882 +++++ .../tendermint/v1/tendermint_pb.js | 1698 +++ .../irismod/coinswap/coinswap_pb.js | 628 + .../irismod/coinswap/genesis_pb.js | 192 + .../irismod/coinswap/query_grpc_web_pb.js | 161 + .../proto-types/irismod/coinswap/query_pb.js | 478 + .../irismod/coinswap/tx_grpc_web_pb.js | 321 + .../proto-types/irismod/coinswap/tx_pb.js | 1369 ++ .../proto-types/irismod/htlc/genesis_pb.js | 174 + .../types/proto-types/irismod/htlc/htlc_pb.js | 422 + .../irismod/htlc/query_grpc_web_pb.js | 159 + .../proto-types/irismod/htlc/query_pb.js | 344 + .../irismod/htlc/tx_grpc_web_pb.js | 319 + .../types/proto-types/irismod/htlc/tx_pb.js | 1144 ++ .../proto-types/irismod/nft/genesis_pb.js | 201 + .../types/proto-types/irismod/nft/nft_pb.js | 1184 ++ .../irismod/nft/query_grpc_web_pb.js | 561 + .../types/proto-types/irismod/nft/query_pb.js | 2020 +++ .../proto-types/irismod/nft/tx_grpc_web_pb.js | 477 + .../types/proto-types/irismod/nft/tx_pb.js | 2052 +++ .../proto-types/irismod/oracle/genesis_pb.js | 466 + .../proto-types/irismod/oracle/oracle_pb.js | 554 + .../irismod/oracle/query_grpc_web_pb.js | 325 + .../proto-types/irismod/oracle/query_pb.js | 1480 ++ .../irismod/oracle/tx_grpc_web_pb.js | 399 + .../types/proto-types/irismod/oracle/tx_pb.js | 1877 +++ .../proto-types/irismod/random/genesis_pb.js | 356 + .../irismod/random/query_grpc_web_pb.js | 241 + .../proto-types/irismod/random/query_pb.js | 680 + .../proto-types/irismod/random/random_pb.js | 563 + .../irismod/random/tx_grpc_web_pb.js | 159 + .../types/proto-types/irismod/random/tx_pb.js | 414 + .../proto-types/irismod/record/genesis_pb.js | 201 + .../irismod/record/query_grpc_web_pb.js | 159 + .../proto-types/irismod/record/query_pb.js | 344 + .../proto-types/irismod/record/record_pb.js | 501 + .../irismod/record/tx_grpc_web_pb.js | 159 + .../types/proto-types/irismod/record/tx_pb.js | 383 + .../proto-types/irismod/service/genesis_pb.js | 371 + .../irismod/service/query_grpc_web_pb.js | 1125 ++ .../proto-types/irismod/service/query_pb.js | 4425 ++++++ .../proto-types/irismod/service/service_pb.js | 3828 +++++ .../irismod/service/tx_grpc_web_pb.js | 1199 ++ .../proto-types/irismod/service/tx_pb.js | 5522 ++++++++ .../proto-types/irismod/token/genesis_pb.js | 252 + .../irismod/token/query_grpc_web_pb.js | 409 + .../proto-types/irismod/token/query_pb.js | 1441 ++ .../proto-types/irismod/token/token_pb.js | 614 + .../irismod/token/tx_grpc_web_pb.js | 397 + .../types/proto-types/irismod/token/tx_pb.js | 1597 +++ .../tendermint/abci/types_grpc_web_pb.js | 1287 ++ .../proto-types/tendermint/abci/types_pb.js | 11785 ++++++++++++++++ .../proto-types/tendermint/crypto/keys_pb.js | 310 + .../proto-types/tendermint/crypto/proof_pb.js | 1214 ++ .../tendermint/libs/bits/types_pb.js | 223 + .../proto-types/tendermint/p2p/types_pb.js | 1051 ++ .../proto-types/tendermint/types/block_pb.js | 347 + .../tendermint/types/evidence_pb.js | 1135 ++ .../proto-types/tendermint/types/params_pb.js | 1302 ++ .../proto-types/tendermint/types/types_pb.js | 4227 ++++++ .../tendermint/types/validator_pb.js | 772 + .../tendermint/version/types_pb.js | 381 + dist/src/types/proto.d.ts | 47 + dist/src/types/proto.js | 194 + dist/src/types/protoTx.d.ts | 64 + dist/src/types/protoTx.js | 222 + dist/src/types/query-builder.js | 186 +- dist/src/types/query-builder.js.map | 1 - dist/src/types/random.d.ts | 3 +- dist/src/types/random.js | 69 +- dist/src/types/random.js.map | 1 - dist/src/types/result-broadcast-tx.d.ts | 25 - dist/src/types/result-broadcast-tx.js | 13 - dist/src/types/result-broadcast-tx.js.map | 1 - dist/src/types/service.d.ts | 42 +- dist/src/types/service.js | 572 +- dist/src/types/service.js.map | 1 - dist/src/types/slashing.d.ts | 11 +- dist/src/types/slashing.js | 69 +- dist/src/types/slashing.js.map | 1 - dist/src/types/stake.d.ts | 91 - dist/src/types/stake.js | 51 - dist/src/types/stake.js.map | 1 - dist/src/types/staking.d.ts | 92 +- dist/src/types/staking.js | 283 +- dist/src/types/staking.js.map | 1 - dist/src/types/token.d.ts | 124 + dist/src/types/token.js | 318 + dist/src/types/tx.js | 4 +- dist/src/types/tx.js.map | 1 - dist/src/types/types.d.ts | 48 +- dist/src/types/types.js | 120 +- dist/src/types/types.js.map | 1 - dist/src/types/validator.js | 4 +- dist/src/types/validator.js.map | 1 - dist/src/utils/address.js | 40 +- dist/src/utils/address.js.map | 1 - dist/src/utils/crypto.d.ts | 65 +- dist/src/utils/crypto.js | 721 +- dist/src/utils/crypto.js.map | 1 - dist/src/utils/index.js | 65 +- dist/src/utils/index.js.map | 1 - dist/src/utils/store-keys.js | 62 +- dist/src/utils/store-keys.js.map | 1 - dist/src/utils/utils.d.ts | 7 + dist/src/utils/utils.js | 455 +- dist/src/utils/utils.js.map | 1 - dist/test/asset.test.d.ts | 1 - dist/test/asset.test.js | 44 - dist/test/asset.test.js.map | 1 - dist/test/bank.test.d.ts | 1 - dist/test/bank.test.js | 86 - dist/test/bank.test.js.map | 1 - dist/test/basetest.d.ts | 21 - dist/test/basetest.js | 48 - dist/test/basetest.js.map | 1 - dist/test/crypto.test.d.ts | 1 - dist/test/crypto.test.js | 34 - dist/test/crypto.test.js.map | 1 - dist/test/distribution.test.d.ts | 1 - dist/test/distribution.test.js | 77 - dist/test/distribution.test.js.map | 1 - dist/test/gov.test.d.ts | 1 - dist/test/gov.test.js | 168 - dist/test/gov.test.js.map | 1 - dist/test/index.test.d.ts | 1 - dist/test/index.test.js | 27 - dist/test/index.test.js.map | 1 - dist/test/jest.setup.d.ts | 6 - dist/test/jest.setup.js | 3 - dist/test/jest.setup.js.map | 1 - dist/test/keys.test.d.ts | 1 - dist/test/keys.test.js | 30 - dist/test/keys.test.js.map | 1 - dist/test/my.test.d.ts | 1 - dist/test/my.test.js | 69 - dist/test/my.test.js.map | 1 - dist/test/slashing.test.d.ts | 1 - dist/test/slashing.test.js | 56 - dist/test/slashing.test.js.map | 1 - dist/test/staking.test.d.ts | 1 - dist/test/staking.test.js | 183 - dist/test/staking.test.js.map | 1 - dist/test/tendermint.test.d.ts | 1 - dist/test/tendermint.test.js | 98 - dist/test/tendermint.test.js.map | 1 - dist/test/tx.test.d.ts | 1 - dist/test/tx.test.js | 89 - dist/test/tx.test.js.map | 1 - dist/test/utils.test.d.ts | 1 - dist/test/utils.test.js | 42 - dist/test/utils.test.js.map | 1 - index.js | 9 + index.ts | 1 + package.json | 42 +- prettier.config.js | 2 +- proto/cosmos/auth/v1beta1/auth.proto | 50 + proto/cosmos/auth/v1beta1/genesis.proto | 17 + proto/cosmos/auth/v1beta1/query.proto | 47 + proto/cosmos/bank/v1beta1/bank.proto | 85 + proto/cosmos/bank/v1beta1/genesis.proto | 38 + proto/cosmos/bank/v1beta1/query.proto | 111 + proto/cosmos/bank/v1beta1/tx.proto | 42 + proto/cosmos/base/abci/v1beta1/abci.proto | 137 + proto/cosmos/base/kv/v1beta1/kv.proto | 17 + .../base/query/v1beta1/pagination.proto | 50 + .../base/reflection/v1beta1/reflection.proto | 44 + .../base/snapshots/v1beta1/snapshot.proto | 20 + .../base/store/v1beta1/commit_info.proto | 29 + .../cosmos/base/store/v1beta1/snapshot.proto | 28 + .../base/tendermint/v1beta1/query.proto | 138 + proto/cosmos/base/v1beta1/coin.proto | 40 + .../capability/v1beta1/capability.proto | 30 + proto/cosmos/capability/v1beta1/genesis.proto | 26 + proto/cosmos/crisis/v1beta1/genesis.proto | 15 + proto/cosmos/crisis/v1beta1/tx.proto | 25 + proto/cosmos/crypto/ed25519/keys.proto | 22 + proto/cosmos/crypto/multisig/keys.proto | 18 + .../crypto/multisig/v1beta1/multisig.proto | 25 + proto/cosmos/crypto/secp256k1/keys.proto | 22 + proto/cosmos/crypto/sm2/keys.proto | 22 + .../distribution/v1beta1/distribution.proto | 157 + .../cosmos/distribution/v1beta1/genesis.proto | 155 + proto/cosmos/distribution/v1beta1/query.proto | 218 + proto/cosmos/distribution/v1beta1/tx.proto | 79 + proto/cosmos/evidence/v1beta1/evidence.proto | 21 + proto/cosmos/evidence/v1beta1/genesis.proto | 12 + proto/cosmos/evidence/v1beta1/query.proto | 51 + proto/cosmos/evidence/v1beta1/tx.proto | 32 + proto/cosmos/genutil/v1beta1/genesis.proto | 16 + proto/cosmos/gov/v1beta1/genesis.proto | 26 + proto/cosmos/gov/v1beta1/gov.proto | 183 + proto/cosmos/gov/v1beta1/query.proto | 190 + proto/cosmos/gov/v1beta1/tx.proto | 75 + proto/cosmos/mint/v1beta1/genesis.proto | 16 + proto/cosmos/mint/v1beta1/mint.proto | 53 + proto/cosmos/mint/v1beta1/query.proto | 57 + proto/cosmos/params/v1beta1/params.proto | 27 + proto/cosmos/params/v1beta1/query.proto | 32 + proto/cosmos/slashing/v1beta1/genesis.proto | 50 + proto/cosmos/slashing/v1beta1/query.proto | 63 + proto/cosmos/slashing/v1beta1/slashing.proto | 55 + proto/cosmos/slashing/v1beta1/tx.proto | 26 + proto/cosmos/staking/v1beta1/genesis.proto | 53 + proto/cosmos/staking/v1beta1/query.proto | 348 + proto/cosmos/staking/v1beta1/staking.proto | 290 + proto/cosmos/staking/v1beta1/tx.proto | 127 + proto/cosmos/tx/signing/v1beta1/signing.proto | 79 + proto/cosmos/tx/v1beta1/service.proto | 117 + proto/cosmos/tx/v1beta1/tx.proto | 182 + proto/cosmos/upgrade/v1beta1/query.proto | 68 + proto/cosmos/upgrade/v1beta1/upgrade.proto | 62 + proto/cosmos/vesting/v1beta1/tx.proto | 31 + proto/cosmos/vesting/v1beta1/vesting.proto | 73 + .../applications/transfer/v1/genesis.proto | 18 + .../ibc/applications/transfer/v1/query.proto | 66 + .../applications/transfer/v1/transfer.proto | 43 + proto/ibc/applications/transfer/v1/tx.proto | 43 + proto/ibc/core/channel/v1/channel.proto | 147 + proto/ibc/core/channel/v1/genesis.proto | 31 + proto/ibc/core/channel/v1/query.proto | 367 + proto/ibc/core/channel/v1/tx.proto | 207 + proto/ibc/core/client/v1/client.proto | 74 + proto/ibc/core/client/v1/genesis.proto | 46 + proto/ibc/core/client/v1/query.proto | 130 + proto/ibc/core/client/v1/tx.proto | 96 + proto/ibc/core/commitment/v1/commitment.proto | 40 + proto/ibc/core/connection/v1/connection.proto | 104 + proto/ibc/core/connection/v1/genesis.proto | 16 + proto/ibc/core/connection/v1/query.proto | 137 + proto/ibc/core/connection/v1/tx.proto | 115 + proto/ibc/core/types/v1/genesis.proto | 22 + .../lightclients/localhost/v1/localhost.proto | 17 + .../solomachine/v1/solomachine.proto | 186 + .../tendermint/v1/tendermint.proto | 111 + proto/irismod/coinswap/coinswap.proto | 30 + proto/irismod/coinswap/genesis.proto | 13 + proto/irismod/coinswap/query.proto | 29 + proto/irismod/coinswap/tx.proto | 60 + proto/irismod/htlc/genesis.proto | 12 + proto/irismod/htlc/htlc.proto | 36 + proto/irismod/htlc/query.proto | 26 + proto/irismod/htlc/tx.proto | 60 + proto/irismod/nft/genesis.proto | 13 + proto/irismod/nft/nft.proto | 49 + proto/irismod/nft/query.proto | 103 + proto/irismod/nft/tx.proto | 97 + proto/irismod/oracle/genesis.proto | 19 + proto/irismod/oracle/oracle.proto | 24 + proto/irismod/oracle/query.proto | 73 + proto/irismod/oracle/tx.proto | 76 + proto/irismod/random/genesis.proto | 16 + proto/irismod/random/query.proto | 41 + proto/irismod/random/random.proto | 24 + proto/irismod/random/tx.proto | 26 + proto/irismod/record/genesis.proto | 13 + proto/irismod/record/query.proto | 25 + proto/irismod/record/record.proto | 25 + proto/irismod/record/tx.proto | 28 + proto/irismod/service/genesis.proto | 16 + proto/irismod/service/query.proto | 214 + proto/irismod/service/service.proto | 152 + proto/irismod/service/tx.proto | 217 + proto/irismod/token/genesis.proto | 14 + proto/irismod/token/query.proto | 75 + proto/irismod/token/token.proto | 35 + proto/irismod/token/tx.proto | 70 + proto/third_party/confio/proofs.proto | 234 + proto/third_party/cosmos_proto/cosmos.proto | 16 + proto/third_party/gogoproto/gogo.proto | 145 + .../third_party/google/api/annotations.proto | 31 + proto/third_party/google/api/http.proto | 318 + proto/third_party/google/api/httpbody.proto | 78 + proto/third_party/google/protobuf/any.proto | 161 + proto/third_party/tendermint/abci/types.proto | 407 + .../third_party/tendermint/crypto/keys.proto | 17 + .../third_party/tendermint/crypto/proof.proto | 41 + .../tendermint/libs/bits/types.proto | 9 + proto/third_party/tendermint/p2p/types.proto | 34 + .../third_party/tendermint/types/block.proto | 15 + .../tendermint/types/evidence.proto | 38 + .../third_party/tendermint/types/params.proto | 80 + .../third_party/tendermint/types/types.proto | 157 + .../tendermint/types/validator.proto | 25 + .../tendermint/version/types.proto | 24 + scripts/protocgen.sh | 21 + src/client.ts | 73 +- src/errors.ts | 89 +- src/helper/index.ts | 3 + src/helper/modelCreator.ts | 20 + src/helper/txHelper.ts | 29 + src/helper/txModelCreator.ts | 108 + src/import.d.ts | 2 +- src/index.ts | 7 +- src/modules/asset.ts | 91 - src/modules/auth.ts | 69 +- src/modules/bank.ts | 207 +- src/modules/coinswap.ts | 422 + src/modules/distribution.ts | 283 +- src/modules/gov.ts | 1 + src/modules/htlc.ts | 117 - src/modules/index.ts | 6 +- src/modules/keys.ts | 139 +- src/modules/nft.ts | 299 + src/modules/oracle.ts | 10 +- src/modules/protobuf.ts | 238 + src/modules/random.ts | 37 +- src/modules/service.ts | 4 +- src/modules/slashing.ts | 21 +- src/modules/staking.ts | 688 +- src/modules/tendermint.ts | 39 +- src/modules/token.ts | 208 + src/modules/tx.ts | 318 +- src/modules/utils.ts | 24 +- src/nets/event-listener.ts | 29 +- src/nets/rpc-client.ts | 81 +- src/nets/ws-client.ts | 14 +- src/types/abci-query.ts | 2 +- src/types/asset.ts | 36 - src/types/auth.ts | 28 +- src/types/bank.ts | 127 +- src/types/coinswap.ts | 93 + src/types/constants.ts | 5 +- src/types/distribution.ts | 217 +- src/types/gov.ts | 43 +- src/types/htlc.ts | 95 - src/types/index.ts | 7 +- src/types/keystore.ts | 19 + src/types/nft.ts | 309 + src/types/proto-types/confio/proofs_pb.js | 3744 +++++ .../cosmos/auth/v1beta1/auth_pb.js | 815 ++ .../cosmos/auth/v1beta1/genesis_pb.js | 254 + .../cosmos/auth/v1beta1/query_grpc_web_pb.js | 246 + .../cosmos/auth/v1beta1/query_pb.js | 646 + .../cosmos/bank/v1beta1/bank_pb.js | 1531 ++ .../cosmos/bank/v1beta1/genesis_pb.js | 572 + .../cosmos/bank/v1beta1/query_grpc_web_pb.js | 486 + .../cosmos/bank/v1beta1/query_pb.js | 1742 +++ .../cosmos/bank/v1beta1/tx_grpc_web_pb.js | 242 + .../proto-types/cosmos/bank/v1beta1/tx_pb.js | 744 + .../cosmos/base/abci/v1beta1/abci_pb.js | 2582 ++++ .../cosmos/base/kv/v1beta1/kv_pb.js | 429 + .../base/query/v1beta1/pagination_pb.js | 487 + .../v1beta1/reflection_grpc_web_pb.js | 239 + .../base/reflection/v1beta1/reflection_pb.js | 648 + .../base/snapshots/v1beta1/snapshot_pb.js | 536 + .../base/store/v1beta1/commit_info_pb.js | 638 + .../cosmos/base/store/v1beta1/snapshot_pb.js | 710 + .../tendermint/v1beta1/query_grpc_web_pb.js | 571 + .../base/tendermint/v1beta1/query_pb.js | 3113 ++++ .../cosmos/base/v1beta1/coin_pb.js | 685 + .../capability/v1beta1/capability_pb.js | 533 + .../cosmos/capability/v1beta1/genesis_pb.js | 434 + .../cosmos/crisis/v1beta1/genesis_pb.js | 192 + .../cosmos/crisis/v1beta1/tx_grpc_web_pb.js | 158 + .../cosmos/crisis/v1beta1/tx_pb.js | 352 + .../cosmos/crypto/ed25519/keys_pb.js | 369 + .../cosmos/crypto/multisig/keys_pb.js | 231 + .../crypto/multisig/v1beta1/multisig_pb.js | 425 + .../cosmos/crypto/secp256k1/keys_pb.js | 369 + .../proto-types/cosmos/crypto/sm2/keys_pb.js | 369 + .../distribution/v1beta1/distribution_pb.js | 2563 ++++ .../cosmos/distribution/v1beta1/genesis_pb.js | 2182 +++ .../distribution/v1beta1/query_grpc_web_pb.js | 806 ++ .../cosmos/distribution/v1beta1/query_pb.js | 3157 +++++ .../distribution/v1beta1/tx_grpc_web_pb.js | 400 + .../cosmos/distribution/v1beta1/tx_pb.js | 1239 ++ .../cosmos/evidence/v1beta1/evidence_pb.js | 282 + .../cosmos/evidence/v1beta1/genesis_pb.js | 199 + .../evidence/v1beta1/query_grpc_web_pb.js | 244 + .../cosmos/evidence/v1beta1/query_pb.js | 778 + .../cosmos/evidence/v1beta1/tx_grpc_web_pb.js | 162 + .../cosmos/evidence/v1beta1/tx_pb.js | 400 + .../cosmos/genutil/v1beta1/genesis_pb.js | 219 + .../cosmos/gov/v1beta1/genesis_pb.js | 490 + .../proto-types/cosmos/gov/v1beta1/gov_pb.js | 2168 +++ .../cosmos/gov/v1beta1/query_grpc_web_pb.js | 724 + .../cosmos/gov/v1beta1/query_pb.js | 3178 +++++ .../cosmos/gov/v1beta1/tx_grpc_web_pb.js | 326 + .../proto-types/cosmos/gov/v1beta1/tx_pb.js | 1140 ++ .../cosmos/mint/v1beta1/genesis_pb.js | 243 + .../cosmos/mint/v1beta1/mint_pb.js | 501 + .../cosmos/mint/v1beta1/query_grpc_web_pb.js | 322 + .../cosmos/mint/v1beta1/query_pb.js | 915 ++ .../cosmos/params/v1beta1/params_pb.js | 471 + .../params/v1beta1/query_grpc_web_pb.js | 162 + .../cosmos/params/v1beta1/query_pb.js | 376 + .../cosmos/slashing/v1beta1/genesis_pb.js | 902 ++ .../slashing/v1beta1/query_grpc_web_pb.js | 324 + .../cosmos/slashing/v1beta1/query_pb.js | 1050 ++ .../cosmos/slashing/v1beta1/slashing_pb.js | 709 + .../cosmos/slashing/v1beta1/tx_grpc_web_pb.js | 158 + .../cosmos/slashing/v1beta1/tx_pb.js | 292 + .../cosmos/staking/v1beta1/genesis_pb.js | 730 + .../staking/v1beta1/query_grpc_web_pb.js | 1204 ++ .../cosmos/staking/v1beta1/query_pb.js | 5442 +++++++ .../cosmos/staking/v1beta1/staking_pb.js | 4840 +++++++ .../cosmos/staking/v1beta1/tx_grpc_web_pb.js | 488 + .../cosmos/staking/v1beta1/tx_pb.js | 2150 +++ .../cosmos/tx/signing/v1beta1/signing_pb.js | 1156 ++ .../cosmos/tx/v1beta1/service_grpc_web_pb.js | 406 + .../cosmos/tx/v1beta1/service_pb.js | 1703 +++ .../proto-types/cosmos/tx/v1beta1/tx_pb.js | 2672 ++++ .../upgrade/v1beta1/query_grpc_web_pb.js | 322 + .../cosmos/upgrade/v1beta1/query_pb.js | 946 ++ .../cosmos/upgrade/v1beta1/upgrade_pb.js | 750 + .../cosmos/vesting/v1beta1/tx_grpc_web_pb.js | 160 + .../cosmos/vesting/v1beta1/tx_pb.js | 444 + .../cosmos/vesting/v1beta1/vesting_pb.js | 1241 ++ .../proto-types/cosmos_proto/cosmos_pb.js | 95 + src/types/proto-types/gogoproto/gogo_pb.js | 2019 +++ .../proto-types/google/api/annotations_pb.js | 45 + src/types/proto-types/google/api/http_pb.js | 1003 ++ .../proto-types/google/api/httpbody_pb.js | 283 + .../proto-types/google/protobuf/any_pb.js | 274 + .../applications/transfer/v1/genesis_pb.js | 282 + .../transfer/v1/query_grpc_web_pb.js | 325 + .../ibc/applications/transfer/v1/query_pb.js | 1050 ++ .../applications/transfer/v1/transfer_pb.js | 623 + .../transfer/v1/tx_grpc_web_pb.js | 163 + .../ibc/applications/transfer/v1/tx_pb.js | 518 + .../ibc/core/channel/v1/channel_pb.js | 1863 +++ .../ibc/core/channel/v1/genesis_pb.js | 761 + .../ibc/core/channel/v1/query_grpc_web_pb.js | 1129 ++ .../ibc/core/channel/v1/query_pb.js | 6303 +++++++++ .../ibc/core/channel/v1/tx_grpc_web_pb.js | 883 ++ .../proto-types/ibc/core/channel/v1/tx_pb.js | 4505 ++++++ .../ibc/core/client/v1/client_pb.js | 1281 ++ .../ibc/core/client/v1/genesis_pb.js | 860 ++ .../ibc/core/client/v1/query_grpc_web_pb.js | 487 + .../ibc/core/client/v1/query_pb.js | 2113 +++ .../ibc/core/client/v1/tx_grpc_web_pb.js | 403 + .../proto-types/ibc/core/client/v1/tx_pb.js | 1625 +++ .../ibc/core/commitment/v1/commitment_pb.js | 731 + .../ibc/core/connection/v1/connection_pb.js | 1533 ++ .../ibc/core/connection/v1/genesis_pb.js | 284 + .../core/connection/v1/query_grpc_web_pb.js | 489 + .../ibc/core/connection/v1/query_pb.js | 2299 +++ .../ibc/core/connection/v1/tx_grpc_web_pb.js | 405 + .../ibc/core/connection/v1/tx_pb.js | 2362 ++++ .../ibc/core/types/v1/genesis_pb.js | 298 + .../lightclients/localhost/v1/localhost_pb.js | 222 + .../solomachine/v1/solomachine_pb.js | 3882 +++++ .../tendermint/v1/tendermint_pb.js | 1698 +++ .../irismod/coinswap/coinswap_pb.js | 628 + .../irismod/coinswap/genesis_pb.js | 192 + .../irismod/coinswap/query_grpc_web_pb.js | 161 + .../proto-types/irismod/coinswap/query_pb.js | 478 + .../irismod/coinswap/tx_grpc_web_pb.js | 321 + .../proto-types/irismod/coinswap/tx_pb.js | 1369 ++ .../proto-types/irismod/htlc/genesis_pb.js | 174 + src/types/proto-types/irismod/htlc/htlc_pb.js | 422 + .../irismod/htlc/query_grpc_web_pb.js | 159 + .../proto-types/irismod/htlc/query_pb.js | 344 + .../irismod/htlc/tx_grpc_web_pb.js | 319 + src/types/proto-types/irismod/htlc/tx_pb.js | 1144 ++ .../proto-types/irismod/nft/genesis_pb.js | 201 + src/types/proto-types/irismod/nft/nft_pb.js | 1184 ++ .../irismod/nft/query_grpc_web_pb.js | 561 + src/types/proto-types/irismod/nft/query_pb.js | 2020 +++ .../proto-types/irismod/nft/tx_grpc_web_pb.js | 477 + src/types/proto-types/irismod/nft/tx_pb.js | 2052 +++ .../proto-types/irismod/oracle/genesis_pb.js | 466 + .../proto-types/irismod/oracle/oracle_pb.js | 554 + .../irismod/oracle/query_grpc_web_pb.js | 325 + .../proto-types/irismod/oracle/query_pb.js | 1480 ++ .../irismod/oracle/tx_grpc_web_pb.js | 399 + src/types/proto-types/irismod/oracle/tx_pb.js | 1877 +++ .../proto-types/irismod/random/genesis_pb.js | 356 + .../irismod/random/query_grpc_web_pb.js | 241 + .../proto-types/irismod/random/query_pb.js | 680 + .../proto-types/irismod/random/random_pb.js | 563 + .../irismod/random/tx_grpc_web_pb.js | 159 + src/types/proto-types/irismod/random/tx_pb.js | 414 + .../proto-types/irismod/record/genesis_pb.js | 201 + .../irismod/record/query_grpc_web_pb.js | 159 + .../proto-types/irismod/record/query_pb.js | 344 + .../proto-types/irismod/record/record_pb.js | 501 + .../irismod/record/tx_grpc_web_pb.js | 159 + src/types/proto-types/irismod/record/tx_pb.js | 383 + .../proto-types/irismod/service/genesis_pb.js | 371 + .../irismod/service/query_grpc_web_pb.js | 1125 ++ .../proto-types/irismod/service/query_pb.js | 4425 ++++++ .../proto-types/irismod/service/service_pb.js | 3828 +++++ .../irismod/service/tx_grpc_web_pb.js | 1199 ++ .../proto-types/irismod/service/tx_pb.js | 5522 ++++++++ .../proto-types/irismod/token/genesis_pb.js | 252 + .../irismod/token/query_grpc_web_pb.js | 409 + .../proto-types/irismod/token/query_pb.js | 1441 ++ .../proto-types/irismod/token/token_pb.js | 614 + .../irismod/token/tx_grpc_web_pb.js | 397 + src/types/proto-types/irismod/token/tx_pb.js | 1597 +++ .../tendermint/abci/types_grpc_web_pb.js | 1287 ++ .../proto-types/tendermint/abci/types_pb.js | 11785 ++++++++++++++++ .../proto-types/tendermint/crypto/keys_pb.js | 310 + .../proto-types/tendermint/crypto/proof_pb.js | 1214 ++ .../tendermint/libs/bits/types_pb.js | 223 + .../proto-types/tendermint/p2p/types_pb.js | 1051 ++ .../proto-types/tendermint/types/block_pb.js | 347 + .../tendermint/types/evidence_pb.js | 1135 ++ .../proto-types/tendermint/types/params_pb.js | 1302 ++ .../proto-types/tendermint/types/types_pb.js | 4227 ++++++ .../tendermint/types/validator_pb.js | 772 + .../tendermint/version/types_pb.js | 381 + src/types/proto.ts | 58 + src/types/protoTx.ts | 169 + src/types/query-builder.ts | 4 +- src/types/random.ts | 6 +- src/types/service.ts | 71 +- src/types/slashing.ts | 13 +- src/types/staking.ts | 207 +- src/types/token.ts | 280 + src/types/types.ts | 81 +- src/utils/crypto.ts | 279 +- src/utils/utils.ts | 62 +- test/asset.test.ts | 46 - test/auth.test.ts | 38 + test/bank.test.ts | 236 +- test/basetest.ts | 72 +- test/coinswap.test.ts | 89 + test/crypto.test.ts | 10 + test/distribution.test.ts | 310 +- test/htlc.test.ts | 101 - test/keys.test.ts | 21 +- test/my.test.ts | 175 - test/nft.test.ts | 225 + test/protobuf.test.ts | 65 + test/staking.test.ts | 160 +- test/tendermint.test.ts | 28 +- test/token.test.ts | 135 + test/tx.test.ts | 156 +- tsconfig.json | 48 +- yarn.lock | 3933 ++++-- 777 files changed, 405110 insertions(+), 8656 deletions(-) create mode 100644 build/.eslintrc.json create mode 100644 build/index.js create mode 100644 build/webpack.common.js create mode 100644 build/webpack.config.js create mode 100644 build/webpack.development.js create mode 100644 build/webpack.node.js create mode 100644 build/webpack.production.js create mode 100644 build/webpack.web.js create mode 100644 dist/LICENSE create mode 100644 dist/README.md create mode 100644 dist/package.json delete mode 100644 dist/src/client.js.map delete mode 100644 dist/src/errors.js.map create mode 100644 dist/src/helper/index.d.ts create mode 100644 dist/src/helper/index.js create mode 100644 dist/src/helper/modelCreator.d.ts create mode 100644 dist/src/helper/modelCreator.js create mode 100644 dist/src/helper/txHelper.d.ts create mode 100644 dist/src/helper/txHelper.js create mode 100644 dist/src/helper/txModelCreator.d.ts create mode 100644 dist/src/helper/txModelCreator.js create mode 100644 dist/src/import.d.js delete mode 100644 dist/src/index.js.map delete mode 100644 dist/src/modules/asset.d.ts delete mode 100644 dist/src/modules/asset.js delete mode 100644 dist/src/modules/asset.js.map delete mode 100644 dist/src/modules/auth.js.map delete mode 100644 dist/src/modules/bank.js.map create mode 100644 dist/src/modules/coinswap.d.ts create mode 100644 dist/src/modules/coinswap.js delete mode 100644 dist/src/modules/distribution.js.map delete mode 100644 dist/src/modules/gov.js.map delete mode 100644 dist/src/modules/index.js.map delete mode 100644 dist/src/modules/keys.js.map create mode 100644 dist/src/modules/nft.d.ts create mode 100644 dist/src/modules/nft.js delete mode 100644 dist/src/modules/oracle.js.map create mode 100644 dist/src/modules/protobuf.d.ts create mode 100644 dist/src/modules/protobuf.js delete mode 100644 dist/src/modules/random.js.map delete mode 100644 dist/src/modules/service.js.map delete mode 100644 dist/src/modules/slashing.js.map delete mode 100644 dist/src/modules/stake.d.ts delete mode 100644 dist/src/modules/stake.js delete mode 100644 dist/src/modules/stake.js.map delete mode 100644 dist/src/modules/staking.js.map delete mode 100644 dist/src/modules/tendermint.js.map create mode 100644 dist/src/modules/token.d.ts create mode 100644 dist/src/modules/token.js delete mode 100644 dist/src/modules/tx.js.map delete mode 100644 dist/src/modules/utils.js.map delete mode 100644 dist/src/nets/event-listener.js.map delete mode 100644 dist/src/nets/rpc-client.js.map delete mode 100644 dist/src/nets/ws-client.js.map delete mode 100644 dist/src/types/abci-query.js.map delete mode 100644 dist/src/types/asset.d.ts delete mode 100644 dist/src/types/asset.js delete mode 100644 dist/src/types/asset.js.map delete mode 100644 dist/src/types/auth.js.map delete mode 100644 dist/src/types/bank.js.map delete mode 100644 dist/src/types/block-result.js.map delete mode 100644 dist/src/types/block.js.map create mode 100644 dist/src/types/coinswap.d.ts create mode 100644 dist/src/types/coinswap.js delete mode 100644 dist/src/types/constants.js.map delete mode 100644 dist/src/types/distribution.js.map delete mode 100644 dist/src/types/events.js.map delete mode 100644 dist/src/types/gov.js.map delete mode 100644 dist/src/types/index.js.map delete mode 100644 dist/src/types/keystore.js.map create mode 100644 dist/src/types/nft.d.ts create mode 100644 dist/src/types/nft.js delete mode 100644 dist/src/types/oracle.js.map delete mode 100644 dist/src/types/params.js.map create mode 100644 dist/src/types/proto-types/confio/proofs_pb.js create mode 100644 dist/src/types/proto-types/cosmos/auth/v1beta1/auth_pb.js create mode 100644 dist/src/types/proto-types/cosmos/auth/v1beta1/genesis_pb.js create mode 100644 dist/src/types/proto-types/cosmos/auth/v1beta1/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/auth/v1beta1/query_pb.js create mode 100644 dist/src/types/proto-types/cosmos/bank/v1beta1/bank_pb.js create mode 100644 dist/src/types/proto-types/cosmos/bank/v1beta1/genesis_pb.js create mode 100644 dist/src/types/proto-types/cosmos/bank/v1beta1/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/bank/v1beta1/query_pb.js create mode 100644 dist/src/types/proto-types/cosmos/bank/v1beta1/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/bank/v1beta1/tx_pb.js create mode 100644 dist/src/types/proto-types/cosmos/base/abci/v1beta1/abci_pb.js create mode 100644 dist/src/types/proto-types/cosmos/base/kv/v1beta1/kv_pb.js create mode 100644 dist/src/types/proto-types/cosmos/base/query/v1beta1/pagination_pb.js create mode 100644 dist/src/types/proto-types/cosmos/base/reflection/v1beta1/reflection_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/base/reflection/v1beta1/reflection_pb.js create mode 100644 dist/src/types/proto-types/cosmos/base/snapshots/v1beta1/snapshot_pb.js create mode 100644 dist/src/types/proto-types/cosmos/base/store/v1beta1/commit_info_pb.js create mode 100644 dist/src/types/proto-types/cosmos/base/store/v1beta1/snapshot_pb.js create mode 100644 dist/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_pb.js create mode 100644 dist/src/types/proto-types/cosmos/base/v1beta1/coin_pb.js create mode 100644 dist/src/types/proto-types/cosmos/capability/v1beta1/capability_pb.js create mode 100644 dist/src/types/proto-types/cosmos/capability/v1beta1/genesis_pb.js create mode 100644 dist/src/types/proto-types/cosmos/crisis/v1beta1/genesis_pb.js create mode 100644 dist/src/types/proto-types/cosmos/crisis/v1beta1/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/crisis/v1beta1/tx_pb.js create mode 100644 dist/src/types/proto-types/cosmos/crypto/ed25519/keys_pb.js create mode 100644 dist/src/types/proto-types/cosmos/crypto/multisig/keys_pb.js create mode 100644 dist/src/types/proto-types/cosmos/crypto/multisig/v1beta1/multisig_pb.js create mode 100644 dist/src/types/proto-types/cosmos/crypto/secp256k1/keys_pb.js create mode 100644 dist/src/types/proto-types/cosmos/crypto/sm2/keys_pb.js create mode 100644 dist/src/types/proto-types/cosmos/distribution/v1beta1/distribution_pb.js create mode 100644 dist/src/types/proto-types/cosmos/distribution/v1beta1/genesis_pb.js create mode 100644 dist/src/types/proto-types/cosmos/distribution/v1beta1/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/distribution/v1beta1/query_pb.js create mode 100644 dist/src/types/proto-types/cosmos/distribution/v1beta1/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/distribution/v1beta1/tx_pb.js create mode 100644 dist/src/types/proto-types/cosmos/evidence/v1beta1/evidence_pb.js create mode 100644 dist/src/types/proto-types/cosmos/evidence/v1beta1/genesis_pb.js create mode 100644 dist/src/types/proto-types/cosmos/evidence/v1beta1/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/evidence/v1beta1/query_pb.js create mode 100644 dist/src/types/proto-types/cosmos/evidence/v1beta1/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/evidence/v1beta1/tx_pb.js create mode 100644 dist/src/types/proto-types/cosmos/genutil/v1beta1/genesis_pb.js create mode 100644 dist/src/types/proto-types/cosmos/gov/v1beta1/genesis_pb.js create mode 100644 dist/src/types/proto-types/cosmos/gov/v1beta1/gov_pb.js create mode 100644 dist/src/types/proto-types/cosmos/gov/v1beta1/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/gov/v1beta1/query_pb.js create mode 100644 dist/src/types/proto-types/cosmos/gov/v1beta1/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/gov/v1beta1/tx_pb.js create mode 100644 dist/src/types/proto-types/cosmos/mint/v1beta1/genesis_pb.js create mode 100644 dist/src/types/proto-types/cosmos/mint/v1beta1/mint_pb.js create mode 100644 dist/src/types/proto-types/cosmos/mint/v1beta1/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/mint/v1beta1/query_pb.js create mode 100644 dist/src/types/proto-types/cosmos/params/v1beta1/params_pb.js create mode 100644 dist/src/types/proto-types/cosmos/params/v1beta1/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/params/v1beta1/query_pb.js create mode 100644 dist/src/types/proto-types/cosmos/slashing/v1beta1/genesis_pb.js create mode 100644 dist/src/types/proto-types/cosmos/slashing/v1beta1/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/slashing/v1beta1/query_pb.js create mode 100644 dist/src/types/proto-types/cosmos/slashing/v1beta1/slashing_pb.js create mode 100644 dist/src/types/proto-types/cosmos/slashing/v1beta1/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/slashing/v1beta1/tx_pb.js create mode 100644 dist/src/types/proto-types/cosmos/staking/v1beta1/genesis_pb.js create mode 100644 dist/src/types/proto-types/cosmos/staking/v1beta1/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/staking/v1beta1/query_pb.js create mode 100644 dist/src/types/proto-types/cosmos/staking/v1beta1/staking_pb.js create mode 100644 dist/src/types/proto-types/cosmos/staking/v1beta1/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/staking/v1beta1/tx_pb.js create mode 100644 dist/src/types/proto-types/cosmos/tx/signing/v1beta1/signing_pb.js create mode 100644 dist/src/types/proto-types/cosmos/tx/v1beta1/service_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/tx/v1beta1/service_pb.js create mode 100644 dist/src/types/proto-types/cosmos/tx/v1beta1/tx_pb.js create mode 100644 dist/src/types/proto-types/cosmos/upgrade/v1beta1/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/upgrade/v1beta1/query_pb.js create mode 100644 dist/src/types/proto-types/cosmos/upgrade/v1beta1/upgrade_pb.js create mode 100644 dist/src/types/proto-types/cosmos/vesting/v1beta1/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/cosmos/vesting/v1beta1/tx_pb.js create mode 100644 dist/src/types/proto-types/cosmos/vesting/v1beta1/vesting_pb.js create mode 100644 dist/src/types/proto-types/cosmos_proto/cosmos_pb.js create mode 100644 dist/src/types/proto-types/gogoproto/gogo_pb.js create mode 100644 dist/src/types/proto-types/google/api/annotations_pb.js create mode 100644 dist/src/types/proto-types/google/api/http_pb.js create mode 100644 dist/src/types/proto-types/google/api/httpbody_pb.js create mode 100644 dist/src/types/proto-types/google/protobuf/any_pb.js create mode 100644 dist/src/types/proto-types/ibc/applications/transfer/v1/genesis_pb.js create mode 100644 dist/src/types/proto-types/ibc/applications/transfer/v1/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/ibc/applications/transfer/v1/query_pb.js create mode 100644 dist/src/types/proto-types/ibc/applications/transfer/v1/transfer_pb.js create mode 100644 dist/src/types/proto-types/ibc/applications/transfer/v1/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/ibc/applications/transfer/v1/tx_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/channel/v1/channel_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/channel/v1/genesis_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/channel/v1/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/channel/v1/query_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/channel/v1/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/channel/v1/tx_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/client/v1/client_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/client/v1/genesis_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/client/v1/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/client/v1/query_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/client/v1/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/client/v1/tx_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/commitment/v1/commitment_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/connection/v1/connection_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/connection/v1/genesis_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/connection/v1/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/connection/v1/query_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/connection/v1/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/connection/v1/tx_pb.js create mode 100644 dist/src/types/proto-types/ibc/core/types/v1/genesis_pb.js create mode 100644 dist/src/types/proto-types/ibc/lightclients/localhost/v1/localhost_pb.js create mode 100644 dist/src/types/proto-types/ibc/lightclients/solomachine/v1/solomachine_pb.js create mode 100644 dist/src/types/proto-types/ibc/lightclients/tendermint/v1/tendermint_pb.js create mode 100644 dist/src/types/proto-types/irismod/coinswap/coinswap_pb.js create mode 100644 dist/src/types/proto-types/irismod/coinswap/genesis_pb.js create mode 100644 dist/src/types/proto-types/irismod/coinswap/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/irismod/coinswap/query_pb.js create mode 100644 dist/src/types/proto-types/irismod/coinswap/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/irismod/coinswap/tx_pb.js create mode 100644 dist/src/types/proto-types/irismod/htlc/genesis_pb.js create mode 100644 dist/src/types/proto-types/irismod/htlc/htlc_pb.js create mode 100644 dist/src/types/proto-types/irismod/htlc/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/irismod/htlc/query_pb.js create mode 100644 dist/src/types/proto-types/irismod/htlc/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/irismod/htlc/tx_pb.js create mode 100644 dist/src/types/proto-types/irismod/nft/genesis_pb.js create mode 100644 dist/src/types/proto-types/irismod/nft/nft_pb.js create mode 100644 dist/src/types/proto-types/irismod/nft/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/irismod/nft/query_pb.js create mode 100644 dist/src/types/proto-types/irismod/nft/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/irismod/nft/tx_pb.js create mode 100644 dist/src/types/proto-types/irismod/oracle/genesis_pb.js create mode 100644 dist/src/types/proto-types/irismod/oracle/oracle_pb.js create mode 100644 dist/src/types/proto-types/irismod/oracle/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/irismod/oracle/query_pb.js create mode 100644 dist/src/types/proto-types/irismod/oracle/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/irismod/oracle/tx_pb.js create mode 100644 dist/src/types/proto-types/irismod/random/genesis_pb.js create mode 100644 dist/src/types/proto-types/irismod/random/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/irismod/random/query_pb.js create mode 100644 dist/src/types/proto-types/irismod/random/random_pb.js create mode 100644 dist/src/types/proto-types/irismod/random/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/irismod/random/tx_pb.js create mode 100644 dist/src/types/proto-types/irismod/record/genesis_pb.js create mode 100644 dist/src/types/proto-types/irismod/record/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/irismod/record/query_pb.js create mode 100644 dist/src/types/proto-types/irismod/record/record_pb.js create mode 100644 dist/src/types/proto-types/irismod/record/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/irismod/record/tx_pb.js create mode 100644 dist/src/types/proto-types/irismod/service/genesis_pb.js create mode 100644 dist/src/types/proto-types/irismod/service/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/irismod/service/query_pb.js create mode 100644 dist/src/types/proto-types/irismod/service/service_pb.js create mode 100644 dist/src/types/proto-types/irismod/service/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/irismod/service/tx_pb.js create mode 100644 dist/src/types/proto-types/irismod/token/genesis_pb.js create mode 100644 dist/src/types/proto-types/irismod/token/query_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/irismod/token/query_pb.js create mode 100644 dist/src/types/proto-types/irismod/token/token_pb.js create mode 100644 dist/src/types/proto-types/irismod/token/tx_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/irismod/token/tx_pb.js create mode 100644 dist/src/types/proto-types/tendermint/abci/types_grpc_web_pb.js create mode 100644 dist/src/types/proto-types/tendermint/abci/types_pb.js create mode 100644 dist/src/types/proto-types/tendermint/crypto/keys_pb.js create mode 100644 dist/src/types/proto-types/tendermint/crypto/proof_pb.js create mode 100644 dist/src/types/proto-types/tendermint/libs/bits/types_pb.js create mode 100644 dist/src/types/proto-types/tendermint/p2p/types_pb.js create mode 100644 dist/src/types/proto-types/tendermint/types/block_pb.js create mode 100644 dist/src/types/proto-types/tendermint/types/evidence_pb.js create mode 100644 dist/src/types/proto-types/tendermint/types/params_pb.js create mode 100644 dist/src/types/proto-types/tendermint/types/types_pb.js create mode 100644 dist/src/types/proto-types/tendermint/types/validator_pb.js create mode 100644 dist/src/types/proto-types/tendermint/version/types_pb.js create mode 100644 dist/src/types/proto.d.ts create mode 100644 dist/src/types/proto.js create mode 100644 dist/src/types/protoTx.d.ts create mode 100644 dist/src/types/protoTx.js delete mode 100644 dist/src/types/query-builder.js.map delete mode 100644 dist/src/types/random.js.map delete mode 100644 dist/src/types/result-broadcast-tx.d.ts delete mode 100644 dist/src/types/result-broadcast-tx.js delete mode 100644 dist/src/types/result-broadcast-tx.js.map delete mode 100644 dist/src/types/service.js.map delete mode 100644 dist/src/types/slashing.js.map delete mode 100644 dist/src/types/stake.d.ts delete mode 100644 dist/src/types/stake.js delete mode 100644 dist/src/types/stake.js.map delete mode 100644 dist/src/types/staking.js.map create mode 100644 dist/src/types/token.d.ts create mode 100644 dist/src/types/token.js delete mode 100644 dist/src/types/tx.js.map delete mode 100644 dist/src/types/types.js.map delete mode 100644 dist/src/types/validator.js.map delete mode 100644 dist/src/utils/address.js.map delete mode 100644 dist/src/utils/crypto.js.map delete mode 100644 dist/src/utils/index.js.map delete mode 100644 dist/src/utils/store-keys.js.map delete mode 100644 dist/src/utils/utils.js.map delete mode 100644 dist/test/asset.test.d.ts delete mode 100644 dist/test/asset.test.js delete mode 100644 dist/test/asset.test.js.map delete mode 100644 dist/test/bank.test.d.ts delete mode 100644 dist/test/bank.test.js delete mode 100644 dist/test/bank.test.js.map delete mode 100644 dist/test/basetest.d.ts delete mode 100644 dist/test/basetest.js delete mode 100644 dist/test/basetest.js.map delete mode 100644 dist/test/crypto.test.d.ts delete mode 100644 dist/test/crypto.test.js delete mode 100644 dist/test/crypto.test.js.map delete mode 100644 dist/test/distribution.test.d.ts delete mode 100644 dist/test/distribution.test.js delete mode 100644 dist/test/distribution.test.js.map delete mode 100644 dist/test/gov.test.d.ts delete mode 100644 dist/test/gov.test.js delete mode 100644 dist/test/gov.test.js.map delete mode 100644 dist/test/index.test.d.ts delete mode 100644 dist/test/index.test.js delete mode 100644 dist/test/index.test.js.map delete mode 100644 dist/test/jest.setup.d.ts delete mode 100644 dist/test/jest.setup.js delete mode 100644 dist/test/jest.setup.js.map delete mode 100644 dist/test/keys.test.d.ts delete mode 100644 dist/test/keys.test.js delete mode 100644 dist/test/keys.test.js.map delete mode 100644 dist/test/my.test.d.ts delete mode 100644 dist/test/my.test.js delete mode 100644 dist/test/my.test.js.map delete mode 100644 dist/test/slashing.test.d.ts delete mode 100644 dist/test/slashing.test.js delete mode 100644 dist/test/slashing.test.js.map delete mode 100644 dist/test/staking.test.d.ts delete mode 100644 dist/test/staking.test.js delete mode 100644 dist/test/staking.test.js.map delete mode 100644 dist/test/tendermint.test.d.ts delete mode 100644 dist/test/tendermint.test.js delete mode 100644 dist/test/tendermint.test.js.map delete mode 100644 dist/test/tx.test.d.ts delete mode 100644 dist/test/tx.test.js delete mode 100644 dist/test/tx.test.js.map delete mode 100644 dist/test/utils.test.d.ts delete mode 100644 dist/test/utils.test.js delete mode 100644 dist/test/utils.test.js.map create mode 100644 index.js create mode 100644 index.ts create mode 100644 proto/cosmos/auth/v1beta1/auth.proto create mode 100644 proto/cosmos/auth/v1beta1/genesis.proto create mode 100644 proto/cosmos/auth/v1beta1/query.proto create mode 100644 proto/cosmos/bank/v1beta1/bank.proto create mode 100644 proto/cosmos/bank/v1beta1/genesis.proto create mode 100644 proto/cosmos/bank/v1beta1/query.proto create mode 100644 proto/cosmos/bank/v1beta1/tx.proto create mode 100644 proto/cosmos/base/abci/v1beta1/abci.proto create mode 100644 proto/cosmos/base/kv/v1beta1/kv.proto create mode 100644 proto/cosmos/base/query/v1beta1/pagination.proto create mode 100644 proto/cosmos/base/reflection/v1beta1/reflection.proto create mode 100644 proto/cosmos/base/snapshots/v1beta1/snapshot.proto create mode 100644 proto/cosmos/base/store/v1beta1/commit_info.proto create mode 100644 proto/cosmos/base/store/v1beta1/snapshot.proto create mode 100644 proto/cosmos/base/tendermint/v1beta1/query.proto create mode 100644 proto/cosmos/base/v1beta1/coin.proto create mode 100644 proto/cosmos/capability/v1beta1/capability.proto create mode 100644 proto/cosmos/capability/v1beta1/genesis.proto create mode 100644 proto/cosmos/crisis/v1beta1/genesis.proto create mode 100644 proto/cosmos/crisis/v1beta1/tx.proto create mode 100644 proto/cosmos/crypto/ed25519/keys.proto create mode 100644 proto/cosmos/crypto/multisig/keys.proto create mode 100644 proto/cosmos/crypto/multisig/v1beta1/multisig.proto create mode 100644 proto/cosmos/crypto/secp256k1/keys.proto create mode 100644 proto/cosmos/crypto/sm2/keys.proto create mode 100644 proto/cosmos/distribution/v1beta1/distribution.proto create mode 100644 proto/cosmos/distribution/v1beta1/genesis.proto create mode 100644 proto/cosmos/distribution/v1beta1/query.proto create mode 100644 proto/cosmos/distribution/v1beta1/tx.proto create mode 100644 proto/cosmos/evidence/v1beta1/evidence.proto create mode 100644 proto/cosmos/evidence/v1beta1/genesis.proto create mode 100644 proto/cosmos/evidence/v1beta1/query.proto create mode 100644 proto/cosmos/evidence/v1beta1/tx.proto create mode 100644 proto/cosmos/genutil/v1beta1/genesis.proto create mode 100644 proto/cosmos/gov/v1beta1/genesis.proto create mode 100644 proto/cosmos/gov/v1beta1/gov.proto create mode 100644 proto/cosmos/gov/v1beta1/query.proto create mode 100644 proto/cosmos/gov/v1beta1/tx.proto create mode 100644 proto/cosmos/mint/v1beta1/genesis.proto create mode 100644 proto/cosmos/mint/v1beta1/mint.proto create mode 100644 proto/cosmos/mint/v1beta1/query.proto create mode 100644 proto/cosmos/params/v1beta1/params.proto create mode 100644 proto/cosmos/params/v1beta1/query.proto create mode 100644 proto/cosmos/slashing/v1beta1/genesis.proto create mode 100644 proto/cosmos/slashing/v1beta1/query.proto create mode 100644 proto/cosmos/slashing/v1beta1/slashing.proto create mode 100644 proto/cosmos/slashing/v1beta1/tx.proto create mode 100644 proto/cosmos/staking/v1beta1/genesis.proto create mode 100644 proto/cosmos/staking/v1beta1/query.proto create mode 100644 proto/cosmos/staking/v1beta1/staking.proto create mode 100644 proto/cosmos/staking/v1beta1/tx.proto create mode 100644 proto/cosmos/tx/signing/v1beta1/signing.proto create mode 100644 proto/cosmos/tx/v1beta1/service.proto create mode 100644 proto/cosmos/tx/v1beta1/tx.proto create mode 100644 proto/cosmos/upgrade/v1beta1/query.proto create mode 100644 proto/cosmos/upgrade/v1beta1/upgrade.proto create mode 100644 proto/cosmos/vesting/v1beta1/tx.proto create mode 100644 proto/cosmos/vesting/v1beta1/vesting.proto create mode 100644 proto/ibc/applications/transfer/v1/genesis.proto create mode 100644 proto/ibc/applications/transfer/v1/query.proto create mode 100644 proto/ibc/applications/transfer/v1/transfer.proto create mode 100644 proto/ibc/applications/transfer/v1/tx.proto create mode 100644 proto/ibc/core/channel/v1/channel.proto create mode 100644 proto/ibc/core/channel/v1/genesis.proto create mode 100644 proto/ibc/core/channel/v1/query.proto create mode 100644 proto/ibc/core/channel/v1/tx.proto create mode 100644 proto/ibc/core/client/v1/client.proto create mode 100644 proto/ibc/core/client/v1/genesis.proto create mode 100644 proto/ibc/core/client/v1/query.proto create mode 100644 proto/ibc/core/client/v1/tx.proto create mode 100644 proto/ibc/core/commitment/v1/commitment.proto create mode 100644 proto/ibc/core/connection/v1/connection.proto create mode 100644 proto/ibc/core/connection/v1/genesis.proto create mode 100644 proto/ibc/core/connection/v1/query.proto create mode 100644 proto/ibc/core/connection/v1/tx.proto create mode 100644 proto/ibc/core/types/v1/genesis.proto create mode 100644 proto/ibc/lightclients/localhost/v1/localhost.proto create mode 100644 proto/ibc/lightclients/solomachine/v1/solomachine.proto create mode 100644 proto/ibc/lightclients/tendermint/v1/tendermint.proto create mode 100644 proto/irismod/coinswap/coinswap.proto create mode 100644 proto/irismod/coinswap/genesis.proto create mode 100644 proto/irismod/coinswap/query.proto create mode 100644 proto/irismod/coinswap/tx.proto create mode 100644 proto/irismod/htlc/genesis.proto create mode 100644 proto/irismod/htlc/htlc.proto create mode 100644 proto/irismod/htlc/query.proto create mode 100644 proto/irismod/htlc/tx.proto create mode 100644 proto/irismod/nft/genesis.proto create mode 100644 proto/irismod/nft/nft.proto create mode 100644 proto/irismod/nft/query.proto create mode 100644 proto/irismod/nft/tx.proto create mode 100644 proto/irismod/oracle/genesis.proto create mode 100644 proto/irismod/oracle/oracle.proto create mode 100644 proto/irismod/oracle/query.proto create mode 100644 proto/irismod/oracle/tx.proto create mode 100644 proto/irismod/random/genesis.proto create mode 100644 proto/irismod/random/query.proto create mode 100644 proto/irismod/random/random.proto create mode 100644 proto/irismod/random/tx.proto create mode 100644 proto/irismod/record/genesis.proto create mode 100644 proto/irismod/record/query.proto create mode 100644 proto/irismod/record/record.proto create mode 100644 proto/irismod/record/tx.proto create mode 100644 proto/irismod/service/genesis.proto create mode 100644 proto/irismod/service/query.proto create mode 100644 proto/irismod/service/service.proto create mode 100644 proto/irismod/service/tx.proto create mode 100644 proto/irismod/token/genesis.proto create mode 100644 proto/irismod/token/query.proto create mode 100644 proto/irismod/token/token.proto create mode 100644 proto/irismod/token/tx.proto create mode 100644 proto/third_party/confio/proofs.proto create mode 100644 proto/third_party/cosmos_proto/cosmos.proto create mode 100644 proto/third_party/gogoproto/gogo.proto create mode 100644 proto/third_party/google/api/annotations.proto create mode 100644 proto/third_party/google/api/http.proto create mode 100644 proto/third_party/google/api/httpbody.proto create mode 100644 proto/third_party/google/protobuf/any.proto create mode 100644 proto/third_party/tendermint/abci/types.proto create mode 100644 proto/third_party/tendermint/crypto/keys.proto create mode 100644 proto/third_party/tendermint/crypto/proof.proto create mode 100644 proto/third_party/tendermint/libs/bits/types.proto create mode 100644 proto/third_party/tendermint/p2p/types.proto create mode 100644 proto/third_party/tendermint/types/block.proto create mode 100644 proto/third_party/tendermint/types/evidence.proto create mode 100644 proto/third_party/tendermint/types/params.proto create mode 100644 proto/third_party/tendermint/types/types.proto create mode 100644 proto/third_party/tendermint/types/validator.proto create mode 100644 proto/third_party/tendermint/version/types.proto create mode 100755 scripts/protocgen.sh create mode 100644 src/helper/index.ts create mode 100644 src/helper/modelCreator.ts create mode 100644 src/helper/txHelper.ts create mode 100644 src/helper/txModelCreator.ts delete mode 100644 src/modules/asset.ts create mode 100644 src/modules/coinswap.ts delete mode 100644 src/modules/htlc.ts create mode 100644 src/modules/nft.ts create mode 100644 src/modules/protobuf.ts create mode 100644 src/modules/token.ts delete mode 100644 src/types/asset.ts create mode 100644 src/types/coinswap.ts delete mode 100644 src/types/htlc.ts create mode 100644 src/types/nft.ts create mode 100644 src/types/proto-types/confio/proofs_pb.js create mode 100644 src/types/proto-types/cosmos/auth/v1beta1/auth_pb.js create mode 100644 src/types/proto-types/cosmos/auth/v1beta1/genesis_pb.js create mode 100644 src/types/proto-types/cosmos/auth/v1beta1/query_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/auth/v1beta1/query_pb.js create mode 100644 src/types/proto-types/cosmos/bank/v1beta1/bank_pb.js create mode 100644 src/types/proto-types/cosmos/bank/v1beta1/genesis_pb.js create mode 100644 src/types/proto-types/cosmos/bank/v1beta1/query_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/bank/v1beta1/query_pb.js create mode 100644 src/types/proto-types/cosmos/bank/v1beta1/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/bank/v1beta1/tx_pb.js create mode 100644 src/types/proto-types/cosmos/base/abci/v1beta1/abci_pb.js create mode 100644 src/types/proto-types/cosmos/base/kv/v1beta1/kv_pb.js create mode 100644 src/types/proto-types/cosmos/base/query/v1beta1/pagination_pb.js create mode 100644 src/types/proto-types/cosmos/base/reflection/v1beta1/reflection_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/base/reflection/v1beta1/reflection_pb.js create mode 100644 src/types/proto-types/cosmos/base/snapshots/v1beta1/snapshot_pb.js create mode 100644 src/types/proto-types/cosmos/base/store/v1beta1/commit_info_pb.js create mode 100644 src/types/proto-types/cosmos/base/store/v1beta1/snapshot_pb.js create mode 100644 src/types/proto-types/cosmos/base/tendermint/v1beta1/query_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/base/tendermint/v1beta1/query_pb.js create mode 100644 src/types/proto-types/cosmos/base/v1beta1/coin_pb.js create mode 100644 src/types/proto-types/cosmos/capability/v1beta1/capability_pb.js create mode 100644 src/types/proto-types/cosmos/capability/v1beta1/genesis_pb.js create mode 100644 src/types/proto-types/cosmos/crisis/v1beta1/genesis_pb.js create mode 100644 src/types/proto-types/cosmos/crisis/v1beta1/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/crisis/v1beta1/tx_pb.js create mode 100644 src/types/proto-types/cosmos/crypto/ed25519/keys_pb.js create mode 100644 src/types/proto-types/cosmos/crypto/multisig/keys_pb.js create mode 100644 src/types/proto-types/cosmos/crypto/multisig/v1beta1/multisig_pb.js create mode 100644 src/types/proto-types/cosmos/crypto/secp256k1/keys_pb.js create mode 100644 src/types/proto-types/cosmos/crypto/sm2/keys_pb.js create mode 100644 src/types/proto-types/cosmos/distribution/v1beta1/distribution_pb.js create mode 100644 src/types/proto-types/cosmos/distribution/v1beta1/genesis_pb.js create mode 100644 src/types/proto-types/cosmos/distribution/v1beta1/query_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/distribution/v1beta1/query_pb.js create mode 100644 src/types/proto-types/cosmos/distribution/v1beta1/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/distribution/v1beta1/tx_pb.js create mode 100644 src/types/proto-types/cosmos/evidence/v1beta1/evidence_pb.js create mode 100644 src/types/proto-types/cosmos/evidence/v1beta1/genesis_pb.js create mode 100644 src/types/proto-types/cosmos/evidence/v1beta1/query_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/evidence/v1beta1/query_pb.js create mode 100644 src/types/proto-types/cosmos/evidence/v1beta1/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/evidence/v1beta1/tx_pb.js create mode 100644 src/types/proto-types/cosmos/genutil/v1beta1/genesis_pb.js create mode 100644 src/types/proto-types/cosmos/gov/v1beta1/genesis_pb.js create mode 100644 src/types/proto-types/cosmos/gov/v1beta1/gov_pb.js create mode 100644 src/types/proto-types/cosmos/gov/v1beta1/query_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/gov/v1beta1/query_pb.js create mode 100644 src/types/proto-types/cosmos/gov/v1beta1/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/gov/v1beta1/tx_pb.js create mode 100644 src/types/proto-types/cosmos/mint/v1beta1/genesis_pb.js create mode 100644 src/types/proto-types/cosmos/mint/v1beta1/mint_pb.js create mode 100644 src/types/proto-types/cosmos/mint/v1beta1/query_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/mint/v1beta1/query_pb.js create mode 100644 src/types/proto-types/cosmos/params/v1beta1/params_pb.js create mode 100644 src/types/proto-types/cosmos/params/v1beta1/query_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/params/v1beta1/query_pb.js create mode 100644 src/types/proto-types/cosmos/slashing/v1beta1/genesis_pb.js create mode 100644 src/types/proto-types/cosmos/slashing/v1beta1/query_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/slashing/v1beta1/query_pb.js create mode 100644 src/types/proto-types/cosmos/slashing/v1beta1/slashing_pb.js create mode 100644 src/types/proto-types/cosmos/slashing/v1beta1/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/slashing/v1beta1/tx_pb.js create mode 100644 src/types/proto-types/cosmos/staking/v1beta1/genesis_pb.js create mode 100644 src/types/proto-types/cosmos/staking/v1beta1/query_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/staking/v1beta1/query_pb.js create mode 100644 src/types/proto-types/cosmos/staking/v1beta1/staking_pb.js create mode 100644 src/types/proto-types/cosmos/staking/v1beta1/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/staking/v1beta1/tx_pb.js create mode 100644 src/types/proto-types/cosmos/tx/signing/v1beta1/signing_pb.js create mode 100644 src/types/proto-types/cosmos/tx/v1beta1/service_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/tx/v1beta1/service_pb.js create mode 100644 src/types/proto-types/cosmos/tx/v1beta1/tx_pb.js create mode 100644 src/types/proto-types/cosmos/upgrade/v1beta1/query_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/upgrade/v1beta1/query_pb.js create mode 100644 src/types/proto-types/cosmos/upgrade/v1beta1/upgrade_pb.js create mode 100644 src/types/proto-types/cosmos/vesting/v1beta1/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/cosmos/vesting/v1beta1/tx_pb.js create mode 100644 src/types/proto-types/cosmos/vesting/v1beta1/vesting_pb.js create mode 100644 src/types/proto-types/cosmos_proto/cosmos_pb.js create mode 100644 src/types/proto-types/gogoproto/gogo_pb.js create mode 100644 src/types/proto-types/google/api/annotations_pb.js create mode 100644 src/types/proto-types/google/api/http_pb.js create mode 100644 src/types/proto-types/google/api/httpbody_pb.js create mode 100644 src/types/proto-types/google/protobuf/any_pb.js create mode 100644 src/types/proto-types/ibc/applications/transfer/v1/genesis_pb.js create mode 100644 src/types/proto-types/ibc/applications/transfer/v1/query_grpc_web_pb.js create mode 100644 src/types/proto-types/ibc/applications/transfer/v1/query_pb.js create mode 100644 src/types/proto-types/ibc/applications/transfer/v1/transfer_pb.js create mode 100644 src/types/proto-types/ibc/applications/transfer/v1/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/ibc/applications/transfer/v1/tx_pb.js create mode 100644 src/types/proto-types/ibc/core/channel/v1/channel_pb.js create mode 100644 src/types/proto-types/ibc/core/channel/v1/genesis_pb.js create mode 100644 src/types/proto-types/ibc/core/channel/v1/query_grpc_web_pb.js create mode 100644 src/types/proto-types/ibc/core/channel/v1/query_pb.js create mode 100644 src/types/proto-types/ibc/core/channel/v1/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/ibc/core/channel/v1/tx_pb.js create mode 100644 src/types/proto-types/ibc/core/client/v1/client_pb.js create mode 100644 src/types/proto-types/ibc/core/client/v1/genesis_pb.js create mode 100644 src/types/proto-types/ibc/core/client/v1/query_grpc_web_pb.js create mode 100644 src/types/proto-types/ibc/core/client/v1/query_pb.js create mode 100644 src/types/proto-types/ibc/core/client/v1/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/ibc/core/client/v1/tx_pb.js create mode 100644 src/types/proto-types/ibc/core/commitment/v1/commitment_pb.js create mode 100644 src/types/proto-types/ibc/core/connection/v1/connection_pb.js create mode 100644 src/types/proto-types/ibc/core/connection/v1/genesis_pb.js create mode 100644 src/types/proto-types/ibc/core/connection/v1/query_grpc_web_pb.js create mode 100644 src/types/proto-types/ibc/core/connection/v1/query_pb.js create mode 100644 src/types/proto-types/ibc/core/connection/v1/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/ibc/core/connection/v1/tx_pb.js create mode 100644 src/types/proto-types/ibc/core/types/v1/genesis_pb.js create mode 100644 src/types/proto-types/ibc/lightclients/localhost/v1/localhost_pb.js create mode 100644 src/types/proto-types/ibc/lightclients/solomachine/v1/solomachine_pb.js create mode 100644 src/types/proto-types/ibc/lightclients/tendermint/v1/tendermint_pb.js create mode 100644 src/types/proto-types/irismod/coinswap/coinswap_pb.js create mode 100644 src/types/proto-types/irismod/coinswap/genesis_pb.js create mode 100644 src/types/proto-types/irismod/coinswap/query_grpc_web_pb.js create mode 100644 src/types/proto-types/irismod/coinswap/query_pb.js create mode 100644 src/types/proto-types/irismod/coinswap/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/irismod/coinswap/tx_pb.js create mode 100644 src/types/proto-types/irismod/htlc/genesis_pb.js create mode 100644 src/types/proto-types/irismod/htlc/htlc_pb.js create mode 100644 src/types/proto-types/irismod/htlc/query_grpc_web_pb.js create mode 100644 src/types/proto-types/irismod/htlc/query_pb.js create mode 100644 src/types/proto-types/irismod/htlc/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/irismod/htlc/tx_pb.js create mode 100644 src/types/proto-types/irismod/nft/genesis_pb.js create mode 100644 src/types/proto-types/irismod/nft/nft_pb.js create mode 100644 src/types/proto-types/irismod/nft/query_grpc_web_pb.js create mode 100644 src/types/proto-types/irismod/nft/query_pb.js create mode 100644 src/types/proto-types/irismod/nft/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/irismod/nft/tx_pb.js create mode 100644 src/types/proto-types/irismod/oracle/genesis_pb.js create mode 100644 src/types/proto-types/irismod/oracle/oracle_pb.js create mode 100644 src/types/proto-types/irismod/oracle/query_grpc_web_pb.js create mode 100644 src/types/proto-types/irismod/oracle/query_pb.js create mode 100644 src/types/proto-types/irismod/oracle/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/irismod/oracle/tx_pb.js create mode 100644 src/types/proto-types/irismod/random/genesis_pb.js create mode 100644 src/types/proto-types/irismod/random/query_grpc_web_pb.js create mode 100644 src/types/proto-types/irismod/random/query_pb.js create mode 100644 src/types/proto-types/irismod/random/random_pb.js create mode 100644 src/types/proto-types/irismod/random/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/irismod/random/tx_pb.js create mode 100644 src/types/proto-types/irismod/record/genesis_pb.js create mode 100644 src/types/proto-types/irismod/record/query_grpc_web_pb.js create mode 100644 src/types/proto-types/irismod/record/query_pb.js create mode 100644 src/types/proto-types/irismod/record/record_pb.js create mode 100644 src/types/proto-types/irismod/record/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/irismod/record/tx_pb.js create mode 100644 src/types/proto-types/irismod/service/genesis_pb.js create mode 100644 src/types/proto-types/irismod/service/query_grpc_web_pb.js create mode 100644 src/types/proto-types/irismod/service/query_pb.js create mode 100644 src/types/proto-types/irismod/service/service_pb.js create mode 100644 src/types/proto-types/irismod/service/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/irismod/service/tx_pb.js create mode 100644 src/types/proto-types/irismod/token/genesis_pb.js create mode 100644 src/types/proto-types/irismod/token/query_grpc_web_pb.js create mode 100644 src/types/proto-types/irismod/token/query_pb.js create mode 100644 src/types/proto-types/irismod/token/token_pb.js create mode 100644 src/types/proto-types/irismod/token/tx_grpc_web_pb.js create mode 100644 src/types/proto-types/irismod/token/tx_pb.js create mode 100644 src/types/proto-types/tendermint/abci/types_grpc_web_pb.js create mode 100644 src/types/proto-types/tendermint/abci/types_pb.js create mode 100644 src/types/proto-types/tendermint/crypto/keys_pb.js create mode 100644 src/types/proto-types/tendermint/crypto/proof_pb.js create mode 100644 src/types/proto-types/tendermint/libs/bits/types_pb.js create mode 100644 src/types/proto-types/tendermint/p2p/types_pb.js create mode 100644 src/types/proto-types/tendermint/types/block_pb.js create mode 100644 src/types/proto-types/tendermint/types/evidence_pb.js create mode 100644 src/types/proto-types/tendermint/types/params_pb.js create mode 100644 src/types/proto-types/tendermint/types/types_pb.js create mode 100644 src/types/proto-types/tendermint/types/validator_pb.js create mode 100644 src/types/proto-types/tendermint/version/types_pb.js create mode 100644 src/types/proto.ts create mode 100644 src/types/protoTx.ts create mode 100644 src/types/token.ts delete mode 100644 test/asset.test.ts create mode 100644 test/auth.test.ts create mode 100644 test/coinswap.test.ts delete mode 100644 test/htlc.test.ts create mode 100644 test/nft.test.ts create mode 100644 test/protobuf.test.ts create mode 100644 test/token.test.ts diff --git a/README.md b/README.md index b3452bfb..62e1e53a 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,265 @@ ![Banner](https://raw.githubusercontent.com/irisnet/irishub/master/docs/pics/iris.jpg) [![License](https://img.shields.io/github/license/irisnet/irishub-sdk-js.svg)](https://github.com/irisnet/irishub-sdk-js/blob/master/LICENSE) [![Version](https://img.shields.io/github/tag/irisnet/irishub-sdk-js.svg)](https://github.com/irisnet/irishub-sdk-js/releases) + +The IRISnet JavaScript SDK allows browsers and Node.js clients to interact with IRISnet. Core functionality and examples +are in the `test` folder. + +- client - client that implements IRISnet transactions types, such as for transfers and staking,etc. +- crypto - core cryptographic functions. +- accounts - management of accounts and wallets, including seed and encrypted mnemonic generation, recover account by + mnemonic or keystore, etc. + +## Installation + +Install the package via npm. + +```bash +npm install https://github.com/irisnet/irishub-sdk-js.git +``` + +## Config + +```typescript +interface ClientConfig { + node: string,//address of a rpc node on IRISnet + network: number, //[Number] 0: Mainnet, 1: Testnet + chainId: string, + gas?: string, + fee?: { + denom: string; + amount: string; + },//default fee for transactions + keyDAO: KeyDAO,//key manager for wallet, which must be implemented + bech32Prefix?: { + AccAddr: string, + AccPub: string, + ValAddr: string, + ValPub: string, + ConsAddr: string, + ConsPub: string, + }, + rpcConfig?: AxiosRequestConfig// axios request config +} +``` + +## Client Setup + +First you should implement your KeyDAO like follows: + +```typescript +class KeyDAO { + /** + * save private key to client + * @param name for account you generated, which will be use to query private key and other account info + * @param wallet: {address: string,privateKey: string,publicKey: string,mnemonic: string} + * @throws error if save failed + */ + write(name, wallet):void { + localStorage.setItem(name, JSON.stringify(wallet)); + } + + /** + * save walet in client + * @param name + * @throws error if read failed + */ + read(name):wallet{ + const wallet = localStorage.getItem(name); + if(wallet) { + return JSON.parse(wallet); + } + throw new Error(`no wallet was found`) + } + + /** + * encrypt your private key before save to client + * @param private key + * @param password for encrypt private key + */ + encrypt?(privateKey, password): string { + return CryptoJS.AES.encrypt(msg, password).toString(); + } + + /** + * decrypto your private key with password + * @param encrypted private key + * @param password that can decrypto private key ecrypted + */ + decrypt?(encryptedPrivateKey, password): string { + const bytes = CryptoJS.AES.decrypt(encryptedPrivateKey, password); + const privateKey = bytes.toString(CryptoJS.enc.Utf8); + if (privateKey) { + return privateKey + } else { + throw new Error('can not decrypto the private key'); + } + + } + +} + +``` + +```typescript +import {newClient as irisSdkClient} from 'irishub-sdk-js'; + +const client = irisSdkClient(ClientConfig) + .withKeyDAO(new KeyDAO()) + .withRpcConfig({timeout: 15000}); + +``` +## Client Usage +The following selected examples demonstrate basic client usage. + +- create account +```typescript +const account: { address: string, mnemonic: string } = client.keys.add(`iris_wallet`, 'S8js8Ka82lqAc'); +``` +- recover account by mnemonic +```typescript +const account: string = client.keys.recover(`iris_wallet`, 'S8js8Ka82lqAc', `fatigue panther innocent dress person fluid animal raven material embark target spread kiss smile cycle begin rocket pull couple mass story analyst guilt network`); +``` +- recover account by keystore +```typescript +const account: string = client.keys.recover(`iris_wallet`, 'S8js8Ka82lqAc', `{"version":"1","id":"1d295464-aaa8-418e-b374-3052a91dc26a","address":"faa1eqvkfthtrr93g4p9qspp54w6dtjtrn279vcmpn","crypto":{"ciphertext":"a6ee40e3b38a7b24a373ec006bcc039ccbae45dc3b1f314405ab51ee975d6b1f","cipherparams":{"iv":"453b83b1331d334b70d160616fe43ace"},"cipher":"aes-128-ctr","kdf":"pbkdf2","kdfparams":{"dklen":32,"salt":"e702e41edf7277a39f7f5cc641c19e1b492cc29bf737aec9b53b496c9f217b37","c":10000,"prf":"hmac-sha256"},"mac":"6e8ed2619f0b30f00c20f9f01858368efbd0feae5811792d8b41a60c2d71d310"}}`); +``` +- transfer example +```typescript +const res = await client.bank.send({ + to:`iaa1eqvkfthtrr93g4p9qspp54w6dtjtrn27ar7rpw`, + amount:[{ + denom:`uiris`, + amount:`1000000` + }], + baseTx:{ + from:`iris_wallet`, + password:`S8js8Ka82lqAc`, + gas:50000, + fee:{ + denom:`uiris`, + amount:`500000` + } + } +}) +``` +### bank `src/modules/bank.ts` +- send +- multiSend +- queryBalance +- queryAllBalances +- queryTotalSupply +- querySupplyOf +- queryParams +### auth `src/modules/auth.ts` +- newStdTx +- queryAccount +- queryParams +### distribution `src/modules/distribution.ts` +- setWithdrawAddr +- withdrawRewards +- withdrawValidatorCommission +- fundCommunityPool +- queryParams +- queryValidatorOutstandingRewards +- queryValidatorCommission +- queryValidatorSlashes +- queryDelegationRewards +- queryDelegationTotalRewards +- queryDelegatorValidators +- queryDelegatorWithdrawAddress +- queryCommunityPool +### gov `src/modules/gov.ts` +- queryProposal +- queryProposals +- queryVote +- queryVotes +- queryDeposit +- queryDeposits +- queryTally +- submitParameterChangeProposal +- submitPlainTextProposal +- submitCommunityTaxUsageProposal +- deposit +- vote +### keys `src/modules/keys.ts` +- add +- recover +- import +- importPrivateKey +- export +- delete +- show +### nft `src/modules/nft.ts` +- issueDenom +- mintNft +- editNft +- transferNft +- burnNft +- querySupply +- queryOwner +- queryCollection +- queryDenom +- queryDenoms +- queryNFT +### slashing `src/modules/slashing.ts` +- queryParams +- querySigningInfo +- unjail +### staking `src/modules/staking.ts` +- delegate +- undelegate +- redelegate +- queryDelegation +- queryDelegations +- queryUnbondingDelegation +- queryDelegatorUnbondingDelegations +- queryRedelegation +- queryDelegatorValidators +- queryDelegatorValidator +- queryHistoricalInfo +- queryValidatorDelegations +- queryValidatorUnbondingDelegations +- queryValidator +- queryValidators +- queryPool +- queryParams +- appendZero +- createValidator +### tendermint `src/modules/tendermint.ts` +- queryBlock +- queryBlockResult +- queryTx +- queryValidators +- searchTxs +- queryNetInfo +### token `src/modules/token.ts` +- issueToken +- editToken +- mintToken +- transferTokenOwner +- queryTokens +- queryToken +- queryFees +- queryParameters +### tx `src/modules/tx.ts` +- buildTx +- newStdTxFromProtoTxModel +- buildAndSend +- broadcast +- sign +- sign_signDoc +- broadcastTxAsync +- broadcastTxSync +- broadcastTxCommit +- broadcastTx +- newTxResult +- createMsg +### protobuf `src/modules/protobuf.ts` +- deserializeTx +- unpackMsg +- deserializeSignDoc +- deserializeTxRaw +- deserializeSigningInfo +- deserializePubkey + diff --git a/build/.eslintrc.json b/build/.eslintrc.json new file mode 100644 index 00000000..5bafe001 --- /dev/null +++ b/build/.eslintrc.json @@ -0,0 +1,19 @@ +{ + "env": { + "commonjs": true, + "es6": true, + "node": true + }, + "extends": [ + "../.eslintrc.json", + "plugin:node/recommended" + ], + "plugins": [ "node" ], + "parserOptions": { + "ecmaVersion": 2018 + }, + "rules": { + "node/no-unpublished-require": "off", + "@typescript-eslint/no-var-requires": "off" + } +} diff --git a/build/index.js b/build/index.js new file mode 100644 index 00000000..0c9447df --- /dev/null +++ b/build/index.js @@ -0,0 +1 @@ +module.exports = require('./webpack.config'); diff --git a/build/webpack.common.js b/build/webpack.common.js new file mode 100644 index 00000000..c9ca6b45 --- /dev/null +++ b/build/webpack.common.js @@ -0,0 +1,54 @@ +const path = require('path'); +const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); + +const root = path.resolve(`${__dirname}/..`); +const srcRoot = `${root}/src`; +const production = (process.env.NODE_ENV === 'production'); + +module.exports = { + entry: `${srcRoot}/index.ts`, + output: { + path: `${root}/dist`, + filename: 'index.js', + library: 'irishub-sdk', + libraryTarget: 'umd' + }, + resolve: { + extensions: ['.ts', '.js'] + }, + module: { + rules: [{ + enforce: 'pre', + test: /\.ts$/, + include: [srcRoot], + use: [{ + loader: 'eslint-loader', + options: { + failOnWarning: production + } + }] + }, { + test: /\.ts$/, + include: [srcRoot], + use: [ + { + loader: 'babel-loader', + options: { + compact: false, + presets: [ + '@babel/preset-typescript', + ['@babel/preset-env', { + targets: { + chrome: '73', + ie: '11', + firefox: '66', + safari: '12' + } + }] + ] + } + } + ] + }] + } +}; diff --git a/build/webpack.config.js b/build/webpack.config.js new file mode 100644 index 00000000..b1fba0a0 --- /dev/null +++ b/build/webpack.config.js @@ -0,0 +1,13 @@ +const merge = require('webpack-merge'); +const common = require('./webpack.common'); +const web = require('./webpack.web'); +const node = require('./webpack.node'); + +const env = (process.env.NODE_ENV === 'production') + ? require('./webpack.production') + : require('./webpack.development'); + +module.exports = [ + merge(common, web, env), + merge(common, node, env) +]; diff --git a/build/webpack.development.js b/build/webpack.development.js new file mode 100644 index 00000000..398041c7 --- /dev/null +++ b/build/webpack.development.js @@ -0,0 +1,4 @@ +module.exports = { + mode: 'development', + devtool: 'source-map' +}; diff --git a/build/webpack.node.js b/build/webpack.node.js new file mode 100644 index 00000000..942da2af --- /dev/null +++ b/build/webpack.node.js @@ -0,0 +1,6 @@ +module.exports = { + target: 'node', + output: { + filename: 'node.js' + } +}; diff --git a/build/webpack.production.js b/build/webpack.production.js new file mode 100644 index 00000000..77bf8508 --- /dev/null +++ b/build/webpack.production.js @@ -0,0 +1,4 @@ +module.exports = { + mode: 'production', + devtool: false +}; diff --git a/build/webpack.web.js b/build/webpack.web.js new file mode 100644 index 00000000..1e7c8166 --- /dev/null +++ b/build/webpack.web.js @@ -0,0 +1,6 @@ +module.exports = { + target: 'web', + output: { + filename: 'web.js' + } +}; diff --git a/dist/LICENSE b/dist/LICENSE new file mode 100644 index 00000000..96cc40e8 --- /dev/null +++ b/dist/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2017 IRIS Foundation Ltd. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dist/README.md b/dist/README.md new file mode 100644 index 00000000..62e1e53a --- /dev/null +++ b/dist/README.md @@ -0,0 +1,267 @@ +# irishub-sdk-js + +![Banner](https://raw.githubusercontent.com/irisnet/irishub/master/docs/pics/iris.jpg) +[![License](https://img.shields.io/github/license/irisnet/irishub-sdk-js.svg)](https://github.com/irisnet/irishub-sdk-js/blob/master/LICENSE) +[![Version](https://img.shields.io/github/tag/irisnet/irishub-sdk-js.svg)](https://github.com/irisnet/irishub-sdk-js/releases) + +The IRISnet JavaScript SDK allows browsers and Node.js clients to interact with IRISnet. Core functionality and examples +are in the `test` folder. + +- client - client that implements IRISnet transactions types, such as for transfers and staking,etc. +- crypto - core cryptographic functions. +- accounts - management of accounts and wallets, including seed and encrypted mnemonic generation, recover account by + mnemonic or keystore, etc. + +## Installation + +Install the package via npm. + +```bash +npm install https://github.com/irisnet/irishub-sdk-js.git +``` + +## Config + +```typescript +interface ClientConfig { + node: string,//address of a rpc node on IRISnet + network: number, //[Number] 0: Mainnet, 1: Testnet + chainId: string, + gas?: string, + fee?: { + denom: string; + amount: string; + },//default fee for transactions + keyDAO: KeyDAO,//key manager for wallet, which must be implemented + bech32Prefix?: { + AccAddr: string, + AccPub: string, + ValAddr: string, + ValPub: string, + ConsAddr: string, + ConsPub: string, + }, + rpcConfig?: AxiosRequestConfig// axios request config +} +``` + +## Client Setup + +First you should implement your KeyDAO like follows: + +```typescript +class KeyDAO { + /** + * save private key to client + * @param name for account you generated, which will be use to query private key and other account info + * @param wallet: {address: string,privateKey: string,publicKey: string,mnemonic: string} + * @throws error if save failed + */ + write(name, wallet):void { + localStorage.setItem(name, JSON.stringify(wallet)); + } + + /** + * save walet in client + * @param name + * @throws error if read failed + */ + read(name):wallet{ + const wallet = localStorage.getItem(name); + if(wallet) { + return JSON.parse(wallet); + } + throw new Error(`no wallet was found`) + } + + /** + * encrypt your private key before save to client + * @param private key + * @param password for encrypt private key + */ + encrypt?(privateKey, password): string { + return CryptoJS.AES.encrypt(msg, password).toString(); + } + + /** + * decrypto your private key with password + * @param encrypted private key + * @param password that can decrypto private key ecrypted + */ + decrypt?(encryptedPrivateKey, password): string { + const bytes = CryptoJS.AES.decrypt(encryptedPrivateKey, password); + const privateKey = bytes.toString(CryptoJS.enc.Utf8); + if (privateKey) { + return privateKey + } else { + throw new Error('can not decrypto the private key'); + } + + } + +} + +``` + +```typescript +import {newClient as irisSdkClient} from 'irishub-sdk-js'; + +const client = irisSdkClient(ClientConfig) + .withKeyDAO(new KeyDAO()) + .withRpcConfig({timeout: 15000}); + +``` +## Client Usage +The following selected examples demonstrate basic client usage. + +- create account +```typescript +const account: { address: string, mnemonic: string } = client.keys.add(`iris_wallet`, 'S8js8Ka82lqAc'); +``` +- recover account by mnemonic +```typescript +const account: string = client.keys.recover(`iris_wallet`, 'S8js8Ka82lqAc', `fatigue panther innocent dress person fluid animal raven material embark target spread kiss smile cycle begin rocket pull couple mass story analyst guilt network`); +``` +- recover account by keystore +```typescript +const account: string = client.keys.recover(`iris_wallet`, 'S8js8Ka82lqAc', `{"version":"1","id":"1d295464-aaa8-418e-b374-3052a91dc26a","address":"faa1eqvkfthtrr93g4p9qspp54w6dtjtrn279vcmpn","crypto":{"ciphertext":"a6ee40e3b38a7b24a373ec006bcc039ccbae45dc3b1f314405ab51ee975d6b1f","cipherparams":{"iv":"453b83b1331d334b70d160616fe43ace"},"cipher":"aes-128-ctr","kdf":"pbkdf2","kdfparams":{"dklen":32,"salt":"e702e41edf7277a39f7f5cc641c19e1b492cc29bf737aec9b53b496c9f217b37","c":10000,"prf":"hmac-sha256"},"mac":"6e8ed2619f0b30f00c20f9f01858368efbd0feae5811792d8b41a60c2d71d310"}}`); +``` +- transfer example +```typescript +const res = await client.bank.send({ + to:`iaa1eqvkfthtrr93g4p9qspp54w6dtjtrn27ar7rpw`, + amount:[{ + denom:`uiris`, + amount:`1000000` + }], + baseTx:{ + from:`iris_wallet`, + password:`S8js8Ka82lqAc`, + gas:50000, + fee:{ + denom:`uiris`, + amount:`500000` + } + } +}) +``` +### bank `src/modules/bank.ts` +- send +- multiSend +- queryBalance +- queryAllBalances +- queryTotalSupply +- querySupplyOf +- queryParams +### auth `src/modules/auth.ts` +- newStdTx +- queryAccount +- queryParams +### distribution `src/modules/distribution.ts` +- setWithdrawAddr +- withdrawRewards +- withdrawValidatorCommission +- fundCommunityPool +- queryParams +- queryValidatorOutstandingRewards +- queryValidatorCommission +- queryValidatorSlashes +- queryDelegationRewards +- queryDelegationTotalRewards +- queryDelegatorValidators +- queryDelegatorWithdrawAddress +- queryCommunityPool +### gov `src/modules/gov.ts` +- queryProposal +- queryProposals +- queryVote +- queryVotes +- queryDeposit +- queryDeposits +- queryTally +- submitParameterChangeProposal +- submitPlainTextProposal +- submitCommunityTaxUsageProposal +- deposit +- vote +### keys `src/modules/keys.ts` +- add +- recover +- import +- importPrivateKey +- export +- delete +- show +### nft `src/modules/nft.ts` +- issueDenom +- mintNft +- editNft +- transferNft +- burnNft +- querySupply +- queryOwner +- queryCollection +- queryDenom +- queryDenoms +- queryNFT +### slashing `src/modules/slashing.ts` +- queryParams +- querySigningInfo +- unjail +### staking `src/modules/staking.ts` +- delegate +- undelegate +- redelegate +- queryDelegation +- queryDelegations +- queryUnbondingDelegation +- queryDelegatorUnbondingDelegations +- queryRedelegation +- queryDelegatorValidators +- queryDelegatorValidator +- queryHistoricalInfo +- queryValidatorDelegations +- queryValidatorUnbondingDelegations +- queryValidator +- queryValidators +- queryPool +- queryParams +- appendZero +- createValidator +### tendermint `src/modules/tendermint.ts` +- queryBlock +- queryBlockResult +- queryTx +- queryValidators +- searchTxs +- queryNetInfo +### token `src/modules/token.ts` +- issueToken +- editToken +- mintToken +- transferTokenOwner +- queryTokens +- queryToken +- queryFees +- queryParameters +### tx `src/modules/tx.ts` +- buildTx +- newStdTxFromProtoTxModel +- buildAndSend +- broadcast +- sign +- sign_signDoc +- broadcastTxAsync +- broadcastTxSync +- broadcastTxCommit +- broadcastTx +- newTxResult +- createMsg +### protobuf `src/modules/protobuf.ts` +- deserializeTx +- unpackMsg +- deserializeSignDoc +- deserializeTxRaw +- deserializeSigningInfo +- deserializePubkey + diff --git a/dist/package.json b/dist/package.json new file mode 100644 index 00000000..652c25cf --- /dev/null +++ b/dist/package.json @@ -0,0 +1,81 @@ +{ + "name": "@irisnet/irishub-sdk", + "version": "0.0.1", + "description": "IRISHub JavaScript SDK", + "main": "index.js", + "typings": "src/index.ts", + "types": "./dist/src", + "files": [ + "dist", + "dist/*", + "src/**/*.{ts,js}", + "types/**/*.ts", + "index.js", + "LICENSE", + "package.json", + "README.md", + "tsconfig.json", + "yarn.lock" + ], + "license": "Apache-2.0", + "keywords": [ + "irishub", + "irishub-sdk", + "irisnet", + "cosmos" + ], + "scripts": { + "node": "cd test/scripts/ && sh build.sh && sh start.sh", + "test": "yarn run node && jest -i --config jest.config.js && sh test/scripts/clean.sh", + "check": "gts check", + "clean": "gts clean", + "build": "rm -rf dist/* && tsc --emitDeclarationOnly && babel --extensions '.ts' src -d dist/src && cp LICENSE dist/ && cp README.md dist/ && cp package.json dist/ && cp -rf src/types/proto-types dist/src/types/proto-types", + "fix": "gts fix", + "docs": "npx typedoc && docker build -t irisnet/docs-irishub-sdk-js .", + "proto-gen": "sh ./scripts/protocgen.sh" + }, + "devDependencies": { + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/plugin-proposal-class-properties": "^7.8.3", + "@babel/plugin-transform-runtime": "^7.9.0", + "@babel/preset-env": "^7.7.6", + "@babel/preset-typescript": "^7.9.0", + "@types/jest": "^25.1.4", + "@types/node": "^10.0.3", + "babel-loader": "^8.1.0", + "eslint": "^6.8.0", + "eslint-loader": "^4.0.0", + "gts": "^1.1.2", + "jest": "^25.1.0", + "ts-jest": "^25.2.1", + "ts-loader": "^6.2.2", + "tslint": "^6.1.0", + "typedoc": "^0.16.9", + "typescript": "^3.8.3" + }, + "dependencies": { + "@babel/runtime": "^7.0.0", + "@types/mathjs": "^6.0.4", + "@types/ws": "^7.2.2", + "axios": "^0.19.0", + "bech32": "^1.1.3", + "bip32": "^2.0.4", + "bip39": "^3.0.2", + "crypto-browserify": "^3.12.0", + "crypto-js": "^3.1.9-1", + "events": "^3.1.0", + "google-protobuf": "3.13.0", + "grpc-web": "^1.2.1", + "uuid": "^3.3.2", + "is_js": "^0.9.0", + "isomorphic-ws": "^4.0.1", + "mathjs": "^6.6.1", + "ndjson": "^1.5.0", + "pumpify": "^2.0.1", + "secp256k1": "^3.7.1", + "secure-random": "^1.1.2", + "sha256": "^0.2.0", + "sm-crypto": "git+https://github.com/bianjieai/sm-crypto-js.git#main" + } +} diff --git a/dist/src/client.d.ts b/dist/src/client.d.ts index 5ea0504f..a5093a2e 100644 --- a/dist/src/client.d.ts +++ b/dist/src/client.d.ts @@ -1,9 +1,9 @@ import * as consts from './types/constants'; import * as modules from './modules'; import { RpcClient } from './nets/rpc-client'; -import { EventListener } from './nets/event-listener'; import { AxiosRequestConfig } from 'axios'; import * as types from './types'; +import { Wallet } from "./types"; /** IRISHub Client */ export declare class Client { /** IRISHub Client Config */ @@ -11,35 +11,35 @@ export declare class Client { /** Axios client for tendermint rpc requests */ rpcClient: RpcClient; /** WebSocket event listener */ - eventListener: EventListener; /** Auth module */ auth: modules.Auth; - /** Asset module */ - asset: modules.Asset; + /** Token module */ + token: modules.Token; /** Bank module */ bank: modules.Bank; /** Key management module */ keys: modules.Keys; + /** Protobuf module */ + protobuf: modules.Protobuf; /** Staking module */ staking: modules.Staking; /** Tx module */ tx: modules.Tx; /** Gov module */ - gov: modules.Gov; /** Slashing module */ slashing: modules.Slashing; /** Distribution module */ distribution: modules.Distribution; /** Service module */ - service: modules.Service; /** Oracle module */ - oracle: modules.Oracle; /** Random module */ - random: modules.Random; /** Utils module */ utils: modules.Utils; /** Tendermint module */ tendermint: modules.Tendermint; + /** Coinswap module */ + /** NFT module */ + nft: modules.Nft; /** IRISHub SDK Constructor */ constructor(config: DefaultClientConfig); /** @@ -129,20 +129,20 @@ export interface KeyDAO { * @param key The encrypted private key object * @throws `SdkError` if the save fails. */ - write(name: string, key: types.Key): void; + write(name: string, key: Wallet): void; /** * Get the encrypted private key by name * * @param name Name of the key * @returns The encrypted private key object or undefined */ - read(name: string): types.Key; + read(name: string): Wallet; /** * Delete the key by name * @param name Name of the key * @throws `SdkError` if the deletion fails. */ - delete(name: string): void; + delete?(name: string): void; /** * Optional function to encrypt the private key by yourself. Default to AES Encryption * @param privKey The plain private key @@ -172,8 +172,8 @@ export interface Bech32Prefix { ConsPub: string; } export declare class DefaultKeyDAOImpl implements KeyDAO { - write(name: string, key: types.Key): void; - read(name: string): types.Key; + write(name: string, key: Wallet): void; + read(name: string): Wallet; delete(name: string): void; encrypt(privKey: string, password: string): string; decrypt(encrptedPrivKey: string, password: string): string; diff --git a/dist/src/client.js b/dist/src/client.js index c9a51449..b7534bfc 100644 --- a/dist/src/client.js +++ b/dist/src/client.js @@ -1,78 +1,164 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const consts = require("./types/constants"); -const modules = require("./modules"); -const rpc_client_1 = require("./nets/rpc-client"); -const event_listener_1 = require("./nets/event-listener"); -const types = require("./types"); -const errors_1 = require("./errors"); -const AES = require("crypto-js/aes"); -const ENC = require("crypto-js/enc-utf8"); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.DefaultKeyDAOImpl = exports.DefaultClientConfig = exports.Client = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var consts = _interopRequireWildcard(require("./types/constants")); + +var modules = _interopRequireWildcard(require("./modules")); + +var _rpcClient = require("./nets/rpc-client"); + +var types = _interopRequireWildcard(require("./types")); + +var _errors = require("./errors"); + +var AES = _interopRequireWildcard(require("crypto-js/aes")); + +var ENC = _interopRequireWildcard(require("crypto-js/enc-utf8")); + /** IRISHub Client */ -class Client { - /** IRISHub SDK Constructor */ - constructor(config) { - this.config = config; - if (!this.config.rpcConfig) - this.config.rpcConfig = {}; - this.config.bech32Prefix = - config.network === consts.Network.Mainnet - ? { - AccAddr: 'iaa', - AccPub: 'iap', - ValAddr: 'iva', - ValPub: 'ivp', - ConsAddr: 'ica', - ConsPub: 'icp', - } - : { - AccAddr: 'faa', - AccPub: 'fap', - ValAddr: 'fva', - ValPub: 'fvp', - ConsAddr: 'fca', - ConsPub: 'fcp', - }; - this.config.rpcConfig.baseURL = this.config.node; - this.rpcClient = new rpc_client_1.RpcClient(this.config.rpcConfig); - this.eventListener = new event_listener_1.EventListener(this); - // Modules - this.asset = new modules.Asset(this); - this.utils = new modules.Utils(this); - this.bank = new modules.Bank(this); - this.keys = new modules.Keys(this); - this.tx = new modules.Tx(this); - this.staking = new modules.Staking(this); - this.gov = new modules.Gov(this); - this.slashing = new modules.Slashing(this); - this.distribution = new modules.Distribution(this); - this.service = new modules.Service(this); - this.oracle = new modules.Oracle(this); - this.random = new modules.Random(this); - this.auth = new modules.Auth(this); - this.tendermint = new modules.Tendermint(this); - // Set default encrypt/decrypt methods - if (!this.config.keyDAO.encrypt || !this.config.keyDAO.decrypt) { - const defaultKeyDAO = new DefaultKeyDAOImpl(); - this.config.keyDAO.encrypt = defaultKeyDAO.encrypt; - this.config.keyDAO.decrypt = defaultKeyDAO.decrypt; - } +var Client = /*#__PURE__*/function () { + /** IRISHub Client Config */ + + /** Axios client for tendermint rpc requests */ + + /** WebSocket event listener */ + // eventListener: EventListener; + + /** Auth module */ + + /** Token module */ + + /** Bank module */ + + /** Key management module */ + + /** Protobuf module */ + + /** Staking module */ + + /** Tx module */ + + /** Gov module */ + // gov: modules.Gov; + + /** Slashing module */ + + /** Distribution module */ + + /** Service module */ + // service: modules.Service; + + /** Oracle module */ + // oracle: modules.Oracle; + + /** Random module */ + // random: modules.Random; + + /** Utils module */ + + /** Tendermint module */ + + /** Coinswap module */ + // coinswap: modules.Coinswap; + + /** NFT module */ + + /** IRISHub SDK Constructor */ + function Client(config) { + (0, _classCallCheck2["default"])(this, Client); + (0, _defineProperty2["default"])(this, "config", void 0); + (0, _defineProperty2["default"])(this, "rpcClient", void 0); + (0, _defineProperty2["default"])(this, "auth", void 0); + (0, _defineProperty2["default"])(this, "token", void 0); + (0, _defineProperty2["default"])(this, "bank", void 0); + (0, _defineProperty2["default"])(this, "keys", void 0); + (0, _defineProperty2["default"])(this, "protobuf", void 0); + (0, _defineProperty2["default"])(this, "staking", void 0); + (0, _defineProperty2["default"])(this, "tx", void 0); + (0, _defineProperty2["default"])(this, "slashing", void 0); + (0, _defineProperty2["default"])(this, "distribution", void 0); + (0, _defineProperty2["default"])(this, "utils", void 0); + (0, _defineProperty2["default"])(this, "tendermint", void 0); + (0, _defineProperty2["default"])(this, "nft", void 0); + this.config = config; + if (!this.config.rpcConfig) this.config.rpcConfig = {}; + this.config.bech32Prefix = config.network === consts.Network.Mainnet ? { + AccAddr: 'iaa', + AccPub: 'iap', + ValAddr: 'iva', + ValPub: 'ivp', + ConsAddr: 'ica', + ConsPub: 'icp' + } : { + AccAddr: 'faa', + AccPub: 'fap', + ValAddr: 'fva', + ValPub: 'fvp', + ConsAddr: 'fca', + ConsPub: 'fcp' + }; + this.config.rpcConfig.baseURL = this.config.node; + this.rpcClient = new _rpcClient.RpcClient(this.config.rpcConfig); // this.eventListener = new EventListener(this); //TODO (lvsc) there is an error 'Event... is not a constructor' + // Modules + + this.token = new modules.Token(this); + this.utils = new modules.Utils(this); + this.bank = new modules.Bank(this); + this.keys = new modules.Keys(this); + this.tx = new modules.Tx(this); + this.protobuf = new modules.Protobuf(this); + this.staking = new modules.Staking(this); // this.gov = new modules.Gov(this); + + this.slashing = new modules.Slashing(this); + this.distribution = new modules.Distribution(this); // this.service = new modules.Service(this); + // this.oracle = new modules.Oracle(this); + // this.random = new modules.Random(this); + + this.auth = new modules.Auth(this); + this.tendermint = new modules.Tendermint(this); // this.coinswap = new modules.Coinswap(this); + + this.nft = new modules.Nft(this); // Set default encrypt/decrypt methods + + if (!this.config.keyDAO.encrypt || !this.config.keyDAO.decrypt) { + var defaultKeyDAO = new DefaultKeyDAOImpl(); + this.config.keyDAO.encrypt = defaultKeyDAO.encrypt; + this.config.keyDAO.decrypt = defaultKeyDAO.decrypt; } - /** - * Set Key DAO Implemention - * - * @param keyDAO Key DAO Implemention - * @returns The SDK itself - */ - withKeyDAO(keyDAO) { - // Set default encrypt/decrypt methods - if (!keyDAO.encrypt || !keyDAO.decrypt) { - const defaultKeyDAO = new DefaultKeyDAOImpl(); - keyDAO.encrypt = defaultKeyDAO.encrypt; - keyDAO.decrypt = defaultKeyDAO.decrypt; - } - this.config.keyDAO = keyDAO; - return this; + } + /** + * Set Key DAO Implemention + * + * @param keyDAO Key DAO Implemention + * @returns The SDK itself + */ + + + (0, _createClass2["default"])(Client, [{ + key: "withKeyDAO", + value: function withKeyDAO(keyDAO) { + // Set default encrypt/decrypt methods + if (!keyDAO.encrypt || !keyDAO.decrypt) { + var defaultKeyDAO = new DefaultKeyDAOImpl(); + keyDAO.encrypt = defaultKeyDAO.encrypt; + keyDAO.decrypt = defaultKeyDAO.decrypt; + } + + this.config.keyDAO = keyDAO; + return this; } /** * Set IRISHub network type @@ -80,9 +166,12 @@ class Client { * @param network IRISHub network type, mainnet / testnet * @returns The SDK itself */ - withNetwork(network) { - this.config.network = network; - return this; + + }, { + key: "withNetwork", + value: function withNetwork(network) { + this.config.network = network; + return this; } /** * Set IRISHub chain-id @@ -90,9 +179,12 @@ class Client { * @param chainId IRISHub chain-id * @returns The SDK itself */ - withChainId(chainId) { - this.config.chainId = chainId; - return this; + + }, { + key: "withChainId", + value: function withChainId(chainId) { + this.config.chainId = chainId; + return this; } /** * Set default gas limit @@ -100,9 +192,12 @@ class Client { * @param gas Default gas limit * @returns The SDK itself */ - withGas(gas) { - this.config.gas = gas; - return this; + + }, { + key: "withGas", + value: function withGas(gas) { + this.config.gas = gas; + return this; } /** * Set default fees @@ -110,9 +205,12 @@ class Client { * @param fee Default fee amount * @returns The SDK itself */ - withFee(fee) { - this.config.fee = fee; - return this; + + }, { + key: "withFee", + value: function withFee(fee) { + this.config.fee = fee; + return this; } /** * Set Axios config for tendermint rpc requests, refer to: https://github.com/axios/axios#request-config. @@ -122,52 +220,99 @@ class Client { * @param rpcConfig Axios config for tendermint rpc requests * @returns The SDK itself */ - withRpcConfig(rpcConfig) { - rpcConfig.baseURL = this.config.node; - this.config.rpcConfig = rpcConfig; - this.rpcClient = new rpc_client_1.RpcClient(this.config.rpcConfig); - return this; + + }, { + key: "withRpcConfig", + value: function withRpcConfig(rpcConfig) { + rpcConfig.baseURL = this.config.node; + this.config.rpcConfig = rpcConfig; + this.rpcClient = new _rpcClient.RpcClient(this.config.rpcConfig); + return this; } -} + }]); + return Client; +}(); +/** IRISHub SDK Config */ + + exports.Client = Client; + /** Default IRISHub Client Config */ -class DefaultClientConfig { - constructor() { - this.node = ''; - this.network = types.Network.Mainnet; - this.chainId = 'irishub'; - this.gas = '100000'; - this.fee = { amount: '0.6', denom: 'iris' }; - this.keyDAO = new DefaultKeyDAOImpl(); - this.bech32Prefix = {}; - this.rpcConfig = { timeout: 2000 }; - } -} +var DefaultClientConfig = function DefaultClientConfig() { + (0, _classCallCheck2["default"])(this, DefaultClientConfig); + (0, _defineProperty2["default"])(this, "node", void 0); + (0, _defineProperty2["default"])(this, "network", void 0); + (0, _defineProperty2["default"])(this, "chainId", void 0); + (0, _defineProperty2["default"])(this, "gas", void 0); + (0, _defineProperty2["default"])(this, "fee", void 0); + (0, _defineProperty2["default"])(this, "keyDAO", void 0); + (0, _defineProperty2["default"])(this, "bech32Prefix", void 0); + (0, _defineProperty2["default"])(this, "rpcConfig", void 0); + this.node = ''; + this.network = types.Network.Mainnet; + this.chainId = ''; + this.gas = '100000'; + this.fee = { + amount: '', + denom: '' + }; + this.keyDAO = new DefaultKeyDAOImpl(); + this.bech32Prefix = {}; + this.rpcConfig = { + timeout: 2000 + }; +}; +/** + * Key DAO Interface, to be implemented by apps if they need the key management. + */ + + exports.DefaultClientConfig = DefaultClientConfig; -class DefaultKeyDAOImpl { - write(name, key) { - throw new errors_1.SdkError('Method not implemented. Please implement KeyDAO first.'); + +var DefaultKeyDAOImpl = /*#__PURE__*/function () { + function DefaultKeyDAOImpl() { + (0, _classCallCheck2["default"])(this, DefaultKeyDAOImpl); + } + + (0, _createClass2["default"])(DefaultKeyDAOImpl, [{ + key: "write", + value: function write(name, key) { + throw new _errors.SdkError('Method not implemented. Please implement KeyDAO first.', _errors.CODES.Panic); } - read(name) { - throw new errors_1.SdkError('Method not implemented. Please implement KeyDAO first.'); + }, { + key: "read", + value: function read(name) { + throw new _errors.SdkError('Method not implemented. Please implement KeyDAO first.', _errors.CODES.Panic); } - delete(name) { - throw new errors_1.SdkError('Method not implemented. Please implement KeyDAO first.'); + }, { + key: "delete", + value: function _delete(name) { + throw new _errors.SdkError('Method not implemented. Please implement KeyDAO first.', _errors.CODES.Panic); } - encrypt(privKey, password) { - const encrypted = AES.encrypt(privKey, password).toString(); - if (!encrypted) { - throw new errors_1.SdkError('Private key encrypt failed'); - } - return encrypted; + }, { + key: "encrypt", + value: function encrypt(privKey, password) { + var encrypted = AES.encrypt(privKey, password).toString(); + + if (!encrypted) { + throw new _errors.SdkError('Private key encrypt failed', _errors.CODES.Internal); + } + + return encrypted; } - decrypt(encrptedPrivKey, password) { - const decrypted = AES.decrypt(encrptedPrivKey, password).toString(ENC); - if (!decrypted) { - throw new errors_1.SdkError('Wrong password'); - } - return decrypted; + }, { + key: "decrypt", + value: function decrypt(encrptedPrivKey, password) { + var decrypted = AES.decrypt(encrptedPrivKey, password).toString(ENC); + + if (!decrypted) { + throw new _errors.SdkError('Wrong password', _errors.CODES.InvalidPassword); + } + + return decrypted; } -} -exports.DefaultKeyDAOImpl = DefaultKeyDAOImpl; -//# sourceMappingURL=client.js.map \ No newline at end of file + }]); + return DefaultKeyDAOImpl; +}(); + +exports.DefaultKeyDAOImpl = DefaultKeyDAOImpl; \ No newline at end of file diff --git a/dist/src/client.js.map b/dist/src/client.js.map deleted file mode 100644 index f5910613..00000000 --- a/dist/src/client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":";;AAAA,4CAA4C;AAC5C,qCAAqC;AACrC,kDAA8C;AAC9C,0DAAsD;AAEtD,iCAAiC;AACjC,qCAAoC;AACpC,qCAAqC;AACrC,0CAA0C;AAE1C,qBAAqB;AACrB,MAAa,MAAM;IAoDjB,8BAA8B;IAC9B,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS;YAAE,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;QAEvD,IAAI,CAAC,MAAM,CAAC,YAAY;YACtB,MAAM,CAAC,OAAO,KAAK,MAAM,CAAC,OAAO,CAAC,OAAO;gBACvC,CAAC,CAAC;oBACE,OAAO,EAAE,KAAK;oBACd,MAAM,EAAE,KAAK;oBACb,OAAO,EAAE,KAAK;oBACd,MAAM,EAAE,KAAK;oBACb,QAAQ,EAAE,KAAK;oBACf,OAAO,EAAE,KAAK;iBACf;gBACH,CAAC,CAAC;oBACE,OAAO,EAAE,KAAK;oBACd,MAAM,EAAE,KAAK;oBACb,OAAO,EAAE,KAAK;oBACd,MAAM,EAAE,KAAK;oBACb,QAAQ,EAAE,KAAK;oBACf,OAAO,EAAE,KAAK;iBACf,CAAC;QACR,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QACjD,IAAI,CAAC,SAAS,GAAG,IAAI,sBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACtD,IAAI,CAAC,aAAa,GAAG,IAAI,8BAAa,CAAC,IAAI,CAAC,CAAC;QAE7C,UAAU;QACV,IAAI,CAAC,KAAK,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,IAAI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,EAAE,GAAG,IAAI,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,YAAY,GAAG,IAAI,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACnD,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,IAAI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAE/C,sCAAsC;QACtC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;YAC9D,MAAM,aAAa,GAAG,IAAI,iBAAiB,EAAE,CAAC;YAC9C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC;YACnD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC;SACpD;IACH,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,MAAc;QACvB,sCAAsC;QACtC,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YACtC,MAAM,aAAa,GAAG,IAAI,iBAAiB,EAAE,CAAC;YAC9C,MAAM,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC;YACvC,MAAM,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC;SACxC;QACD,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACH,WAAW,CAAC,OAAuB;QACjC,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACH,WAAW,CAAC,OAAe;QACzB,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,GAAW;QACjB,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,GAAe;QACrB,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;;;OAOG;IACH,aAAa,CAAC,SAA6B;QACzC,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QACrC,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC;QAClC,IAAI,CAAC,SAAS,GAAG,IAAI,sBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlLD,wBAkLC;AA6BD,oCAAoC;AACpC,MAAa,mBAAmB;IAU9B;QACE,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QACzB,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC;QACpB,IAAI,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAC5C,IAAI,CAAC,MAAM,GAAG,IAAI,iBAAiB,EAAE,CAAC;QACtC,IAAI,CAAC,YAAY,GAAG,EAAkB,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACrC,CAAC;CACF;AApBD,kDAoBC;AA6DD,MAAa,iBAAiB;IAC5B,KAAK,CAAC,IAAY,EAAE,GAAc;QAChC,MAAM,IAAI,iBAAQ,CAChB,wDAAwD,CACzD,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,IAAY;QACf,MAAM,IAAI,iBAAQ,CAChB,wDAAwD,CACzD,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,IAAY;QACjB,MAAM,IAAI,iBAAQ,CAChB,wDAAwD,CACzD,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,OAAe,EAAE,QAAgB;QACvC,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;QAC5D,IAAI,CAAC,SAAS,EAAE;YACd,MAAM,IAAI,iBAAQ,CAAC,4BAA4B,CAAC,CAAC;SAClD;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,CAAC,eAAuB,EAAE,QAAgB;QAC/C,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QACvE,IAAI,CAAC,SAAS,EAAE;YACd,MAAM,IAAI,iBAAQ,CAAC,gBAAgB,CAAC,CAAC;SACtC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AA/BD,8CA+BC"} \ No newline at end of file diff --git a/dist/src/errors.d.ts b/dist/src/errors.d.ts index 3f96f105..e266e042 100644 --- a/dist/src/errors.d.ts +++ b/dist/src/errors.d.ts @@ -1,7 +1,49 @@ +/** Error codes in irishub v1.0 */ +export declare const CODES: { + OK: number; + Internal: number; + TxParseError: number; + InvalidSequence: number; + Unauthorized: number; + InsufficientFunds: number; + UnknownRequest: number; + InvalidAddress: number; + InvalidPubkey: number; + UnknownAddress: number; + InvalidCoins: number; + OutOfGas: number; + MemoTooLarge: number; + InsufficientFee: number; + TooManySignatures: number; + NoSignatures: number; + ErrJsonMarshal: number; + ErrJsonUnmarshal: number; + InvalidRequest: number; + TxInMempoolCache: number; + MempoolIsFull: number; + TxTooLarge: number; + KeyNotFound: number; + InvalidPassword: number; + SignerDoesNotMatch: number; + InvalidGasAdjustment: number; + InvalidHeight: number; + InvalidVersion: number; + InvalidChainId: number; + InvalidType: number; + TxTimeoutHeight: number; + UnknownExtensionOptions: number; + IncorrectAccountSequence: number; + FailedPackingProtobufMessageToAny: number; + FailedUnpackingProtobufMessagFromAny: number; + InternalLogicError: number; + Conflict: number; + FeatureNotSupported: number; + Panic: number; + InvalidMnemonic: number; + DerivePrivateKeyError: number; +}; /** IRISHub SDK Error */ export declare class SdkError extends Error { - /** Error code space, reserved field */ - codespace: string; /** Error code */ code: number; /** diff --git a/dist/src/errors.js b/dist/src/errors.js index 38772b27..c249d365 100644 --- a/dist/src/errors.js +++ b/dist/src/errors.js @@ -1,101 +1,108 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const CODESPACE_ROOT = 'sdk'; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.SdkError = exports.CODES = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); + +var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); + +var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); + +var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); + +var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +var CODESPACE_ROOT = 'sdk'; /** Error codes in irishub v1.0 */ -const CODES = { - OK: 0, - Internal: 1, - TxDecode: 2, - InvalidSequence: 3, - Unauthorized: 4, - InsufficientFunds: 5, - UnknownRequest: 6, - InvalidAddress: 7, - InvalidPubkey: 8, - UnknownAddress: 9, - InvalidCoins: 10, - OutOfGas: 11, - MemoTooLarge: 12, - InsufficientFee: 13, - OutOfService: 15, - TooManySignatures: 14, - NoSignatures: 15, - ErrJsonMarshal: 16, - ErrJsonUnmarshal: 17, - InvalidRequest: 18, - TxInMempoolCache: 19, - MempoolIsFull: 20, - TxTooLarge: 21, + +var CODES = { + OK: 0, + Internal: 1, + TxParseError: 2, + InvalidSequence: 3, + Unauthorized: 4, + InsufficientFunds: 5, + UnknownRequest: 6, + InvalidAddress: 7, + InvalidPubkey: 8, + UnknownAddress: 9, + InvalidCoins: 10, + OutOfGas: 11, + MemoTooLarge: 12, + InsufficientFee: 13, + TooManySignatures: 14, + NoSignatures: 15, + ErrJsonMarshal: 16, + ErrJsonUnmarshal: 17, + InvalidRequest: 18, + TxInMempoolCache: 19, + MempoolIsFull: 20, + TxTooLarge: 21, + KeyNotFound: 22, + InvalidPassword: 23, + SignerDoesNotMatch: 24, + InvalidGasAdjustment: 25, + InvalidHeight: 26, + InvalidVersion: 27, + InvalidChainId: 28, + InvalidType: 29, + TxTimeoutHeight: 30, + UnknownExtensionOptions: 31, + IncorrectAccountSequence: 32, + FailedPackingProtobufMessageToAny: 33, + FailedUnpackingProtobufMessagFromAny: 34, + InternalLogicError: 35, + Conflict: 36, + FeatureNotSupported: 37, + Panic: 111222, + //sdk custom + InvalidMnemonic: 801, + DerivePrivateKeyError: 802 }; -/** Error codes in irishub v0.17 */ -const CODES_V17 = { - OK: 0, - Internal: 1, - TxDecode: 2, - InvalidSequence: 3, - Unauthorized: 4, - InsufficientFunds: 5, - UnknownRequest: 6, - InvalidAddress: 7, - InvalidPubkey: 8, - UnknownAddress: 9, - InsufficientCoins: 10, - InvalidCoins: 11, - OutOfGas: 12, - MemoTooLarge: 13, - InsufficientFee: 14, - OutOfService: 15, - TooManySignatures: 16, - GasPriceTooLow: 17, - InvalidGas: 18, - InvalidTxFee: 19, - InvalidFeeDenom: 20, - ExceedsTxSize: 21, - ServiceTxLimit: 22, - PaginationParams: 23, -}; -// Map error codes in irishub v0.17 to v1.0 -const errorMap = new Map([ - [CODESPACE_ROOT + CODES_V17.OK, CODES.OK], - [CODESPACE_ROOT + CODES_V17.Internal, CODES.Internal], - [CODESPACE_ROOT + CODES_V17.TxDecode, CODES.TxDecode], - [CODESPACE_ROOT + CODES_V17.InvalidSequence, CODES.InvalidSequence], - [CODESPACE_ROOT + CODES_V17.Unauthorized, CODES.Unauthorized], - [CODESPACE_ROOT + CODES_V17.InsufficientFunds, CODES.InsufficientFunds], - [CODESPACE_ROOT + CODES_V17.UnknownRequest, CODES.UnknownRequest], - [CODESPACE_ROOT + CODES_V17.InvalidAddress, CODES.InvalidAddress], - [CODESPACE_ROOT + CODES_V17.InvalidPubkey, CODES.InvalidPubkey], - [CODESPACE_ROOT + CODES_V17.UnknownAddress, CODES.UnknownAddress], - [CODESPACE_ROOT + CODES_V17.InsufficientCoins, CODES.InsufficientFunds], - [CODESPACE_ROOT + CODES_V17.InvalidCoins, CODES.InvalidCoins], - [CODESPACE_ROOT + CODES_V17.OutOfGas, CODES.OutOfGas], - [CODESPACE_ROOT + CODES_V17.MemoTooLarge, CODES.MemoTooLarge], - [CODESPACE_ROOT + CODES_V17.InsufficientFee, CODES.InsufficientFee], - [CODESPACE_ROOT + CODES_V17.OutOfService, CODES.UnknownRequest], - [CODESPACE_ROOT + CODES_V17.TooManySignatures, CODES.TooManySignatures], - [CODESPACE_ROOT + CODES_V17.GasPriceTooLow, CODES.InsufficientFee], - [CODESPACE_ROOT + CODES_V17.InvalidGas, CODES.InvalidRequest], - [CODESPACE_ROOT + CODES_V17.InvalidTxFee, CODES.InvalidRequest], - [CODESPACE_ROOT + CODES_V17.InvalidFeeDenom, CODES.InvalidRequest], - [CODESPACE_ROOT + CODES_V17.ExceedsTxSize, CODES.TxTooLarge], - [CODESPACE_ROOT + CODES_V17.ServiceTxLimit, CODES.InvalidRequest], - [CODESPACE_ROOT + CODES_V17.PaginationParams, CODES.InvalidRequest], -]); /** IRISHub SDK Error */ -class SdkError extends Error { - /** - * Initialize SdkError with irishub error msg - * @param msg irishub error msg - */ - constructor(msg, code = CODES.InvalidRequest) { - super(msg); - /** Error code space, reserved field */ - this.codespace = CODESPACE_ROOT; - /** Error code */ - this.code = CODES.InvalidRequest; - const mappedCode = errorMap.get(this.codespace + code); - this.code = mappedCode ? mappedCode : CODES.InvalidRequest; - } -} -exports.SdkError = SdkError; -//# sourceMappingURL=errors.js.map \ No newline at end of file + +exports.CODES = CODES; + +var SdkError = /*#__PURE__*/function (_Error) { + (0, _inherits2["default"])(SdkError, _Error); + + var _super = _createSuper(SdkError); + + // /** Error code space, reserved field */ + // codespace = CODESPACE_ROOT; + + /** Error code */ + + /** + * Initialize SdkError with irishub error msg + * @param msg irishub error msg + */ + function SdkError(msg) { + var _this; + + var code = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : CODES.InvalidRequest; + (0, _classCallCheck2["default"])(this, SdkError); + _this = _super.call(this, msg); // const mappedCode = errorMap.get(this.codespace + code); + + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "code", CODES.InvalidRequest); + _this.code = code; + return _this; + } + + return SdkError; +}( /*#__PURE__*/(0, _wrapNativeSuper2["default"])(Error)); + +exports.SdkError = SdkError; \ No newline at end of file diff --git a/dist/src/errors.js.map b/dist/src/errors.js.map deleted file mode 100644 index 078c7538..00000000 --- a/dist/src/errors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":";;AAAA,MAAM,cAAc,GAAG,KAAK,CAAC;AAE7B,kCAAkC;AAClC,MAAM,KAAK,GAAG;IACZ,EAAE,EAAE,CAAC;IACL,QAAQ,EAAE,CAAC;IACX,QAAQ,EAAE,CAAC;IACX,eAAe,EAAE,CAAC;IAClB,YAAY,EAAE,CAAC;IACf,iBAAiB,EAAE,CAAC;IACpB,cAAc,EAAE,CAAC;IACjB,cAAc,EAAE,CAAC;IACjB,aAAa,EAAE,CAAC;IAChB,cAAc,EAAE,CAAC;IACjB,YAAY,EAAE,EAAE;IAChB,QAAQ,EAAE,EAAE;IACZ,YAAY,EAAE,EAAE;IAChB,eAAe,EAAE,EAAE;IACnB,YAAY,EAAE,EAAE;IAChB,iBAAiB,EAAE,EAAE;IACrB,YAAY,EAAE,EAAE;IAChB,cAAc,EAAE,EAAE;IAClB,gBAAgB,EAAE,EAAE;IACpB,cAAc,EAAE,EAAE;IAClB,gBAAgB,EAAE,EAAE;IACpB,aAAa,EAAE,EAAE;IACjB,UAAU,EAAE,EAAE;CACf,CAAC;AAEF,mCAAmC;AACnC,MAAM,SAAS,GAAG;IAChB,EAAE,EAAE,CAAC;IACL,QAAQ,EAAE,CAAC;IACX,QAAQ,EAAE,CAAC;IACX,eAAe,EAAE,CAAC;IAClB,YAAY,EAAE,CAAC;IACf,iBAAiB,EAAE,CAAC;IACpB,cAAc,EAAE,CAAC;IACjB,cAAc,EAAE,CAAC;IACjB,aAAa,EAAE,CAAC;IAChB,cAAc,EAAE,CAAC;IACjB,iBAAiB,EAAE,EAAE;IACrB,YAAY,EAAE,EAAE;IAChB,QAAQ,EAAE,EAAE;IACZ,YAAY,EAAE,EAAE;IAChB,eAAe,EAAE,EAAE;IACnB,YAAY,EAAE,EAAE;IAChB,iBAAiB,EAAE,EAAE;IACrB,cAAc,EAAE,EAAE;IAClB,UAAU,EAAE,EAAE;IACd,YAAY,EAAE,EAAE;IAChB,eAAe,EAAE,EAAE;IACnB,aAAa,EAAE,EAAE;IACjB,cAAc,EAAE,EAAE;IAClB,gBAAgB,EAAE,EAAE;CACrB,CAAC;AAEF,2CAA2C;AAC3C,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAiB;IACvC,CAAC,cAAc,GAAG,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC;IACzC,CAAC,cAAc,GAAG,SAAS,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;IACrD,CAAC,cAAc,GAAG,SAAS,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;IACrD,CAAC,cAAc,GAAG,SAAS,CAAC,eAAe,EAAE,KAAK,CAAC,eAAe,CAAC;IACnE,CAAC,cAAc,GAAG,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7D,CAAC,cAAc,GAAG,SAAS,CAAC,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACvE,CAAC,cAAc,GAAG,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC;IACjE,CAAC,cAAc,GAAG,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC;IACjE,CAAC,cAAc,GAAG,SAAS,CAAC,aAAa,EAAE,KAAK,CAAC,aAAa,CAAC;IAC/D,CAAC,cAAc,GAAG,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC;IACjE,CAAC,cAAc,GAAG,SAAS,CAAC,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACvE,CAAC,cAAc,GAAG,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7D,CAAC,cAAc,GAAG,SAAS,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;IACrD,CAAC,cAAc,GAAG,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7D,CAAC,cAAc,GAAG,SAAS,CAAC,eAAe,EAAE,KAAK,CAAC,eAAe,CAAC;IACnE,CAAC,cAAc,GAAG,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC;IAC/D,CAAC,cAAc,GAAG,SAAS,CAAC,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACvE,CAAC,cAAc,GAAG,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,eAAe,CAAC;IAClE,CAAC,cAAc,GAAG,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC;IAC7D,CAAC,cAAc,GAAG,SAAS,CAAC,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC;IAC/D,CAAC,cAAc,GAAG,SAAS,CAAC,eAAe,EAAE,KAAK,CAAC,cAAc,CAAC;IAClE,CAAC,cAAc,GAAG,SAAS,CAAC,aAAa,EAAE,KAAK,CAAC,UAAU,CAAC;IAC5D,CAAC,cAAc,GAAG,SAAS,CAAC,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC;IACjE,CAAC,cAAc,GAAG,SAAS,CAAC,gBAAgB,EAAE,KAAK,CAAC,cAAc,CAAC;CACpE,CAAC,CAAC;AAEH,wBAAwB;AACxB,MAAa,QAAS,SAAQ,KAAK;IAMjC;;;OAGG;IACH,YAAY,GAAW,EAAE,IAAI,GAAG,KAAK,CAAC,cAAc;QAClD,KAAK,CAAC,GAAG,CAAC,CAAC;QAVb,uCAAuC;QACvC,cAAS,GAAG,cAAc,CAAC;QAC3B,iBAAiB;QACjB,SAAI,GAAG,KAAK,CAAC,cAAc,CAAC;QAQ1B,MAAM,UAAU,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;QACvD,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC;IAC7D,CAAC;CACF;AAfD,4BAeC"} \ No newline at end of file diff --git a/dist/src/helper/index.d.ts b/dist/src/helper/index.d.ts new file mode 100644 index 00000000..cf265885 --- /dev/null +++ b/dist/src/helper/index.d.ts @@ -0,0 +1,3 @@ +export * from './modelCreator'; +export * from './txHelper'; +export * from './txModelCreator'; diff --git a/dist/src/helper/index.js b/dist/src/helper/index.js new file mode 100644 index 00000000..cf78d558 --- /dev/null +++ b/dist/src/helper/index.js @@ -0,0 +1,44 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _modelCreator = require("./modelCreator"); + +Object.keys(_modelCreator).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _modelCreator[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _modelCreator[key]; + } + }); +}); + +var _txHelper = require("./txHelper"); + +Object.keys(_txHelper).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _txHelper[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _txHelper[key]; + } + }); +}); + +var _txModelCreator = require("./txModelCreator"); + +Object.keys(_txModelCreator).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _txModelCreator[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _txModelCreator[key]; + } + }); +}); \ No newline at end of file diff --git a/dist/src/helper/modelCreator.d.ts b/dist/src/helper/modelCreator.d.ts new file mode 100644 index 00000000..2923fd88 --- /dev/null +++ b/dist/src/helper/modelCreator.d.ts @@ -0,0 +1,3 @@ +export declare class ModelCreator { + static createPaginationModel(page_number?: number, page_size?: number, count_total?: boolean, key?: string): any; +} diff --git a/dist/src/helper/modelCreator.js b/dist/src/helper/modelCreator.js new file mode 100644 index 00000000..0c9a1641 --- /dev/null +++ b/dist/src/helper/modelCreator.js @@ -0,0 +1,49 @@ +"use strict"; + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ModelCreator = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var types = _interopRequireWildcard(require("../types")); + +var is = _interopRequireWildcard(require("is_js")); + +var ModelCreator = /*#__PURE__*/function () { + function ModelCreator() { + (0, _classCallCheck2["default"])(this, ModelCreator); + } + + (0, _createClass2["default"])(ModelCreator, null, [{ + key: "createPaginationModel", + value: function createPaginationModel() { + var page_number = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; + var page_size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 30; + var count_total = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var key = arguments.length > 3 ? arguments[3] : undefined; + var pagination = new types.base_query_pagination_pb.PageRequest(); + + if (is.not.undefined(key)) { + //only one of offset or key should be set. + pagination.setKey(key); + } else { + pagination.setOffset((page_number - 1) * page_size > 0 ? (page_number - 1) * page_size : 0); + pagination.setLimit(page_size > 0 ? page_size : 10); + } + + pagination.setCountTotal(count_total); + return pagination; + } + }]); + return ModelCreator; +}(); + +exports.ModelCreator = ModelCreator; \ No newline at end of file diff --git a/dist/src/helper/txHelper.d.ts b/dist/src/helper/txHelper.d.ts new file mode 100644 index 00000000..40b1ab3f --- /dev/null +++ b/dist/src/helper/txHelper.d.ts @@ -0,0 +1,7 @@ +/// +export declare class TxHelper { + static getHexPubkey(pubkey: string): string; + static isSignDoc(signDoc: any): boolean; + static isAny(value: any): boolean; + static ecodeModelAddress(address: string): Buffer; +} diff --git a/dist/src/helper/txHelper.js b/dist/src/helper/txHelper.js new file mode 100644 index 00000000..a949831d --- /dev/null +++ b/dist/src/helper/txHelper.js @@ -0,0 +1,61 @@ +"use strict"; + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.TxHelper = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var Bech32 = _interopRequireWildcard(require("bech32")); + +var types = _interopRequireWildcard(require("../types")); + +var _errors = require("../errors"); + +var TxHelper = /*#__PURE__*/function () { + function TxHelper() { + (0, _classCallCheck2["default"])(this, TxHelper); + } + + (0, _createClass2["default"])(TxHelper, null, [{ + key: "getHexPubkey", + value: function getHexPubkey(pubkey) { + try { + var pk = Bech32.decode(pubkey); + pubkey = Buffer.from(Bech32.fromWords(pk.words)).toString('hex').toUpperCase(); + } catch (e) {} + + return pubkey; + } + }, { + key: "isSignDoc", + value: function isSignDoc(signDoc) { + return signDoc instanceof types.tx_tx_pb.SignDoc; + } + }, { + key: "isAny", + value: function isAny(value) { + return value instanceof types.any_pb.Any; + } + }, { + key: "ecodeModelAddress", + value: function ecodeModelAddress(address) { + if (!address) { + throw new _errors.SdkError("address is empty", _errors.CODES.UnknownAddress); + } + + var words = Bech32.decode(address, 'utf-8').words; + return Buffer.from(Bech32.fromWords(words)); + } + }]); + return TxHelper; +}(); + +exports.TxHelper = TxHelper; \ No newline at end of file diff --git a/dist/src/helper/txModelCreator.d.ts b/dist/src/helper/txModelCreator.d.ts new file mode 100644 index 00000000..a85840ba --- /dev/null +++ b/dist/src/helper/txModelCreator.d.ts @@ -0,0 +1,13 @@ +import * as types from '../types'; +export declare class TxModelCreator { + static createBodyModel(msgs: types.Msg[], memo: string, timeoutHeight: number): any; + static createAuthInfoModel(fee: types.StdFee, sequence?: string, publicKey?: string | types.Pubkey): any; + static createSignerInfoModel(sequence: string, publicKey: string | types.Pubkey): any; + static createPublicKeyModel(publicKey: string | types.Pubkey): { + type: string; + value: any; + }; + static createFeeModel(amounts: types.Coin[], gasLimit: string): any; + static createCoinModel(denom: string, amount: string): any; + static createAnyModel(typeUrl: string, value: Uint8Array): any; +} diff --git a/dist/src/helper/txModelCreator.js b/dist/src/helper/txModelCreator.js new file mode 100644 index 00000000..c50d1837 --- /dev/null +++ b/dist/src/helper/txModelCreator.js @@ -0,0 +1,150 @@ +"use strict"; + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.TxModelCreator = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var types = _interopRequireWildcard(require("../types")); + +var _txHelper = require("./txHelper"); + +var _errors = require("../errors"); + +var TxModelCreator = /*#__PURE__*/function () { + function TxModelCreator() { + (0, _classCallCheck2["default"])(this, TxModelCreator); + } + + (0, _createClass2["default"])(TxModelCreator, null, [{ + key: "createBodyModel", + value: function createBodyModel(msgs, memo, timeoutHeight) { + var body = new types.tx_tx_pb.TxBody(); + msgs.forEach(function (msg) { + body.addMessages(msg.pack()); + }); + body.setMemo(memo); + body.setTimeoutHeight(timeoutHeight); + return body; + } + }, { + key: "createAuthInfoModel", + value: function createAuthInfoModel(fee, sequence, publicKey) { + var authInfo = new types.tx_tx_pb.AuthInfo(); + var feeModel = TxModelCreator.createFeeModel(fee.amount, fee.gasLimit); + authInfo.setFee(feeModel); + + if (publicKey && typeof sequence != 'undefined') { + var signerInfo = TxModelCreator.createSignerInfoModel(sequence, publicKey); + authInfo.addSignerInfos(signerInfo); + } + + return authInfo; + } + }, { + key: "createSignerInfoModel", + value: function createSignerInfoModel(sequence, publicKey) { + var single = new types.tx_tx_pb.ModeInfo.Single(); + single.setMode(types.signing_signing_pb.SignMode.SIGN_MODE_DIRECT); + var mode_info = new types.tx_tx_pb.ModeInfo(); + mode_info.setSingle(single); + var signerInfo = new types.tx_tx_pb.SignerInfo(); + signerInfo.setModeInfo(mode_info); + signerInfo.setSequence(String(sequence)); + + if (publicKey) { + var pk = TxModelCreator.createPublicKeyModel(publicKey); + signerInfo.setPublicKey(TxModelCreator.createAnyModel(pk.type, pk.value.serializeBinary())); + } + + return signerInfo; + } + }, { + key: "createPublicKeyModel", + value: function createPublicKeyModel(publicKey) { + if (typeof publicKey == 'string') { + publicKey = { + type: types.PubkeyType.secp256k1, + value: publicKey + }; + } + + var pk_hex = _txHelper.TxHelper.getHexPubkey(publicKey.value); + + var pubByteArray = Array.from(Buffer.from(pk_hex, 'hex')); + + if (pubByteArray.length > 33) { + //去掉amino编码前缀 + pubByteArray = pubByteArray.slice(5); + } + + var pk; + var type = ''; + + switch (publicKey.type) { + case types.PubkeyType.secp256k1: + type = 'cosmos.crypto.secp256k1.PubKey'; + pk = new types.crypto_secp256k1_keys_pb.PubKey(); + break; + + case types.PubkeyType.ed25519: + type = 'cosmos.crypto.ed25519.PubKey'; + pk = new types.crypto_ed25519_keys_pb.PubKey(); + break; + + case types.PubkeyType.sm2: + type = 'cosmos.crypto.sm2.PubKey'; + pk = new types.crypto_sm2_keys_pb.PubKey(); + break; + } + + if (!pk) { + throw new _errors.SdkError("Unsupported public Key types", _errors.CODES.InvalidPubkey); + } + + pk.setKey(Buffer.from(pubByteArray)); + return { + type: type, + value: pk + }; + } + }, { + key: "createFeeModel", + value: function createFeeModel(amounts, gasLimit) { + var fee = new types.tx_tx_pb.Fee(); + amounts.forEach(function (amount) { + var coin = TxModelCreator.createCoinModel(amount.denom, amount.amount); + fee.addAmount(coin); + }); + fee.setGasLimit(String(gasLimit)); + return fee; + } + }, { + key: "createCoinModel", + value: function createCoinModel(denom, amount) { + var coin = new types.base_coin_pb.Coin(); + coin.setDenom(denom); + coin.setAmount(String(amount)); + return coin; + } + }, { + key: "createAnyModel", + value: function createAnyModel(typeUrl, value) { + var msg_any = new types.any_pb.Any(); + msg_any.setTypeUrl("/".concat(typeUrl)); + msg_any.setValue(value); + return msg_any; + } + }]); + return TxModelCreator; +}(); + +exports.TxModelCreator = TxModelCreator; \ No newline at end of file diff --git a/dist/src/import.d.js b/dist/src/import.d.js new file mode 100644 index 00000000..9a390c31 --- /dev/null +++ b/dist/src/import.d.js @@ -0,0 +1 @@ +"use strict"; \ No newline at end of file diff --git a/dist/src/index.d.ts b/dist/src/index.d.ts index 017222c4..752e5303 100644 --- a/dist/src/index.d.ts +++ b/dist/src/index.d.ts @@ -1,5 +1,7 @@ -export * from './types/constants'; -export { KeyDAO } from './client'; +export * as types from './types'; +export * as utils from './utils'; +export { Client, ClientConfig, KeyDAO } from './client'; +export { Crypto } from "./utils"; import { Client, ClientConfig } from './client'; /** * Initialize IRISHub SDK diff --git a/dist/src/index.js b/dist/src/index.js index 91c508bb..9717698a 100644 --- a/dist/src/index.js +++ b/dist/src/index.js @@ -1,10 +1,47 @@ "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./types/constants")); -const client_1 = require("./client"); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.newClient = newClient; +Object.defineProperty(exports, "Crypto", { + enumerable: true, + get: function get() { + return _utils.Crypto; + } +}); +Object.defineProperty(exports, "Client", { + enumerable: true, + get: function get() { + return _client.Client; + } +}); +Object.defineProperty(exports, "ClientConfig", { + enumerable: true, + get: function get() { + return _client.ClientConfig; + } +}); +Object.defineProperty(exports, "KeyDAO", { + enumerable: true, + get: function get() { + return _client.KeyDAO; + } +}); +exports.utils = exports.types = void 0; + +var _types = _interopRequireWildcard(require("./types")); + +exports.types = _types; + +var _utils = _interopRequireWildcard(require("./utils")); + +exports.utils = _utils; + +var _client = require("./client"); + /** * Initialize IRISHub SDK * @@ -13,9 +50,7 @@ const client_1 = require("./client"); * @returns New IRISHub SDK Instance */ function newClient(config) { - const copyConfig = new client_1.DefaultClientConfig(); - Object.assign(copyConfig, config); - return new client_1.Client(copyConfig); -} -exports.newClient = newClient; -//# sourceMappingURL=index.js.map \ No newline at end of file + var copyConfig = new _client.DefaultClientConfig(); + Object.assign(copyConfig, config); + return new _client.Client(copyConfig); +} \ No newline at end of file diff --git a/dist/src/index.js.map b/dist/src/index.js.map deleted file mode 100644 index 7fa44d0d..00000000 --- a/dist/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;AAAA,uCAAkC;AAElC,qCAKkB;AAElB;;;;;;GAMG;AACH,SAAgB,SAAS,CAAC,MAAoB;IAC5C,MAAM,UAAU,GAAG,IAAI,4BAAmB,EAAE,CAAC;IAC7C,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAClC,OAAO,IAAI,eAAM,CAAC,UAAU,CAAC,CAAC;AAChC,CAAC;AAJD,8BAIC"} \ No newline at end of file diff --git a/dist/src/modules/asset.d.ts b/dist/src/modules/asset.d.ts deleted file mode 100644 index c7df2d6c..00000000 --- a/dist/src/modules/asset.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Client } from '../client'; -import * as types from '../types'; -/** - * IRISHub allows individuals and companies to create and issue their own tokens. - * - * [More Details](https://www.irisnet.org/docs/features/asset.html) - * - * @category Modules - * @since v0.17 - */ -export declare class Asset { - /** @hidden */ - private client; - /** @hidden */ - constructor(client: Client); - /** - * Query details of a token - * @param symbol The token symbol - * @returns - * @since v0.17 - */ - queryToken(symbol: string): Promise; - /** - * Query details of a group of tokens - * @param owner The optional token owner address - * @returns - * @since v0.17 - */ - queryTokens(owner?: string): Promise; - /** - * Query the asset related fees - * @param symbol The token symbol - * @returns - * @since v0.17 - */ - queryFees(symbol: string): Promise; - /** - * Get coin name by denom - * - * **NOTE:** For iris units in irishub v0.17, only support `iris` and `iris-atto` - * - * @param denom - * @since v0.17 - */ - private getCoinName; -} diff --git a/dist/src/modules/asset.js b/dist/src/modules/asset.js deleted file mode 100644 index e0e2b3de..00000000 --- a/dist/src/modules/asset.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const types = require("../types"); -const is = require("is_js"); -const errors_1 = require("../errors"); -/** - * IRISHub allows individuals and companies to create and issue their own tokens. - * - * [More Details](https://www.irisnet.org/docs/features/asset.html) - * - * @category Modules - * @since v0.17 - */ -class Asset { - /** @hidden */ - constructor(client) { - this.client = client; - } - /** - * Query details of a token - * @param symbol The token symbol - * @returns - * @since v0.17 - */ - queryToken(symbol) { - if (is.empty(symbol)) { - throw new errors_1.SdkError('symbol can not be empty'); - } - return this.client.rpcClient.abciQuery('custom/asset/token', { - Symbol: this.getCoinName(symbol), - }); - } - /** - * Query details of a group of tokens - * @param owner The optional token owner address - * @returns - * @since v0.17 - */ - queryTokens(owner) { - return this.client.rpcClient.abciQuery('custom/asset/tokens', { - Owner: owner, - }); - } - /** - * Query the asset related fees - * @param symbol The token symbol - * @returns - * @since v0.17 - */ - queryFees(symbol) { - return this.client.rpcClient.abciQuery('custom/asset/fees', { - Symbol: symbol, - }); - } - /** - * Get coin name by denom - * - * **NOTE:** For iris units in irishub v0.17, only support `iris` and `iris-atto` - * - * @param denom - * @since v0.17 - */ - getCoinName(denom) { - denom = denom.toLowerCase(); - if (denom === types.IRIS || denom === types.IRIS_ATTO) { - return types.IRIS; - } - if (!denom.startsWith(types.IRIS + '-') && - !denom.endsWith(types.MIN_UNIT_SUFFIX)) { - return denom; - } - return denom.substr(0, denom.indexOf(types.MIN_UNIT_SUFFIX)); - } -} -exports.Asset = Asset; -//# sourceMappingURL=asset.js.map \ No newline at end of file diff --git a/dist/src/modules/asset.js.map b/dist/src/modules/asset.js.map deleted file mode 100644 index 6fea594d..00000000 --- a/dist/src/modules/asset.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"asset.js","sourceRoot":"","sources":["../../../src/modules/asset.ts"],"names":[],"mappings":";;AACA,kCAAkC;AAClC,4BAA4B;AAC5B,sCAAqC;AAErC;;;;;;;GAOG;AACH,MAAa,KAAK;IAGhB,cAAc;IACd,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,MAAc;QACvB,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;YACpB,MAAM,IAAI,iBAAQ,CAAC,yBAAyB,CAAC,CAAC;SAC/C;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAc,oBAAoB,EAAE;YACxE,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC;SACjC,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,WAAW,CAAC,KAAc;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,qBAAqB,EACrB;YACE,KAAK,EAAE,KAAK;SACb,CACF,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,MAAc;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,mBAAmB,EACnB;YACE,MAAM,EAAE,MAAM;SACf,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACK,WAAW,CAAC,KAAa;QAC/B,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;QAE5B,IAAI,KAAK,KAAK,KAAK,CAAC,IAAI,IAAI,KAAK,KAAK,KAAK,CAAC,SAAS,EAAE;YACrD,OAAO,KAAK,CAAC,IAAI,CAAC;SACnB;QAED,IACE,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC;YACnC,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,EACtC;YACA,OAAO,KAAK,CAAC;SACd;QAED,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;IAC/D,CAAC;CACF;AA7ED,sBA6EC"} \ No newline at end of file diff --git a/dist/src/modules/auth.d.ts b/dist/src/modules/auth.d.ts index a0e53633..5bd239ed 100644 --- a/dist/src/modules/auth.d.ts +++ b/dist/src/modules/auth.d.ts @@ -26,5 +26,14 @@ export declare class Auth { * @returns * @since v0.17 */ - newStdTx(msgs: types.Msg[], baseTx: types.BaseTx, sigs?: types.StdSignature[], memo?: string): types.Tx; + newStdTx(msgs: types.Msg[], baseTx: types.BaseTx): types.ProtoTx; + /** + * Account returns account details based on address. + * @param address defines the address to query for. + */ + queryAccount(address: string): Promise; + /** + * Params queries all parameters. + */ + queryParams(): Promise; } diff --git a/dist/src/modules/auth.js b/dist/src/modules/auth.js index f61b1a6b..6d1cf483 100644 --- a/dist/src/modules/auth.js +++ b/dist/src/modules/auth.js @@ -1,53 +1,130 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const is = require("is_js"); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Auth = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var types = _interopRequireWildcard(require("../types")); + +var is = _interopRequireWildcard(require("is_js")); + +var _errors = require("../errors"); + /** * Auth module is only used to build `StdTx` * * @category Modules * @since v0.17 */ -class Auth { - /** @hidden */ - constructor(client) { - this.client = client; - this.defaultStdFee = { - amount: [this.client.config.fee], - gas: this.client.config.gas, - }; +var Auth = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + + /** @hidden */ + function Auth(client) { + (0, _classCallCheck2["default"])(this, Auth); + (0, _defineProperty2["default"])(this, "client", void 0); + (0, _defineProperty2["default"])(this, "defaultStdFee", void 0); + this.client = client; + this.defaultStdFee = { + amount: [this.client.config.fee], + gasLimit: this.client.config.gas + }; + } + /** + * Generate a new `StdTx` which is a standard way to wrap Msgs with Fee and Signatures. + * + * **NOTE:** The first signature is the fee payer + * + * @param msgs Msgs to be sent + * @param baseTx Base params of the transaction + * @param sigs Signatures of the transaction, defaults to [] + * @param memo Memo of the transaction + * + * @returns + * @since v0.17 + */ + + + (0, _createClass2["default"])(Auth, [{ + key: "newStdTx", + value: function newStdTx(msgs, baseTx) { + var stdFee = { + amount: [], + gasLimit: '' + }; + Object.assign(stdFee, this.defaultStdFee); // Copy from default std fee + + if (baseTx.fee) { + stdFee.amount = [baseTx.fee]; + } + + if (baseTx.gas && is.not.empty(baseTx.gas)) { + stdFee.gasLimit = baseTx.gas; + } + + var protoTx = new types.ProtoTx({ + msgs: msgs, + memo: baseTx.memo || '', + stdFee: stdFee, + chain_id: this.client.config.chainId, + account_number: baseTx.account_number || undefined, + sequence: baseTx.sequence || undefined + }); + return protoTx; } /** - * Generate a new `StdTx` which is a standard way to wrap Msgs with Fee and Signatures. - * - * **NOTE:** The first signature is the fee payer - * - * @param msgs Msgs to be sent - * @param baseTx Base params of the transaction - * @param sigs Signatures of the transaction, defaults to [] - * @param memo Memo of the transaction - * - * @returns - * @since v0.17 + * Account returns account details based on address. + * @param address defines the address to query for. */ - newStdTx(msgs, baseTx, sigs = [], memo = '') { - const stdFee = { amount: [], gas: '' }; - Object.assign(stdFee, this.defaultStdFee); // Copy from default std fee - if (baseTx.fee) { - stdFee.amount = [baseTx.fee]; + + }, { + key: "queryAccount", + value: function queryAccount(address) { + if (!address) { + throw new _errors.SdkError("address can ont be empty"); + } + + var request = new types.auth_query_pb.QueryAccountRequest(); + request.setAddress(address); + return this.client.rpcClient.protoQuery('/cosmos.auth.v1beta1.Query/Account', request, types.auth_query_pb.QueryAccountResponse).then(function (data) { + var result = {}; + + if (data && data.account && data.account.value) { + result = types.auth_auth_pb.BaseAccount.deserializeBinary(data.account.value).toObject(); + + if (result.pubKey && result.pubKey.value) { + result.pubKey = types.crypto_secp256k1_keys_pb.PubKey.deserializeBinary(result.pubKey.value).toObject(); + } } - if (baseTx.gas && is.not.empty(baseTx.gas)) { - stdFee.gas = baseTx.gas; - } - return { - type: 'irishub/bank/StdTx', - value: { - msg: msgs, - fee: stdFee, - signatures: sigs, - memo, - }, - }; + + return result; + }); + } + /** + * Params queries all parameters. + */ + + }, { + key: "queryParams", + value: function queryParams() { + var request = new types.auth_query_pb.QueryParamsRequest(); + return this.client.rpcClient.protoQuery('/cosmos.auth.v1beta1.Query/Params', request, types.auth_query_pb.QueryParamsResponse); } -} -exports.Auth = Auth; -//# sourceMappingURL=auth.js.map \ No newline at end of file + }]); + return Auth; +}(); + +exports.Auth = Auth; \ No newline at end of file diff --git a/dist/src/modules/auth.js.map b/dist/src/modules/auth.js.map deleted file mode 100644 index 31f94c82..00000000 --- a/dist/src/modules/auth.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/modules/auth.ts"],"names":[],"mappings":";;AAEA,4BAA4B;AAE5B;;;;;GAKG;AACH,MAAa,IAAI;IAKf,cAAc;IACd,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG;YACnB,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC;YAChC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG;SAC5B,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,IAAiB,EACjB,MAAoB,EACpB,OAA6B,EAAE,EAC/B,IAAI,GAAG,EAAE;QAET,MAAM,MAAM,GAAiB,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;QACrD,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,4BAA4B;QAEvE,IAAI,MAAM,CAAC,GAAG,EAAE;YACd,MAAM,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;SAC9B;QAED,IAAI,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;YAC1C,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;SACzB;QACD,OAAO;YACL,IAAI,EAAE,oBAAoB;YAC1B,KAAK,EAAE;gBACL,GAAG,EAAE,IAAI;gBACT,GAAG,EAAE,MAAM;gBACX,UAAU,EAAE,IAAI;gBAChB,IAAI;aACL;SACF,CAAC;IACJ,CAAC;CACF;AArDD,oBAqDC"} \ No newline at end of file diff --git a/dist/src/modules/bank.d.ts b/dist/src/modules/bank.d.ts index fe95d6c4..1627f047 100644 --- a/dist/src/modules/bank.d.ts +++ b/dist/src/modules/bank.d.ts @@ -1,6 +1,5 @@ import { Client } from '../client'; import * as types from '../types'; -import { SdkError } from '../errors'; /** * This module is mainly used to transfer coins between accounts, * query account balances, and provide common offline transaction signing and broadcasting methods. @@ -16,28 +15,6 @@ export declare class Bank { private client; /** @hidden */ constructor(client: Client); - /** - * Get the cointype of a token - * - * @deprecated Please refer to [[asset.queryToken]] - * @since v0.17 - */ - queryCoinType(tokenName: string): void; - /** - * Query account info from blockchain - * @param address Bech32 address - * @returns - * @since v0.17 - * // TODO: - */ - queryAccount(address: string): Promise; - /** - * Query the token statistic, including total loose tokens, total burned tokens and total bonded tokens. - * @param tokenID Identity of the token - * @returns - * @since v0.17 - */ - queryTokenStats(tokenID?: string): Promise; /** * Send coins * @param to Recipient bech32 address @@ -48,30 +25,36 @@ export declare class Bank { */ send(to: string, amount: types.Coin[], baseTx: types.BaseTx): Promise; /** - * Burn coins - * @param amount Coins to be burnt + * multiSend coins + * @param to Recipient bech32 address + * @param amount Coins to be sent * @param baseTx { types.BaseTx } * @returns * @since v0.17 */ - burn(amount: types.Coin[], baseTx: types.BaseTx): Promise; + multiSend(to: string, amount: types.Coin[], baseTx: types.BaseTx): Promise; /** - * Set memo regexp for your own address, so that you can only receive coins from transactions with the corresponding memo. - * @param memoRegexp - * @param baseTx { types.BaseTx } - * @returns - * @since v0.17 + * Balance queries the balance of a single coin for a single account. + * @param address is the address to query balances for. + * @param denom is the coin denom to query balances for. */ - setMemoRegexp(memoRegexp: string, baseTx: types.BaseTx): Promise; + queryBalance(address: string, denom: string): Promise; /** - * Subscribe Send Txs - * @param conditions Query conditions for the subscription - * @param callback A function to receive notifications - * @returns - * @since v0.17 + * AllBalances queries the balance of all coins for a single account. + * @param address is the address to query balances for. + */ + queryAllBalances(address: string): Promise; + /** + * TotalSupply queries the total supply of all coins. + */ + queryTotalSupply(): Promise; + /** + * SupplyOf queries the supply of a single coin. + * @param denom is the coin denom to query balances for. + */ + querySupplyOf(denom: string): Promise; + /** + * Params queries the parameters of x/bank module. */ - subscribeSendTx(conditions: { - from?: string; - to?: string; - }, callback: (error?: SdkError, data?: types.EventDataMsgSend) => void): types.EventSubscription; + queryParams(): Promise; } diff --git a/dist/src/modules/bank.js b/dist/src/modules/bank.js index 828cdba3..5534c6df 100644 --- a/dist/src/modules/bank.js +++ b/dist/src/modules/bank.js @@ -1,19 +1,30 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const crypto_1 = require("../utils/crypto"); -const types = require("../types"); -const errors_1 = require("../errors"); -const bank_1 = require("../types/bank"); -const types_1 = require("../types"); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Bank = void 0; + +var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); + +var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _crypto = require("../utils/crypto"); + +var types = _interopRequireWildcard(require("../types")); + +var _errors = require("../errors"); + /** * This module is mainly used to transfer coins between accounts, * query account balances, and provide common offline transaction signing and broadcasting methods. @@ -24,130 +35,200 @@ const types_1 = require("../types"); * @category Modules * @since v0.17 */ -class Bank { - /** @hidden */ - constructor(client) { - this.client = client; - } - /** - * Get the cointype of a token - * - * @deprecated Please refer to [[asset.queryToken]] - * @since v0.17 - */ - queryCoinType(tokenName) { - throw new errors_1.SdkError('Not supported'); - } +var Bank = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + function Bank(client) { + (0, _classCallCheck2["default"])(this, Bank); + (0, _defineProperty2["default"])(this, "client", void 0); + this.client = client; + } + /** + * Send coins + * @param to Recipient bech32 address + * @param amount Coins to be sent + * @param baseTx { types.BaseTx } + * @returns + * @since v0.17 + */ + + + (0, _createClass2["default"])(Bank, [{ + key: "send", + value: function () { + var _send = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(to, amount, baseTx) { + var from, msgs; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (_crypto.Crypto.checkAddress(to, this.client.config.bech32Prefix.AccAddr)) { + _context.next = 2; + break; + } + + throw new _errors.SdkError('Invalid bech32 address'); + + case 2: + from = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgSend, + value: { + from_address: from, + to_address: to, + amount: amount + } + }]; + return _context.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 5: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function send(_x, _x2, _x3) { + return _send.apply(this, arguments); + } + + return send; + }() /** - * Query account info from blockchain - * @param address Bech32 address + * multiSend coins + * @param to Recipient bech32 address + * @param amount Coins to be sent + * @param baseTx { types.BaseTx } * @returns * @since v0.17 - * // TODO: */ - queryAccount(address) { - return this.client.rpcClient.abciQuery('custom/acc/account', { - Address: address, - }); - } + + }, { + key: "multiSend", + value: function () { + var _multiSend = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(to, amount, baseTx) { + var from, coins, msgs; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (_crypto.Crypto.checkAddress(to, this.client.config.bech32Prefix.AccAddr)) { + _context2.next = 2; + break; + } + + throw new _errors.SdkError('Invalid bech32 address'); + + case 2: + from = this.client.keys.show(baseTx.from); + coins = amount; + msgs = [{ + type: types.TxType.MsgMultiSend, + value: { + inputs: [{ + address: from, + coins: coins + }], + outputs: [{ + address: to, + coins: coins + }] + } + }]; + return _context2.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 6: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function multiSend(_x4, _x5, _x6) { + return _multiSend.apply(this, arguments); + } + + return multiSend; + }() /** - * Query the token statistic, including total loose tokens, total burned tokens and total bonded tokens. - * @param tokenID Identity of the token - * @returns - * @since v0.17 + * Balance queries the balance of a single coin for a single account. + * @param address is the address to query balances for. + * @param denom is the coin denom to query balances for. */ - queryTokenStats(tokenID) { - return this.client.rpcClient.abciQuery('custom/acc/tokenStats', { - TokenId: tokenID, - }); + + }, { + key: "queryBalance", + value: function queryBalance(address, denom) { + if (!address) { + throw new _errors.SdkError("address can ont be empty"); + } + + if (!denom) { + throw new _errors.SdkError("denom can ont be empty"); + } + + var request = new types.bank_query_pb.QueryBalanceRequest(); + request.setAddress(address); + request.setDenom(denom); + return this.client.rpcClient.protoQuery('/cosmos.bank.v1beta1.Query/Balance', request, types.bank_query_pb.QueryBalanceResponse); } /** - * Send coins - * @param to Recipient bech32 address - * @param amount Coins to be sent - * @param baseTx { types.BaseTx } - * @returns - * @since v0.17 + * AllBalances queries the balance of all coins for a single account. + * @param address is the address to query balances for. */ - send(to, amount, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - // Validate bech32 address - if (!crypto_1.Crypto.checkAddress(to, this.client.config.bech32Prefix.AccAddr)) { - throw new errors_1.SdkError('Invalid bech32 address'); - } - const from = this.client.keys.show(baseTx.from); - const coins = yield this.client.utils.toMinCoins(amount); - const msgs = [ - new bank_1.MsgSend([{ address: from, coins }], [{ address: to, coins }]), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); + + }, { + key: "queryAllBalances", + value: function queryAllBalances(address) { + if (!address) { + throw new _errors.SdkError("address can ont be empty"); + } + + var request = new types.bank_query_pb.QueryAllBalancesRequest(); + request.setAddress(address); + return this.client.rpcClient.protoQuery('/cosmos.bank.v1beta1.Query/AllBalances', request, types.bank_query_pb.QueryAllBalancesResponse); } /** - * Burn coins - * @param amount Coins to be burnt - * @param baseTx { types.BaseTx } - * @returns - * @since v0.17 + * TotalSupply queries the total supply of all coins. */ - burn(amount, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const from = this.client.keys.show(baseTx.from); - const coins = yield this.client.utils.toMinCoins(amount); - const msgs = [new bank_1.MsgBurn(from, coins)]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); + + }, { + key: "queryTotalSupply", + value: function queryTotalSupply() { + var request = new types.bank_query_pb.QueryTotalSupplyRequest(); + return this.client.rpcClient.protoQuery('/cosmos.bank.v1beta1.Query/TotalSupply', request, types.bank_query_pb.QueryTotalSupplyResponse); } /** - * Set memo regexp for your own address, so that you can only receive coins from transactions with the corresponding memo. - * @param memoRegexp - * @param baseTx { types.BaseTx } - * @returns - * @since v0.17 + * SupplyOf queries the supply of a single coin. + * @param denom is the coin denom to query balances for. */ - setMemoRegexp(memoRegexp, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const from = this.client.keys.show(baseTx.from); - const msgs = [new bank_1.MsgSetMemoRegexp(from, memoRegexp)]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); + + }, { + key: "querySupplyOf", + value: function querySupplyOf(denom) { + if (!denom) { + throw new _errors.SdkError("denom can ont be empty"); + } + + var request = new types.bank_query_pb.QuerySupplyOfRequest(); + request.setDenom(denom); + return this.client.rpcClient.protoQuery('/cosmos.bank.v1beta1.Query/SupplyOf', request, types.bank_query_pb.QuerySupplyOfResponse); } /** - * Subscribe Send Txs - * @param conditions Query conditions for the subscription - * @param callback A function to receive notifications - * @returns - * @since v0.17 + * Params queries the parameters of x/bank module. */ - subscribeSendTx(conditions, callback) { - const queryBuilder = new types_1.EventQueryBuilder().addCondition(new types.Condition(types_1.EventKey.Action).eq(types_1.EventAction.Send)); - if (conditions.from) { - queryBuilder.addCondition(new types.Condition(types_1.EventKey.Sender).eq(conditions.from)); - } - if (conditions.to) { - queryBuilder.addCondition(new types.Condition(types_1.EventKey.Recipient).eq(conditions.to)); - } - const subscription = this.client.eventListener.subscribeTx(queryBuilder, (error, data) => { - if (error) { - callback(error); - return; - } - data === null || data === void 0 ? void 0 : data.tx.value.msg.forEach(msg => { - if (msg.type !== 'irishub/bank/Send') - return; - const msgSend = msg; - const height = data.height; - const hash = data.hash; - msgSend.value.inputs.forEach((input, index) => { - const from = input.address; - const to = msgSend.value.outputs[index].address; - const amount = input.coins; - callback(undefined, { height, hash, from, to, amount }); - }); - }); - }); - return subscription; + + }, { + key: "queryParams", + value: function queryParams() { + var request = new types.bank_query_pb.QueryParamsRequest(); + return this.client.rpcClient.protoQuery('/cosmos.bank.v1beta1.Query/Params', request, types.bank_query_pb.QueryParamsResponse); } -} -exports.Bank = Bank; -//# sourceMappingURL=bank.js.map \ No newline at end of file + }]); + return Bank; +}(); + +exports.Bank = Bank; \ No newline at end of file diff --git a/dist/src/modules/bank.js.map b/dist/src/modules/bank.js.map deleted file mode 100644 index 19f466a3..00000000 --- a/dist/src/modules/bank.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bank.js","sourceRoot":"","sources":["../../../src/modules/bank.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,4CAAyC;AACzC,kCAAkC;AAElC,sCAAqC;AACrC,wCAAmE;AACnE,oCAAoE;AAEpE;;;;;;;;;GASG;AACH,MAAa,IAAI;IAGf,cAAc;IACd,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,aAAa,CAAC,SAAiB;QAC7B,MAAM,IAAI,iBAAQ,CAAC,eAAe,CAAC,CAAC;IACtC,CAAC;IAED;;;;;;OAMG;IACH,YAAY,CAAC,OAAe;QAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,oBAAoB,EACpB;YACE,OAAO,EAAE,OAAO;SACjB,CACF,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,eAAe,CAAC,OAAgB;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,uBAAuB,EACvB;YACE,OAAO,EAAE,OAAO;SACjB,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACG,IAAI,CACR,EAAU,EACV,MAAoB,EACpB,MAAoB;;YAEpB,0BAA0B;YAC1B,IAAI,CAAC,eAAM,CAAC,YAAY,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE;gBACrE,MAAM,IAAI,iBAAQ,CAAC,wBAAwB,CAAC,CAAC;aAC9C;YAED,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAEhD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACzD,MAAM,IAAI,GAAgB;gBACxB,IAAI,cAAO,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;aAClE,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;OAMG;IACG,IAAI,CACR,MAAoB,EACpB,MAAoB;;YAEpB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAEhD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACzD,MAAM,IAAI,GAAgB,CAAC,IAAI,cAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;YAErD,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;OAMG;IACG,aAAa,CACjB,UAAkB,EAClB,MAAoB;;YAEpB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAChD,MAAM,IAAI,GAAgB,CAAC,IAAI,uBAAgB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;YAEnE,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;OAMG;IACH,eAAe,CACb,UAA0C,EAC1C,QAAmE;QAEnE,MAAM,YAAY,GAAG,IAAI,yBAAiB,EAAE,CAAC,YAAY,CACvD,IAAI,KAAK,CAAC,SAAS,CAAC,gBAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,mBAAW,CAAC,IAAI,CAAC,CAC1D,CAAC;QAEF,IAAI,UAAU,CAAC,IAAI,EAAE;YACnB,YAAY,CAAC,YAAY,CACvB,IAAI,KAAK,CAAC,SAAS,CAAC,gBAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CACzD,CAAC;SACH;QACD,IAAI,UAAU,CAAC,EAAE,EAAE;YACjB,YAAY,CAAC,YAAY,CACvB,IAAI,KAAK,CAAC,SAAS,CAAC,gBAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAC1D,CAAC;SACH;QAED,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,WAAW,CACxD,YAAY,EACZ,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACd,IAAI,KAAK,EAAE;gBACT,QAAQ,CAAC,KAAK,CAAC,CAAC;gBAChB,OAAO;aACR;YACD,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBAC/B,IAAI,GAAG,CAAC,IAAI,KAAK,mBAAmB;oBAAE,OAAO;gBAC7C,MAAM,OAAO,GAAG,GAAoB,CAAC;gBACrC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;gBAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;gBACvB,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAkB,EAAE,KAAa,EAAE,EAAE;oBACjE,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC;oBAC3B,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;oBAChD,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC;oBAC3B,QAAQ,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;gBAC1D,CAAC,CAAC,CAAC;YACL,CAAC,EAAE;QACL,CAAC,CACF,CAAC;QACF,OAAO,YAAY,CAAC;IACtB,CAAC;CACF;AAlKD,oBAkKC"} \ No newline at end of file diff --git a/dist/src/modules/coinswap.d.ts b/dist/src/modules/coinswap.d.ts new file mode 100644 index 00000000..fe7000f5 --- /dev/null +++ b/dist/src/modules/coinswap.d.ts @@ -0,0 +1,98 @@ +import { Client } from '../client'; +import * as types from '../types'; +import { DepositRequest, WithdrawRequest, SwapOrderRequest, Coin } from '../types'; +/** + * Implementation of the [Constant Product Market Maker Model](https://github.com/runtimeverification/verified-smart-contracts/blob/uniswap/uniswap/x-y-k.pdf) token exchange protocol on IRISHub. + * + * [More Details](https://www.irisnet.org/docs/features/coinswap.html) + * + * @category Modules + */ +export declare class Coinswap { + /** @hidden */ + private client; + /** @hidden */ + private formatUniABSPrefix; + /** @hidden */ + private mathConfig; + /** @hidden */ + private math; + /** @hidden */ + constructor(client: Client); + /** + * + * Query liquidity by id + * @param id The liquidity id + * @returns + * @since v1.0 + */ + queryLiquidity(id: string): Promise; + /** + * Add liquidity by exact iris amount, calculated token and liquidity amount + * @param request Add liquidity request + * @param baseTx + * @returns + * @since v1.0 + */ + deposit(request: DepositRequest, baseTx: types.BaseTx): Promise; + /** + * Remove liquidity by exact liquidity amount, calculated iris and token amount + * @param request Remove liquidity request + * @param baseTx + * @returns + * @since v1.0 + */ + withdraw(request: WithdrawRequest, baseTx: types.BaseTx): Promise; + /** + * Swap coin by exact output, calculated input + * @param request Buy order request + * @param baseTx + * @returns + * @since v1.0 + */ + buy(request: SwapOrderRequest, baseTx: types.BaseTx): Promise; + /** + * Swap coin by exact input, calculated output + * @param request Sell order request + * @param baseTx + * @returns + * @since v1.0 + */ + sell(request: SwapOrderRequest, baseTx: types.BaseTx): Promise; + private getUniDenomFromDenoms; + /** + * Calculate the amount of another token to be received based on the exact amount of tokens sold + * @param exactSoldCoin sold coin + * @param soldTokenDenom received token's denom + * @returns output token amount to be received + * @since v1.0 + */ + calculateWithExactInput(exactSoldCoin: Coin, boughtTokenDenom: string): Promise; + /** + * Calculate the amount of the token to be paid based on the exact amount of the token to be bought + * @param exactBoughtCoin + * @param soldTokenDenom + * @return: input amount to be paid + * @since v1.0 + */ + calculateWithExactOutput(exactBoughtCoin: Coin, soldTokenDenom: string): Promise; + /** + * Calculate token amount and liquidity amount of the deposit request by exact standard token amount + * @param exactStdAmt Exact standard token amount to be deposited + * @param calculatedDenom The token denom being calculated + * @returns The [[DepositRequest]], max_token = -1 means the liquidity pool is empty, users can deposit any amount of the token + * @since v1.0 + */ + calculateDeposit(exactStdAmt: number, calculatedDenom: string): Promise; + /** + * Calculate how many tokens can be withdrawn by exact liquidity amount + * @param exactWithdrawLiquidity Exact liquidity amount to be withdrawn + * @returns The [[WithdrawRequest]] + * @since v1.0 + */ + calculateWithdraw(exactWithdrawLiquidity: Coin): Promise; + private calculateDoubleWithExactInput; + private calculateDoubleWithExactOutput; + private getInputPrice; + private getOutputPrice; +} diff --git a/dist/src/modules/coinswap.js b/dist/src/modules/coinswap.js new file mode 100644 index 00000000..3f526832 --- /dev/null +++ b/dist/src/modules/coinswap.js @@ -0,0 +1,620 @@ +"use strict"; + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Coinswap = void 0; + +var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); + +var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var mathjs = _interopRequireWildcard(require("mathjs")); + +var is = _interopRequireWildcard(require("is_js")); + +var _types = require("../types"); + +var _errors = require("../errors"); + +/** + * Implementation of the [Constant Product Market Maker Model](https://github.com/runtimeverification/verified-smart-contracts/blob/uniswap/uniswap/x-y-k.pdf) token exchange protocol on IRISHub. + * + * [More Details](https://www.irisnet.org/docs/features/coinswap.html) + * + * @category Modules + */ +var Coinswap = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + + /** @hidden */ + + /** @hidden */ + + /** @hidden */ + function Coinswap(client) { + (0, _classCallCheck2["default"])(this, Coinswap); + (0, _defineProperty2["default"])(this, "client", void 0); + (0, _defineProperty2["default"])(this, "formatUniABSPrefix", 'uni:'); + (0, _defineProperty2["default"])(this, "mathConfig", { + number: 'BigNumber', + // Choose 'number' (default), 'BigNumber', or 'Fraction' + precision: 64 // 64 by default, only applicable for BigNumbers + + }); + (0, _defineProperty2["default"])(this, "math", void 0); + this.client = client; + this.math = mathjs.create(mathjs.all, this.mathConfig); + } + /** + * + * Query liquidity by id + * @param id The liquidity id + * @returns + * @since v1.0 + */ + + + (0, _createClass2["default"])(Coinswap, [{ + key: "queryLiquidity", + value: function queryLiquidity(id) { + return this.client.rpcClient.abciQuery('custom/coinswap/liquidity', { + id: id + }); + } + /** + * Add liquidity by exact iris amount, calculated token and liquidity amount + * @param request Add liquidity request + * @param baseTx + * @returns + * @since v1.0 + */ + + }, { + key: "deposit", + value: function () { + var _deposit = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(request, baseTx) { + var from, msgs; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + from = this.client.keys.show(baseTx.from); + msgs = [new _types.MsgAddLiquidity(request, from)]; + return _context.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function deposit(_x, _x2) { + return _deposit.apply(this, arguments); + } + + return deposit; + }() + /** + * Remove liquidity by exact liquidity amount, calculated iris and token amount + * @param request Remove liquidity request + * @param baseTx + * @returns + * @since v1.0 + */ + + }, { + key: "withdraw", + value: function () { + var _withdraw = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(request, baseTx) { + var from, msgs; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + from = this.client.keys.show(baseTx.from); + msgs = [new _types.MsgRemoveLiquidity(request, from)]; + return _context2.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function withdraw(_x3, _x4) { + return _withdraw.apply(this, arguments); + } + + return withdraw; + }() + /** + * Swap coin by exact output, calculated input + * @param request Buy order request + * @param baseTx + * @returns + * @since v1.0 + */ + + }, { + key: "buy", + value: function () { + var _buy = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(request, baseTx) { + var msgs; + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + msgs = [new _types.MsgSwapOrder(request, true)]; + return _context3.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 2: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function buy(_x5, _x6) { + return _buy.apply(this, arguments); + } + + return buy; + }() + /** + * Swap coin by exact input, calculated output + * @param request Sell order request + * @param baseTx + * @returns + * @since v1.0 + */ + + }, { + key: "sell", + value: function () { + var _sell = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(request, baseTx) { + var msgs; + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + msgs = [new _types.MsgSwapOrder(request, true)]; + return _context4.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 2: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function sell(_x7, _x8) { + return _sell.apply(this, arguments); + } + + return sell; + }() + }, { + key: "getUniDenomFromDenoms", + value: function getUniDenomFromDenoms(denom1, denom2) { + if (denom1 === denom2) { + throw new _errors.SdkError('input and output denomination are equal'); + } + + if (denom1 !== _types.STD_DENOM && denom2 !== _types.STD_DENOM) { + throw new _errors.SdkError("standard denom: '".concat(_types.STD_DENOM, "', denom1: '").concat(denom1, "', denom2: '").concat(denom2, "'")); + } + + if (denom1 === _types.STD_DENOM) { + return this.formatUniABSPrefix + denom2; + } + + return this.formatUniABSPrefix + denom1; + } + /** + * Calculate the amount of another token to be received based on the exact amount of tokens sold + * @param exactSoldCoin sold coin + * @param soldTokenDenom received token's denom + * @returns output token amount to be received + * @since v1.0 + */ + + }, { + key: "calculateWithExactInput", + value: function () { + var _calculateWithExactInput = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(exactSoldCoin, boughtTokenDenom) { + var uniDenom, reservePool, inputReserve, outputReserve, boughtAmt; + return _regenerator["default"].wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + if (!(exactSoldCoin.denom !== _types.STD_DENOM && boughtTokenDenom !== _types.STD_DENOM)) { + _context5.next = 2; + break; + } + + return _context5.abrupt("return", this.calculateDoubleWithExactInput(exactSoldCoin, boughtTokenDenom)); + + case 2: + uniDenom = this.getUniDenomFromDenoms(exactSoldCoin.denom, boughtTokenDenom); + _context5.next = 5; + return this.queryLiquidity(uniDenom); + + case 5: + reservePool = _context5.sent; + + if (reservePool.standard.denom === exactSoldCoin.denom) { + inputReserve = Number(reservePool.standard.amount); + outputReserve = Number(reservePool.token.amount); + } else { + inputReserve = Number(reservePool.token.amount); + outputReserve = Number(reservePool.standard.amount); + } + + if (!is.not.positive(inputReserve)) { + _context5.next = 9; + break; + } + + throw new _errors.SdkError("liquidity pool insufficient funds: ['".concat(inputReserve).concat(exactSoldCoin.denom, "']")); + + case 9: + if (!is.not.positive(outputReserve)) { + _context5.next = 11; + break; + } + + throw new _errors.SdkError("liquidity pool insufficient funds: ['".concat(outputReserve).concat(boughtTokenDenom, "']")); + + case 11: + boughtAmt = this.getInputPrice(Number(exactSoldCoin.amount), inputReserve, outputReserve, Number(reservePool.fee)); + + if (!is.above(Number(boughtAmt), outputReserve)) { + _context5.next = 14; + break; + } + + throw new _errors.SdkError("liquidity pool insufficient balance of '".concat(boughtTokenDenom, "', only bought: '").concat(outputReserve, "', got: '").concat(inputReserve, "'")); + + case 14: + return _context5.abrupt("return", boughtAmt); + + case 15: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function calculateWithExactInput(_x9, _x10) { + return _calculateWithExactInput.apply(this, arguments); + } + + return calculateWithExactInput; + }() + /** + * Calculate the amount of the token to be paid based on the exact amount of the token to be bought + * @param exactBoughtCoin + * @param soldTokenDenom + * @return: input amount to be paid + * @since v1.0 + */ + + }, { + key: "calculateWithExactOutput", + value: function () { + var _calculateWithExactOutput = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(exactBoughtCoin, soldTokenDenom) { + var uniDenom, reservePool, inputReserve, outputReserve, paidAmt; + return _regenerator["default"].wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + if (!(exactBoughtCoin.denom !== _types.STD_DENOM && soldTokenDenom !== _types.STD_DENOM)) { + _context6.next = 2; + break; + } + + return _context6.abrupt("return", this.calculateDoubleWithExactOutput(exactBoughtCoin, soldTokenDenom)); + + case 2: + uniDenom = this.getUniDenomFromDenoms(exactBoughtCoin.denom, soldTokenDenom); + _context6.next = 5; + return this.queryLiquidity(uniDenom); + + case 5: + reservePool = _context6.sent; + + if (reservePool.standard.denom === soldTokenDenom) { + inputReserve = Number(reservePool.standard.amount); + outputReserve = Number(reservePool.token.amount); + } else { + inputReserve = Number(reservePool.token.amount); + outputReserve = Number(reservePool.standard.amount); + } + + if (!is.not.positive(inputReserve)) { + _context6.next = 9; + break; + } + + throw new _errors.SdkError("liquidity pool insufficient funds, actual ['".concat(inputReserve).concat(soldTokenDenom, "']")); + + case 9: + if (!is.not.positive(outputReserve)) { + _context6.next = 11; + break; + } + + throw new _errors.SdkError("liquidity pool insufficient funds, actual ['".concat(outputReserve).concat(exactBoughtCoin.denom, "']")); + + case 11: + if (!is.above(Number(exactBoughtCoin.amount), outputReserve)) { + _context6.next = 13; + break; + } + + throw new _errors.SdkError("liquidity pool insufficient balance of '".concat(exactBoughtCoin.denom, "', user expected: '").concat(exactBoughtCoin.amount, "', got: '").concat(outputReserve, "'")); + + case 13: + paidAmt = this.getOutputPrice(Number(exactBoughtCoin.amount), inputReserve, outputReserve, Number(reservePool.fee)); + + if (!is.infinite(paidAmt)) { + _context6.next = 16; + break; + } + + throw new _errors.SdkError("infinite amount of '".concat(soldTokenDenom, "' is required")); + + case 16: + return _context6.abrupt("return", paidAmt); + + case 17: + case "end": + return _context6.stop(); + } + } + }, _callee6, this); + })); + + function calculateWithExactOutput(_x11, _x12) { + return _calculateWithExactOutput.apply(this, arguments); + } + + return calculateWithExactOutput; + }() + /** + * Calculate token amount and liquidity amount of the deposit request by exact standard token amount + * @param exactStdAmt Exact standard token amount to be deposited + * @param calculatedDenom The token denom being calculated + * @returns The [[DepositRequest]], max_token = -1 means the liquidity pool is empty, users can deposit any amount of the token + * @since v1.0 + */ + + }, { + key: "calculateDeposit", + value: function () { + var _calculateDeposit = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(exactStdAmt, calculatedDenom) { + var reservePool, depositRequest, deltaTokenAmt; + return _regenerator["default"].wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + _context7.next = 2; + return this.queryLiquidity(this.getUniDenomFromDenoms(_types.STD_DENOM, calculatedDenom)); + + case 2: + reservePool = _context7.sent; + // Initiate default deposit request, max_token = -1 means the liquidity pool is empty, users can deposit any amount of the token + depositRequest = { + exact_standard_amt: exactStdAmt, + max_token: { + denom: calculatedDenom, + amount: '-1' + }, + min_liquidity: exactStdAmt, + deadline: 10000 // default 10s + + }; + + if (is.positive(Number(reservePool.standard.amount)) && is.positive(Number(reservePool.token.amount))) { + // ∆t = ⌊(∆i/i) * t⌋ + 1 + deltaTokenAmt = this.math.floor(this.math.multiply(this.math.divide(exactStdAmt, Number(reservePool.standard.amount)), Number(reservePool.token.amount))) + 1; + depositRequest.max_token = { + denom: calculatedDenom, + amount: String(deltaTokenAmt) + }; + } + + return _context7.abrupt("return", depositRequest); + + case 6: + case "end": + return _context7.stop(); + } + } + }, _callee7, this); + })); + + function calculateDeposit(_x13, _x14) { + return _calculateDeposit.apply(this, arguments); + } + + return calculateDeposit; + }() + /** + * Calculate how many tokens can be withdrawn by exact liquidity amount + * @param exactWithdrawLiquidity Exact liquidity amount to be withdrawn + * @returns The [[WithdrawRequest]] + * @since v1.0 + */ + + }, { + key: "calculateWithdraw", + value: function () { + var _calculateWithdraw = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8(exactWithdrawLiquidity) { + var reservePool, withdrawRequest, deltaStdAmt, deltaTokenAmt; + return _regenerator["default"].wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + _context8.next = 2; + return this.queryLiquidity(exactWithdrawLiquidity.denom); + + case 2: + reservePool = _context8.sent; + // Initiate default withdraw request + withdrawRequest = { + min_standard_amt: 0, + min_token: 0, + withdraw_liquidity: exactWithdrawLiquidity, + deadline: 10000 // default 10s + + }; + + if (is.positive(Number(reservePool.standard.amount)) && is.positive(Number(reservePool.token.amount))) { + // ∆i = ⌊(∆l/l) * i⌋ + deltaStdAmt = this.math.floor(this.math.multiply(this.math.divide(Number(exactWithdrawLiquidity.amount), Number(reservePool.liquidity.amount)), Number(reservePool.standard.amount))); + withdrawRequest.min_standard_amt = deltaStdAmt; // ∆t = ⌊(∆l/l) * t⌋ + + deltaTokenAmt = this.math.floor(this.math.multiply(this.math.divide(Number(exactWithdrawLiquidity.amount), Number(reservePool.liquidity.amount)), Number(reservePool.token.amount))); + withdrawRequest.min_token = deltaTokenAmt; + } + + return _context8.abrupt("return", withdrawRequest); + + case 6: + case "end": + return _context8.stop(); + } + } + }, _callee8, this); + })); + + function calculateWithdraw(_x15) { + return _calculateWithdraw.apply(this, arguments); + } + + return calculateWithdraw; + }() + }, { + key: "calculateDoubleWithExactInput", + value: function () { + var _calculateDoubleWithExactInput = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(exactSoldCoin, boughtTokenDenom) { + var boughtStandardAmount, boughtTokenAmt; + return _regenerator["default"].wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + _context9.next = 2; + return this.calculateWithExactInput(exactSoldCoin, _types.STD_DENOM); + + case 2: + boughtStandardAmount = _context9.sent; + _context9.next = 5; + return this.calculateWithExactInput({ + denom: _types.STD_DENOM, + amount: String(boughtStandardAmount) + }, boughtTokenDenom); + + case 5: + boughtTokenAmt = _context9.sent; + return _context9.abrupt("return", boughtTokenAmt); + + case 7: + case "end": + return _context9.stop(); + } + } + }, _callee9, this); + })); + + function calculateDoubleWithExactInput(_x16, _x17) { + return _calculateDoubleWithExactInput.apply(this, arguments); + } + + return calculateDoubleWithExactInput; + }() + }, { + key: "calculateDoubleWithExactOutput", + value: function () { + var _calculateDoubleWithExactOutput = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(exactBoughtCoin, soldTokenDenom) { + var soldStandardAmount, soldTokenAmt; + return _regenerator["default"].wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + _context10.next = 2; + return this.calculateWithExactOutput(exactBoughtCoin, _types.STD_DENOM); + + case 2: + soldStandardAmount = _context10.sent; + _context10.next = 5; + return this.calculateWithExactOutput({ + denom: _types.STD_DENOM, + amount: String(soldStandardAmount) + }, soldTokenDenom); + + case 5: + soldTokenAmt = _context10.sent; + return _context10.abrupt("return", soldTokenAmt); + + case 7: + case "end": + return _context10.stop(); + } + } + }, _callee10, this); + })); + + function calculateDoubleWithExactOutput(_x18, _x19) { + return _calculateDoubleWithExactOutput.apply(this, arguments); + } + + return calculateDoubleWithExactOutput; + }() // getInputPrice returns the amount of coins bought (calculated) given the input amount being sold (exact) + // The fee is included in the input coins being bought + // https://github.com/runtimeverification/verified-smart-contracts/blob/uniswap/uniswap/x-y-k.pdf + + }, { + key: "getInputPrice", + value: function getInputPrice(inputAmt, inputReserve, outputReserve, fee) { + var deltaFee = 1 - fee; + var inputAmtWithFee = this.math.multiply(inputAmt, deltaFee); + var numerator = this.math.multiply(inputAmtWithFee, outputReserve); + var denominator = this.math.add(this.math.floor(inputReserve), inputAmtWithFee); + return this.math.floor(Number(this.math.divide(numerator, denominator))); + } // getOutputPrice returns the amount of coins sold (calculated) given the output amount being bought (exact) + // The fee is included in the output coins being bought + + }, { + key: "getOutputPrice", + value: function getOutputPrice(outputAmt, inputReserve, outputReserve, fee) { + var deltaFee = 1 - fee; + var numerator = this.math.multiply(inputReserve, outputAmt); + var denominator = this.math.multiply(this.math.subtract(outputReserve, outputAmt), deltaFee); + return this.math.floor(Number(this.math.divide(numerator, denominator))) + 1; + } + }]); + return Coinswap; +}(); + +exports.Coinswap = Coinswap; \ No newline at end of file diff --git a/dist/src/modules/distribution.d.ts b/dist/src/modules/distribution.d.ts index 3a00cd0a..4d86b3be 100644 --- a/dist/src/modules/distribution.d.ts +++ b/dist/src/modules/distribution.d.ts @@ -15,13 +15,6 @@ export declare class Distribution { private client; /** @hidden */ constructor(client: Client); - /** - * Query all the rewards of a validator or a delegator - * @param address Bech32 account address - * @returns - * @since v0.17 - */ - queryRewards(address: string): Promise; /** * Set another address to receive the rewards instead of using the delegator address * @param withdrawAddress Bech32 account address @@ -33,10 +26,73 @@ export declare class Distribution { /** * Withdraw rewards to the withdraw-address(default to the delegator address, you can set to another address via [[setWithdrawAddr]]) * @param baseTx { types.BaseTx } - * @param onlyFromValidator only withdraw from this validator address - * @param isValidator also withdraw validator's commission, can be set to `true` only if the `onlyFromValidator` is specified + * @param validatorAddr withdraw from this validator address + * @returns { Promise } + * @since v0.17 + */ + withdrawRewards(validatorAddr: string, baseTx: types.BaseTx): Promise; + /** + * withdraws the full commission to the validator + * @param validatorAddr withdraw from this validator address + * @param baseTx { types.BaseTx } + * @returns { Promise } + * @since v0.17 + */ + withdrawValidatorCommission(validator_address: string, baseTx: types.BaseTx): Promise; + /** + * fundCommunityPool allows an account to directly fund the community pool + * @param amount Coins to be fund + * @param baseTx { types.BaseTx } * @returns { Promise } * @since v0.17 */ - withdrawRewards(baseTx: types.BaseTx, onlyFromValidator?: string, isValidator?: boolean): Promise; + fundCommunityPool(amount: types.Coin[], baseTx: types.BaseTx): Promise; + /** + * Params queries params of the distribution module. + */ + queryParams(): Promise; + /** + * ValidatorOutstandingRewards queries rewards of a validator address. + * @param validator_address Bech32 address + */ + queryValidatorOutstandingRewards(validator_address: string): Promise; + /** + * ValidatorCommission queries accumulated commission for a validator. + * @param validator_address Bech32 address + */ + queryValidatorCommission(validator_address: string): Promise; + /** + * ValidatorSlashes queries slash events of a validator. + * @param validator_address defines the validator address to query for. + * @param starting_height defines the optional starting height to query the slashes. + * @param ending_height defines the optional ending height to query the slashes. + * @param page_number + * @param page_size + */ + queryValidatorSlashes(validator_address: string, starting_height?: number, ending_height?: number, page_number?: number, page_size?: number): Promise; + /** + * DelegationRewards queries the total rewards accrued by a delegation. + * @param validator_address defines the validator address to query for + * @param delegator_address defines the delegator address to query for + */ + queryDelegationRewards(validator_address: string, delegator_address: string): Promise; + /** + * DelegationTotalRewards queries the total rewards accrued by a each validator. + * @param delegator_address defines the delegator address to query for + */ + queryDelegationTotalRewards(delegator_address: string): Promise; + /** + * DelegatorValidators queries the validators of a delegator. + * @param delegator_address defines the delegator address to query for + */ + queryDelegatorValidators(delegator_address: string): Promise; + /** + * DelegatorWithdrawAddress queries withdraw address of a delegator. + * @param delegator_address defines the delegator address to query for + */ + queryDelegatorWithdrawAddress(delegator_address: string): Promise; + /** + * CommunityPool queries the community pool coins. + */ + queryCommunityPool(): Promise; } diff --git a/dist/src/modules/distribution.js b/dist/src/modules/distribution.js index 5eab461b..9a359aad 100644 --- a/dist/src/modules/distribution.js +++ b/dist/src/modules/distribution.js @@ -1,16 +1,32 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const is = require("is_js"); -const distribution_1 = require("../types/distribution"); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Distribution = void 0; + +var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); + +var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var types = _interopRequireWildcard(require("../types")); + +var _utils = require("../utils"); + +var _helper = require("../helper"); + +var _errors = require("../errors"); + /** * This module is in charge of distributing collected transaction fee and inflated token to all validators and delegators. * To reduce computation stress, a lazy distribution strategy is brought in. lazy means that the benefit won't be paid directly to contributors automatically. @@ -21,64 +37,347 @@ const distribution_1 = require("../types/distribution"); * @category Modules * @since v0.17 */ -class Distribution { - /** @hidden */ - constructor(client) { - this.client = client; - } +var Distribution = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + function Distribution(client) { + (0, _classCallCheck2["default"])(this, Distribution); + (0, _defineProperty2["default"])(this, "client", void 0); + this.client = client; + } + /** + * Set another address to receive the rewards instead of using the delegator address + * @param withdrawAddress Bech32 account address + * @param baseTx + * @returns + * @since v0.17 + */ + + + (0, _createClass2["default"])(Distribution, [{ + key: "setWithdrawAddr", + value: function () { + var _setWithdrawAddr = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(withdrawAddress, baseTx) { + var from, msgs; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + from = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgSetWithdrawAddress, + value: { + delegator_address: from, + withdraw_address: withdrawAddress + } + }]; + return _context.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function setWithdrawAddr(_x, _x2) { + return _setWithdrawAddr.apply(this, arguments); + } + + return setWithdrawAddr; + }() /** - * Query all the rewards of a validator or a delegator - * @param address Bech32 account address - * @returns + * Withdraw rewards to the withdraw-address(default to the delegator address, you can set to another address via [[setWithdrawAddr]]) + * @param baseTx { types.BaseTx } + * @param validatorAddr withdraw from this validator address + * @returns { Promise } * @since v0.17 */ - queryRewards(address) { - return this.client.rpcClient.abciQuery('custom/distr/rewards', { - address, - }); - } + + }, { + key: "withdrawRewards", + value: function () { + var _withdrawRewards = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(validatorAddr, baseTx) { + var delegatorAddr, msgs; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + delegatorAddr = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgWithdrawDelegatorReward, + value: { + delegator_address: delegatorAddr, + validator_address: validatorAddr + } + }]; + return _context2.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function withdrawRewards(_x3, _x4) { + return _withdrawRewards.apply(this, arguments); + } + + return withdrawRewards; + }() /** - * Set another address to receive the rewards instead of using the delegator address - * @param withdrawAddress Bech32 account address - * @param baseTx - * @returns + * withdraws the full commission to the validator + * @param validatorAddr withdraw from this validator address + * @param baseTx { types.BaseTx } + * @returns { Promise } * @since v0.17 */ - setWithdrawAddr(withdrawAddress, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const from = this.client.keys.show(baseTx.from); - const msgs = [ - new distribution_1.MsgSetWithdrawAddress(from, withdrawAddress), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "withdrawValidatorCommission", + value: function () { + var _withdrawValidatorCommission = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(validator_address, baseTx) { + var msgs; + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + if (_utils.Crypto.checkAddress(validator_address, this.client.config.bech32Prefix.ValAddr)) { + _context3.next = 2; + break; + } + + throw new _errors.SdkError('Invalid bech32 address'); + + case 2: + msgs = [{ + type: types.TxType.MsgWithdrawValidatorCommission, + value: { + validator_address: validator_address + } + }]; + return _context3.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 4: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function withdrawValidatorCommission(_x5, _x6) { + return _withdrawValidatorCommission.apply(this, arguments); + } + + return withdrawValidatorCommission; + }() /** - * Withdraw rewards to the withdraw-address(default to the delegator address, you can set to another address via [[setWithdrawAddr]]) + * fundCommunityPool allows an account to directly fund the community pool + * @param amount Coins to be fund * @param baseTx { types.BaseTx } - * @param onlyFromValidator only withdraw from this validator address - * @param isValidator also withdraw validator's commission, can be set to `true` only if the `onlyFromValidator` is specified * @returns { Promise } * @since v0.17 */ - withdrawRewards(baseTx, onlyFromValidator = '', isValidator = false) { - return __awaiter(this, void 0, void 0, function* () { - const from = this.client.keys.show(baseTx.from); - let msgs; - if (is.not.empty(onlyFromValidator)) { - if (isValidator) { - msgs = [new distribution_1.MsgWithdrawValidatorRewardsAll(onlyFromValidator)]; - } - else { - msgs = [new distribution_1.MsgWithdrawDelegatorReward(from, onlyFromValidator)]; - } - } - else { - msgs = [new distribution_1.MsgWithdrawDelegatorRewardsAll(from)]; + + }, { + key: "fundCommunityPool", + value: function () { + var _fundCommunityPool = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(amount, baseTx) { + var depositor, msgs; + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + depositor = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgFundCommunityPool, + value: { + depositor: depositor, + amount: amount + } + }]; + return _context4.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context4.stop(); } - return this.client.tx.buildAndSend(msgs, baseTx); - }); + } + }, _callee4, this); + })); + + function fundCommunityPool(_x7, _x8) { + return _fundCommunityPool.apply(this, arguments); + } + + return fundCommunityPool; + }() + /** + * Params queries params of the distribution module. + */ + + }, { + key: "queryParams", + value: function queryParams() { + var request = new types.distribution_query_pb.QueryParamsRequest(); + return this.client.rpcClient.protoQuery('/cosmos.distribution.v1beta1.Query/Params', request, types.distribution_query_pb.QueryParamsResponse); + } + /** + * ValidatorOutstandingRewards queries rewards of a validator address. + * @param validator_address Bech32 address + */ + + }, { + key: "queryValidatorOutstandingRewards", + value: function queryValidatorOutstandingRewards(validator_address) { + if (!validator_address) { + throw new _errors.SdkError("validator_address can ont be empty"); + } + + var request = new types.distribution_query_pb.QueryValidatorOutstandingRewardsRequest(); + request.setValidatorAddress(validator_address); + return this.client.rpcClient.protoQuery('/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards', request, types.distribution_query_pb.QueryValidatorOutstandingRewardsResponse); + } + /** + * ValidatorCommission queries accumulated commission for a validator. + * @param validator_address Bech32 address + */ + + }, { + key: "queryValidatorCommission", + value: function queryValidatorCommission(validator_address) { + if (!validator_address) { + throw new _errors.SdkError("validator_address can ont be empty"); + } + + var request = new types.distribution_query_pb.QueryValidatorCommissionRequest(); + request.setValidatorAddress(validator_address); + return this.client.rpcClient.protoQuery('/cosmos.distribution.v1beta1.Query/ValidatorCommission', request, types.distribution_query_pb.QueryValidatorCommissionResponse); + } + /** + * ValidatorSlashes queries slash events of a validator. + * @param validator_address defines the validator address to query for. + * @param starting_height defines the optional starting height to query the slashes. + * @param ending_height defines the optional ending height to query the slashes. + * @param page_number + * @param page_size + */ + + }, { + key: "queryValidatorSlashes", + value: function queryValidatorSlashes(validator_address) { + var starting_height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var ending_height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var page_number = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; + var page_size = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 10; + + if (!validator_address) { + throw new _errors.SdkError("validator_address can ont be empty"); + } + + var pagination = _helper.ModelCreator.createPaginationModel(page_number, page_size, true); + + var request = new types.distribution_query_pb.QueryValidatorSlashesRequest(); + request.setValidatorAddress(validator_address); + request.setPagination(pagination); + + if (starting_height) { + request.setStartingHeight(starting_height); + } + + if (ending_height) { + request.setEndingHeight(ending_height); + } + + return this.client.rpcClient.protoQuery('/cosmos.distribution.v1beta1.Query/ValidatorSlashes', request, types.distribution_query_pb.QueryValidatorSlashesResponse); + } + /** + * DelegationRewards queries the total rewards accrued by a delegation. + * @param validator_address defines the validator address to query for + * @param delegator_address defines the delegator address to query for + */ + + }, { + key: "queryDelegationRewards", + value: function queryDelegationRewards(validator_address, delegator_address) { + if (!validator_address) { + throw new _errors.SdkError("validator_address can ont be empty"); + } + + if (!delegator_address) { + throw new _errors.SdkError("delegator_address can ont be empty"); + } + + var request = new types.distribution_query_pb.QueryDelegationRewardsRequest(); + request.setValidatorAddress(validator_address); + request.setDelegatorAddress(delegator_address); + return this.client.rpcClient.protoQuery('/cosmos.distribution.v1beta1.Query/DelegationRewards', request, types.distribution_query_pb.QueryDelegationRewardsResponse); + } + /** + * DelegationTotalRewards queries the total rewards accrued by a each validator. + * @param delegator_address defines the delegator address to query for + */ + + }, { + key: "queryDelegationTotalRewards", + value: function queryDelegationTotalRewards(delegator_address) { + if (!delegator_address) { + throw new _errors.SdkError("delegator_address can ont be empty"); + } + + var request = new types.distribution_query_pb.QueryDelegationTotalRewardsRequest(); + request.setDelegatorAddress(delegator_address); + return this.client.rpcClient.protoQuery('/cosmos.distribution.v1beta1.Query/DelegationTotalRewards', request, types.distribution_query_pb.QueryDelegationTotalRewardsResponse); + } + /** + * DelegatorValidators queries the validators of a delegator. + * @param delegator_address defines the delegator address to query for + */ + + }, { + key: "queryDelegatorValidators", + value: function queryDelegatorValidators(delegator_address) { + if (!delegator_address) { + throw new _errors.SdkError("delegator_address can ont be empty"); + } + + var request = new types.distribution_query_pb.QueryDelegatorValidatorsRequest(); + request.setDelegatorAddress(delegator_address); + return this.client.rpcClient.protoQuery('/cosmos.distribution.v1beta1.Query/DelegatorValidators', request, types.distribution_query_pb.QueryDelegatorValidatorsResponse); + } + /** + * DelegatorWithdrawAddress queries withdraw address of a delegator. + * @param delegator_address defines the delegator address to query for + */ + + }, { + key: "queryDelegatorWithdrawAddress", + value: function queryDelegatorWithdrawAddress(delegator_address) { + if (!delegator_address) { + throw new _errors.SdkError("delegator_address can ont be empty"); + } + + var request = new types.distribution_query_pb.QueryDelegatorWithdrawAddressRequest(); + request.setDelegatorAddress(delegator_address); + return this.client.rpcClient.protoQuery('/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress', request, types.distribution_query_pb.QueryDelegatorWithdrawAddressResponse); + } + /** + * CommunityPool queries the community pool coins. + */ + + }, { + key: "queryCommunityPool", + value: function queryCommunityPool() { + var request = new types.distribution_query_pb.QueryCommunityPoolRequest(); + return this.client.rpcClient.protoQuery('/cosmos.distribution.v1beta1.Query/CommunityPool', request, types.distribution_query_pb.QueryCommunityPoolResponse); } -} -exports.Distribution = Distribution; -//# sourceMappingURL=distribution.js.map \ No newline at end of file + }]); + return Distribution; +}(); + +exports.Distribution = Distribution; \ No newline at end of file diff --git a/dist/src/modules/distribution.js.map b/dist/src/modules/distribution.js.map deleted file mode 100644 index 9870e7c7..00000000 --- a/dist/src/modules/distribution.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"distribution.js","sourceRoot":"","sources":["../../../src/modules/distribution.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,4BAA4B;AAC5B,wDAK+B;AAE/B;;;;;;;;;GASG;AACH,MAAa,YAAY;IAGvB,cAAc;IACd,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,YAAY,CAAC,OAAe;QAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,sBAAsB,EACtB;YACE,OAAO;SACR,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACG,eAAe,CACnB,eAAuB,EACvB,MAAoB;;YAEpB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAChD,MAAM,IAAI,GAAgB;gBACxB,IAAI,oCAAqB,CAAC,IAAI,EAAE,eAAe,CAAC;aACjD,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;OAOG;IACG,eAAe,CACnB,MAAoB,EACpB,iBAAiB,GAAG,EAAE,EACtB,WAAW,GAAG,KAAK;;YAEnB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAChD,IAAI,IAAiB,CAAC;YACtB,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,iBAAiB,CAAC,EAAE;gBACnC,IAAI,WAAW,EAAE;oBACf,IAAI,GAAG,CAAC,IAAI,6CAA8B,CAAC,iBAAiB,CAAC,CAAC,CAAC;iBAChE;qBAAM;oBACL,IAAI,GAAG,CAAC,IAAI,yCAA0B,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC;iBAClE;aACF;iBAAM;gBACL,IAAI,GAAG,CAAC,IAAI,6CAA8B,CAAC,IAAI,CAAC,CAAC,CAAC;aACnD;YACD,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;CACF;AApED,oCAoEC"} \ No newline at end of file diff --git a/dist/src/modules/gov.js b/dist/src/modules/gov.js index 5f8c8833..74a5ff77 100644 --- a/dist/src/modules/gov.js +++ b/dist/src/modules/gov.js @@ -1,15 +1,24 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const gov_1 = require("../types/gov"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Gov = void 0; + +var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); + +var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _gov = require("../types/gov"); + /** * This module provides governance functionalities * @@ -18,21 +27,29 @@ const gov_1 = require("../types/gov"); * @category Modules * @since v0.17 */ -class Gov { - /** @hidden */ - constructor(client) { - this.client = client; - } - /** - * Query details of a single proposal - * @param proposalID Identity of a proposal - * @returns - * @since v0.17 - */ - queryProposal(proposalID) { - return this.client.rpcClient.abciQuery('custom/gov/proposal', { - ProposalID: String(proposalID), - }); +var Gov = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + function Gov(client) { + (0, _classCallCheck2["default"])(this, Gov); + (0, _defineProperty2["default"])(this, "client", void 0); + this.client = client; + } + /** + * Query details of a single proposal + * @param proposalID Identity of a proposal + * @returns + * @since v0.17 + */ + + + (0, _createClass2["default"])(Gov, [{ + key: "queryProposal", + value: function queryProposal(proposalID) { + return this.client.rpcClient.abciQuery('custom/gov/proposal', { + ProposalID: String(proposalID) + }); } /** * Query proposals by conditions @@ -40,17 +57,22 @@ class Gov { * @returns * @since v0.17 */ - queryProposals(params) { - let queryParams = {}; - if (params) { - queryParams = { - Voter: params.voter, - Depositor: params.depositor, - ProposalStatus: params.proposalStatus, - Limit: String(params.limit), - }; - } - return this.client.rpcClient.abciQuery('custom/gov/proposals', queryParams); + + }, { + key: "queryProposals", + value: function queryProposals(params) { + var queryParams = {}; + + if (params) { + queryParams = { + Voter: params.voter, + Depositor: params.depositor, + ProposalStatus: params.proposalStatus, + Limit: String(params.limit) + }; + } + + return this.client.rpcClient.abciQuery('custom/gov/proposals', queryParams); } /** * Query a vote @@ -59,11 +81,14 @@ class Gov { * @returns * @since v0.17 */ - queryVote(proposalID, voter) { - return this.client.rpcClient.abciQuery('custom/gov/vote', { - ProposalID: String(proposalID), - Voter: voter, - }); + + }, { + key: "queryVote", + value: function queryVote(proposalID, voter) { + return this.client.rpcClient.abciQuery('custom/gov/vote', { + ProposalID: String(proposalID), + Voter: voter + }); } /** * Query all votes of a proposal @@ -71,10 +96,13 @@ class Gov { * @returns * @since v0.17 */ - queryVotes(proposalID) { - return this.client.rpcClient.abciQuery('custom/gov/votes', { - ProposalID: String(proposalID), - }); + + }, { + key: "queryVotes", + value: function queryVotes(proposalID) { + return this.client.rpcClient.abciQuery('custom/gov/votes', { + ProposalID: String(proposalID) + }); } /** * Query a deposit of a proposal @@ -83,11 +111,14 @@ class Gov { * @returns * @since v0.17 */ - queryDeposit(proposalID, depositor) { - return this.client.rpcClient.abciQuery('custom/gov/deposit', { - ProposalID: String(proposalID), - Depositor: depositor, - }); + + }, { + key: "queryDeposit", + value: function queryDeposit(proposalID, depositor) { + return this.client.rpcClient.abciQuery('custom/gov/deposit', { + ProposalID: String(proposalID), + Depositor: depositor + }); } /** * Query all deposits of a proposal @@ -95,10 +126,13 @@ class Gov { * @returns * @since v0.17 */ - queryDeposits(proposalID) { - return this.client.rpcClient.abciQuery('custom/gov/deposits', { - ProposalID: String(proposalID), - }); + + }, { + key: "queryDeposits", + value: function queryDeposits(proposalID) { + return this.client.rpcClient.abciQuery('custom/gov/deposits', { + ProposalID: String(proposalID) + }); } /** * Query the statistics of a proposal @@ -106,10 +140,13 @@ class Gov { * @returns * @since v0.17 */ - queryTally(proposalID) { - return this.client.rpcClient.abciQuery('custom/gov/tally', { - ProposalID: String(proposalID), - }); + + }, { + key: "queryTally", + value: function queryTally(proposalID) { + return this.client.rpcClient.abciQuery('custom/gov/tally', { + ProposalID: String(proposalID) + }); } /** * Submit a ParameterChangeProposal along with an initial deposit @@ -126,22 +163,45 @@ class Gov { * @returns * @since v0.17 */ - submitParameterChangeProposal(title, description, initialDeposit, params, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const proposer = this.client.keys.show(baseTx.from); - const coins = yield this.client.utils.toMinCoins(initialDeposit); - const msgs = [ - new gov_1.MsgSubmitParameterChangeProposal({ - title, - description, - proposer, - initial_deposit: coins, - params, - }), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "submitParameterChangeProposal", + value: function () { + var _submitParameterChangeProposal = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(title, description, initialDeposit, params, baseTx) { + var proposer, coins, msgs; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + proposer = this.client.keys.show(baseTx.from); + _context.next = 3; + return this.client.utils.toMinCoins(initialDeposit); + + case 3: + coins = _context.sent; + msgs = [new _gov.MsgSubmitParameterChangeProposal({ + title: title, + description: description, + proposer: proposer, + initial_deposit: coins, + params: params + })]; + return _context.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 6: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function submitParameterChangeProposal(_x, _x2, _x3, _x4, _x5) { + return _submitParameterChangeProposal.apply(this, arguments); + } + + return submitParameterChangeProposal; + }() /** * Submit a PlainTextProposal along with an initial deposit * @@ -154,21 +214,44 @@ class Gov { * @returns * @since v0.17 */ - submitPlainTextProposal(title, description, initialDeposit, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const proposer = this.client.keys.show(baseTx.from); - const coins = yield this.client.utils.toMinCoins(initialDeposit); - const msgs = [ - new gov_1.MsgSubmitPlainTextProposal({ - title, - description, - proposer, - initial_deposit: coins, - }), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "submitPlainTextProposal", + value: function () { + var _submitPlainTextProposal = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(title, description, initialDeposit, baseTx) { + var proposer, coins, msgs; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + proposer = this.client.keys.show(baseTx.from); + _context2.next = 3; + return this.client.utils.toMinCoins(initialDeposit); + + case 3: + coins = _context2.sent; + msgs = [new _gov.MsgSubmitPlainTextProposal({ + title: title, + description: description, + proposer: proposer, + initial_deposit: coins + })]; + return _context2.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 6: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function submitPlainTextProposal(_x6, _x7, _x8, _x9) { + return _submitPlainTextProposal.apply(this, arguments); + } + + return submitPlainTextProposal; + }() /** * Submit a CommunityTaxUsageProposal along with an initial deposit * @@ -186,24 +269,47 @@ class Gov { * @param baseTx * @since v0.17 */ - submitCommunityTaxUsageProposal(title, description, initialDeposit, usage, destAddress, percent, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const proposer = this.client.keys.show(baseTx.from); - const coins = yield this.client.utils.toMinCoins(initialDeposit); - const msgs = [ - new gov_1.MsgSubmitCommunityTaxUsageProposal({ - title, - description, - proposer, - initial_deposit: coins, - usage: gov_1.CommunityTaxUsageType[usage], - dest_address: destAddress, - percent: String(percent), - }), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "submitCommunityTaxUsageProposal", + value: function () { + var _submitCommunityTaxUsageProposal = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(title, description, initialDeposit, usage, destAddress, percent, baseTx) { + var proposer, coins, msgs; + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + proposer = this.client.keys.show(baseTx.from); + _context3.next = 3; + return this.client.utils.toMinCoins(initialDeposit); + + case 3: + coins = _context3.sent; + msgs = [new _gov.MsgSubmitCommunityTaxUsageProposal({ + title: title, + description: description, + proposer: proposer, + initial_deposit: coins, + usage: _gov.CommunityTaxUsageType[usage], + dest_address: destAddress, + percent: String(percent) + })]; + return _context3.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 6: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function submitCommunityTaxUsageProposal(_x10, _x11, _x12, _x13, _x14, _x15, _x16) { + return _submitCommunityTaxUsageProposal.apply(this, arguments); + } + + return submitCommunityTaxUsageProposal; + }() /** * Deposit tokens for an active proposal. * @@ -215,16 +321,39 @@ class Gov { * @returns * @since v0.17 */ - deposit(proposalID, amount, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const depositor = this.client.keys.show(baseTx.from); - const coins = yield this.client.utils.toMinCoins(amount); - const msgs = [ - new gov_1.MsgDeposit(String(proposalID), depositor, coins), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "deposit", + value: function () { + var _deposit = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(proposalID, amount, baseTx) { + var depositor, coins, msgs; + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + depositor = this.client.keys.show(baseTx.from); + _context4.next = 3; + return this.client.utils.toMinCoins(amount); + + case 3: + coins = _context4.sent; + msgs = [new _gov.MsgDeposit(String(proposalID), depositor, coins)]; + return _context4.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 6: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function deposit(_x17, _x18, _x19) { + return _deposit.apply(this, arguments); + } + + return deposit; + }() /** * Vote for an active proposal, options: Yes/No/NoWithVeto/Abstain. * Only validators and delegators can vote for proposals in the voting period. @@ -234,13 +363,40 @@ class Gov { * @param baseTx * @since v0.17 */ - vote(proposalID, option, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const voter = this.client.keys.show(baseTx.from); - const msgs = [new gov_1.MsgVote(String(proposalID), voter, option)]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } -} -exports.Gov = Gov; -//# sourceMappingURL=gov.js.map \ No newline at end of file + + }, { + key: "vote", + value: function () { + var _vote = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(proposalID, option, baseTx) { + var voter, msgs; + return _regenerator["default"].wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + voter = this.client.keys.show(baseTx.from); + msgs = [new _gov.MsgVote(String(proposalID), voter, option)]; + return _context5.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function vote(_x20, _x21, _x22) { + return _vote.apply(this, arguments); + } + + return vote; + }() // =================== NOT SUPPORTED ==================== // + // submitSoftwareUpgradeProposal; // + // submitSystemHaltProposal; // + // =================== NOT SUPPORTED ==================== // + + }]); + return Gov; +}(); + +exports.Gov = Gov; \ No newline at end of file diff --git a/dist/src/modules/gov.js.map b/dist/src/modules/gov.js.map deleted file mode 100644 index 9c688962..00000000 --- a/dist/src/modules/gov.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gov.js","sourceRoot":"","sources":["../../../src/modules/gov.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,sCAOsB;AAEtB;;;;;;;GAOG;AACH,MAAa,GAAG;IAGd,cAAc;IACd,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,aAAa,CAAC,UAAkB;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,qBAAqB,EACrB;YACE,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;SAC/B,CACF,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,cAAc,CACZ,MAAmC;QAEnC,IAAI,WAAW,GAAG,EAAE,CAAC;QACrB,IAAI,MAAM,EAAE;YACV,WAAW,GAAG;gBACZ,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,cAAc,EAAE,MAAM,CAAC,cAAc;gBACrC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;aAC5B,CAAC;SACH;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,sBAAsB,EACtB,WAAW,CACZ,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,SAAS,CAAC,UAAkB,EAAE,KAAa;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,iBAAiB,EACjB;YACE,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;YAC9B,KAAK,EAAE,KAAK;SACb,CACF,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,UAAkB;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,kBAAkB,EAClB;YACE,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;SAC/B,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,YAAY,CACV,UAAkB,EAClB,SAAiB;QAEjB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,oBAAoB,EACpB;YACE,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;YAC9B,SAAS,EAAE,SAAS;SACrB,CACF,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,aAAa,CAAC,UAAkB;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,qBAAqB,EACrB;YACE,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;SAC/B,CACF,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,UAAkB;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,kBAAkB,EAClB;YACE,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;SAC/B,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACG,6BAA6B,CACjC,KAAa,EACb,WAAmB,EACnB,cAA4B,EAC5B,MAA+B,EAC/B,MAAoB;;YAEpB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;YACjE,MAAM,IAAI,GAAgB;gBACxB,IAAI,sCAAgC,CAAC;oBACnC,KAAK;oBACL,WAAW;oBACX,QAAQ;oBACR,eAAe,EAAE,KAAK;oBACtB,MAAM;iBACP,CAAC;aACH,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;;;;;OAWG;IACG,uBAAuB,CAC3B,KAAa,EACb,WAAmB,EACnB,cAA4B,EAC5B,MAAoB;;YAEpB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;YACjE,MAAM,IAAI,GAAgB;gBACxB,IAAI,gCAA0B,CAAC;oBAC7B,KAAK;oBACL,WAAW;oBACX,QAAQ;oBACR,eAAe,EAAE,KAAK;iBACvB,CAAC;aACH,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;OAgBG;IACG,+BAA+B,CACnC,KAAa,EACb,WAAmB,EACnB,cAA4B,EAC5B,KAA4B,EAC5B,WAAmB,EACnB,OAAe,EACf,MAAoB;;YAEpB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAEpD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;YACjE,MAAM,IAAI,GAAgB;gBACxB,IAAI,wCAAkC,CAAC;oBACrC,KAAK;oBACL,WAAW;oBACX,QAAQ;oBACR,eAAe,EAAE,KAAK;oBACtB,KAAK,EAAE,2BAAqB,CAAC,KAAK,CAAC;oBACnC,YAAY,EAAE,WAAW;oBACzB,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC;iBACzB,CAAC;aACH,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;;;;OAUG;IACG,OAAO,CACX,UAAkB,EAClB,MAAoB,EACpB,MAAoB;;YAEpB,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAErD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACzD,MAAM,IAAI,GAAgB;gBACxB,IAAI,gBAAU,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC;aACrD,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;;OAQG;IACG,IAAI,CACR,UAAkB,EAClB,MAAwB,EACxB,MAAoB;;YAEpB,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACjD,MAAM,IAAI,GAAgB,CAAC,IAAI,aAAO,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;YAE3E,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;CAMF;AApSD,kBAoSC"} \ No newline at end of file diff --git a/dist/src/modules/index.d.ts b/dist/src/modules/index.d.ts index 369c9b39..6326518d 100644 --- a/dist/src/modules/index.d.ts +++ b/dist/src/modules/index.d.ts @@ -10,6 +10,9 @@ export * from './distribution'; export * from './service'; export * from './oracle'; export * from './random'; -export * from './asset'; +export * from './token'; export * from './utils'; export * from './tendermint'; +export * from './coinswap'; +export * from './protobuf'; +export * from './nft'; diff --git a/dist/src/modules/index.js b/dist/src/modules/index.js index 9fb052ba..ed21f84b 100644 --- a/dist/src/modules/index.js +++ b/dist/src/modules/index.js @@ -1,21 +1,239 @@ "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./auth")); -__export(require("./bank")); -__export(require("../utils/crypto")); -__export(require("./keys")); -__export(require("./tx")); -__export(require("./staking")); -__export(require("./gov")); -__export(require("./slashing")); -__export(require("./distribution")); -__export(require("./service")); -__export(require("./oracle")); -__export(require("./random")); -__export(require("./asset")); -__export(require("./utils")); -__export(require("./tendermint")); -//# sourceMappingURL=index.js.map \ No newline at end of file + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _auth = require("./auth"); + +Object.keys(_auth).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _auth[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _auth[key]; + } + }); +}); + +var _bank = require("./bank"); + +Object.keys(_bank).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _bank[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _bank[key]; + } + }); +}); + +var _crypto = require("../utils/crypto"); + +Object.keys(_crypto).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _crypto[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _crypto[key]; + } + }); +}); + +var _keys = require("./keys"); + +Object.keys(_keys).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _keys[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _keys[key]; + } + }); +}); + +var _tx = require("./tx"); + +Object.keys(_tx).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _tx[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _tx[key]; + } + }); +}); + +var _staking = require("./staking"); + +Object.keys(_staking).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _staking[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _staking[key]; + } + }); +}); + +var _gov = require("./gov"); + +Object.keys(_gov).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _gov[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _gov[key]; + } + }); +}); + +var _slashing = require("./slashing"); + +Object.keys(_slashing).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _slashing[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _slashing[key]; + } + }); +}); + +var _distribution = require("./distribution"); + +Object.keys(_distribution).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _distribution[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _distribution[key]; + } + }); +}); + +var _service = require("./service"); + +Object.keys(_service).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _service[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _service[key]; + } + }); +}); + +var _oracle = require("./oracle"); + +Object.keys(_oracle).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _oracle[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _oracle[key]; + } + }); +}); + +var _random = require("./random"); + +Object.keys(_random).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _random[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _random[key]; + } + }); +}); + +var _token = require("./token"); + +Object.keys(_token).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _token[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _token[key]; + } + }); +}); + +var _utils = require("./utils"); + +Object.keys(_utils).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _utils[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _utils[key]; + } + }); +}); + +var _tendermint = require("./tendermint"); + +Object.keys(_tendermint).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _tendermint[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _tendermint[key]; + } + }); +}); + +var _coinswap = require("./coinswap"); + +Object.keys(_coinswap).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _coinswap[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _coinswap[key]; + } + }); +}); + +var _protobuf = require("./protobuf"); + +Object.keys(_protobuf).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _protobuf[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _protobuf[key]; + } + }); +}); + +var _nft = require("./nft"); + +Object.keys(_nft).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _nft[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _nft[key]; + } + }); +}); \ No newline at end of file diff --git a/dist/src/modules/index.js.map b/dist/src/modules/index.js.map deleted file mode 100644 index a8ed99a6..00000000 --- a/dist/src/modules/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":";;;;;AAAA,4BAAuB;AACvB,4BAAuB;AACvB,qCAAgC;AAChC,4BAAuB;AACvB,0BAAqB;AACrB,+BAA0B;AAC1B,2BAAsB;AACtB,gCAA2B;AAC3B,oCAA+B;AAC/B,+BAA0B;AAC1B,8BAAyB;AACzB,8BAAyB;AACzB,6BAAwB;AACxB,6BAAwB;AACxB,kCAA6B"} \ No newline at end of file diff --git a/dist/src/modules/keys.d.ts b/dist/src/modules/keys.d.ts index f09a6e68..f9073b15 100644 --- a/dist/src/modules/keys.d.ts +++ b/dist/src/modules/keys.d.ts @@ -18,10 +18,11 @@ export declare class Keys { * * @param name Name of the key * @param password Password for encrypting the keystore + * @param type Pubkey Type * @returns Bech32 address and mnemonic * @since v0.17 */ - add(name: string, password: string): { + add(name: string, password: string, type?: types.PubkeyType): { address: string; mnemonic: string; }; @@ -31,33 +32,47 @@ export declare class Keys { * @param name Name of the key * @param password Password for encrypting the keystore * @param mnemonic Mnemonic of the key - * @param derive Derive a private key using the default HD path (default: true) + * @param type Pubkey Type * @param index The bip44 address index (default: 0) + * @param derive Derive a private key using the default HD path (default: true) * @param saltPassword A passphrase for generating the salt, according to bip39 * @returns Bech32 address * @since v0.17 */ - recover(name: string, password: string, mnemonic: string, derive?: boolean, index?: number, saltPassword?: string): string; + recover(name: string, password: string, mnemonic: string, type?: types.PubkeyType, index?: number, derive?: boolean, saltPassword?: string): string; /** * Import a key from keystore * * @param name Name of the key * @param password Password of the keystore * @param keystore Keystore json or object + * @param type Pubkey Type + * @returns Bech32 address + * @since v0.17 + */ + import(name: string, password: string, keystore: string | types.Keystore, type?: types.PubkeyType): string; + /** + * Import a PrivateKey + * + * @param name Name of the key + * @param password Password of the keystore + * @param privateKey privateKey hex + * @param type Pubkey Type * @returns Bech32 address * @since v0.17 */ - import(name: string, password: string, keystore: string | types.Keystore): string; + importPrivateKey(name: string, password: string, privateKey: string, type?: types.PubkeyType): string; /** * Export keystore of a key * * @param name Name of the key * @param keyPassword Password of the key * @param keystorePassword Password for encrypting the keystore + * @param iterations * @returns Keystore json * @since v0.17 */ - export(name: string, keyPassword: string, keystorePassword: string): string; + export(name: string, keyPassword: string, keystorePassword: string, iterations?: number): string; /** * Delete a key * diff --git a/dist/src/modules/keys.js b/dist/src/modules/keys.js index 326f4668..eec00178 100644 --- a/dist/src/modules/keys.js +++ b/dist/src/modules/keys.js @@ -1,8 +1,28 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const crypto_1 = require("../utils/crypto"); -const errors_1 = require("../errors"); -const is = require("is_js"); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Keys = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _crypto = require("../utils/crypto"); + +var _errors = require("../errors"); + +var is = _interopRequireWildcard(require("is_js")); + +var types = _interopRequireWildcard(require("../types")); + /** * This module allows you to manage your local tendermint keystore (wallets) for iris. * @@ -11,44 +31,68 @@ const is = require("is_js"); * @category Modules * @since v0.17 */ -class Keys { - /** @hidden */ - constructor(client) { - this.client = client; - } - /** - * Create a new key - * - * @param name Name of the key - * @param password Password for encrypting the keystore - * @returns Bech32 address and mnemonic - * @since v0.17 - */ - add(name, password) { - if (is.empty(name)) { - throw new errors_1.SdkError(`Name of the key can not be empty`); - } - if (is.empty(password)) { - throw new errors_1.SdkError(`Password of the key can not be empty`); - } - if (!this.client.config.keyDAO.encrypt) { - throw new errors_1.SdkError(`Encrypt method of KeyDAO not implemented`); - } - const exists = this.client.config.keyDAO.read(name); - if (exists) { - throw new errors_1.SdkError(`Key with name '${name}' already exists`); - } - const mnemonic = crypto_1.Crypto.generateMnemonic(); - const privKey = crypto_1.Crypto.getPrivateKeyFromMnemonic(mnemonic); - const pubKey = crypto_1.Crypto.getPublicKeyFromPrivateKey(privKey); - const address = crypto_1.Crypto.getAddressFromPublicKey(pubKey, this.client.config.bech32Prefix.AccAddr); - const encryptedPrivKey = this.client.config.keyDAO.encrypt(privKey, password); - // Save the key to app - this.client.config.keyDAO.write(name, { - address, - privKey: encryptedPrivKey, - }); - return { address, mnemonic }; +var Keys = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + function Keys(client) { + (0, _classCallCheck2["default"])(this, Keys); + (0, _defineProperty2["default"])(this, "client", void 0); + this.client = client; + } + /** + * Create a new key + * + * @param name Name of the key + * @param password Password for encrypting the keystore + * @param type Pubkey Type + * @returns Bech32 address and mnemonic + * @since v0.17 + */ + + + (0, _createClass2["default"])(Keys, [{ + key: "add", + value: function add(name, password) { + var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : types.PubkeyType.secp256k1; + + if (is.empty(name)) { + throw new _errors.SdkError("Name of the key can not be empty"); + } + + if (is.empty(password)) { + throw new _errors.SdkError("Password of the key can not be empty"); + } + + if (!this.client.config.keyDAO.encrypt) { + throw new _errors.SdkError("Encrypt method of KeyDAO not implemented"); + } // const exists = this.client.config.keyDAO.read(name); + // if (exists) { + // throw new SdkError(`Key with name '${name}' already exists`); + // } + + + var mnemonic = _crypto.Crypto.generateMnemonic(); + + var privKey = _crypto.Crypto.getPrivateKeyFromMnemonic(mnemonic); + + var pubKey = _crypto.Crypto.getPublicKeyFromPrivateKey(privKey, type); + + var address = _crypto.Crypto.getAddressFromPublicKey(pubKey, this.client.config.bech32Prefix.AccAddr); + + var encryptedPrivKey = this.client.config.keyDAO.encrypt(privKey, password); + var encryptedMnemonic = this.client.config.keyDAO.encrypt(mnemonic, password); // Save the key to app + + this.client.config.keyDAO.write(name, { + address: address, + privateKey: encryptedPrivKey, + publicKey: _crypto.Crypto.aminoMarshalPubKey(pubKey), + mnemonic: encryptedMnemonic + }); + return { + address: address, + mnemonic: mnemonic + }; } /** * Recover a key @@ -56,39 +100,56 @@ class Keys { * @param name Name of the key * @param password Password for encrypting the keystore * @param mnemonic Mnemonic of the key - * @param derive Derive a private key using the default HD path (default: true) + * @param type Pubkey Type * @param index The bip44 address index (default: 0) + * @param derive Derive a private key using the default HD path (default: true) * @param saltPassword A passphrase for generating the salt, according to bip39 * @returns Bech32 address * @since v0.17 */ - recover(name, password, mnemonic, derive = true, index = 0, saltPassword = '') { - if (is.empty(name)) { - throw new errors_1.SdkError(`Name of the key can not be empty`); - } - if (is.empty(password)) { - throw new errors_1.SdkError(`Password of the key can not be empty`); - } - if (is.empty(mnemonic)) { - throw new errors_1.SdkError(`Mnemonic of the key can not be empty`); - } - if (!this.client.config.keyDAO.encrypt) { - throw new errors_1.SdkError(`Encrypt method of KeyDAO not implemented`); - } - const exists = this.client.config.keyDAO.read(name); - if (exists) { - throw new errors_1.SdkError(`Key with name '${name}' exists`); - } - const privKey = crypto_1.Crypto.getPrivateKeyFromMnemonic(mnemonic, derive, index, saltPassword); - const pubKey = crypto_1.Crypto.getPublicKeyFromPrivateKey(privKey); - const address = crypto_1.Crypto.getAddressFromPublicKey(pubKey, this.client.config.bech32Prefix.AccAddr); - const encryptedPrivKey = this.client.config.keyDAO.encrypt(privKey, password); - // Save the key to app - this.client.config.keyDAO.write(name, { - address, - privKey: encryptedPrivKey, - }); - return address; + + }, { + key: "recover", + value: function recover(name, password, mnemonic) { + var type = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : types.PubkeyType.secp256k1; + var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; + var derive = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; + var saltPassword = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : ''; + + if (is.empty(name)) { + throw new _errors.SdkError("Name of the key can not be empty"); + } + + if (is.empty(password)) { + throw new _errors.SdkError("Password of the key can not be empty"); + } + + if (is.empty(mnemonic)) { + throw new _errors.SdkError("Mnemonic of the key can not be empty"); + } + + if (!this.client.config.keyDAO.encrypt) { + throw new _errors.SdkError("Encrypt method of KeyDAO not implemented"); + } // const exists = this.client.config.keyDAO.read(name); + // if (exists) { + // throw new SdkError(`Key with name '${name}' exists`); + // } + + + var privKey = _crypto.Crypto.getPrivateKeyFromMnemonic(mnemonic, index, derive, saltPassword); + + var pubKey = _crypto.Crypto.getPublicKeyFromPrivateKey(privKey, type); + + var address = _crypto.Crypto.getAddressFromPublicKey(pubKey, this.client.config.bech32Prefix.AccAddr); + + var encryptedPrivKey = this.client.config.keyDAO.encrypt(privKey, password); // Save the key to app + + this.client.config.keyDAO.write(name, { + address: address, + privateKey: encryptedPrivKey, + publicKey: _crypto.Crypto.aminoMarshalPubKey(pubKey) + }); + return address; } /** * Import a key from keystore @@ -96,36 +157,95 @@ class Keys { * @param name Name of the key * @param password Password of the keystore * @param keystore Keystore json or object + * @param type Pubkey Type * @returns Bech32 address * @since v0.17 */ - import(name, password, keystore) { - if (is.empty(name)) { - throw new errors_1.SdkError(`Name of the key can not be empty`); - } - if (is.empty(password)) { - throw new errors_1.SdkError(`Password of the key can not be empty`); - } - if (is.empty(keystore)) { - throw new errors_1.SdkError(`Keystore can not be empty`); - } - if (!this.client.config.keyDAO.encrypt) { - throw new errors_1.SdkError(`Encrypt method of KeyDAO not implemented`); - } - const exists = this.client.config.keyDAO.read(name); - if (exists) { - throw new errors_1.SdkError(`Key with name '${name}' already exists`); - } - const privKey = crypto_1.Crypto.getPrivateKeyFromKeyStore(keystore, password); - const pubKey = crypto_1.Crypto.getPublicKeyFromPrivateKey(privKey); - const address = crypto_1.Crypto.getAddressFromPublicKey(pubKey, this.client.config.bech32Prefix.AccAddr); - const encryptedPrivKey = this.client.config.keyDAO.encrypt(privKey, password); - // Save the key to app - this.client.config.keyDAO.write(name, { - address, - privKey: encryptedPrivKey, - }); - return address; + + }, { + key: "import", + value: function _import(name, password, keystore) { + var type = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : types.PubkeyType.secp256k1; + + if (is.empty(name)) { + throw new _errors.SdkError("Name of the key can not be empty"); + } + + if (is.empty(password)) { + throw new _errors.SdkError("Password of the key can not be empty"); + } + + if (is.empty(keystore)) { + throw new _errors.SdkError("Keystore can not be empty"); + } + + if (!this.client.config.keyDAO.encrypt) { + throw new _errors.SdkError("Encrypt method of KeyDAO not implemented"); + } // const exists = this.client.config.keyDAO.read(name); + // if (exists) { + // throw new SdkError(`Key with name '${name}' already exists`); + // } + + + var privKey = _crypto.Crypto.getPrivateKeyFromKeyStore(keystore, password); + + var pubKey = _crypto.Crypto.getPublicKeyFromPrivateKey(privKey, type); + + var address = _crypto.Crypto.getAddressFromPublicKey(pubKey, this.client.config.bech32Prefix.AccAddr); + + var encryptedPrivKey = this.client.config.keyDAO.encrypt(privKey, password); // Save the key to app + + this.client.config.keyDAO.write(name, { + address: address, + privateKey: encryptedPrivKey, + publicKey: _crypto.Crypto.aminoMarshalPubKey(pubKey) + }); + return address; + } + /** + * Import a PrivateKey + * + * @param name Name of the key + * @param password Password of the keystore + * @param privateKey privateKey hex + * @param type Pubkey Type + * @returns Bech32 address + * @since v0.17 + */ + + }, { + key: "importPrivateKey", + value: function importPrivateKey(name, password, privateKey) { + var type = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : types.PubkeyType.secp256k1; + + if (is.empty(name)) { + throw new _errors.SdkError("Name of the key can not be empty"); + } + + if (is.empty(password)) { + throw new _errors.SdkError("Password of the key can not be empty"); + } + + if (is.empty(privateKey)) { + throw new _errors.SdkError("privateKey can not be empty"); + } // const exists = this.client.config.keyDAO.read(name); + // if (exists) { + // throw new SdkError(`Key with name '${name}' already exists`); + // } + + + var pubKey = _crypto.Crypto.getPublicKeyFromPrivateKey(privateKey, type); + + var address = _crypto.Crypto.getAddressFromPublicKey(pubKey, this.client.config.bech32Prefix.AccAddr); + + var encryptedPrivKey = this.client.config.keyDAO.encrypt(privateKey, password); // Save the key to app + + this.client.config.keyDAO.write(name, { + address: address, + privateKey: encryptedPrivKey, + publicKey: _crypto.Crypto.aminoMarshalPubKey(pubKey) + }); + return address; } /** * Export keystore of a key @@ -133,26 +253,37 @@ class Keys { * @param name Name of the key * @param keyPassword Password of the key * @param keystorePassword Password for encrypting the keystore + * @param iterations * @returns Keystore json * @since v0.17 */ - export(name, keyPassword, keystorePassword) { - if (is.empty(name)) { - throw new errors_1.SdkError(`Name of the key can not be empty`); - } - if (is.empty(keyPassword)) { - throw new errors_1.SdkError(`Password of the key can not be empty`); - } - if (!this.client.config.keyDAO.decrypt) { - throw new errors_1.SdkError(`Decrypt method of KeyDAO not implemented`); - } - const keyObj = this.client.config.keyDAO.read(name); - if (!keyObj) { - throw new errors_1.SdkError(`Key with name '${name}' not found`); - } - const privKey = this.client.config.keyDAO.decrypt(keyObj.privKey, keyPassword); - const keystore = crypto_1.Crypto.generateKeyStore(privKey, keystorePassword, this.client.config.bech32Prefix.AccAddr); - return JSON.stringify(keystore); + + }, { + key: "export", + value: function _export(name, keyPassword, keystorePassword, iterations) { + if (is.empty(name)) { + throw new _errors.SdkError("Name of the key can not be empty"); + } + + if (is.empty(keyPassword)) { + throw new _errors.SdkError("Password of the key can not be empty"); + } + + if (!this.client.config.keyDAO.decrypt) { + throw new _errors.SdkError("Decrypt method of KeyDAO not implemented"); + } + + var keyObj = this.client.config.keyDAO.read(name); + + if (!keyObj) { + throw new _errors.SdkError("Key with name '".concat(name, "' not found")); + } + + var privKey = this.client.config.keyDAO.decrypt(keyObj.privateKey, keyPassword); + + var keystore = _crypto.Crypto.generateKeyStore(privKey, keystorePassword, this.client.config.bech32Prefix.AccAddr, iterations); + + return JSON.stringify(keystore); } /** * Delete a key @@ -161,24 +292,32 @@ class Keys { * @param password Password of the key * @since v0.17 */ - delete(name, password) { - if (is.empty(name)) { - throw new errors_1.SdkError(`Name of the key can not be empty`); - } - if (is.empty(password)) { - throw new errors_1.SdkError(`Password of the key can not be empty`); - } - if (!this.client.config.keyDAO.decrypt) { - throw new errors_1.SdkError(`Decrypt method of KeyDAO not implemented`); - } - const keyObj = this.client.config.keyDAO.read(name); - if (!keyObj) { - throw new errors_1.SdkError(`Key with name '${name}' not found`); - } - // Check keystore password - this.client.config.keyDAO.decrypt(keyObj.privKey, password); - // Delete the key from app - this.client.config.keyDAO.delete(name); + + }, { + key: "delete", + value: function _delete(name, password) { + if (is.empty(name)) { + throw new _errors.SdkError("Name of the key can not be empty"); + } + + if (is.empty(password)) { + throw new _errors.SdkError("Password of the key can not be empty"); + } + + if (!this.client.config.keyDAO.decrypt) { + throw new _errors.SdkError("Decrypt method of KeyDAO not implemented"); + } + + var keyObj = this.client.config.keyDAO.read(name); + + if (!keyObj) { + throw new _errors.SdkError("Key with name '".concat(name, "' not found")); + } // Check keystore password + + + this.client.config.keyDAO.decrypt(keyObj.privateKey, password); // Delete the key from app + + this.client.config.keyDAO["delete"](name); } /** * Gets address of a key @@ -187,16 +326,25 @@ class Keys { * @returns Bech32 address * @since v0.17 */ - show(name) { - if (is.empty(name)) { - throw new errors_1.SdkError(`Name of the key can not be empty`); - } - const keyObj = this.client.config.keyDAO.read(name); - if (!keyObj) { - throw new errors_1.SdkError(`Key with name '${name}' not found`); - } - return keyObj.address; - } -} -exports.Keys = Keys; -//# sourceMappingURL=keys.js.map \ No newline at end of file + + }, { + key: "show", + value: function show(name) { + if (is.empty(name)) { + throw new _errors.SdkError("Name of the key can not be empty"); + } + + var keyObj = this.client.config.keyDAO.read(name); + + if (!keyObj) { + throw new _errors.SdkError("Key with name '".concat(name, "' not found"), _errors.CODES.KeyNotFound); + } + + return keyObj.address; + } // TODO: Ledger support + + }]); + return Keys; +}(); + +exports.Keys = Keys; \ No newline at end of file diff --git a/dist/src/modules/keys.js.map b/dist/src/modules/keys.js.map deleted file mode 100644 index 06a772d6..00000000 --- a/dist/src/modules/keys.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"keys.js","sourceRoot":"","sources":["../../../src/modules/keys.ts"],"names":[],"mappings":";;AACA,4CAAyC;AACzC,sCAAqC;AACrC,4BAA4B;AAG5B;;;;;;;GAOG;AACH,MAAa,IAAI;IAGf,cAAc;IACd,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACH,GAAG,CAAC,IAAY,EAAE,QAAgB;QAChC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YAClB,MAAM,IAAI,iBAAQ,CAAC,kCAAkC,CAAC,CAAC;SACxD;QACD,IAAI,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;YACtB,MAAM,IAAI,iBAAQ,CAAC,sCAAsC,CAAC,CAAC;SAC5D;QACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;YACtC,MAAM,IAAI,iBAAQ,CAAC,0CAA0C,CAAC,CAAC;SAChE;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,MAAM,EAAE;YACV,MAAM,IAAI,iBAAQ,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,CAAC;SAC9D;QACD,MAAM,QAAQ,GAAG,eAAM,CAAC,gBAAgB,EAAE,CAAC;QAC3C,MAAM,OAAO,GAAG,eAAM,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC;QAC3D,MAAM,MAAM,GAAG,eAAM,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC;QAC1D,MAAM,OAAO,GAAG,eAAM,CAAC,uBAAuB,CAC5C,MAAM,EACN,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CACxC,CAAC;QAEF,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CACxD,OAAO,EACP,QAAQ,CACT,CAAC;QAEF,sBAAsB;QACtB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE;YACpC,OAAO;YACP,OAAO,EAAE,gBAAgB;SAC1B,CAAC,CAAC;QAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;IAC/B,CAAC;IAED;;;;;;;;;;;OAWG;IACH,OAAO,CACL,IAAY,EACZ,QAAgB,EAChB,QAAgB,EAChB,MAAM,GAAG,IAAI,EACb,KAAK,GAAG,CAAC,EACT,YAAY,GAAG,EAAE;QAEjB,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YAClB,MAAM,IAAI,iBAAQ,CAAC,kCAAkC,CAAC,CAAC;SACxD;QACD,IAAI,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;YACtB,MAAM,IAAI,iBAAQ,CAAC,sCAAsC,CAAC,CAAC;SAC5D;QACD,IAAI,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;YACtB,MAAM,IAAI,iBAAQ,CAAC,sCAAsC,CAAC,CAAC;SAC5D;QACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;YACtC,MAAM,IAAI,iBAAQ,CAAC,0CAA0C,CAAC,CAAC;SAChE;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,MAAM,EAAE;YACV,MAAM,IAAI,iBAAQ,CAAC,kBAAkB,IAAI,UAAU,CAAC,CAAC;SACtD;QAED,MAAM,OAAO,GAAG,eAAM,CAAC,yBAAyB,CAC9C,QAAQ,EACR,MAAM,EACN,KAAK,EACL,YAAY,CACb,CAAC;QACF,MAAM,MAAM,GAAG,eAAM,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC;QAC1D,MAAM,OAAO,GAAG,eAAM,CAAC,uBAAuB,CAC5C,MAAM,EACN,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CACxC,CAAC;QAEF,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CACxD,OAAO,EACP,QAAQ,CACT,CAAC;QAEF,sBAAsB;QACtB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE;YACpC,OAAO;YACP,OAAO,EAAE,gBAAgB;SAC1B,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CACJ,IAAY,EACZ,QAAgB,EAChB,QAAiC;QAEjC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YAClB,MAAM,IAAI,iBAAQ,CAAC,kCAAkC,CAAC,CAAC;SACxD;QACD,IAAI,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;YACtB,MAAM,IAAI,iBAAQ,CAAC,sCAAsC,CAAC,CAAC;SAC5D;QACD,IAAI,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;YACtB,MAAM,IAAI,iBAAQ,CAAC,2BAA2B,CAAC,CAAC;SACjD;QACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;YACtC,MAAM,IAAI,iBAAQ,CAAC,0CAA0C,CAAC,CAAC;SAChE;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,MAAM,EAAE;YACV,MAAM,IAAI,iBAAQ,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,CAAC;SAC9D;QAED,MAAM,OAAO,GAAG,eAAM,CAAC,yBAAyB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACrE,MAAM,MAAM,GAAG,eAAM,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC;QAC1D,MAAM,OAAO,GAAG,eAAM,CAAC,uBAAuB,CAC5C,MAAM,EACN,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CACxC,CAAC;QAEF,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CACxD,OAAO,EACP,QAAQ,CACT,CAAC;QAEF,sBAAsB;QACtB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE;YACpC,OAAO;YACP,OAAO,EAAE,gBAAgB;SAC1B,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAY,EAAE,WAAmB,EAAE,gBAAwB;QAChE,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YAClB,MAAM,IAAI,iBAAQ,CAAC,kCAAkC,CAAC,CAAC;SACxD;QACD,IAAI,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE;YACzB,MAAM,IAAI,iBAAQ,CAAC,sCAAsC,CAAC,CAAC;SAC5D;QACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;YACtC,MAAM,IAAI,iBAAQ,CAAC,0CAA0C,CAAC,CAAC;SAChE;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,EAAE;YACX,MAAM,IAAI,iBAAQ,CAAC,kBAAkB,IAAI,aAAa,CAAC,CAAC;SACzD;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAC/C,MAAM,CAAC,OAAO,EACd,WAAW,CACZ,CAAC;QAEF,MAAM,QAAQ,GAAG,eAAM,CAAC,gBAAgB,CACtC,OAAO,EACP,gBAAgB,EAChB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CACxC,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,IAAY,EAAE,QAAgB;QACnC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YAClB,MAAM,IAAI,iBAAQ,CAAC,kCAAkC,CAAC,CAAC;SACxD;QACD,IAAI,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;YACtB,MAAM,IAAI,iBAAQ,CAAC,sCAAsC,CAAC,CAAC;SAC5D;QACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;YACtC,MAAM,IAAI,iBAAQ,CAAC,0CAA0C,CAAC,CAAC;SAChE;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,EAAE;YACX,MAAM,IAAI,iBAAQ,CAAC,kBAAkB,IAAI,aAAa,CAAC,CAAC;SACzD;QAED,0BAA0B;QAC1B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAE5D,0BAA0B;QAC1B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CAAC,IAAY;QACf,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YAClB,MAAM,IAAI,iBAAQ,CAAC,kCAAkC,CAAC,CAAC;SACxD;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,EAAE;YACX,MAAM,IAAI,iBAAQ,CAAC,kBAAkB,IAAI,aAAa,CAAC,CAAC;SACzD;QACD,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;CAGF;AA5PD,oBA4PC"} \ No newline at end of file diff --git a/dist/src/modules/nft.d.ts b/dist/src/modules/nft.d.ts new file mode 100644 index 00000000..372aa888 --- /dev/null +++ b/dist/src/modules/nft.d.ts @@ -0,0 +1,107 @@ +import { Client } from '../client'; +import * as types from '../types'; +/** + * This module implements NFT related functions + * + * @category Modules + * @since v0.17 + */ +export declare class Nft { + /** @hidden */ + private client; + /** @hidden */ + constructor(client: Client); + /** + * issue Denom + * @param id string + * @param name string + * @param schema string + * @param baseTx { types.BaseTx } + * @returns + * @since v0.17 + */ + issueDenom(id: string, name: string, schema: string, baseTx: types.BaseTx): Promise; + /** + * mint NFT + * @param id string + * @param denom_id string + * @param name string + * @param uri string + * @param data string + * @param recipient string If recipient it's "", recipient default is sender + * @param baseTx { types.BaseTx } + * @returns + * @since v0.17 + */ + mintNft(id: string, denom_id: string, name: string, uri: string, data: string, recipient: string, baseTx: types.BaseTx): Promise; + /** + * edit NFT + * @param id string + * @param denom_id string + * @param newProperty {name?: string,uri?:string,data?:string} new nft property + * @param baseTx { types.BaseTx } + * @returns + * @since v0.17 + */ + editNft(id: string, denom_id: string, new_property: { + name?: string; + uri?: string; + data?: string; + }, baseTx: types.BaseTx): Promise; + /** + * transfer NFT + * @param id string + * @param denom_id string + * @param recipient string + * @param newProperty {name?: string,uri?:string,data?:string} new nft property + * @param baseTx { types.BaseTx } + * @returns + * @since v0.17 + */ + transferNft(id: string, denom_id: string, recipient: string, new_property: { + name?: string; + uri?: string; + data?: string; + }, baseTx: types.BaseTx): Promise; + /** + * burn NFT + * @param id string + * @param denom_id string + * @param baseTx { types.BaseTx } + * @returns + * @since v0.17 + */ + burnNft(id: string, denom_id: string, baseTx: types.BaseTx): Promise; + /** + * Supply queries the total supply of a given denom or owner + * @param denom_id + * @param owner + */ + querySupply(denom_id?: string, owner?: string): Promise; + /** + * Owner queries the NFTs of the specified owner + * @param owner + * @param denom_id + */ + queryOwner(owner: string, denom_id?: string): Promise; + /** + * Collection queries the NFTs of the specified denom + * @param denom_id + */ + queryCollection(denom_id: string): Promise; + /** + * Denom queries the definition of a given denom + * @param denom_id + */ + queryDenom(denom_id: string): Promise; + /** + * Denoms queries all the denoms + */ + queryDenoms(): Promise; + /** + * NFT queries the NFT for the given denom and token ID + * @param denom_id + * @param token_id + */ + queryNFT(denom_id: string, token_id: string): Promise; +} diff --git a/dist/src/modules/nft.js b/dist/src/modules/nft.js new file mode 100644 index 00000000..950860e0 --- /dev/null +++ b/dist/src/modules/nft.js @@ -0,0 +1,413 @@ +"use strict"; + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Nft = void 0; + +var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); + +var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _crypto = require("../utils/crypto"); + +var types = _interopRequireWildcard(require("../types")); + +var _errors = require("../errors"); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +/** + * This module implements NFT related functions + * + * @category Modules + * @since v0.17 + */ +var Nft = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + function Nft(client) { + (0, _classCallCheck2["default"])(this, Nft); + (0, _defineProperty2["default"])(this, "client", void 0); + this.client = client; + } + /** + * issue Denom + * @param id string + * @param name string + * @param schema string + * @param baseTx { types.BaseTx } + * @returns + * @since v0.17 + */ + + + (0, _createClass2["default"])(Nft, [{ + key: "issueDenom", + value: function () { + var _issueDenom = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(id, name, schema, baseTx) { + var sender, msgs; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + sender = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgIssueDenom, + value: { + id: id, + name: name, + schema: schema, + sender: sender + } + }]; + return _context.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function issueDenom(_x, _x2, _x3, _x4) { + return _issueDenom.apply(this, arguments); + } + + return issueDenom; + }() + /** + * mint NFT + * @param id string + * @param denom_id string + * @param name string + * @param uri string + * @param data string + * @param recipient string If recipient it's "", recipient default is sender + * @param baseTx { types.BaseTx } + * @returns + * @since v0.17 + */ + + }, { + key: "mintNft", + value: function () { + var _mintNft = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(id, denom_id, name, uri, data, recipient, baseTx) { + var sender, msgs; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (!(recipient && !_crypto.Crypto.checkAddress(recipient, this.client.config.bech32Prefix.AccAddr))) { + _context2.next = 2; + break; + } + + throw new _errors.SdkError('recipient Invalid bech32 address'); + + case 2: + sender = this.client.keys.show(baseTx.from); + + if (!recipient) { + recipient = sender; + } + + msgs = [{ + type: types.TxType.MsgMintNFT, + value: { + id: id, + denom_id: denom_id, + name: name, + uri: uri, + data: data, + sender: sender, + recipient: recipient + } + }]; + return _context2.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 6: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function mintNft(_x5, _x6, _x7, _x8, _x9, _x10, _x11) { + return _mintNft.apply(this, arguments); + } + + return mintNft; + }() + /** + * edit NFT + * @param id string + * @param denom_id string + * @param newProperty {name?: string,uri?:string,data?:string} new nft property + * @param baseTx { types.BaseTx } + * @returns + * @since v0.17 + */ + + }, { + key: "editNft", + value: function () { + var _editNft = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(id, denom_id, new_property, baseTx) { + var sender, msgs; + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + sender = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgEditNFT, + value: _objectSpread({ + id: id, + denom_id: denom_id, + sender: sender + }, new_property) + }]; + return _context3.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function editNft(_x12, _x13, _x14, _x15) { + return _editNft.apply(this, arguments); + } + + return editNft; + }() + /** + * transfer NFT + * @param id string + * @param denom_id string + * @param recipient string + * @param newProperty {name?: string,uri?:string,data?:string} new nft property + * @param baseTx { types.BaseTx } + * @returns + * @since v0.17 + */ + + }, { + key: "transferNft", + value: function () { + var _transferNft = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(id, denom_id, recipient, new_property, baseTx) { + var sender, msgs; + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + if (!(recipient && !_crypto.Crypto.checkAddress(recipient, this.client.config.bech32Prefix.AccAddr))) { + _context4.next = 2; + break; + } + + throw new _errors.SdkError('recipient Invalid bech32 address'); + + case 2: + sender = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgTransferNFT, + value: _objectSpread({ + id: id, + denom_id: denom_id, + sender: sender, + recipient: recipient + }, new_property) + }]; + return _context4.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 5: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function transferNft(_x16, _x17, _x18, _x19, _x20) { + return _transferNft.apply(this, arguments); + } + + return transferNft; + }() + /** + * burn NFT + * @param id string + * @param denom_id string + * @param baseTx { types.BaseTx } + * @returns + * @since v0.17 + */ + + }, { + key: "burnNft", + value: function () { + var _burnNft = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(id, denom_id, baseTx) { + var sender, msgs; + return _regenerator["default"].wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + sender = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgBurnNFT, + value: { + id: id, + denom_id: denom_id, + sender: sender + } + }]; + return _context5.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function burnNft(_x21, _x22, _x23) { + return _burnNft.apply(this, arguments); + } + + return burnNft; + }() + /** + * Supply queries the total supply of a given denom or owner + * @param denom_id + * @param owner + */ + + }, { + key: "querySupply", + value: function querySupply(denom_id, owner) { + if (!denom_id && !owner) { + throw new _errors.SdkError("there must be one denom_id or owner"); + } + + var request = new types.nft_query_pb.QuerySupplyRequest(); + + if (denom_id) { + request.setDenomId(denom_id); + } + + if (owner) { + request.setOwner(owner); + } + + return this.client.rpcClient.protoQuery('/irismod.nft.Query/Supply', request, types.nft_query_pb.QuerySupplyResponse); + } + /** + * Owner queries the NFTs of the specified owner + * @param owner + * @param denom_id + */ + + }, { + key: "queryOwner", + value: function queryOwner(owner, denom_id) { + if (!owner) { + throw new _errors.SdkError("owner can ont be empty"); + } + + var request = new types.nft_query_pb.QueryOwnerRequest(); + request.setOwner(owner); + + if (denom_id) { + request.setDenomId(denom_id); + } + + return this.client.rpcClient.protoQuery('/irismod.nft.Query/Owner', request, types.nft_query_pb.QueryOwnerResponse); + } + /** + * Collection queries the NFTs of the specified denom + * @param denom_id + */ + + }, { + key: "queryCollection", + value: function queryCollection(denom_id) { + if (!denom_id) { + throw new _errors.SdkError("denom_id can ont be empty"); + } + + var request = new types.nft_query_pb.QueryCollectionRequest(); + request.setDenomId(denom_id); + return this.client.rpcClient.protoQuery('/irismod.nft.Query/Collection', request, types.nft_query_pb.QueryCollectionResponse); + } + /** + * Denom queries the definition of a given denom + * @param denom_id + */ + + }, { + key: "queryDenom", + value: function queryDenom(denom_id) { + if (!denom_id) { + throw new _errors.SdkError("denom_id can ont be empty"); + } + + var request = new types.nft_query_pb.QueryDenomRequest(); + request.setDenomId(denom_id); + return this.client.rpcClient.protoQuery('/irismod.nft.Query/Denom', request, types.nft_query_pb.QueryDenomResponse); + } + /** + * Denoms queries all the denoms + */ + + }, { + key: "queryDenoms", + value: function queryDenoms() { + var request = new types.nft_query_pb.QueryDenomsRequest(); + return this.client.rpcClient.protoQuery('/irismod.nft.Query/Denoms', request, types.nft_query_pb.QueryDenomsResponse); + } + /** + * NFT queries the NFT for the given denom and token ID + * @param denom_id + * @param token_id + */ + + }, { + key: "queryNFT", + value: function queryNFT(denom_id, token_id) { + if (!denom_id) { + throw new _errors.SdkError("denom_id can ont be empty"); + } + + if (!token_id) { + throw new _errors.SdkError("token_id can ont be empty"); + } + + var request = new types.nft_query_pb.QueryNFTRequest(); + request.setDenomId(denom_id); + request.setTokenId(token_id); + return this.client.rpcClient.protoQuery('/irismod.nft.Query/NFT', request, types.nft_query_pb.QueryNFTResponse); + } + }]); + return Nft; +}(); + +exports.Nft = Nft; \ No newline at end of file diff --git a/dist/src/modules/oracle.js b/dist/src/modules/oracle.js index a9e61b10..bac5dd21 100644 --- a/dist/src/modules/oracle.js +++ b/dist/src/modules/oracle.js @@ -1,26 +1,48 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const errors_1 = require("../errors"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Oracle = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _errors = require("../errors"); + /** * @category Modules * @since v0.17 */ -class Oracle { - /** @hidden */ - constructor(client) { - this.client = client; - } - /** - * Query feed context by feed name - * - * @param feedName Feed name - * @returns - * @since v0.17 - */ - queryFeed(feedName) { - return this.client.rpcClient.abciQuery('custom/oracle/feed', { - FeedName: feedName, - }); +var Oracle = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + function Oracle(client) { + (0, _classCallCheck2["default"])(this, Oracle); + (0, _defineProperty2["default"])(this, "client", void 0); + this.client = client; + } + /** + * Query feed context by feed name + * + * @param feedName Feed name + * @returns + * @since v0.17 + */ + + + (0, _createClass2["default"])(Oracle, [{ + key: "queryFeed", + value: function queryFeed(feedName) { + return this.client.rpcClient.abciQuery('custom/oracle/feed', { + FeedName: feedName + }); } /** * Query all feed contexts by state @@ -29,10 +51,13 @@ class Oracle { * @returns * @since v0.17 */ - queryFeeds(state) { - return this.client.rpcClient.abciQuery('custom/oracle/feeds', { - State: state, - }); + + }, { + key: "queryFeeds", + value: function queryFeeds(state) { + return this.client.rpcClient.abciQuery('custom/oracle/feeds', { + State: state + }); } /** * Query all feed values by feed name @@ -41,43 +66,60 @@ class Oracle { * @returns * @since v0.17 */ - queryFeedValue(feedName) { - return this.client.rpcClient.abciQuery('custom/oracle/feedValue', { - FeedName: feedName, - }); + + }, { + key: "queryFeedValue", + value: function queryFeedValue(feedName) { + return this.client.rpcClient.abciQuery('custom/oracle/feedValue', { + FeedName: feedName + }); } /** * Create a new feed, the feed will be in `paused` state * * ** Not Supported ** */ - createFeed() { - throw new errors_1.SdkError('Not supported'); + + }, { + key: "createFeed", + value: function createFeed() { + throw new _errors.SdkError('Not supported', _errors.CODES.Internal); } /** * Start a feed in `paused` state * * ** Not Supported ** */ - startFeed() { - throw new errors_1.SdkError('Not supported'); + + }, { + key: "startFeed", + value: function startFeed() { + throw new _errors.SdkError('Not supported', _errors.CODES.Internal); } /** * Pause a feed in `running` state * * ** Not Supported ** */ - pauseFeed() { - throw new errors_1.SdkError('Not supported'); + + }, { + key: "pauseFeed", + value: function pauseFeed() { + throw new _errors.SdkError('Not supported', _errors.CODES.Internal); } /** * Modify the feed information and update service invocation parameters by feed creator * * ** Not Supported ** */ - editFeed() { - throw new errors_1.SdkError('Not supported'); + + }, { + key: "editFeed", + value: function editFeed() { + throw new _errors.SdkError('Not supported', _errors.CODES.Internal); } -} -exports.Oracle = Oracle; -//# sourceMappingURL=oracle.js.map \ No newline at end of file + }]); + return Oracle; +}(); + +exports.Oracle = Oracle; \ No newline at end of file diff --git a/dist/src/modules/oracle.js.map b/dist/src/modules/oracle.js.map deleted file mode 100644 index 7ee1485e..00000000 --- a/dist/src/modules/oracle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"oracle.js","sourceRoot":"","sources":["../../../src/modules/oracle.ts"],"names":[],"mappings":";;AAEA,sCAAqC;AAErC;;;GAGG;AACH,MAAa,MAAM;IAGjB,cAAc;IACd,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACH,SAAS,CAAC,QAAgB;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,oBAAoB,EACpB;YACE,QAAQ,EAAE,QAAQ;SACnB,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,UAAU,CAAC,KAAa;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,qBAAqB,EACrB;YACE,KAAK,EAAE,KAAK;SACb,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,cAAc,CAAC,QAAgB;QAC7B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,yBAAyB,EACzB;YACE,QAAQ,EAAE,QAAQ;SACnB,CACF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,UAAU;QACR,MAAM,IAAI,iBAAQ,CAAC,eAAe,CAAC,CAAC;IACtC,CAAC;IAED;;;;OAIG;IACH,SAAS;QACP,MAAM,IAAI,iBAAQ,CAAC,eAAe,CAAC,CAAC;IACtC,CAAC;IAED;;;;OAIG;IACH,SAAS;QACP,MAAM,IAAI,iBAAQ,CAAC,eAAe,CAAC,CAAC;IACtC,CAAC;IAED;;;;OAIG;IACH,QAAQ;QACN,MAAM,IAAI,iBAAQ,CAAC,eAAe,CAAC,CAAC;IACtC,CAAC;CACF;AA3FD,wBA2FC"} \ No newline at end of file diff --git a/dist/src/modules/protobuf.d.ts b/dist/src/modules/protobuf.d.ts new file mode 100644 index 00000000..ed8bf2d8 --- /dev/null +++ b/dist/src/modules/protobuf.d.ts @@ -0,0 +1,61 @@ +import { Client } from '../client'; +import * as types from '../types'; +/** + * ProtobufModel module allows you to deserialize protobuf serialize string + * + * @category Modules + * @since v0.17 + */ +export declare class Protobuf { + /** @hidden */ + private client; + /** @hidden */ + constructor(client: Client); + /** + * deserialize Tx + * @param {[type]} Tx:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} Tx object + */ + deserializeTx(tx: string, returnProtobufModel?: boolean): types.ValidatorSigningInfo | object; + /** + * Unpack protobuffer tx msg + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} message object + */ + unpackMsg(msg: { + typeUrl: string; + value: string; + }, returnProtobufModel?: boolean): types.ValidatorSigningInfo | object | null; + /** + * deserialize SignDoc + * @param {[type]} signDoc:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} signDoc object + */ + deserializeSignDoc(signDoc: string, returnProtobufModel?: boolean): types.ValidatorSigningInfo | object; + /** + * deserialize txRaw + * @param {[type]} txRaw:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} txRaw object + */ + deserializeTxRaw(txRaw: string, returnProtobufModel?: boolean): types.ValidatorSigningInfo | object; + /** + * deserialize Signing Info + * @param {[type]} signingInfo:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} Signing Info object + */ + deserializeSigningInfo(signingInfo: string, returnProtobufModel?: boolean): types.ValidatorSigningInfo | object; + /** + * deserialize Pubkey + * @param {[type]} pubKey:{typeUrl:string, value:string} + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} pubKey object + */ + deserializePubkey(pubKey: { + typeUrl: string; + value: string; + }, returnProtobufModel?: boolean): types.ValidatorSigningInfo | object; +} diff --git a/dist/src/modules/protobuf.js b/dist/src/modules/protobuf.js new file mode 100644 index 00000000..bbc4e007 --- /dev/null +++ b/dist/src/modules/protobuf.js @@ -0,0 +1,336 @@ +"use strict"; + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Protobuf = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var types = _interopRequireWildcard(require("../types")); + +var _errors = require("../errors"); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +var slashing_pb = require('../types/proto-types/cosmos/slashing/v1beta1/slashing_pb'); +/** + * ProtobufModel module allows you to deserialize protobuf serialize string + * + * @category Modules + * @since v0.17 + */ + + +var Protobuf = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + function Protobuf(client) { + (0, _classCallCheck2["default"])(this, Protobuf); + (0, _defineProperty2["default"])(this, "client", void 0); + this.client = client; + } + /** + * deserialize Tx + * @param {[type]} Tx:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} Tx object + */ + + + (0, _createClass2["default"])(Protobuf, [{ + key: "deserializeTx", + value: function deserializeTx(tx, returnProtobufModel) { + var _this = this; + + if (!tx) { + throw new _errors.SdkError('tx can not be empty'); + } + + if (returnProtobufModel) { + return types.tx_tx_pb.Tx.deserializeBinary(tx); + } else { + var txObj = types.tx_tx_pb.Tx.deserializeBinary(tx).toObject(); + + if (txObj.body && txObj.body.messagesList) { + txObj.body.messagesList = txObj.body.messagesList.map(function (msg) { + return _this.unpackMsg(msg); + }); + } + + return txObj; + } + } + /** + * Unpack protobuffer tx msg + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} message object + */ + + }, { + key: "unpackMsg", + value: function unpackMsg(msg, returnProtobufModel) { + if (!msg) { + throw new _errors.SdkError('message can not be empty'); + } + + var messageModelClass; + var typeUrl = msg.typeUrl.replace(/^\//, ''); + + switch (typeUrl) { + //bank + case types.TxType.MsgSend: + { + messageModelClass = types.MsgSend.getModelClass(); + break; + } + + case types.TxType.MsgMultiSend: + { + messageModelClass = types.MsgMultiSend.getModelClass(); + break; + } + //staking + + case types.TxType.MsgDelegate: + { + messageModelClass = types.MsgDelegate.getModelClass(); + break; + } + + case types.TxType.MsgUndelegate: + { + messageModelClass = types.MsgUndelegate.getModelClass(); + break; + } + + case types.TxType.MsgBeginRedelegate: + { + messageModelClass = types.MsgRedelegate.getModelClass(); + break; + } + //distribution + + case types.TxType.MsgWithdrawDelegatorReward: + { + messageModelClass = types.MsgWithdrawDelegatorReward.getModelClass(); + break; + } + + case types.TxType.MsgSetWithdrawAddress: + { + messageModelClass = types.MsgSetWithdrawAddress.getModelClass(); + break; + } + + case types.TxType.MsgWithdrawValidatorCommission: + { + messageModelClass = types.MsgWithdrawValidatorCommission.getModelClass(); + break; + } + + case types.TxType.MsgFundCommunityPool: + { + messageModelClass = types.MsgFundCommunityPool.getModelClass(); + break; + } + //token + + case types.TxType.MsgIssueToken: + { + messageModelClass = types.MsgIssueToken.getModelClass(); + break; + } + + case types.TxType.MsgEditToken: + { + messageModelClass = types.MsgEditToken.getModelClass(); + break; + } + + case types.TxType.MsgMintToken: + { + messageModelClass = types.MsgMintToken.getModelClass(); + break; + } + + case types.TxType.MsgTransferTokenOwner: + { + messageModelClass = types.MsgTransferTokenOwner.getModelClass(); + break; + } + //coinswap + + case types.TxType.MsgAddLiquidity: + { + break; + } + + case types.TxType.MsgRemoveLiquidity: + { + break; + } + + case types.TxType.MsgSwapOrder: + { + break; + } + //nft + + case types.TxType.MsgIssueDenom: + { + messageModelClass = types.MsgIssueDenom.getModelClass(); + break; + } + + case types.TxType.MsgMintNFT: + { + messageModelClass = types.MsgMintNFT.getModelClass(); + break; + } + + case types.TxType.MsgEditNFT: + { + messageModelClass = types.MsgEditNFT.getModelClass(); + break; + } + + case types.TxType.MsgTransferNFT: + { + messageModelClass = types.MsgTransferNFT.getModelClass(); + break; + } + + case types.TxType.MsgBurnNFT: + { + messageModelClass = types.MsgBurnNFT.getModelClass(); + break; + } + + default: + { + throw new _errors.SdkError("not exist tx type", _errors.CODES.InvalidType); + } + } + + if (messageModelClass && messageModelClass.deserializeBinary) { + var messageObj = messageModelClass.deserializeBinary(msg.value); + + if (!returnProtobufModel) { + messageObj = messageObj.toObject(); + messageObj.type = typeUrl; + } + + return messageObj; + } else { + return null; + } + } + /** + * deserialize SignDoc + * @param {[type]} signDoc:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} signDoc object + */ + + }, { + key: "deserializeSignDoc", + value: function deserializeSignDoc(signDoc, returnProtobufModel) { + if (!signDoc) { + throw new _errors.SdkError('signDoc can not be empty'); + } + + if (returnProtobufModel) { + return types.tx_tx_pb.SignDoc.deserializeBinary(signDoc); + } else { + return types.tx_tx_pb.SignDoc.deserializeBinary(signDoc).toObject(); + } + } + /** + * deserialize txRaw + * @param {[type]} txRaw:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} txRaw object + */ + + }, { + key: "deserializeTxRaw", + value: function deserializeTxRaw(txRaw, returnProtobufModel) { + if (!txRaw) { + throw new _errors.SdkError('txRaw can not be empty'); + } + + if (returnProtobufModel) { + return types.tx_tx_pb.TxRaw.deserializeBinary(txRaw); + } else { + return types.tx_tx_pb.TxRaw.deserializeBinary(txRaw).toObject(); + } + } + /** + * deserialize Signing Info + * @param {[type]} signingInfo:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} Signing Info object + */ + + }, { + key: "deserializeSigningInfo", + value: function deserializeSigningInfo(signingInfo, returnProtobufModel) { + if (!signingInfo) { + throw new _errors.SdkError('signing info can not be empty'); + } + + if (returnProtobufModel) { + return slashing_pb.ValidatorSigningInfo.deserializeBinary(signingInfo); + } else { + return slashing_pb.ValidatorSigningInfo.deserializeBinary(signingInfo).toObject(); + } + } + /** + * deserialize Pubkey + * @param {[type]} pubKey:{typeUrl:string, value:string} + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} pubKey object + */ + + }, { + key: "deserializePubkey", + value: function deserializePubkey(pubKey, returnProtobufModel) { + if (!pubKey) { + throw new _errors.SdkError('pubKey can not be empty'); + } + + var result = _objectSpread({}, pubKey); + + switch (pubKey.typeUrl) { + case '/cosmos.crypto.ed25519.PubKey': + result.value = types.crypto_ed25519_keys_pb.PubKey.deserializeBinary(pubKey.value); + break; + + case '/cosmos.crypto.secp256k1.PubKey': + result.value = types.crypto_secp256k1_keys_pb.PubKey.deserializeBinary(pubKey.value); + break; + } + + if (!returnProtobufModel && result.value && result.value.toObject) { + result.value = result.value.toObject(); + } + + return result; + } + }]); + return Protobuf; +}(); + +exports.Protobuf = Protobuf; \ No newline at end of file diff --git a/dist/src/modules/random.d.ts b/dist/src/modules/random.d.ts index 434a40ac..720c8683 100644 --- a/dist/src/modules/random.d.ts +++ b/dist/src/modules/random.d.ts @@ -1,6 +1,5 @@ import { Client } from '../client'; import * as types from '../types'; -import { SdkError } from '../errors'; /** * @category Modules * @since v0.17 @@ -34,11 +33,4 @@ export declare class Random { * @since v0.17 */ request(blockInterval: number, baseTx: types.BaseTx): Promise; - /** - * Subscribe notification when the random is generated - * @param requestID The request id of the random number - * @param callback A function to receive notifications - * @since v0.17 - */ - subscribeRandom(requestID: string, callback: (error?: SdkError, data?: types.RandomInfo) => void): types.EventSubscription; } diff --git a/dist/src/modules/random.js b/dist/src/modules/random.js index 5dd7feb7..540f0227 100644 --- a/dist/src/modules/random.js +++ b/dist/src/modules/random.js @@ -1,44 +1,59 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const types = require("../types"); -const random_1 = require("../types/random"); -const types_1 = require("../types"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Random = void 0; + +var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); + +var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _random = require("../types/random"); + /** * @category Modules * @since v0.17 */ -class Random { - /** @hidden */ - constructor(client) { - this.client = client; - } - /** - * Query the random information by the specified reqID - * - * @param reqID The ID of the random request - * @returns - * @since v0.17 - */ - queryRandom(reqID) { - return new Promise(resolve => { - this.client.rpcClient - .abciQuery('custom/rand/rand', { - ReqID: reqID, - }) - .then((random) => { - random.request_id = reqID; - resolve(random); - }); +var Random = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + function Random(client) { + (0, _classCallCheck2["default"])(this, Random); + (0, _defineProperty2["default"])(this, "client", void 0); + this.client = client; + } + /** + * Query the random information by the specified reqID + * + * @param reqID The ID of the random request + * @returns + * @since v0.17 + */ + + + (0, _createClass2["default"])(Random, [{ + key: "queryRandom", + value: function queryRandom(reqID) { + var _this = this; + + return new Promise(function (resolve) { + _this.client.rpcClient.abciQuery('custom/rand/rand', { + ReqID: reqID + }).then(function (random) { + random.request_id = reqID; + resolve(random); }); + }); } /** * Query random requests of a specified block height @@ -47,10 +62,13 @@ class Random { * @returns * @since v0.17 */ - queryRequest(height) { - return this.client.rpcClient.abciQuery('custom/rand/queue', { - Height: height, - }); + + }, { + key: "queryRequest", + value: function queryRequest(height) { + return this.client.rpcClient.abciQuery('custom/rand/queue', { + Height: height + }); } /** * Request a random number @@ -59,39 +77,36 @@ class Random { * @param baseTx * @since v0.17 */ - request(blockInterval, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const consumer = this.client.keys.show(baseTx.from); - const msgs = [new random_1.MsgRequestRand(consumer, blockInterval)]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } - /** - * Subscribe notification when the random is generated - * @param requestID The request id of the random number - * @param callback A function to receive notifications - * @since v0.17 - */ - subscribeRandom(requestID, callback) { - const condition = new types_1.EventQueryBuilder().addCondition(new types.Condition(types_1.EventKey.RequestID).eq(requestID)); - const subscription = this.client.eventListener.subscribeNewBlock((error, data) => { - if (error) { - callback(error); - return; + + }, { + key: "request", + value: function () { + var _request = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(blockInterval, baseTx) { + var consumer, msgs; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + consumer = this.client.keys.show(baseTx.from); + msgs = [new _random.MsgRequestRand(consumer, blockInterval)]; + return _context.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context.stop(); } - const tags = data === null || data === void 0 ? void 0 : data.result_begin_block.tags; - if (!tags) - return; - tags.forEach(tag => { - if (tag.key === 'request-id' && tag.value === requestID) { - this.queryRandom(requestID).then(random => { - callback(undefined, random); - }); - } - }); - }, condition); - return subscription; - } -} -exports.Random = Random; -//# sourceMappingURL=random.js.map \ No newline at end of file + } + }, _callee, this); + })); + + function request(_x, _x2) { + return _request.apply(this, arguments); + } + + return request; + }() + }]); + return Random; +}(); + +exports.Random = Random; \ No newline at end of file diff --git a/dist/src/modules/random.js.map b/dist/src/modules/random.js.map deleted file mode 100644 index 38a02685..00000000 --- a/dist/src/modules/random.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"random.js","sourceRoot":"","sources":["../../../src/modules/random.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,kCAAkC;AAClC,4CAAiD;AAEjD,oCAAuD;AAEvD;;;GAGG;AACH,MAAa,MAAM;IAGjB,cAAc;IACd,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACH,WAAW,CAAC,KAAa;QACvB,OAAO,IAAI,OAAO,CAAmB,OAAO,CAAC,EAAE;YAC7C,IAAI,CAAC,MAAM,CAAC,SAAS;iBAClB,SAAS,CAAmB,kBAAkB,EAAE;gBAC/C,KAAK,EAAE,KAAK;aACb,CAAC;iBACD,IAAI,CAAC,CAAC,MAAwB,EAAE,EAAE;gBACjC,MAAM,CAAC,UAAU,GAAG,KAAK,CAAC;gBAC1B,OAAO,CAAC,MAAM,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,YAAY,CAAC,MAAc;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,mBAAmB,EACnB;YACE,MAAM,EAAE,MAAM;SACf,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACG,OAAO,CACX,aAAqB,EACrB,MAAoB;;YAEpB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAEpD,MAAM,IAAI,GAAgB,CAAC,IAAI,uBAAc,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;YAExE,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;OAKG;IACH,eAAe,CACb,SAAiB,EACjB,QAA6D;QAE7D,MAAM,SAAS,GAAG,IAAI,yBAAiB,EAAE,CAAC,YAAY,CACpD,IAAI,KAAK,CAAC,SAAS,CAAC,gBAAQ,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CACtD,CAAC;QACF,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,iBAAiB,CAC9D,CAAC,KAAgB,EAAE,IAA8B,EAAE,EAAE;YACnD,IAAI,KAAK,EAAE;gBACT,QAAQ,CAAC,KAAK,CAAC,CAAC;gBAChB,OAAO;aACR;YAED,MAAM,IAAI,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,kBAAkB,CAAC,IAAI,CAAC;YAC3C,IAAI,CAAC,IAAI;gBAAE,OAAO;YAClB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBACjB,IAAI,GAAG,CAAC,GAAG,KAAK,YAAY,IAAI,GAAG,CAAC,KAAK,KAAK,SAAS,EAAE;oBACvD,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;wBACxC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;oBAC9B,CAAC,CAAC,CAAC;iBACJ;YACH,CAAC,CAAC,CAAC;QACL,CAAC,EACD,SAAS,CACV,CAAC;QACF,OAAO,YAAY,CAAC;IACtB,CAAC;CACF;AAhGD,wBAgGC"} \ No newline at end of file diff --git a/dist/src/modules/service.js b/dist/src/modules/service.js index 4adc1eb8..71018062 100644 --- a/dist/src/modules/service.js +++ b/dist/src/modules/service.js @@ -1,38 +1,57 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const service_1 = require("../types/service"); -const errors_1 = require("../errors"); -const utils_1 = require("../utils"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Service = void 0; + +var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); + +var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _service = require("../types/service"); + +var _errors = require("../errors"); + +var _utils = require("../utils"); + /** * @todo docs * @category Modules * @since v0.17 */ -class Service { - /** @hidden */ - constructor(client) { - this.client = client; - } - /** - * Query a service definition - * - * @param serviceName The unique service name - * @returns - * @since v0.17 - */ - queryDefinition(serviceName) { - return this.client.rpcClient.abciQuery('custom/service/definition', { - ServiceName: serviceName, - }); +var Service = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + function Service(client) { + (0, _classCallCheck2["default"])(this, Service); + (0, _defineProperty2["default"])(this, "client", void 0); + this.client = client; + } + /** + * Query a service definition + * + * @param serviceName The unique service name + * @returns + * @since v0.17 + */ + + + (0, _createClass2["default"])(Service, [{ + key: "queryDefinition", + value: function queryDefinition(serviceName) { + return this.client.rpcClient.abciQuery('custom/service/definition', { + ServiceName: serviceName + }); } /** * Query a service binding @@ -42,11 +61,14 @@ class Service { * @returns * @since v0.17 */ - queryBinding(serviceName, provider) { - return this.client.rpcClient.abciQuery('custom/service/binding', { - ServiceName: serviceName, - Provider: provider, - }); + + }, { + key: "queryBinding", + value: function queryBinding(serviceName, provider) { + return this.client.rpcClient.abciQuery('custom/service/binding', { + ServiceName: serviceName, + Provider: provider + }); } /** * Query service bindings by service name @@ -55,10 +77,13 @@ class Service { * @returns * @since v0.17 */ - queryBindings(serviceName) { - return this.client.rpcClient.abciQuery('custom/service/bindings', { - ServiceName: serviceName, - }); + + }, { + key: "queryBindings", + value: function queryBindings(serviceName) { + return this.client.rpcClient.abciQuery('custom/service/bindings', { + ServiceName: serviceName + }); } /** * Query a service request @@ -67,10 +92,13 @@ class Service { * @returns * @since v0.17 */ - queryRequest(requestID) { - return this.client.rpcClient.abciQuery('custom/service/request', { - RequestID: requestID, - }); + + }, { + key: "queryRequest", + value: function queryRequest(requestID) { + return this.client.rpcClient.abciQuery('custom/service/request', { + RequestID: requestID + }); } /** * Query all requests of a specified service and provider @@ -80,11 +108,14 @@ class Service { * @returns * @since v0.17 */ - queryRequests(serviceName, provider) { - return this.client.rpcClient.abciQuery('custom/service/request', { - ServiceName: serviceName, - Provider: provider, - }); + + }, { + key: "queryRequests", + value: function queryRequests(serviceName, provider) { + return this.client.rpcClient.abciQuery('custom/service/request', { + ServiceName: serviceName, + Provider: provider + }); } /** * Query all requests of a specified request context ID and batch counter @@ -94,11 +125,14 @@ class Service { * @returns * @since v0.17 */ - queryRequestsByReqCtx(requestContextID, batchCounter) { - return this.client.rpcClient.abciQuery('custom/service/requests_by_ctx', { - RequestContextID: utils_1.Utils.str2ab(requestContextID), - BatchCounter: batchCounter, - }); + + }, { + key: "queryRequestsByReqCtx", + value: function queryRequestsByReqCtx(requestContextID, batchCounter) { + return this.client.rpcClient.abciQuery('custom/service/requests_by_ctx', { + RequestContextID: _utils.Utils.str2ab(requestContextID), + BatchCounter: batchCounter + }); } /** * Query a request context @@ -107,10 +141,13 @@ class Service { * @returns * @since v0.17 */ - queryRequestContext(requestContextID) { - return this.client.rpcClient.abciQuery('custom/service/context', { - RequestContextID: utils_1.Utils.str2ab(requestContextID), - }); + + }, { + key: "queryRequestContext", + value: function queryRequestContext(requestContextID) { + return this.client.rpcClient.abciQuery('custom/service/context', { + RequestContextID: _utils.Utils.str2ab(requestContextID) + }); } /** * Query a service response @@ -119,10 +156,13 @@ class Service { * @returns * @since v0.17 */ - queryResponse(requestID) { - return this.client.rpcClient.abciQuery('custom/service/response', { - RequestID: requestID, - }); + + }, { + key: "queryResponse", + value: function queryResponse(requestID) { + return this.client.rpcClient.abciQuery('custom/service/response', { + RequestID: requestID + }); } /** * Query service responses @@ -132,11 +172,14 @@ class Service { * @returns * @since v0.17 */ - queryResponses(requestContextID, batchCounter) { - return this.client.rpcClient.abciQuery('custom/service/responses', { - RequestContextID: utils_1.Utils.str2ab(requestContextID), - BatchCounter: batchCounter, - }); + + }, { + key: "queryResponses", + value: function queryResponses(requestContextID, batchCounter) { + return this.client.rpcClient.abciQuery('custom/service/responses', { + RequestContextID: _utils.Utils.str2ab(requestContextID), + BatchCounter: batchCounter + }); } /** * Query service fee @@ -145,10 +188,13 @@ class Service { * @returns * @since v0.17 */ - queryFees(provider) { - return this.client.rpcClient.abciQuery('custom/service/fees', { - Address: provider, - }); + + }, { + key: "queryFees", + value: function queryFees(provider) { + return this.client.rpcClient.abciQuery('custom/service/fees', { + Address: provider + }); } /** * Creating a new service definition @@ -158,22 +204,41 @@ class Service { * @returns * @since v0.17 */ - defineService(definition, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const author = this.client.keys.show(baseTx.from); - const msgs = [ - new service_1.MsgDefineService({ - name: definition.name, - author, - schemas: definition.schemas, - description: definition.description, - tags: definition.tags, - author_description: definition.author_description, - }), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "defineService", + value: function () { + var _defineService = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(definition, baseTx) { + var author, msgs; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + author = this.client.keys.show(baseTx.from); + msgs = [new _service.MsgDefineService({ + name: definition.name, + author: author, + schemas: definition.schemas, + description: definition.description, + tags: definition.tags, + author_description: definition.author_description + })]; + return _context.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function defineService(_x, _x2) { + return _defineService.apply(this, arguments); + } + + return defineService; + }() /** * Bind an existing service definition * @@ -182,21 +247,44 @@ class Service { * @returns * @since v0.17 */ - bindService(binding, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const provider = this.client.keys.show(baseTx.from); - const deposit = yield this.client.utils.toMinCoins(binding.deposit); - const msgs = [ - new service_1.MsgBindService({ - service_name: binding.serviceName, - provider, - deposit, - pricing: binding.pricing, - }), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "bindService", + value: function () { + var _bindService = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(binding, baseTx) { + var provider, deposit, msgs; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + provider = this.client.keys.show(baseTx.from); + _context2.next = 3; + return this.client.utils.toMinCoins(binding.deposit); + + case 3: + deposit = _context2.sent; + msgs = [new _service.MsgBindService({ + service_name: binding.serviceName, + provider: provider, + deposit: deposit, + pricing: binding.pricing + })]; + return _context2.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 6: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function bindService(_x3, _x4) { + return _bindService.apply(this, arguments); + } + + return bindService; + }() /** * Update the specified service binding * @@ -205,21 +293,44 @@ class Service { * @returns * @since v0.17 */ - updateServiceBinding(binding, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const provider = this.client.keys.show(baseTx.from); - const deposit = yield this.client.utils.toMinCoins(binding.deposit); - const msgs = [ - new service_1.MsgUpdateServiceBinding({ - service_name: binding.serviceName, - provider, - deposit, - pricing: binding.pricing, - }), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "updateServiceBinding", + value: function () { + var _updateServiceBinding = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(binding, baseTx) { + var provider, deposit, msgs; + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + provider = this.client.keys.show(baseTx.from); + _context3.next = 3; + return this.client.utils.toMinCoins(binding.deposit); + + case 3: + deposit = _context3.sent; + msgs = [new _service.MsgUpdateServiceBinding({ + service_name: binding.serviceName, + provider: provider, + deposit: deposit, + pricing: binding.pricing + })]; + return _context3.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 6: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function updateServiceBinding(_x5, _x6) { + return _updateServiceBinding.apply(this, arguments); + } + + return updateServiceBinding; + }() /** * Disable an available service binding * @@ -228,15 +339,34 @@ class Service { * @returns * @since v0.17 */ - disableServiceBinding(serviceName, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const provider = this.client.keys.show(baseTx.from); - const msgs = [ - new service_1.MsgDisableServiceBinding(serviceName, provider), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "disableServiceBinding", + value: function () { + var _disableServiceBinding = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(serviceName, baseTx) { + var provider, msgs; + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + provider = this.client.keys.show(baseTx.from); + msgs = [new _service.MsgDisableServiceBinding(serviceName, provider)]; + return _context4.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function disableServiceBinding(_x7, _x8) { + return _disableServiceBinding.apply(this, arguments); + } + + return disableServiceBinding; + }() /** * Enable an unavailable service binding * @@ -246,15 +376,34 @@ class Service { * @returns * @since v0.17 */ - enableServiceBinding(serviceName, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const provider = this.client.keys.show(baseTx.from); - const msgs = [ - new service_1.MsgEnableServiceBinding(serviceName, provider), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "enableServiceBinding", + value: function () { + var _enableServiceBinding = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(serviceName, baseTx) { + var provider, msgs; + return _regenerator["default"].wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + provider = this.client.keys.show(baseTx.from); + msgs = [new _service.MsgEnableServiceBinding(serviceName, provider)]; + return _context5.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function enableServiceBinding(_x9, _x10) { + return _enableServiceBinding.apply(this, arguments); + } + + return enableServiceBinding; + }() /** * Initiate a service call * @@ -264,27 +413,31 @@ class Service { * @returns * @since v0.17 */ - invokeService(request, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - // const consumer = this.client.keys.show(baseTx.from); - // const msgs: types.Msg[] = [ - // new MsgRequestService({ - // service_name: request.serviceName, - // providers: request.providers, - // consumer, - // input: request.input, - // service_fee_cap: request.serviceFeeCap, - // timeout: request.timeout, - // super_mode: request.superMode, - // repeated: request.repeated, - // repeated_frequency: request.repeatedFrequency, - // repeated_total: request.repeatedTotal, - // }), - // ]; - // return this.client.tx.buildAndSend(msgs, baseTx); - throw new errors_1.SdkError('Not supported'); - }); - } + + }, { + key: "invokeService", + value: function () { + var _invokeService = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(request, baseTx) { + return _regenerator["default"].wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + throw new _errors.SdkError('Not supported', _errors.CODES.Internal); + + case 1: + case "end": + return _context6.stop(); + } + } + }, _callee6); + })); + + function invokeService(_x11, _x12) { + return _invokeService.apply(this, arguments); + } + + return invokeService; + }() /** * Set a withdrawal address for a provider * @@ -293,15 +446,34 @@ class Service { * @returns * @since v0.17 */ - setWithdrawAddress(withdrawAddress, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const provider = this.client.keys.show(baseTx.from); - const msgs = [ - new service_1.MsgSetServiceWithdrawAddress(withdrawAddress, provider), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "setWithdrawAddress", + value: function () { + var _setWithdrawAddress = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(withdrawAddress, baseTx) { + var provider, msgs; + return _regenerator["default"].wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + provider = this.client.keys.show(baseTx.from); + msgs = [new _service.MsgSetServiceWithdrawAddress(withdrawAddress, provider)]; + return _context7.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context7.stop(); + } + } + }, _callee7, this); + })); + + function setWithdrawAddress(_x13, _x14) { + return _setWithdrawAddress.apply(this, arguments); + } + + return setWithdrawAddress; + }() /** * Refund deposits from the specified service binding * @@ -310,15 +482,34 @@ class Service { * @returns * @since v0.17 */ - refundServiceDeposit(serviceName, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const provider = this.client.keys.show(baseTx.from); - const msgs = [ - new service_1.MsgRefundServiceDeposit(serviceName, provider), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "refundServiceDeposit", + value: function () { + var _refundServiceDeposit = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8(serviceName, baseTx) { + var provider, msgs; + return _regenerator["default"].wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + provider = this.client.keys.show(baseTx.from); + msgs = [new _service.MsgRefundServiceDeposit(serviceName, provider)]; + return _context8.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context8.stop(); + } + } + }, _callee8, this); + })); + + function refundServiceDeposit(_x15, _x16) { + return _refundServiceDeposit.apply(this, arguments); + } + + return refundServiceDeposit; + }() /** * Start the specified request context * @@ -327,15 +518,34 @@ class Service { * @returns * @since v0.17 */ - startRequestContext(requestContextID, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const consumer = this.client.keys.show(baseTx.from); - const msgs = [ - new service_1.MsgStartRequestContext(requestContextID, consumer), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "startRequestContext", + value: function () { + var _startRequestContext = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(requestContextID, baseTx) { + var consumer, msgs; + return _regenerator["default"].wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + consumer = this.client.keys.show(baseTx.from); + msgs = [new _service.MsgStartRequestContext(requestContextID, consumer)]; + return _context9.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context9.stop(); + } + } + }, _callee9, this); + })); + + function startRequestContext(_x17, _x18) { + return _startRequestContext.apply(this, arguments); + } + + return startRequestContext; + }() /** * Pause the specified request context * @@ -344,15 +554,34 @@ class Service { * @returns * @since v0.17 */ - pauseRequestContext(requestContextID, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const consumer = this.client.keys.show(baseTx.from); - const msgs = [ - new service_1.MsgPauseRequestContext(requestContextID, consumer), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "pauseRequestContext", + value: function () { + var _pauseRequestContext = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(requestContextID, baseTx) { + var consumer, msgs; + return _regenerator["default"].wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + consumer = this.client.keys.show(baseTx.from); + msgs = [new _service.MsgPauseRequestContext(requestContextID, consumer)]; + return _context10.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context10.stop(); + } + } + }, _callee10, this); + })); + + function pauseRequestContext(_x19, _x20) { + return _pauseRequestContext.apply(this, arguments); + } + + return pauseRequestContext; + }() /** * Kill the specified request context * @@ -361,15 +590,34 @@ class Service { * @returns * @since v0.17 */ - killRequestContext(requestContextID, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const consumer = this.client.keys.show(baseTx.from); - const msgs = [ - new service_1.MsgKillRequestContext(requestContextID, consumer), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "killRequestContext", + value: function () { + var _killRequestContext = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11(requestContextID, baseTx) { + var consumer, msgs; + return _regenerator["default"].wrap(function _callee11$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + consumer = this.client.keys.show(baseTx.from); + msgs = [new _service.MsgKillRequestContext(requestContextID, consumer)]; + return _context11.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context11.stop(); + } + } + }, _callee11, this); + })); + + function killRequestContext(_x21, _x22) { + return _killRequestContext.apply(this, arguments); + } + + return killRequestContext; + }() /** * Update the specified request context * @@ -378,26 +626,61 @@ class Service { * @returns * @since v0.17 */ - updateRequestContext(request, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const consumer = this.client.keys.show(baseTx.from); - const serviceFeeCap = request.service_fee_cap - ? yield this.client.utils.toMinCoins(request.service_fee_cap) - : []; - const msgs = [ - new service_1.MsgUpdateRequestContext({ - request_context_id: request.request_context_id, - providers: request.providers, - service_fee_cap: serviceFeeCap, - timeout: request.timeout || 0, - repeated_frequency: request.repeated_frequency || 0, - repeated_total: request.repeated_total || 0, - consumer, - }), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "updateRequestContext", + value: function () { + var _updateRequestContext = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12(request, baseTx) { + var consumer, serviceFeeCap, msgs; + return _regenerator["default"].wrap(function _callee12$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + consumer = this.client.keys.show(baseTx.from); + + if (!request.service_fee_cap) { + _context12.next = 7; + break; + } + + _context12.next = 4; + return this.client.utils.toMinCoins(request.service_fee_cap); + + case 4: + _context12.t0 = _context12.sent; + _context12.next = 8; + break; + + case 7: + _context12.t0 = []; + + case 8: + serviceFeeCap = _context12.t0; + msgs = [new _service.MsgUpdateRequestContext({ + request_context_id: request.request_context_id, + providers: request.providers, + service_fee_cap: serviceFeeCap, + timeout: request.timeout || 0, + repeated_frequency: request.repeated_frequency || 0, + repeated_total: request.repeated_total || 0, + consumer: consumer + })]; + return _context12.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 11: + case "end": + return _context12.stop(); + } + } + }, _callee12, this); + })); + + function updateRequestContext(_x23, _x24) { + return _updateRequestContext.apply(this, arguments); + } + + return updateRequestContext; + }() /** * Withdraw the earned fees to the specified provider * @@ -405,13 +688,34 @@ class Service { * @returns * @since v0.17 */ - withdrawEarnedFees(baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const provider = this.client.keys.show(baseTx.from); - const msgs = [new service_1.MsgWithdrawEarnedFees(provider)]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } + + }, { + key: "withdrawEarnedFees", + value: function () { + var _withdrawEarnedFees = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13(baseTx) { + var provider, msgs; + return _regenerator["default"].wrap(function _callee13$(_context13) { + while (1) { + switch (_context13.prev = _context13.next) { + case 0: + provider = this.client.keys.show(baseTx.from); + msgs = [new _service.MsgWithdrawEarnedFees(provider)]; + return _context13.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context13.stop(); + } + } + }, _callee13, this); + })); + + function withdrawEarnedFees(_x25) { + return _withdrawEarnedFees.apply(this, arguments); + } + + return withdrawEarnedFees; + }() /** * Withdraw the service tax to the speicified destination address by the trustee * @@ -420,14 +724,42 @@ class Service { * @returns * @since v0.17 */ - withdrawTax(destAddress, amount, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const trustee = this.client.keys.show(baseTx.from); - const coins = yield this.client.utils.toMinCoins(amount); - const msgs = [new service_1.MsgWithdrawTax(trustee, destAddress, coins)]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } -} -exports.Service = Service; -//# sourceMappingURL=service.js.map \ No newline at end of file + + }, { + key: "withdrawTax", + value: function () { + var _withdrawTax = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14(destAddress, amount, baseTx) { + var trustee, coins, msgs; + return _regenerator["default"].wrap(function _callee14$(_context14) { + while (1) { + switch (_context14.prev = _context14.next) { + case 0: + trustee = this.client.keys.show(baseTx.from); + _context14.next = 3; + return this.client.utils.toMinCoins(amount); + + case 3: + coins = _context14.sent; + msgs = [new _service.MsgWithdrawTax(trustee, destAddress, coins)]; + return _context14.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 6: + case "end": + return _context14.stop(); + } + } + }, _callee14, this); + })); + + function withdrawTax(_x26, _x27, _x28) { + return _withdrawTax.apply(this, arguments); + } + + return withdrawTax; + }() // Service listeners not supported in browser + + }]); + return Service; +}(); + +exports.Service = Service; \ No newline at end of file diff --git a/dist/src/modules/service.js.map b/dist/src/modules/service.js.map deleted file mode 100644 index 70b34671..00000000 --- a/dist/src/modules/service.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/modules/service.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,8CAc0B;AAC1B,sCAAqC;AACrC,oCAAiC;AAGjC;;;;GAIG;AACH,MAAa,OAAO;IAGlB,cAAc;IACd,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACH,eAAe,CAAC,WAAmB;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,2BAA2B,EAC3B;YACE,WAAW,EAAE,WAAW;SACzB,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CACV,WAAmB,EACnB,QAAgB;QAEhB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,wBAAwB,EACxB;YACE,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,QAAQ;SACnB,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,aAAa,CAAC,WAAmB;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,yBAAyB,EACzB;YACE,WAAW,EAAE,WAAW;SACzB,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,YAAY,CAAC,SAAiB;QAC5B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,wBAAwB,EACxB;YACE,SAAS,EAAE,SAAS;SACrB,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,aAAa,CACX,WAAmB,EACnB,QAAgB;QAEhB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,wBAAwB,EACxB;YACE,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,QAAQ;SACnB,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,qBAAqB,CACnB,gBAAwB,EACxB,YAAoB;QAEpB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,gCAAgC,EAChC;YACE,gBAAgB,EAAE,aAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC;YAChD,YAAY,EAAE,YAAY;SAC3B,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,mBAAmB,CACjB,gBAAwB;QAExB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,wBAAwB,EACxB;YACE,gBAAgB,EAAE,aAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC;SACjD,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,aAAa,CAAC,SAAiB;QAC7B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,yBAAyB,EACzB;YACE,SAAS,EAAE,SAAS;SACrB,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,cAAc,CACZ,gBAAwB,EACxB,YAAoB;QAEpB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,0BAA0B,EAC1B;YACE,gBAAgB,EAAE,aAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC;YAChD,YAAY,EAAE,YAAY;SAC3B,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,SAAS,CAAC,QAAgB;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,qBAAqB,EACrB;YACE,OAAO,EAAE,QAAQ;SAClB,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACG,aAAa,CACjB,UAMC,EACD,MAAoB;;YAEpB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAElD,MAAM,IAAI,GAAgB;gBACxB,IAAI,0BAAgB,CAAC;oBACnB,IAAI,EAAE,UAAU,CAAC,IAAI;oBACrB,MAAM;oBACN,OAAO,EAAE,UAAU,CAAC,OAAO;oBAC3B,WAAW,EAAE,UAAU,CAAC,WAAW;oBACnC,IAAI,EAAE,UAAU,CAAC,IAAI;oBACrB,kBAAkB,EAAE,UAAU,CAAC,kBAAkB;iBAClD,CAAC;aACH,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;OAOG;IACG,WAAW,CACf,OAIC,EACD,MAAoB;;YAEpB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACpE,MAAM,IAAI,GAAgB;gBACxB,IAAI,wBAAc,CAAC;oBACjB,YAAY,EAAE,OAAO,CAAC,WAAW;oBACjC,QAAQ;oBACR,OAAO;oBACP,OAAO,EAAE,OAAO,CAAC,OAAO;iBACzB,CAAC;aACH,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;OAOG;IACG,oBAAoB,CACxB,OAIC,EACD,MAAoB;;YAEpB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACpE,MAAM,IAAI,GAAgB;gBACxB,IAAI,iCAAuB,CAAC;oBAC1B,YAAY,EAAE,OAAO,CAAC,WAAW;oBACjC,QAAQ;oBACR,OAAO;oBACP,OAAO,EAAE,OAAO,CAAC,OAAO;iBACzB,CAAC;aACH,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;OAOG;IACG,qBAAqB,CACzB,WAAmB,EACnB,MAAoB;;YAEpB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,IAAI,GAAgB;gBACxB,IAAI,kCAAwB,CAAC,WAAW,EAAE,QAAQ,CAAC;aACpD,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;;OAQG;IACG,oBAAoB,CACxB,WAAmB,EACnB,MAAoB;;YAEpB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,IAAI,GAAgB;gBACxB,IAAI,iCAAuB,CAAC,WAAW,EAAE,QAAQ,CAAC;aACnD,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;;OAQG;IACG,aAAa,CACjB,OAUC,EACD,MAAoB;;YAEpB,uDAAuD;YACvD,8BAA8B;YAC9B,4BAA4B;YAC5B,yCAAyC;YACzC,oCAAoC;YACpC,gBAAgB;YAChB,4BAA4B;YAC5B,8CAA8C;YAC9C,gCAAgC;YAChC,qCAAqC;YACrC,kCAAkC;YAClC,qDAAqD;YACrD,6CAA6C;YAC7C,QAAQ;YACR,KAAK;YAEL,oDAAoD;YACpD,MAAM,IAAI,iBAAQ,CAAC,eAAe,CAAC,CAAC;QACtC,CAAC;KAAA;IAED;;;;;;;OAOG;IACG,kBAAkB,CACtB,eAAuB,EACvB,MAAoB;;YAEpB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,IAAI,GAAgB;gBACxB,IAAI,sCAA4B,CAAC,eAAe,EAAE,QAAQ,CAAC;aAC5D,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;OAOG;IACG,oBAAoB,CACxB,WAAmB,EACnB,MAAoB;;YAEpB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,IAAI,GAAgB;gBACxB,IAAI,iCAAuB,CAAC,WAAW,EAAE,QAAQ,CAAC;aACnD,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;OAOG;IACG,mBAAmB,CACvB,gBAAwB,EACxB,MAAoB;;YAEpB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,IAAI,GAAgB;gBACxB,IAAI,gCAAsB,CAAC,gBAAgB,EAAE,QAAQ,CAAC;aACvD,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;OAOG;IACG,mBAAmB,CACvB,gBAAwB,EACxB,MAAoB;;YAEpB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,IAAI,GAAgB;gBACxB,IAAI,gCAAsB,CAAC,gBAAgB,EAAE,QAAQ,CAAC;aACvD,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;OAOG;IACG,kBAAkB,CACtB,gBAAwB,EACxB,MAAoB;;YAEpB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,IAAI,GAAgB;gBACxB,IAAI,+BAAqB,CAAC,gBAAgB,EAAE,QAAQ,CAAC;aACtD,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;OAOG;IACG,oBAAoB,CACxB,OAOC,EACD,MAAoB;;YAEpB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,aAAa,GAAG,OAAO,CAAC,eAAe;gBAC3C,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,eAAe,CAAC;gBAC7D,CAAC,CAAC,EAAE,CAAC;YACP,MAAM,IAAI,GAAgB;gBACxB,IAAI,iCAAuB,CAAC;oBAC1B,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;oBAC9C,SAAS,EAAE,OAAO,CAAC,SAAS;oBAC5B,eAAe,EAAE,aAAa;oBAC9B,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,CAAC;oBAC7B,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,IAAI,CAAC;oBACnD,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,CAAC;oBAC3C,QAAQ;iBACT,CAAC;aACH,CAAC;YAEF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;OAMG;IACG,kBAAkB,CAAC,MAAoB;;YAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,IAAI,GAAgB,CAAC,IAAI,+BAAqB,CAAC,QAAQ,CAAC,CAAC,CAAC;YAEhE,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;OAOG;IACG,WAAW,CACf,WAAmB,EACnB,MAAc,EACd,MAAoB;;YAEpB,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACnD,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACzD,MAAM,IAAI,GAAgB,CAAC,IAAI,wBAAc,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC,CAAC;YAE5E,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;CAGF;AA7hBD,0BA6hBC"} \ No newline at end of file diff --git a/dist/src/modules/slashing.js b/dist/src/modules/slashing.js index ad738b63..335d0264 100644 --- a/dist/src/modules/slashing.js +++ b/dist/src/modules/slashing.js @@ -1,19 +1,32 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const slashing_1 = require("../types/slashing"); -const errors_1 = require("../errors"); -const utils_1 = require("../utils"); -const amino_js_1 = require("@irisnet/amino-js"); -const belt_1 = require("@tendermint/belt"); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Slashing = void 0; + +var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); + +var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _slashing = require("../types/slashing"); + +var _errors = require("../errors"); + +var _utils = require("../utils"); + +var Bech32 = _interopRequireWildcard(require("bech32")); + /** * In Proof-of-Stake blockchain, validators will get block provisions by staking their token. * But if they failed to keep online, they will be punished by slashing a small portion of their staked tokens. @@ -24,21 +37,29 @@ const belt_1 = require("@tendermint/belt"); * * @category Modules */ -class Slashing { - /** @hidden */ - constructor(client) { - this.client = client; - } - /** - * Query on-chain parameters of Slashing - * @returns - * @since v1.0 - */ - queryParams() { - // return this.client.rpcClient.abciQuery( - // 'custom/slashing/parameters' - // ); - throw new errors_1.SdkError('Not supported'); +var Slashing = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + function Slashing(client) { + (0, _classCallCheck2["default"])(this, Slashing); + (0, _defineProperty2["default"])(this, "client", void 0); + this.client = client; + } + /** + * Query on-chain parameters of Slashing + * @returns + * @since v1.0 + */ + + + (0, _createClass2["default"])(Slashing, [{ + key: "queryParams", + value: function queryParams() { + // return this.client.rpcClient.abciQuery( + // 'custom/slashing/parameters' + // ); + throw new _errors.SdkError('Not supported', _errors.CODES.Internal); } /** * Query a validator's signing information @@ -47,16 +68,21 @@ class Slashing { * @returns * @since v0.17 */ - querySigningInfo(bech32ConsAddress, height) { - const key = utils_1.StoreKeys.getSigningInfoKey(bech32ConsAddress); - return this.client.rpcClient - .queryStore(key, 'slashing', height) - .then(res => { - if (!res || !res.response || !res.response.value) { - throw new errors_1.SdkError('Validator not found'); - } - return amino_js_1.unmarshalValidatorSigningInfo(belt_1.base64ToBytes(res.response.value)); - }); + + }, { + key: "querySigningInfo", + value: function querySigningInfo(bech32ConsAddress, height) { + var _this = this; + + var key = _utils.StoreKeys.getSigningInfoKey(bech32ConsAddress); + + return this.client.rpcClient.queryStore(key, 'slashing', height).then(function (res) { + if (!res || !res.response || !res.response.value) { + throw new _errors.SdkError('Validator not found'); + } + + return _this.client.protobuf.deserializeSigningInfo(res.response.value); + }); } /** * Unjail a validator previously jailed @@ -64,15 +90,38 @@ class Slashing { * @returns * @since v0.17 */ - unjail(baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const val = this.client.keys.show(baseTx.from); - const [hrp, bytes] = amino_js_1.decodeBech32(val); - const validatorAddr = amino_js_1.encodeBech32(this.client.config.bech32Prefix.ValAddr, bytes); - const msgs = [new slashing_1.MsgUnjail(validatorAddr)]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } -} -exports.Slashing = Slashing; -//# sourceMappingURL=slashing.js.map \ No newline at end of file + + }, { + key: "unjail", + value: function () { + var _unjail = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(baseTx) { + var val, words, validatorAddr, msgs; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + val = this.client.keys.show(baseTx.from); + words = Bech32.decode(val).words; + validatorAddr = Bech32.encode(this.client.config.bech32Prefix.ValAddr, words); + msgs = [new _slashing.MsgUnjail(validatorAddr)]; + return _context.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 5: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function unjail(_x) { + return _unjail.apply(this, arguments); + } + + return unjail; + }() + }]); + return Slashing; +}(); + +exports.Slashing = Slashing; \ No newline at end of file diff --git a/dist/src/modules/slashing.js.map b/dist/src/modules/slashing.js.map deleted file mode 100644 index 722b6e36..00000000 --- a/dist/src/modules/slashing.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"slashing.js","sourceRoot":"","sources":["../../../src/modules/slashing.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,gDAA8C;AAC9C,sCAAqC;AACrC,oCAAqC;AACrC,gDAI2B;AAC3B,2CAAiD;AAEjD;;;;;;;;;GASG;AACH,MAAa,QAAQ;IAGnB,cAAc;IACd,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,WAAW;QACT,gEAAgE;QAChE,iCAAiC;QACjC,KAAK;QAEL,MAAM,IAAI,iBAAQ,CAAC,eAAe,CAAC,CAAC;IACtC,CAAC;IAED;;;;;;OAMG;IACH,gBAAgB,CACd,iBAAyB,EACzB,MAAe;QAEf,MAAM,GAAG,GAAG,iBAAS,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS;aACzB,UAAU,CAAM,GAAG,EAAE,UAAU,EAAE,MAAM,CAAC;aACxC,IAAI,CAAC,GAAG,CAAC,EAAE;YACV,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,EAAE;gBAChD,MAAM,IAAI,iBAAQ,CAAC,qBAAqB,CAAC,CAAC;aAC3C;YACD,OAAO,wCAA6B,CAClC,oBAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CACJ,CAAC;QAClC,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACG,MAAM,CAAC,MAAoB;;YAC/B,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC/C,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,uBAAY,CAAC,GAAG,CAAC,CAAC;YACvC,MAAM,aAAa,GAAG,uBAAY,CAChC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,EACvC,KAAK,CACN,CAAC;YACF,MAAM,IAAI,GAAgB,CAAC,IAAI,oBAAS,CAAC,aAAa,CAAC,CAAC,CAAC;YAEzD,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;CACF;AA9DD,4BA8DC"} \ No newline at end of file diff --git a/dist/src/modules/stake.d.ts b/dist/src/modules/stake.d.ts deleted file mode 100644 index 1080da59..00000000 --- a/dist/src/modules/stake.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Client } from '../client'; -import * as types from '../types'; -export declare class Stake { - client: Client; - constructor(client: Client); - queryDelegation(delegatorAddr: string, validatorAddr: string): Promise; - queryDelegations(delegatorAddr: string): Promise; - queryUnbondingDelegation(delegatorAddr: string, validatorAddr: string): Promise; - queryUnbondingDelegations(delegatorAddr: string): Promise; - queryRedelegation(delegatorAddr: string, srcValidatorAddr: string, dstValidatorAddr: string): Promise; - queryRedelegations(delegatorAddr: string): Promise; - queryDelegationsTo(validatorAddr: string): Promise; - queryUnbondingDelegationsFrom(validatorAddr: string): Promise; - queryRedelegationsFrom(validatorAddr: string): Promise; - queryValidator(address: string): Promise; - queryValidators(page: number, size?: number): Promise; - queryPool(): Promise; - queryParams(): Promise; - delegate(validatorAddr: string, amount: types.Coin, baseTx: types.BaseTx): Promise; - /** - * Undelegate from a validator - * @param validatorAddr - * @param amount Amount to be unbonded in iris-atto - */ - unbond(validatorAddr: string, amount: string, baseTx: types.BaseTx): Promise; - /** - * Undelegate from a validator - * @param validatorAddr - * @param amount Amount to be unbonded in iris-atto - */ - redelegate(validatorSrcAddr: string, validatorDstAddr: string, amount: string, baseTx: types.BaseTx): Promise; - /** - * TODO: Historical issue, irishub only accepts 10 decimal places due to `sdk.Dec` - */ - private appendZero; -} diff --git a/dist/src/modules/stake.js b/dist/src/modules/stake.js deleted file mode 100644 index 4d986830..00000000 --- a/dist/src/modules/stake.js +++ /dev/null @@ -1,142 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const stake_1 = require("../types/stake"); -class Stake { - constructor(client) { - this.client = client; - } - queryDelegation(delegatorAddr, validatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/delegation', { - DelegatorAddr: delegatorAddr, - ValidatorAddr: validatorAddr, - }); - } - queryDelegations(delegatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/delegatorDelegations', { - DelegatorAddr: delegatorAddr, - }); - } - queryUnbondingDelegation(delegatorAddr, validatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/unbondingDelegation', { - DelegatorAddr: delegatorAddr, - ValidatorAddr: validatorAddr, - }); - } - queryUnbondingDelegations(delegatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/delegatorUnbondingDelegations', { - DelegatorAddr: delegatorAddr, - }); - } - queryRedelegation(delegatorAddr, srcValidatorAddr, dstValidatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/redelegation', { - DelegatorAddr: delegatorAddr, - ValSrcAddr: srcValidatorAddr, - ValDstAddr: dstValidatorAddr, - }); - } - queryRedelegations(delegatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/delegatorRedelegations', { - DelegatorAddr: delegatorAddr, - }); - } - queryDelegationsTo(validatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/validatorDelegations', { - ValidatorAddr: validatorAddr, - }); - } - queryUnbondingDelegationsFrom(validatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/validatorUnbondingDelegations', { - ValidatorAddr: validatorAddr, - }); - } - queryRedelegationsFrom(validatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/validatorRedelegations', { - ValidatorAddr: validatorAddr, - }); - } - queryValidator(address) { - return this.client.rpcClient.abciQuery('custom/stake/validator', { - ValidatorAddr: address, - }); - } - queryValidators(page, size = 100) { - return this.client.rpcClient.abciQuery('custom/stake/validators', { - Page: page, - Size: size, - }); - } - queryPool() { - return this.client.rpcClient.abciQuery('custom/stake/pool'); - } - queryParams() { - return this.client.rpcClient.abciQuery('custom/stake/parameters'); - } - // TODO: querySigningInfo - // TODO: Do we need `Create Validator` function? - delegate(validatorAddr, amount, baseTx) { - const delegatorAddr = this.client.keys.show(baseTx.from); - const msgs = [ - new stake_1.MsgDelegate(delegatorAddr, validatorAddr, amount), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - } - /** - * Undelegate from a validator - * @param validatorAddr - * @param amount Amount to be unbonded in iris-atto - */ - unbond(validatorAddr, amount, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const delegatorAddr = this.client.keys.show(baseTx.from); - const validator = yield this.queryValidator(validatorAddr); - const shares = Number(amount) * - (Number(validator.tokens) / Number(validator.delegator_shares)); - const msgs = [ - new stake_1.MsgUndelegate(delegatorAddr, validatorAddr, this.appendZero(String(shares), 10)), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } - /** - * Undelegate from a validator - * @param validatorAddr - * @param amount Amount to be unbonded in iris-atto - */ - redelegate(validatorSrcAddr, validatorDstAddr, amount, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const delegatorAddr = this.client.keys.show(baseTx.from); - const srcValidator = yield this.queryValidator(validatorSrcAddr); - const shares = Number(amount) * - (Number(srcValidator.tokens) / Number(srcValidator.delegator_shares)); - const msgs = [ - new stake_1.MsgRedelegate(delegatorAddr, validatorSrcAddr, validatorDstAddr, this.appendZero(String(shares), 10)), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } - /** - * TODO: Historical issue, irishub only accepts 10 decimal places due to `sdk.Dec` - */ - appendZero(num, count) { - const length = num.length; - const dotIndex = num.lastIndexOf('.'); - if (dotIndex <= 0) { - return this.appendZero(num + '.0', count); - } - if (length - (dotIndex + 1) < count) { - return this.appendZero(num + '0', count); - } - return num; - } -} -exports.Stake = Stake; -//# sourceMappingURL=stake.js.map \ No newline at end of file diff --git a/dist/src/modules/stake.js.map b/dist/src/modules/stake.js.map deleted file mode 100644 index c53f444b..00000000 --- a/dist/src/modules/stake.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stake.js","sourceRoot":"","sources":["../../../src/modules/stake.ts"],"names":[],"mappings":";;;;;;;;;;;AAQA,0CAA2E;AAE3E,MAAa,KAAK;IAEhB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,eAAe,CACb,aAAqB,EACrB,aAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,yBAAyB,EACzB;YACE,aAAa,EAAE,aAAa;YAC5B,aAAa,EAAE,aAAa;SAC7B,CACF,CAAC;IACJ,CAAC;IAED,gBAAgB,CAAC,aAAqB;QACpC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,mCAAmC,EACnC;YACE,aAAa,EAAE,aAAa;SAC7B,CACF,CAAC;IACJ,CAAC;IAED,wBAAwB,CACtB,aAAqB,EACrB,aAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,kCAAkC,EAClC;YACE,aAAa,EAAE,aAAa;YAC5B,aAAa,EAAE,aAAa;SAC7B,CACF,CAAC;IACJ,CAAC;IAED,yBAAyB,CACvB,aAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,4CAA4C,EAC5C;YACE,aAAa,EAAE,aAAa;SAC7B,CACF,CAAC;IACJ,CAAC;IAED,iBAAiB,CACf,aAAqB,EACrB,gBAAwB,EACxB,gBAAwB;QAExB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,2BAA2B,EAC3B;YACE,aAAa,EAAE,aAAa;YAC5B,UAAU,EAAE,gBAAgB;YAC5B,UAAU,EAAE,gBAAgB;SAC7B,CACF,CAAC;IACJ,CAAC;IAED,kBAAkB,CAAC,aAAqB;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,qCAAqC,EACrC;YACE,aAAa,EAAE,aAAa;SAC7B,CACF,CAAC;IACJ,CAAC;IAED,kBAAkB,CAAC,aAAqB;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,mCAAmC,EACnC;YACE,aAAa,EAAE,aAAa;SAC7B,CACF,CAAC;IACJ,CAAC;IAED,6BAA6B,CAC3B,aAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,4CAA4C,EAC5C;YACE,aAAa,EAAE,aAAa;SAC7B,CACF,CAAC;IACJ,CAAC;IAED,sBAAsB,CAAC,aAAqB;QAC1C,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,qCAAqC,EACrC;YACE,aAAa,EAAE,aAAa;SAC7B,CACF,CAAC;IACJ,CAAC;IAED,cAAc,CAAC,OAAe;QAC5B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,wBAAwB,EACxB;YACE,aAAa,EAAE,OAAO;SACvB,CACF,CAAC;IACJ,CAAC;IAED,eAAe,CACb,IAAY,EACZ,OAAe,GAAG;QAElB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,yBAAyB,EACzB;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,IAAI;SACX,CACF,CAAC;IACJ,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAkB,mBAAmB,CAAC,CAAC;IAC/E,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,yBAAyB,CAC1B,CAAC;IACJ,CAAC;IAED,yBAAyB;IAEzB,gDAAgD;IAEhD,QAAQ,CACN,aAAqB,EACrB,MAAkB,EAClB,MAAoB;QAEpB,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACzD,MAAM,IAAI,GAAgB;YACxB,IAAI,mBAAW,CAAC,aAAa,EAAE,aAAa,EAAE,MAAM,CAAC;SACtD,CAAC;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC;IAED;;;;OAIG;IACG,MAAM,CACV,aAAqB,EACrB,MAAc,EACd,MAAoB;;YAEpB,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACzD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;YAE3D,MAAM,MAAM,GACV,MAAM,CAAC,MAAM,CAAC;gBACd,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC;YAClE,MAAM,IAAI,GAAgB;gBACxB,IAAI,qBAAa,CACf,aAAa,EACb,aAAa,EACb,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CACpC;aACF,CAAC;YACF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;OAIG;IACG,UAAU,CACd,gBAAwB,EACxB,gBAAwB,EACxB,MAAc,EACd,MAAoB;;YAEpB,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACzD,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;YAEjE,MAAM,MAAM,GACV,MAAM,CAAC,MAAM,CAAC;gBACd,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACxE,MAAM,IAAI,GAAgB;gBACxB,IAAI,qBAAa,CACf,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CACpC;aACF,CAAC;YACF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;OAEG;IACK,UAAU,CAAC,GAAW,EAAE,KAAa;QAC3C,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;QAC1B,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACtC,IAAI,QAAQ,IAAI,CAAC,EAAE;YACjB,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,GAAG,IAAI,EAAE,KAAK,CAAC,CAAC;SAC3C;QACD,IAAI,MAAM,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,KAAK,EAAE;YACnC,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,GAAG,GAAG,EAAE,KAAK,CAAC,CAAC;SAC1C;QACD,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AA7ND,sBA6NC"} \ No newline at end of file diff --git a/dist/src/modules/staking.d.ts b/dist/src/modules/staking.d.ts index 1f8ef4b1..5ef1da29 100644 --- a/dist/src/modules/staking.d.ts +++ b/dist/src/modules/staking.d.ts @@ -1,13 +1,12 @@ import { Client } from '../client'; import * as types from '../types'; -import { SdkError } from '../errors'; /** * This module provides staking functionalities for validators and delegators * * [More Details](https://www.irisnet.org/docs/features/stake.html) * * @category Modules - * @since v0.17 + * @since */ export declare class Staking { /** @hidden */ @@ -15,157 +14,200 @@ export declare class Staking { /** @hidden */ constructor(client: Client); /** - * Query a delegation based on delegator address and validator address + * Delegate liquid tokens to an validator * - * @param delegatorAddr Bech32 delegator address * @param validatorAddr Bech32 validator address + * @param amount Amount to be delegated to the validator + * @param baseTx + * @returns + * @since v0.17 + */ + delegate(validatorAddr: string, amount: types.Coin, baseTx: types.BaseTx): Promise; + /** + * Undelegate from a validator + * @param validatorAddr Bech32 validator address + * @param amount Amount to be undelegated from the validator + * @param baseTx * @returns * @since v0.17 */ - queryDelegation(delegatorAddr: string, validatorAddr: string): Promise; + undelegate(validatorAddr: string, amount: types.Coin, baseTx: types.BaseTx): Promise; + /** + * Redelegate illiquid tokens from one validator to another + * @param validatorSrcAddr Bech32 source validator address + * @param validatorDstAddr Bech32 destination validator address + * @param amount Amount to be redelegated + * @param baseTx + * @since v0.17 + */ + redelegate(validatorSrcAddr: string, validatorDstAddr: string, amount: types.Coin, baseTx: types.BaseTx): Promise; + /** + * Query a delegation based on delegator address and validator address + * + * @param delegator_addr Bech32 delegator address + * @param validator_addr Bech32 validator address + * @returns + * @since + */ + queryDelegation(delegator_addr: string, validator_addr: string): Promise; /** * Query all delegations made from one delegator * - * @param delegatorAddr Bech32 delegator address + * @param pagination page info + * @param delegator_addr Bech32 delegator address * @returns - * @since v0.17 + * @since */ - queryDelegations(delegatorAddr: string): Promise; + queryDelegations(query: { + key?: string; + page?: number; + size?: number; + count_total?: boolean; + delegator_addr: string; + }): Promise; /** * Query an unbonding-delegation record based on delegator and validator address * - * @param delegatorAddr Bech32 delegator address - * @param validatorAddr Bech32 validator address + * @param delegator_addr Bech32 delegator address + * @param validator_addr Bech32 validator address * @returns - * @since v0.17 + * @since */ - queryUnbondingDelegation(delegatorAddr: string, validatorAddr: string): Promise; + queryUnbondingDelegation(delegator_addr: string, validator_addr: string): Promise; /** * Query all unbonding-delegations records for one delegator * - * @param delegatorAddr Bech32 delegator address + * @param pagination page info + * @param delegator_addr Bech32 delegator address * @returns - * @since v0.17 + * @since */ - queryUnbondingDelegations(delegatorAddr: string): Promise; + queryDelegatorUnbondingDelegations(query: { + key?: string; + page?: number; + size?: number; + count_total?: boolean; + delegator_addr: string; + }): Promise; /** * Query a redelegation record based on delegator and a source and destination validator address * - * @param delegatorAddr Bech32 delegator address - * @param srcValidatorAddr Bech32 source validator address - * @param dstValidatorAddr Bech32 destination validator address + * @param delegator_addr Bech32 delegator address + * @param src_validator_addr (optional) Bech32 source validator address + * @param dst_validator_addr (optional) Bech32 destination validator address + * @returns + * @since + */ + queryRedelegation(query: { + key?: string; + page?: number; + size?: number; + count_total?: boolean; + delegator_addr: string; + src_validator_addr?: string; + dst_validator_addr?: string; + }): Promise; + /** + * Query all validators info for given delegator + * + * @param delegator_addr Bech32 delegator address + * @param pagination page info * @returns - * @since v0.17 + * @since */ - queryRedelegation(delegatorAddr: string, srcValidatorAddr: string, dstValidatorAddr: string): Promise; + queryDelegatorValidators(query: { + key?: string; + page?: number; + size?: number; + count_total?: boolean; + delegator_addr: string; + }): Promise; /** - * Query all redelegations records for one delegator + * Query validator info for given delegator validator * - * @param delegatorAddr Bech32 delegator address + * @param delegator_addr Bech32 delegator address + * @param validator_addr Bech32 validator address * @returns - * @since v0.17 + * @since */ - queryRedelegations(delegatorAddr: string): Promise; + queryDelegatorValidator(query: { + delegator_addr: string; + validator_addr: string; + }): Promise; /** - * Query all delegations to one validator + * Query the historical info for given height. * - * @param validatorAddr Bech32 validator address + * @param height defines at which height to query the historical info * @returns - * @since v0.17 + * @since */ - queryDelegationsTo(validatorAddr: string): Promise; + queryHistoricalInfo(query: { + height: number; + }): Promise; /** - * Query all unbonding delegatations from a validator + * Query all delegations to one validator * - * @param validatorAddr Bech32 validator address + * @param validator_addr Bech32 validator address + * @param pagination page info * @returns - * @since v0.17 + * @since */ - queryUnbondingDelegationsFrom(validatorAddr: string): Promise; + queryValidatorDelegations(query: { + key?: string; + page?: number; + size?: number; + count_total?: boolean; + validator_addr: string; + }): Promise; /** - * Query all outgoing redelegatations from a validator + * Query all unbonding delegatations from a validator * - * @param validatorAddr Bech32 validator address + * @param validator_addr Bech32 validator address + * @param pagination page info * @returns - * @since v0.17 + * @since */ - queryRedelegationsFrom(validatorAddr: string): Promise; + queryValidatorUnbondingDelegations(query: { + key?: string; + page?: number; + size?: number; + count_total?: boolean; + validator_addr: string; + }): Promise; /** * Query a validator * * @param address Bech32 validator address * @returns - * @since v0.17 + * @since */ queryValidator(address: string): Promise; /** * Query for all validators - * @param page Page number - * @param size Page size + * @param pagination page info + * @param status validator status * @returns - * @since v0.17 + * @since */ - queryValidators(page: number, size?: 100): Promise; + queryValidators(query: { + key?: string; + page?: number; + size?: number; + count_total?: boolean; + status?: string; + }): Promise; /** * Query the current staking pool values * @returns - * @since v0.17 + * @since */ queryPool(): Promise; /** * Query the current staking parameters information * @returns - * @since v0.17 + * @since */ queryParams(): Promise; - /** - * Delegate liquid tokens to an validator - * - * @param validatorAddr Bech32 validator address - * @param amount Amount to be delegated to the validator - * @param baseTx - * @returns - * @since v0.17 - */ - delegate(validatorAddr: string, amount: types.Coin, baseTx: types.BaseTx): Promise; - /** - * Undelegate from a validator - * @param validatorAddr Bech32 validator address - * @param amount Amount to be unbonded from the validator - * @param baseTx - * @returns - * @since v0.17 - */ - undelegate(validatorAddr: string, amount: string, baseTx: types.BaseTx): Promise; - /** - * Redelegate illiquid tokens from one validator to another - * @param validatorSrcAddr Bech32 source validator address - * @param validatorDstAddr Bech32 destination validator address - * @param amount Amount to be redelegated - * @param baseTx - * @since v0.17 - */ - redelegate(validatorSrcAddr: string, validatorDstAddr: string, amount: string, baseTx: types.BaseTx): Promise; - /** - * Subscribe validator information updates - * @param conditions Query conditions for the subscription { validatorAddress: string - The `iva` (or `fva` on testnets) prefixed bech32 validator address } - * @param callback A function to receive notifications - * @returns - * @since v0.17 - */ - subscribeValidatorInfoUpdates(conditions: { - validatorAddress?: string; - }, callback: (error?: SdkError, data?: types.EventDataMsgEditValidator) => void): types.EventSubscription; - /** - * Subscribe validator set updates - * @param conditions Query conditions for the subscription { validatorPubKeys: string[] - The `icp` (or `fcp` on testnets) prefixed bech32 validator consensus pubkey } - * @param callback A function to receive notifications - * @returns - * @since v0.17 - */ - subscribeValidatorSetUpdates(conditions: { - validatorConsPubKeys?: string[]; - }, callback: (error?: SdkError, data?: types.ExtendedEventDataValidatorSetUpdates) => void): types.EventSubscription; /** * TODO: Historical issue, irishub only accepts 10 decimal places due to `sdk.Dec` * diff --git a/dist/src/modules/staking.js b/dist/src/modules/staking.js index a1d660e1..2838eb0d 100644 --- a/dist/src/modules/staking.js +++ b/dist/src/modules/staking.js @@ -1,325 +1,510 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const types = require("../types"); -const errors_1 = require("../errors"); -const staking_1 = require("../types/staking"); -const types_1 = require("../types"); -const utils_1 = require("../utils"); -const amino_js_1 = require("@irisnet/amino-js"); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Staking = void 0; + +var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); + +var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var types = _interopRequireWildcard(require("../types")); + +var _errors = require("../errors"); + +var is = _interopRequireWildcard(require("is_js")); + +var _helper = require("../helper"); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + /** * This module provides staking functionalities for validators and delegators * * [More Details](https://www.irisnet.org/docs/features/stake.html) * * @category Modules - * @since v0.17 + * @since */ -class Staking { - /** @hidden */ - constructor(client) { - this.client = client; +var Staking = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + function Staking(client) { + (0, _classCallCheck2["default"])(this, Staking); + (0, _defineProperty2["default"])(this, "client", void 0); + this.client = client; + } + /** + * Delegate liquid tokens to an validator + * + * @param validatorAddr Bech32 validator address + * @param amount Amount to be delegated to the validator + * @param baseTx + * @returns + * @since v0.17 + */ + + + (0, _createClass2["default"])(Staking, [{ + key: "delegate", + value: function delegate(validatorAddr, amount, baseTx) { + var delegatorAddr = this.client.keys.show(baseTx.from); + var msgs = [{ + type: types.TxType.MsgDelegate, + value: { + delegator_address: delegatorAddr, + validator_address: validatorAddr, + amount: amount + } + }]; + return this.client.tx.buildAndSend(msgs, baseTx); } /** - * Query a delegation based on delegator address and validator address - * - * @param delegatorAddr Bech32 delegator address + * Undelegate from a validator * @param validatorAddr Bech32 validator address + * @param amount Amount to be undelegated from the validator + * @param baseTx * @returns * @since v0.17 */ - queryDelegation(delegatorAddr, validatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/delegation', { - DelegatorAddr: delegatorAddr, - ValidatorAddr: validatorAddr, - }); - } + + }, { + key: "undelegate", + value: function () { + var _undelegate = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(validatorAddr, amount, baseTx) { + var delegatorAddr, msgs; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + delegatorAddr = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgUndelegate, + value: { + delegator_address: delegatorAddr, + validator_address: validatorAddr, + amount: amount + } + }]; + return _context.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function undelegate(_x, _x2, _x3) { + return _undelegate.apply(this, arguments); + } + + return undelegate; + }() /** - * Query all delegations made from one delegator - * - * @param delegatorAddr Bech32 delegator address - * @returns + * Redelegate illiquid tokens from one validator to another + * @param validatorSrcAddr Bech32 source validator address + * @param validatorDstAddr Bech32 destination validator address + * @param amount Amount to be redelegated + * @param baseTx * @since v0.17 */ - queryDelegations(delegatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/delegatorDelegations', { - DelegatorAddr: delegatorAddr, - }); - } + + }, { + key: "redelegate", + value: function () { + var _redelegate = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(validatorSrcAddr, validatorDstAddr, amount, baseTx) { + var delegatorAddr, msgs; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + delegatorAddr = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgBeginRedelegate, + value: { + delegator_address: delegatorAddr, + validator_src_address: validatorSrcAddr, + validator_dst_address: validatorDstAddr, + amount: amount + } + }]; + return _context2.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function redelegate(_x4, _x5, _x6, _x7) { + return _redelegate.apply(this, arguments); + } + + return redelegate; + }() /** - * Query an unbonding-delegation record based on delegator and validator address + * Query a delegation based on delegator address and validator address * - * @param delegatorAddr Bech32 delegator address - * @param validatorAddr Bech32 validator address + * @param delegator_addr Bech32 delegator address + * @param validator_addr Bech32 validator address * @returns - * @since v0.17 + * @since */ - queryUnbondingDelegation(delegatorAddr, validatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/unbondingDelegation', { - DelegatorAddr: delegatorAddr, - ValidatorAddr: validatorAddr, - }); + + }, { + key: "queryDelegation", + value: function queryDelegation(delegator_addr, validator_addr) { + if (is.undefined(validator_addr)) { + throw new _errors.SdkError('validator address can not be empty'); + } + + if (is.undefined(delegator_addr)) { + throw new _errors.SdkError('delegator address can not be empty'); + } + + var request = new types.staking_query_pb.QueryDelegationRequest().setValidatorAddr(validator_addr).setDelegatorAddr(delegator_addr); + return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/Delegation', request, types.staking_query_pb.QueryDelegationResponse); } /** - * Query all unbonding-delegations records for one delegator + * Query all delegations made from one delegator * - * @param delegatorAddr Bech32 delegator address + * @param pagination page info + * @param delegator_addr Bech32 delegator address * @returns - * @since v0.17 + * @since */ - queryUnbondingDelegations(delegatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/delegatorUnbondingDelegations', { - DelegatorAddr: delegatorAddr, - }); + + }, { + key: "queryDelegations", + value: function queryDelegations(query) { + var key = query.key, + page = query.page, + size = query.size, + count_total = query.count_total, + delegator_addr = query.delegator_addr; + + if (is.undefined(delegator_addr)) { + throw new _errors.SdkError('delegator address can not be empty'); + } + + var request = new types.staking_query_pb.QueryDelegatorDelegationsRequest().setDelegatorAddr(delegator_addr).setPagination(_helper.ModelCreator.createPaginationModel(page, size, count_total, key)); + return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/DelegatorDelegations', request, types.staking_query_pb.QueryDelegatorDelegationsResponse); } /** - * Query a redelegation record based on delegator and a source and destination validator address + * Query an unbonding-delegation record based on delegator and validator address * - * @param delegatorAddr Bech32 delegator address - * @param srcValidatorAddr Bech32 source validator address - * @param dstValidatorAddr Bech32 destination validator address + * @param delegator_addr Bech32 delegator address + * @param validator_addr Bech32 validator address * @returns - * @since v0.17 + * @since */ - queryRedelegation(delegatorAddr, srcValidatorAddr, dstValidatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/redelegation', { - DelegatorAddr: delegatorAddr, - ValSrcAddr: srcValidatorAddr, - ValDstAddr: dstValidatorAddr, - }); + + }, { + key: "queryUnbondingDelegation", + value: function queryUnbondingDelegation(delegator_addr, validator_addr) { + if (is.undefined(validator_addr)) { + throw new _errors.SdkError('validator address can not be empty'); + } + + if (is.undefined(delegator_addr)) { + throw new _errors.SdkError('delegator address can not be empty'); + } + + var request = new types.staking_query_pb.QueryUnbondingDelegationRequest().setValidatorAddr(validator_addr).setDelegatorAddr(delegator_addr); + return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/UnbondingDelegation', request, types.staking_query_pb.QueryUnbondingDelegationResponse); } /** - * Query all redelegations records for one delegator + * Query all unbonding-delegations records for one delegator * - * @param delegatorAddr Bech32 delegator address + * @param pagination page info + * @param delegator_addr Bech32 delegator address * @returns - * @since v0.17 + * @since */ - queryRedelegations(delegatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/delegatorRedelegations', { - DelegatorAddr: delegatorAddr, - }); + + }, { + key: "queryDelegatorUnbondingDelegations", + value: function queryDelegatorUnbondingDelegations(query) { + var key = query.key, + page = query.page, + size = query.size, + count_total = query.count_total, + delegator_addr = query.delegator_addr; + + if (is.undefined(delegator_addr)) { + throw new _errors.SdkError('delegator address can not be empty'); + } + + var request = new types.staking_query_pb.QueryDelegatorUnbondingDelegationsRequest().setDelegatorAddr(delegator_addr).setPagination(_helper.ModelCreator.createPaginationModel(page, size, count_total, key)); + return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations', request, types.staking_query_pb.QueryDelegatorUnbondingDelegationsResponse); } /** - * Query all delegations to one validator + * Query a redelegation record based on delegator and a source and destination validator address * - * @param validatorAddr Bech32 validator address + * @param delegator_addr Bech32 delegator address + * @param src_validator_addr (optional) Bech32 source validator address + * @param dst_validator_addr (optional) Bech32 destination validator address * @returns - * @since v0.17 + * @since */ - queryDelegationsTo(validatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/validatorDelegations', { - ValidatorAddr: validatorAddr, - }); + + }, { + key: "queryRedelegation", + value: function queryRedelegation(query) { + var key = query.key, + page = query.page, + size = query.size, + count_total = query.count_total, + delegator_addr = query.delegator_addr, + src_validator_addr = query.src_validator_addr, + dst_validator_addr = query.dst_validator_addr; + + if (is.undefined(delegator_addr)) { + throw new _errors.SdkError('delegator address can not be empty'); + } + + var request = new types.staking_query_pb.QueryRedelegationsRequest().setDelegatorAddr(delegator_addr).setPagination(_helper.ModelCreator.createPaginationModel(page, size, count_total, key)); + + if (is.not.undefined(src_validator_addr)) { + request.setSrcValidatorAddr(src_validator_addr); + } + + if (is.not.undefined(dst_validator_addr)) { + request.setDstValidatorAddr(dst_validator_addr); + } + + return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/Redelegations', request, types.staking_query_pb.QueryRedelegationsResponse); } /** - * Query all unbonding delegatations from a validator + * Query all validators info for given delegator * - * @param validatorAddr Bech32 validator address + * @param delegator_addr Bech32 delegator address + * @param pagination page info * @returns - * @since v0.17 + * @since */ - queryUnbondingDelegationsFrom(validatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/validatorUnbondingDelegations', { - ValidatorAddr: validatorAddr, - }); + + }, { + key: "queryDelegatorValidators", + value: function queryDelegatorValidators(query) { + var key = query.key, + page = query.page, + size = query.size, + count_total = query.count_total, + delegator_addr = query.delegator_addr; + + if (is.undefined(delegator_addr)) { + throw new _errors.SdkError('delegator address can not be empty'); + } + + var request = new types.staking_query_pb.QueryDelegatorValidatorsRequest().setDelegatorAddr(delegator_addr).setPagination(_helper.ModelCreator.createPaginationModel(page, size, count_total, key)); + return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/DelegatorValidators', request, types.staking_query_pb.QueryDelegatorValidatorsResponse); } /** - * Query all outgoing redelegatations from a validator + * Query validator info for given delegator validator * - * @param validatorAddr Bech32 validator address + * @param delegator_addr Bech32 delegator address + * @param validator_addr Bech32 validator address * @returns - * @since v0.17 + * @since */ - queryRedelegationsFrom(validatorAddr) { - return this.client.rpcClient.abciQuery('custom/stake/validatorRedelegations', { - ValidatorAddr: validatorAddr, - }); + + }, { + key: "queryDelegatorValidator", + value: function queryDelegatorValidator(query) { + var delegator_addr = query.delegator_addr, + validator_addr = query.validator_addr; + + if (is.undefined(delegator_addr)) { + throw new _errors.SdkError('delegator address can not be empty'); + } + + if (is.undefined(validator_addr)) { + throw new _errors.SdkError('validator address can not be empty'); + } + + var request = new types.staking_query_pb.QueryDelegatorValidatorRequest().setDelegatorAddr(delegator_addr).setValidatorAddr(validator_addr); + return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/DelegatorValidator', request, types.staking_query_pb.QueryDelegatorValidatorResponse); } /** - * Query a validator + * Query the historical info for given height. * - * @param address Bech32 validator address + * @param height defines at which height to query the historical info * @returns - * @since v0.17 + * @since */ - queryValidator(address) { - return this.client.rpcClient.abciQuery('custom/stake/validator', { - ValidatorAddr: address, - }); + + }, { + key: "queryHistoricalInfo", + value: function queryHistoricalInfo(query) { + var height = query.height; + + if (is.undefined(height)) { + throw new _errors.SdkError('block height can not be empty'); + } + + var request = new types.staking_query_pb.QueryHistoricalInfoRequest().setHeight(height); + return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/HistoricalInfo', request, types.staking_query_pb.QueryHistoricalInfoResponse); } /** - * Query for all validators - * @param page Page number - * @param size Page size - * @returns - * @since v0.17 - */ - queryValidators(page, size) { - return this.client.rpcClient.abciQuery('custom/stake/validators', { - Page: page, - Size: size, - }); - } - /** - * Query the current staking pool values + * Query all delegations to one validator + * + * @param validator_addr Bech32 validator address + * @param pagination page info * @returns - * @since v0.17 + * @since */ - queryPool() { - return this.client.rpcClient.abciQuery('custom/stake/pool'); + + }, { + key: "queryValidatorDelegations", + value: function queryValidatorDelegations(query) { + var key = query.key, + page = query.page, + size = query.size, + count_total = query.count_total, + validator_addr = query.validator_addr; + + if (is.undefined(validator_addr)) { + throw new _errors.SdkError('validator address can not be empty'); + } + + var request = new types.staking_query_pb.QueryValidatorDelegationsRequest().setValidatorAddr(validator_addr).setPagination(_helper.ModelCreator.createPaginationModel(page, size, count_total, key)); + return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/ValidatorDelegations', request, types.staking_query_pb.QueryValidatorDelegationsResponse); } /** - * Query the current staking parameters information + * Query all unbonding delegatations from a validator + * + * @param validator_addr Bech32 validator address + * @param pagination page info * @returns - * @since v0.17 + * @since */ - queryParams() { - return this.client.rpcClient.abciQuery('custom/stake/parameters'); + + }, { + key: "queryValidatorUnbondingDelegations", + value: function queryValidatorUnbondingDelegations(query) { + var key = query.key, + page = query.page, + size = query.size, + count_total = query.count_total, + validator_addr = query.validator_addr; + + if (is.undefined(validator_addr)) { + throw new _errors.SdkError('validator address can not be empty'); + } + + var request = new types.staking_query_pb.QueryValidatorUnbondingDelegationsRequest().setValidatorAddr(validator_addr).setPagination(_helper.ModelCreator.createPaginationModel(page, size, count_total, key)); + return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations', request, types.staking_query_pb.QueryValidatorUnbondingDelegationsResponse); } /** - * Delegate liquid tokens to an validator + * Query a validator * - * @param validatorAddr Bech32 validator address - * @param amount Amount to be delegated to the validator - * @param baseTx + * @param address Bech32 validator address * @returns - * @since v0.17 + * @since */ - delegate(validatorAddr, amount, baseTx) { - const delegatorAddr = this.client.keys.show(baseTx.from); - const msgs = [ - new staking_1.MsgDelegate(delegatorAddr, validatorAddr, amount), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); + + }, { + key: "queryValidator", + value: function queryValidator(address) { + var _this = this; + + if (is.undefined(address)) { + throw new _errors.SdkError('validator address can not be empty'); + } + + var request = new types.staking_query_pb.QueryValidatorRequest().setValidatorAddr(address); + return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/Validator', request, types.staking_query_pb.QueryValidatorResponse).then(function (res) { + var result = _objectSpread({}, res); + + if (res.validator && res.validator.consensusPubkey && res.validator.consensusPubkey.value) { + result.validator.consensusPubkey = _this.client.protobuf.deserializePubkey(res.validator.consensusPubkey); + } + + return result; + }); } /** - * Undelegate from a validator - * @param validatorAddr Bech32 validator address - * @param amount Amount to be unbonded from the validator - * @param baseTx + * Query for all validators + * @param pagination page info + * @param status validator status * @returns - * @since v0.17 + * @since */ - undelegate(validatorAddr, amount, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const delegatorAddr = this.client.keys.show(baseTx.from); - const validator = yield this.queryValidator(validatorAddr); - const shares = Number(amount) * - (Number(validator.tokens) / Number(validator.delegator_shares)); - const msgs = [ - new staking_1.MsgUndelegate(delegatorAddr, validatorAddr, this.appendZero(String(shares), 10)), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); - } - /** - * Redelegate illiquid tokens from one validator to another - * @param validatorSrcAddr Bech32 source validator address - * @param validatorDstAddr Bech32 destination validator address - * @param amount Amount to be redelegated - * @param baseTx - * @since v0.17 - */ - redelegate(validatorSrcAddr, validatorDstAddr, amount, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - const delegatorAddr = this.client.keys.show(baseTx.from); - const srcValidator = yield this.queryValidator(validatorSrcAddr); - const shares = Number(amount) * - (Number(srcValidator.tokens) / Number(srcValidator.delegator_shares)); - const msgs = [ - new staking_1.MsgRedelegate(delegatorAddr, validatorSrcAddr, validatorDstAddr, this.appendZero(String(shares), 10)), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - }); + + }, { + key: "queryValidators", + value: function queryValidators(query) { + var _this2 = this; + + var key = query.key, + page = query.page, + size = query.size, + count_total = query.count_total, + status = query.status; + var request = new types.staking_query_pb.QueryValidatorsRequest().setPagination(_helper.ModelCreator.createPaginationModel(page, size, count_total, key)); + + if (is.not.undefined(status)) { + request.setStatus(status); + } + + return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/Validators', request, types.staking_query_pb.QueryValidatorsResponse).then(function (res) { + var result = _objectSpread({}, res); + + if (res.validatorsList && res.validatorsList.length) { + result.validatorsList = res.validatorsList.map(function (val) { + if (val.consensusPubkey && val.consensusPubkey.value) { + val.consensusPubkey = _this2.client.protobuf.deserializePubkey(val.consensusPubkey); + } + + return val; + }); + } + + return result; + }); } /** - * Subscribe validator information updates - * @param conditions Query conditions for the subscription { validatorAddress: string - The `iva` (or `fva` on testnets) prefixed bech32 validator address } - * @param callback A function to receive notifications + * Query the current staking pool values * @returns - * @since v0.17 + * @since */ - subscribeValidatorInfoUpdates(conditions, callback) { - const queryBuilder = new types_1.EventQueryBuilder().addCondition(new types.Condition(types_1.EventKey.Action).eq(types_1.EventAction.EditValidator)); - if (conditions.validatorAddress) { - queryBuilder.addCondition(new types.Condition(types_1.EventKey.DestinationValidator).eq(conditions.validatorAddress)); - } - const subscription = this.client.eventListener.subscribeTx(queryBuilder, (error, data) => { - if (error) { - callback(error); - return; - } - data === null || data === void 0 ? void 0 : data.tx.value.msg.forEach(msg => { - if (msg.type !== 'irishub/stake/MsgEditValidator') - return; - const msgEditValidator = msg; - const height = data.height; - const hash = data.hash; - const description = msgEditValidator.value.Description; - const address = msgEditValidator.value.address; - const commission_rate = msgEditValidator.value.commission_rate; - callback(undefined, { - height, - hash, - description, - address, - commission_rate, - }); - }); - }); - return subscription; + + }, { + key: "queryPool", + value: function queryPool() { + var request = new types.staking_query_pb.QueryPoolRequest(); + return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/Pool', request, types.staking_query_pb.QueryPoolResponse); } /** - * Subscribe validator set updates - * @param conditions Query conditions for the subscription { validatorPubKeys: string[] - The `icp` (or `fcp` on testnets) prefixed bech32 validator consensus pubkey } - * @param callback A function to receive notifications + * Query the current staking parameters information * @returns - * @since v0.17 + * @since */ - subscribeValidatorSetUpdates(conditions, callback) { - // Add pubkeys to the set - const listeningSet = new Set(); - if (conditions.validatorConsPubKeys) { - conditions.validatorConsPubKeys.forEach(pubkey => { - listeningSet.add(pubkey); - }); - } - // Subscribe notifications from blockchain - const subscription = this.client.eventListener.subscribeValidatorSetUpdates((error, data) => { - if (error) { - callback(error); - } - data === null || data === void 0 ? void 0 : data.forEach(event => { - const bech32Address = utils_1.Crypto.encodeAddress(event.address, this.client.config.bech32Prefix.ConsAddr); - const bech32Pubkey = utils_1.Crypto.encodeAddress(utils_1.Utils.ab2hexstring(amino_js_1.marshalPubKey(event.pub_key, false)), this.client.config.bech32Prefix.ConsPub); - const update = { - address: event.address, - pub_key: event.pub_key, - voting_power: event.voting_power, - proposer_priority: event.proposer_priority, - bech32_address: bech32Address, - bech32_pubkey: bech32Pubkey, - }; - if (listeningSet.size > 0) { - if (listeningSet.has(update.bech32_pubkey)) { - callback(undefined, update); - } - } - else { - callback(undefined, update); - } - }); - }); - return subscription; + + }, { + key: "queryParams", + value: function queryParams() { + var request = new types.staking_query_pb.QueryParamsRequest(); + return this.client.rpcClient.protoQuery('/cosmos.staking.v1beta1.Query/Params', request, types.staking_query_pb.QueryParamsResponse); } /** * TODO: Historical issue, irishub only accepts 10 decimal places due to `sdk.Dec` @@ -328,25 +513,36 @@ class Staking { * @deprecated * @hidden */ - appendZero(num, count) { - const length = num.length; - const dotIndex = num.lastIndexOf('.'); - if (dotIndex <= 0) { - return this.appendZero(num + '.0', count); - } - if (length - (dotIndex + 1) < count) { - return this.appendZero(num + '0', count); - } - return num; + + }, { + key: "appendZero", + value: function appendZero(num, count) { + var length = num.length; + var dotIndex = num.lastIndexOf('.'); + + if (dotIndex <= 0) { + return this.appendZero(num + '.0', count); + } + + if (length - (dotIndex + 1) < count) { + return this.appendZero(num + '0', count); + } + + return num; } /** * Create new validator initialized with a self-delegation to it * * ** Not Supported ** */ - createValidator() { - throw new errors_1.SdkError('Not supported'); + + }, { + key: "createValidator", + value: function createValidator() { + throw new _errors.SdkError('Not supported', _errors.CODES.Internal); } -} -exports.Staking = Staking; -//# sourceMappingURL=staking.js.map \ No newline at end of file + }]); + return Staking; +}(); + +exports.Staking = Staking; \ No newline at end of file diff --git a/dist/src/modules/staking.js.map b/dist/src/modules/staking.js.map deleted file mode 100644 index 40d7bc64..00000000 --- a/dist/src/modules/staking.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"staking.js","sourceRoot":"","sources":["../../../src/modules/staking.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,kCAAkC;AAClC,sCAAqC;AACrC,8CAA6E;AAC7E,oCAAoE;AACpE,oCAAyC;AACzC,gDAAkD;AAElD;;;;;;;GAOG;AACH,MAAa,OAAO;IAGlB,cAAc;IACd,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACH,eAAe,CACb,aAAqB,EACrB,aAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,yBAAyB,EACzB;YACE,aAAa,EAAE,aAAa;YAC5B,aAAa,EAAE,aAAa;SAC7B,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,gBAAgB,CAAC,aAAqB;QACpC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,mCAAmC,EACnC;YACE,aAAa,EAAE,aAAa;SAC7B,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACH,wBAAwB,CACtB,aAAqB,EACrB,aAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,kCAAkC,EAClC;YACE,aAAa,EAAE,aAAa;YAC5B,aAAa,EAAE,aAAa;SAC7B,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,yBAAyB,CACvB,aAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,4CAA4C,EAC5C;YACE,aAAa,EAAE,aAAa;SAC7B,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;OAQG;IACH,iBAAiB,CACf,aAAqB,EACrB,gBAAwB,EACxB,gBAAwB;QAExB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,2BAA2B,EAC3B;YACE,aAAa,EAAE,aAAa;YAC5B,UAAU,EAAE,gBAAgB;YAC5B,UAAU,EAAE,gBAAgB;SAC7B,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,kBAAkB,CAAC,aAAqB;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,qCAAqC,EACrC;YACE,aAAa,EAAE,aAAa;SAC7B,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,kBAAkB,CAAC,aAAqB;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,mCAAmC,EACnC;YACE,aAAa,EAAE,aAAa;SAC7B,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,6BAA6B,CAC3B,aAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,4CAA4C,EAC5C;YACE,aAAa,EAAE,aAAa;SAC7B,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,sBAAsB,CAAC,aAAqB;QAC1C,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,qCAAqC,EACrC;YACE,aAAa,EAAE,aAAa;SAC7B,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,cAAc,CAAC,OAAe;QAC5B,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,wBAAwB,EACxB;YACE,aAAa,EAAE,OAAO;SACvB,CACF,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,eAAe,CAAC,IAAY,EAAE,IAAU;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,yBAAyB,EACzB;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,IAAI;SACX,CACF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CACpC,yBAAyB,CAC1B,CAAC;IACJ,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CACN,aAAqB,EACrB,MAAkB,EAClB,MAAoB;QAEpB,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACzD,MAAM,IAAI,GAAgB;YACxB,IAAI,qBAAW,CAAC,aAAa,EAAE,aAAa,EAAE,MAAM,CAAC;SACtD,CAAC;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC;IAED;;;;;;;OAOG;IACG,UAAU,CACd,aAAqB,EACrB,MAAc,EACd,MAAoB;;YAEpB,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACzD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;YAE3D,MAAM,MAAM,GACV,MAAM,CAAC,MAAM,CAAC;gBACd,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC;YAClE,MAAM,IAAI,GAAgB;gBACxB,IAAI,uBAAa,CACf,aAAa,EACb,aAAa,EACb,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CACpC;aACF,CAAC;YACF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;;OAOG;IACG,UAAU,CACd,gBAAwB,EACxB,gBAAwB,EACxB,MAAc,EACd,MAAoB;;YAEpB,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACzD,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;YAEjE,MAAM,MAAM,GACV,MAAM,CAAC,MAAM,CAAC;gBACd,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC;YACxE,MAAM,IAAI,GAAgB;gBACxB,IAAI,uBAAa,CACf,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CACpC;aACF,CAAC;YACF,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC;KAAA;IAED;;;;;;OAMG;IACH,6BAA6B,CAC3B,UAAyC,EACzC,QAA4E;QAE5E,MAAM,YAAY,GAAG,IAAI,yBAAiB,EAAE,CAAC,YAAY,CACvD,IAAI,KAAK,CAAC,SAAS,CAAC,gBAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,mBAAW,CAAC,aAAa,CAAC,CACnE,CAAC;QAEF,IAAI,UAAU,CAAC,gBAAgB,EAAE;YAC/B,YAAY,CAAC,YAAY,CACvB,IAAI,KAAK,CAAC,SAAS,CAAC,gBAAQ,CAAC,oBAAoB,CAAC,CAAC,EAAE,CACnD,UAAU,CAAC,gBAAgB,CAC5B,CACF,CAAC;SACH;QAED,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,WAAW,CACxD,YAAY,EACZ,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACd,IAAI,KAAK,EAAE;gBACT,QAAQ,CAAC,KAAK,CAAC,CAAC;gBAChB,OAAO;aACR;YACD,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBAC/B,IAAI,GAAG,CAAC,IAAI,KAAK,gCAAgC;oBAAE,OAAO;gBAC1D,MAAM,gBAAgB,GAAG,GAA6B,CAAC;gBACvD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;gBAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;gBACvB,MAAM,WAAW,GAAG,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC;gBACvD,MAAM,OAAO,GAAG,gBAAgB,CAAC,KAAK,CAAC,OAAO,CAAC;gBAC/C,MAAM,eAAe,GAAG,gBAAgB,CAAC,KAAK,CAAC,eAAe,CAAC;gBAC/D,QAAQ,CAAC,SAAS,EAAE;oBAClB,MAAM;oBACN,IAAI;oBACJ,WAAW;oBACX,OAAO;oBACP,eAAe;iBAChB,CAAC,CAAC;YACL,CAAC,EAAE;QACL,CAAC,CACF,CAAC;QACF,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;;;;;OAMG;IACH,4BAA4B,CAC1B,UAA+C,EAC/C,QAGS;QAET,yBAAyB;QACzB,MAAM,YAAY,GAAG,IAAI,GAAG,EAAU,CAAC;QACvC,IAAI,UAAU,CAAC,oBAAoB,EAAE;YACnC,UAAU,CAAC,oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;gBAC/C,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAC3B,CAAC,CAAC,CAAC;SACJ;QAED,0CAA0C;QAC1C,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,4BAA4B,CACzE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACd,IAAI,KAAK,EAAE;gBACT,QAAQ,CAAC,KAAK,CAAC,CAAC;aACjB;YAED,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,CAAC,KAAK,CAAC,EAAE;gBACpB,MAAM,aAAa,GAAG,cAAM,CAAC,aAAa,CACxC,KAAK,CAAC,OAAO,EACb,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CACzC,CAAC;gBACF,MAAM,YAAY,GAAG,cAAM,CAAC,aAAa,CACvC,aAAK,CAAC,YAAY,CAAC,wBAAa,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,EACvD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CACxC,CAAC;gBACF,MAAM,MAAM,GAA+C;oBACzD,OAAO,EAAE,KAAK,CAAC,OAAO;oBACtB,OAAO,EAAE,KAAK,CAAC,OAAO;oBACtB,YAAY,EAAE,KAAK,CAAC,YAAY;oBAChC,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;oBAC1C,cAAc,EAAE,aAAa;oBAC7B,aAAa,EAAE,YAAY;iBAC5B,CAAC;gBACF,IAAI,YAAY,CAAC,IAAI,GAAG,CAAC,EAAE;oBACzB,IAAI,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE;wBAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;qBAC7B;iBACF;qBAAM;oBACL,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;iBAC7B;YACH,CAAC,EAAE;QACL,CAAC,CACF,CAAC;QACF,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;;;;;OAMG;IACK,UAAU,CAAC,GAAW,EAAE,KAAa;QAC3C,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;QAC1B,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QACtC,IAAI,QAAQ,IAAI,CAAC,EAAE;YACjB,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,GAAG,IAAI,EAAE,KAAK,CAAC,CAAC;SAC3C;QACD,IAAI,MAAM,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,KAAK,EAAE;YACnC,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,GAAG,GAAG,EAAE,KAAK,CAAC,CAAC;SAC1C;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;;;OAIG;IACH,eAAe;QACb,MAAM,IAAI,iBAAQ,CAAC,eAAe,CAAC,CAAC;IACtC,CAAC;CACF;AA/bD,0BA+bC"} \ No newline at end of file diff --git a/dist/src/modules/tendermint.d.ts b/dist/src/modules/tendermint.d.ts index c8540953..1f13250c 100644 --- a/dist/src/modules/tendermint.d.ts +++ b/dist/src/modules/tendermint.d.ts @@ -38,7 +38,7 @@ export declare class Tendermint { * @returns * @since v0.17 */ - queryValidators(height?: number): Promise; + queryValidators(height?: number, page?: number, size?: number): Promise; /** * Search txs * @@ -48,4 +48,16 @@ export declare class Tendermint { * @since v0.17 */ searchTxs(conditions: types.EventQueryBuilder, page?: number, size?: number): Promise; + /** + * query Net Info + * + * @returns + * @since v0.17 + */ + queryNetInfo(): Promise<{ + listening: boolean; + listeners: string[]; + n_peers: string; + peers: any[]; + }>; } diff --git a/dist/src/modules/tendermint.js b/dist/src/modules/tendermint.js index a1a64d9d..7284f760 100644 --- a/dist/src/modules/tendermint.js +++ b/dist/src/modules/tendermint.js @@ -1,44 +1,72 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const types_1 = require("../types"); -const amino_js_1 = require("@irisnet/amino-js"); -const belt_1 = require("@tendermint/belt"); -const utils_1 = require("../utils"); -const hexEncoding = require("crypto-js/enc-hex"); -const base64Encoding = require("crypto-js/enc-base64"); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Tendermint = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _types = require("../types"); + +var _utils = require("../utils"); + +var hexEncoding = _interopRequireWildcard(require("crypto-js/enc-hex")); + +var base64Encoding = _interopRequireWildcard(require("crypto-js/enc-base64")); + /** * Tendermint module provides tendermint rpc queriers implementation * * @category Modules * @since v0.17 */ -class Tendermint { - /** @hidden */ - constructor(client) { - this.client = client; - } - /** - * Get a block info at a certain height or the latest height - * @param height The block height - * @returns - * @since v0.17 - */ - queryBlock(height) { - const params = height ? { height: String(height) } : {}; - return this.client.rpcClient - .request(types_1.RpcMethods.Block, params) - .then(res => { - // Decode txs - if (res.block && res.block.data && res.block.data.txs) { - const txs = res.block.data.txs; - const decodedTxs = new Array(); - txs.forEach(msg => { - decodedTxs.push(amino_js_1.unmarshalTx(belt_1.base64ToBytes(msg))); - }); - res.block.data.txs = decodedTxs; - } - return res; - }); +var Tendermint = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + function Tendermint(client) { + (0, _classCallCheck2["default"])(this, Tendermint); + (0, _defineProperty2["default"])(this, "client", void 0); + this.client = client; + } + /** + * Get a block info at a certain height or the latest height + * @param height The block height + * @returns + * @since v0.17 + */ + + + (0, _createClass2["default"])(Tendermint, [{ + key: "queryBlock", + value: function queryBlock(height) { + var _this = this; + + var params = height ? { + height: String(height) + } : {}; + return this.client.rpcClient.request(_types.RpcMethods.Block, params).then(function (res) { + // Decode txs + if (res.block && res.block.data && res.block.data.txs) { + var txs = res.block.data.txs; + var decodedTxs = new Array(); + txs.forEach(function (msg) { + decodedTxs.push(_this.client.protobuf.deserializeTx(msg)); + }); + res.block.data.txs = decodedTxs; + } + + return res; + }); } /** * Get a block result at a certain height or the latest height @@ -46,30 +74,39 @@ class Tendermint { * @returns * @since v0.17 */ - queryBlockResult(height) { - const params = height ? { height: String(height) } : {}; - return this.client.rpcClient - .request(types_1.RpcMethods.BlockResults, params) - .then(res => { - // Decode tags - if (res.results) { - const deliverTxs = res.results.DeliverTx; - if (deliverTxs) { - deliverTxs.forEach((deliverTx, index) => { - res.results.DeliverTx[index].tags = utils_1.Utils.decodeTags(deliverTx.tags); - }); - } - const endBlock = res.results.EndBlock; - if (endBlock) { - res.results.EndBlock.tags = utils_1.Utils.decodeTags(endBlock.tags); - } - const beginBlock = res.results.BeginBlock; - if (beginBlock) { - res.results.BeginBlock.tags = utils_1.Utils.decodeTags(beginBlock.tags); - } - } - return res; - }); + + }, { + key: "queryBlockResult", + value: function queryBlockResult(height) { + var params = height ? { + height: String(height) + } : {}; + return this.client.rpcClient.request(_types.RpcMethods.BlockResults, params).then(function (res) { + // Decode tags + if (res.results) { + var deliverTxs = res.results.DeliverTx; + + if (deliverTxs) { + deliverTxs.forEach(function (deliverTx, index) { + res.results.DeliverTx[index].tags = _utils.Utils.decodeTags(deliverTx.tags); + }); + } + + var endBlock = res.results.EndBlock; + + if (endBlock) { + res.results.EndBlock.tags = _utils.Utils.decodeTags(endBlock.tags); + } + + var beginBlock = res.results.BeginBlock; + + if (beginBlock) { + res.results.BeginBlock.tags = _utils.Utils.decodeTags(beginBlock.tags); + } + } + + return res; + }); } /** * Query tx info by hash @@ -77,17 +114,20 @@ class Tendermint { * @returns * @since v0.17 */ - queryTx(hash) { - return this.client.rpcClient - .request(types_1.RpcMethods.Tx, { - hash: base64Encoding.stringify(hexEncoding.parse(hash)), - }) - .then(res => { - // Decode tags and tx - res.tx_result.tags = utils_1.Utils.decodeTags(res.tx_result.tags); - res.tx = amino_js_1.unmarshalTx(belt_1.base64ToBytes(res.tx)); - return res; - }); + + }, { + key: "queryTx", + value: function queryTx(hash) { + var _this2 = this; + + return this.client.rpcClient.request(_types.RpcMethods.Tx, { + hash: base64Encoding.stringify(hexEncoding.parse(hash)) + }).then(function (res) { + // Decode tags and tx + res.tx_result.tags = _utils.Utils.decodeTags(res.tx_result.tags); + res.tx = _this2.client.protobuf.deserializeTx(res.tx); + return res; + }); } /** * Query validator set at a certain height or the latest height @@ -95,31 +135,51 @@ class Tendermint { * @returns * @since v0.17 */ - queryValidators(height) { - const params = height ? { height: String(height) } : {}; - return this.client.rpcClient - .request(types_1.RpcMethods.Validators, params) - .then(res => { - const result = { - block_height: res.block_height, - validators: [], - }; - if (res.validators) { - res.validators.forEach((v) => { - const bech32Address = utils_1.Crypto.encodeAddress(v.address, this.client.config.bech32Prefix.ConsAddr); - const bech32Pubkey = utils_1.Crypto.encodeAddress(utils_1.Utils.ab2hexstring(amino_js_1.marshalPubKey(v.pub_key, false)), this.client.config.bech32Prefix.ConsPub); - result.validators.push({ - bech32_address: bech32Address, - bech32_pubkey: bech32Pubkey, - address: v.address, - pub_key: v.pub_key, - voting_power: v.voting_power, - proposer_priority: v.proposer_priority, - }); - }); - } - return result; - }); + + }, { + key: "queryValidators", + value: function queryValidators(height, page, size) { + var _this3 = this; + + var params = {}; + + if (height) { + params.height = String(height); + } + + if (page) { + params.page = String(page); + } + + if (size) { + params.per_page = String(size); + } + + return this.client.rpcClient.request(_types.RpcMethods.Validators, params).then(function (res) { + var result = { + block_height: res.block_height, + validators: [] + }; + + if (res.validators) { + res.validators.forEach(function (v) { + var bech32Address = _utils.Crypto.encodeAddress(v.address, _this3.client.config.bech32Prefix.ConsAddr); + + var bech32Pubkey = _utils.Crypto.encodeAddress(_utils.Crypto.aminoMarshalPubKey(v.pub_key, false), _this3.client.config.bech32Prefix.ConsPub); + + result.validators.push({ + bech32_address: bech32Address, + bech32_pubkey: bech32Pubkey, + address: v.address, + pub_key: v.pub_key, + voting_power: v.voting_power, + proposer_priority: v.proposer_priority + }); + }); + } + + return result; + }); } /** * Search txs @@ -129,27 +189,45 @@ class Tendermint { * @returns * @since v0.17 */ - searchTxs(conditions, page, size) { - return this.client.rpcClient - .request(types_1.RpcMethods.TxSearch, { - query: conditions.build(), - page, - per_page: size, - }) - .then(res => { - if (res.txs) { - const txs = []; - // Decode tags and txs - res.txs.forEach((tx) => { - tx.tx_result.tags = utils_1.Utils.decodeTags(tx.tx_result.tags); - tx.tx = amino_js_1.unmarshalTx(belt_1.base64ToBytes(tx.tx)); - txs.push(tx); - }); - res.txs = txs; - } - return res; - }); + + }, { + key: "searchTxs", + value: function searchTxs(conditions, page, size) { + var _this4 = this; + + return this.client.rpcClient.request(_types.RpcMethods.TxSearch, { + query: conditions.build(), + page: page, + per_page: size + }).then(function (res) { + if (res.txs) { + var txs = []; // Decode tags and txs + + res.txs.forEach(function (tx) { + tx.tx_result.tags = _utils.Utils.decodeTags(tx.tx_result.tags); + tx.tx = _this4.client.protobuf.deserializeTx(tx.tx); + txs.push(tx); + }); + res.txs = txs; + } + + return res; + }); + } + /** + * query Net Info + * + * @returns + * @since v0.17 + */ + + }, { + key: "queryNetInfo", + value: function queryNetInfo() { + return this.client.rpcClient.request(_types.RpcMethods.NetInfo, {}); } -} -exports.Tendermint = Tendermint; -//# sourceMappingURL=tendermint.js.map \ No newline at end of file + }]); + return Tendermint; +}(); + +exports.Tendermint = Tendermint; \ No newline at end of file diff --git a/dist/src/modules/tendermint.js.map b/dist/src/modules/tendermint.js.map deleted file mode 100644 index d9e9e5cc..00000000 --- a/dist/src/modules/tendermint.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tendermint.js","sourceRoot":"","sources":["../../../src/modules/tendermint.ts"],"names":[],"mappings":";;AAEA,oCAAsC;AACtC,gDAA+D;AAC/D,2CAAiD;AACjD,oCAAyC;AACzC,iDAAiD;AACjD,uDAAuD;AAEvD;;;;;GAKG;AACH,MAAa,UAAU;IAGrB,cAAc;IACd,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,MAAe;QACxB,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACxD,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS;aACzB,OAAO,CAAM,kBAAU,CAAC,KAAK,EAAE,MAAM,CAAC;aACtC,IAAI,CAAC,GAAG,CAAC,EAAE;YACV,aAAa;YACb,IAAI,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;gBACrD,MAAM,GAAG,GAAa,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;gBACzC,MAAM,UAAU,GAAG,IAAI,KAAK,EAAyB,CAAC;gBACtD,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;oBAChB,UAAU,CAAC,IAAI,CACb,sBAAW,CAAC,oBAAa,CAAC,GAAG,CAAC,CAA0B,CACzD,CAAC;gBACJ,CAAC,CAAC,CAAC;gBACH,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC;aACjC;YACD,OAAO,GAAkB,CAAC;QAC5B,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACH,gBAAgB,CAAC,MAAe;QAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAExD,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS;aACzB,OAAO,CAAM,kBAAU,CAAC,YAAY,EAAE,MAAM,CAAC;aAC7C,IAAI,CAAC,GAAG,CAAC,EAAE;YACV,cAAc;YACd,IAAI,GAAG,CAAC,OAAO,EAAE;gBACf,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC;gBACzC,IAAI,UAAU,EAAE;oBACd,UAAU,CAAC,OAAO,CAAC,CAAC,SAAc,EAAE,KAAa,EAAE,EAAE;wBACnD,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,aAAK,CAAC,UAAU,CAClD,SAAS,CAAC,IAAI,CACf,CAAC;oBACJ,CAAC,CAAC,CAAC;iBACJ;gBAED,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC;gBACtC,IAAI,QAAQ,EAAE;oBACZ,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,GAAG,aAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;iBAC7D;gBAED,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC;gBAC1C,IAAI,UAAU,EAAE;oBACd,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,GAAG,aAAK,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;iBACjE;aACF;YACD,OAAO,GAAwB,CAAC;QAClC,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,IAAY;QAClB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS;aACzB,OAAO,CAAM,kBAAU,CAAC,EAAE,EAAE;YAC3B,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;SACxD,CAAC;aACD,IAAI,CAAC,GAAG,CAAC,EAAE;YACV,qBAAqB;YACrB,GAAG,CAAC,SAAS,CAAC,IAAI,GAAG,aAAK,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YAC1D,GAAG,CAAC,EAAE,GAAG,sBAAW,CAAC,oBAAa,CAAC,GAAG,CAAC,EAAE,CAAC,CAA0B,CAAC;YACrE,OAAO,GAA0B,CAAC;QACpC,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACH,eAAe,CAAC,MAAe;QAC7B,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACxD,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS;aACzB,OAAO,CAAM,kBAAU,CAAC,UAAU,EAAE,MAAM,CAAC;aAC3C,IAAI,CAAC,GAAG,CAAC,EAAE;YACV,MAAM,MAAM,GAA+B;gBACzC,YAAY,EAAE,GAAG,CAAC,YAAY;gBAC9B,UAAU,EAAE,EAAE;aACf,CAAC;YACF,IAAI,GAAG,CAAC,UAAU,EAAE;gBAClB,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAM,EAAE,EAAE;oBAChC,MAAM,aAAa,GAAG,cAAM,CAAC,aAAa,CACxC,CAAC,CAAC,OAAO,EACT,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CACzC,CAAC;oBACF,MAAM,YAAY,GAAG,cAAM,CAAC,aAAa,CACvC,aAAK,CAAC,YAAY,CAAC,wBAAa,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,EACnD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CACxC,CAAC;oBACF,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC;wBACrB,cAAc,EAAE,aAAa;wBAC7B,aAAa,EAAE,YAAY;wBAC3B,OAAO,EAAE,CAAC,CAAC,OAAO;wBAClB,OAAO,EAAE,CAAC,CAAC,OAAO;wBAClB,YAAY,EAAE,CAAC,CAAC,YAAY;wBAC5B,iBAAiB,EAAE,CAAC,CAAC,iBAAiB;qBACvC,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;aACJ;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CACP,UAAmC,EACnC,IAAa,EACb,IAAa;QAEb,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS;aACzB,OAAO,CAAM,kBAAU,CAAC,QAAQ,EAAE;YACjC,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE;YACzB,IAAI;YACJ,QAAQ,EAAE,IAAI;SACf,CAAC;aACD,IAAI,CAAC,GAAG,CAAC,EAAE;YACV,IAAI,GAAG,CAAC,GAAG,EAAE;gBACX,MAAM,GAAG,GAA0B,EAAE,CAAC;gBACtC,sBAAsB;gBACtB,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,EAAO,EAAE,EAAE;oBAC1B,EAAE,CAAC,SAAS,CAAC,IAAI,GAAG,aAAK,CAAC,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;oBACxD,EAAE,CAAC,EAAE,GAAG,sBAAW,CAAC,oBAAa,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;oBAC1C,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACf,CAAC,CAAC,CAAC;gBACH,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC;aACf;YACD,OAAO,GAA4B,CAAC;QACtC,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAlKD,gCAkKC"} \ No newline at end of file diff --git a/dist/src/modules/token.d.ts b/dist/src/modules/token.d.ts new file mode 100644 index 00000000..be39881d --- /dev/null +++ b/dist/src/modules/token.d.ts @@ -0,0 +1,88 @@ +import { Client } from '../client'; +import * as types from '../types'; +/** + * IRISHub allows individuals and companies to create and issue their own tokens. + * + * [More Details](https://www.irisnet.org/docs/features/asset.html) + * + * @category Modules + * @since v0.17 + */ +export declare class Token { + /** @hidden */ + private client; + /** @hidden */ + constructor(client: Client); + /** + * issue a new token + * @param IssueTokenTxParam + * @returns + */ + issueToken(token: { + symbol: string; + name: string; + min_unit: string; + scale?: number; + initial_supply?: number; + max_supply?: number; + mintable?: boolean; + }, baseTx: types.BaseTx): Promise; + /** + * edit a token existed + * @param EditTokenTxParam + * @returns + */ + editToken(token: { + symbol: string; + name?: string; + max_supply?: number; + mintable?: string; + }, baseTx: types.BaseTx): Promise; + /** + * mint some amount of token + * @param MintTokenTxParam + * @returns + */ + mintToken(token: { + symbol: string; + amount: number; + owner?: string; + to?: string; + }, baseTx: types.BaseTx): Promise; + /** + * transfer owner of token + * @param TransferTokenOwnerTxParam + * @returns + */ + transferTokenOwner(token: { + symbol: string; + dst_owner: string; + }, baseTx: types.BaseTx): Promise; + /** + * Query all tokens + * @param owner The optional token owner address + * @returns Token[] + */ + queryTokens(owner?: string): Promise; + /** + * Query details of a group of tokens + * @param denom symbol of token + * @returns + * @since + */ + queryToken(denom: string): Promise; + /** + * Query the token related fees + * @param symbol The token symbol + * @returns + * @since + */ + queryFees(symbol: string): Promise; + /** + * Query parameters of token tx + * @param null + * @returns + * @since + */ + queryParameters(): Promise; +} diff --git a/dist/src/modules/token.js b/dist/src/modules/token.js new file mode 100644 index 00000000..debef7d7 --- /dev/null +++ b/dist/src/modules/token.js @@ -0,0 +1,336 @@ +"use strict"; + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Token = void 0; + +var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); + +var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var types = _interopRequireWildcard(require("../types")); + +var is = _interopRequireWildcard(require("is_js")); + +var _errors = require("../errors"); + +/** + * IRISHub allows individuals and companies to create and issue their own tokens. + * + * [More Details](https://www.irisnet.org/docs/features/asset.html) + * + * @category Modules + * @since v0.17 + */ +var Token = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + function Token(client) { + (0, _classCallCheck2["default"])(this, Token); + (0, _defineProperty2["default"])(this, "client", void 0); + this.client = client; + } + /** + * issue a new token + * @param IssueTokenTxParam + * @returns + */ + + + (0, _createClass2["default"])(Token, [{ + key: "issueToken", + value: function () { + var _issueToken = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(token, baseTx) { + var owner, msgs; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + owner = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgIssueToken, + value: Object.assign({ + owner: owner + }, token) + }]; + return _context.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function issueToken(_x, _x2) { + return _issueToken.apply(this, arguments); + } + + return issueToken; + }() + /** + * edit a token existed + * @param EditTokenTxParam + * @returns + */ + + }, { + key: "editToken", + value: function () { + var _editToken = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(token, baseTx) { + var owner, msgs; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + owner = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgEditToken, + value: Object.assign({ + owner: owner + }, token) + }]; + return _context2.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function editToken(_x3, _x4) { + return _editToken.apply(this, arguments); + } + + return editToken; + }() + /** + * mint some amount of token + * @param MintTokenTxParam + * @returns + */ + + }, { + key: "mintToken", + value: function () { + var _mintToken = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(token, baseTx) { + var owner, msgs; + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + owner = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgMintToken, + value: Object.assign({ + owner: owner + }, token) + }]; + return _context3.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function mintToken(_x5, _x6) { + return _mintToken.apply(this, arguments); + } + + return mintToken; + }() + /** + * transfer owner of token + * @param TransferTokenOwnerTxParam + * @returns + */ + + }, { + key: "transferTokenOwner", + value: function () { + var _transferTokenOwner = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(token, baseTx) { + var owner, msgs; + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + owner = this.client.keys.show(baseTx.from); + msgs = [{ + type: types.TxType.MsgTransferTokenOwner, + value: Object.assign({ + src_owner: owner + }, token) + }]; + return _context4.abrupt("return", this.client.tx.buildAndSend(msgs, baseTx)); + + case 3: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function transferTokenOwner(_x7, _x8) { + return _transferTokenOwner.apply(this, arguments); + } + + return transferTokenOwner; + }() + /** + * Query all tokens + * @param owner The optional token owner address + * @returns Token[] + */ + + }, { + key: "queryTokens", + value: function queryTokens(owner) { + var _this = this; + + var request = new types.token_query_pb.QueryTokensRequest(); + + if (is.not.undefined(owner)) { + request.setOwner(owner); + } + + return new Promise( /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(resolve) { + var res, deserializedData; + return _regenerator["default"].wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return _this.client.rpcClient.protoQuery('/irismod.token.Query/Tokens', request, types.token_query_pb.QueryTokensResponse); + + case 2: + res = _context5.sent; + deserializedData = []; + + if (res && res.tokensList && is.array(res.tokensList)) { + deserializedData = res.tokensList.map(function (item) { + return types.token_token_pb.Token.deserializeBinary(item.value).toObject(); + }); + } + + resolve(deserializedData); + + case 6: + case "end": + return _context5.stop(); + } + } + }, _callee5); + })); + + return function (_x9) { + return _ref.apply(this, arguments); + }; + }()); + } + /** + * Query details of a group of tokens + * @param denom symbol of token + * @returns + * @since + */ + + }, { + key: "queryToken", + value: function queryToken(denom) { + var _this2 = this; + + if (is.undefined(denom)) { + throw new _errors.SdkError('denom can not be empty'); + } + + var request = new types.token_query_pb.QueryTokenRequest(); + request.setDenom(denom); + return new Promise( /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(resolve) { + var res, deserializedData; + return _regenerator["default"].wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return _this2.client.rpcClient.protoQuery('/irismod.token.Query/Token', request, types.token_query_pb.QueryTokenResponse); + + case 2: + res = _context6.sent; + deserializedData = null; + + if (res && res.token && res.token.value) { + deserializedData = types.token_token_pb.Token.deserializeBinary(res.token.value).toObject(); + } + + resolve(deserializedData); + + case 6: + case "end": + return _context6.stop(); + } + } + }, _callee6); + })); + + return function (_x10) { + return _ref2.apply(this, arguments); + }; + }()); + } + /** + * Query the token related fees + * @param symbol The token symbol + * @returns + * @since + */ + + }, { + key: "queryFees", + value: function queryFees(symbol) { + if (is.undefined(symbol)) { + throw new _errors.SdkError('symbol can not be empty'); + } + + var request = new types.token_query_pb.QueryFeesRequest(); + request.setSymbol(symbol); + return this.client.rpcClient.protoQuery('/irismod.token.Query/Fees', request, types.token_query_pb.QueryFeesResponse); + } + /** + * Query parameters of token tx + * @param null + * @returns + * @since + */ + + }, { + key: "queryParameters", + value: function queryParameters() { + var request = new types.token_query_pb.QueryParamsRequest(); + return this.client.rpcClient.protoQuery('/irismod.token.Query/Params', request, types.token_query_pb.QueryParamsResponse); + } + }]); + return Token; +}(); + +exports.Token = Token; \ No newline at end of file diff --git a/dist/src/modules/tx.d.ts b/dist/src/modules/tx.d.ts index 274c6db7..c48a5492 100644 --- a/dist/src/modules/tx.d.ts +++ b/dist/src/modules/tx.d.ts @@ -11,6 +11,26 @@ export declare class Tx { private client; /** @hidden */ constructor(client: Client); + /** + * Build Tx + * @param msgs Msgs to be sent + * @param baseTx + * @returns unsignedTx + * @since v0.17 + */ + buildTx(msgs: any[], baseTx: types.BaseTx): types.ProtoTx; + /** + * generate StdTx from protoTxModel + * @param {[type]} protoTxModel:any instance of cosmos.tx.v1beta1.Tx + * @return {[type]} unsignedTx + */ + newStdTxFromProtoTxModel(protoTxModel: any): types.ProtoTx; + /** + * generate StdTx from Tx Data + * @param {[type]} TxData:string base64 string form txBytes + * @return {[type]} unsignedTx + */ + newStdTxFromTxData(TxDataString: string): types.ProtoTx; /** * Build, sign and broadcast the msgs * @param msgs Msgs to be sent @@ -18,7 +38,7 @@ export declare class Tx { * @returns * @since v0.17 */ - buildAndSend(msgs: types.Msg[], baseTx: types.BaseTx): Promise; + buildAndSend(msgs: any[], baseTx: types.BaseTx): Promise; /** * Broadcast a tx * @param signedTx The tx object with signatures @@ -26,18 +46,27 @@ export declare class Tx { * @returns * @since v0.17 */ - broadcast(signedTx: types.Tx, mode?: types.BroadcastMode): Promise; + broadcast(signedTx: types.ProtoTx, mode?: types.BroadcastMode): Promise; /** * Single sign a transaction * * @param stdTx StdTx with no signatures + * @param baseTx baseTx.from && baseTx.password is requred + * @returns The signed tx + * @since v0.17 + */ + sign(stdTx: types.ProtoTx, baseTx: types.BaseTx): Promise; + /** + * Single sign a transaction with signDoc + * + * @param signDoc from protobuf * @param name Name of the key to sign the tx * @param password Password of the key - * @param offline Offline signing, default `false` - * @returns The signed tx + * @param type pubkey Type + * @returns signature * @since v0.17 */ - sign(stdTx: types.Tx, name: string, password: string, offline?: boolean): Promise>; + sign_signDoc(signDoc: Uint8Array, name: string, password: string, type?: types.PubkeyType): string; /** * Broadcast tx async * @param txBytes The tx bytes with signatures @@ -63,6 +92,14 @@ export declare class Tx { * @returns The result object of broadcasting */ private broadcastTx; - private marshal; private newTxResult; + /** + * create message + * @param {[type]} txMsg:{type:string, value:any} message + * @return {[type]} message instance of types.Msg + */ + createMsg(txMsg: { + type: string; + value: any; + }): any; } diff --git a/dist/src/modules/tx.js b/dist/src/modules/tx.js index 72c9c62f..8c41af32 100644 --- a/dist/src/modules/tx.js +++ b/dist/src/modules/tx.js @@ -1,30 +1,89 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const is = require("is_js"); -const types = require("../types"); -const errors_1 = require("../errors"); -const utils_1 = require("../utils"); -const amino_js_1 = require("@irisnet/amino-js"); -const belt_1 = require("@tendermint/belt"); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Tx = void 0; + +var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); + +var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var is = _interopRequireWildcard(require("is_js")); + +var types = _interopRequireWildcard(require("../types")); + +var _errors = require("../errors"); + +var _utils = require("../utils"); + /** * Tx module allows you to sign or broadcast transactions * * @category Modules * @since v0.17 */ -class Tx { - /** @hidden */ - constructor(client) { - this.client = client; +var Tx = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + function Tx(client) { + (0, _classCallCheck2["default"])(this, Tx); + (0, _defineProperty2["default"])(this, "client", void 0); + this.client = client; + } + /** + * Build Tx + * @param msgs Msgs to be sent + * @param baseTx + * @returns unsignedTx + * @since v0.17 + */ + + + (0, _createClass2["default"])(Tx, [{ + key: "buildTx", + value: function buildTx(msgs, baseTx) { + var _this = this; + + var msgList = msgs.map(function (msg) { + return _this.createMsg(msg); + }); + var unsignedTx = this.client.auth.newStdTx(msgList, baseTx); + return unsignedTx; + } + /** + * generate StdTx from protoTxModel + * @param {[type]} protoTxModel:any instance of cosmos.tx.v1beta1.Tx + * @return {[type]} unsignedTx + */ + + }, { + key: "newStdTxFromProtoTxModel", + value: function newStdTxFromProtoTxModel(protoTxModel) { + return types.ProtoTx.newStdTxFromProtoTxModel(protoTxModel); + } + /** + * generate StdTx from Tx Data + * @param {[type]} TxData:string base64 string form txBytes + * @return {[type]} unsignedTx + */ + + }, { + key: "newStdTxFromTxData", + value: function newStdTxFromTxData(TxDataString) { + var protoTxModel = this.client.protobuf.deserializeTx(TxDataString, true); + return types.ProtoTx.newStdTxFromProtoTxModel(protoTxModel); } /** * Build, sign and broadcast the msgs @@ -33,18 +92,40 @@ class Tx { * @returns * @since v0.17 */ - buildAndSend(msgs, baseTx) { - return __awaiter(this, void 0, void 0, function* () { - // Build Unsigned Tx - const unsignedTx = this.client.auth.newStdTx(msgs, baseTx); - const fee = yield this.client.utils.toMinCoins(unsignedTx.value.fee.amount); - unsignedTx.value.fee.amount = fee; - // Sign Tx - const signedTx = yield this.sign(unsignedTx, baseTx.from, baseTx.password); - // Broadcast Tx - return this.broadcast(signedTx, baseTx.mode); - }); - } + + }, { + key: "buildAndSend", + value: function () { + var _buildAndSend = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(msgs, baseTx) { + var unsignedTx, signedTx; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + // Build Unsigned Tx + unsignedTx = this.buildTx(msgs, baseTx); // Sign Tx + + _context.next = 3; + return this.sign(unsignedTx, baseTx); + + case 3: + signedTx = _context.sent; + return _context.abrupt("return", this.broadcast(signedTx, baseTx.mode)); + + case 5: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function buildAndSend(_x, _x2) { + return _buildAndSend.apply(this, arguments); + } + + return buildAndSend; + }() /** * Broadcast a tx * @param signedTx The tx object with signatures @@ -52,139 +133,241 @@ class Tx { * @returns * @since v0.17 */ - broadcast(signedTx, mode) { - signedTx = this.marshal(signedTx); - const txBytes = amino_js_1.marshalTx(signedTx); - switch (mode) { - case types.BroadcastMode.Commit: - return this.broadcastTxCommit(txBytes); - case types.BroadcastMode.Sync: - return this.broadcastTxSync(txBytes).then(response => { - return this.newTxResult(response.hash); - }); - default: - return this.broadcastTxAsync(txBytes).then(response => { - return this.newTxResult(response.hash); - }); - } + + }, { + key: "broadcast", + value: function broadcast(signedTx, mode) { + var _this2 = this; + + var txBytes = signedTx.getData(); + + switch (mode) { + case types.BroadcastMode.Commit: + return this.broadcastTxCommit(txBytes); + + case types.BroadcastMode.Sync: + return this.broadcastTxSync(txBytes).then(function (response) { + return _this2.newTxResult(response.hash); + }); + + default: + return this.broadcastTxAsync(txBytes).then(function (response) { + return _this2.newTxResult(response.hash); + }); + } } /** * Single sign a transaction * * @param stdTx StdTx with no signatures - * @param name Name of the key to sign the tx - * @param password Password of the key - * @param offline Offline signing, default `false` + * @param baseTx baseTx.from && baseTx.password is requred * @returns The signed tx * @since v0.17 */ - sign(stdTx, name, password, offline = false) { - return __awaiter(this, void 0, void 0, function* () { - if (is.empty(name)) { - throw new errors_1.SdkError(`Name of the key can not be empty`); - } - if (is.empty(password)) { - throw new errors_1.SdkError(`Password of the key can not be empty`); - } - if (!this.client.config.keyDAO.decrypt) { - throw new errors_1.SdkError(`Decrypt method of KeyDAO not implemented`); - } - if (is.undefined(stdTx) || - is.undefined(stdTx.value) || - is.undefined(stdTx.value.msg)) { - throw new errors_1.SdkError(`Msgs can not be empty`); - } - const keyObj = this.client.config.keyDAO.read(name); - if (!keyObj) { - throw new errors_1.SdkError(`Key with name '${name}' not found`); - } - const msgs = []; - stdTx.value.msg.forEach(msg => { - if (msg.getSignBytes) { - msgs.push(msg.getSignBytes()); + + }, { + key: "sign", + value: function () { + var _sign = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(stdTx, baseTx) { + var _baseTx$account_numbe; + + var keyObj, accountNumber, sequence, account, privKey, pubKey, signature; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (!is.empty(baseTx.from)) { + _context2.next = 2; + break; + } + + throw new _errors.SdkError("baseTx.from of the key can not be empty"); + + case 2: + if (!is.empty(baseTx.password)) { + _context2.next = 4; + break; + } + + throw new _errors.SdkError("baseTx.password of the key can not be empty"); + + case 4: + if (this.client.config.keyDAO.decrypt) { + _context2.next = 6; + break; + } + + throw new _errors.SdkError("Decrypt method of KeyDAO not implemented", _errors.CODES.Panic); + + case 6: + keyObj = this.client.config.keyDAO.read(baseTx.from); + + if (keyObj) { + _context2.next = 9; + break; + } + + throw new _errors.SdkError("Key with name '".concat(baseTx.from, "' not found"), _errors.CODES.KeyNotFound); + + case 9: + accountNumber = (_baseTx$account_numbe = baseTx.account_number) !== null && _baseTx$account_numbe !== void 0 ? _baseTx$account_numbe : '0'; + sequence = baseTx.sequence || '0'; + + if (!(!baseTx.account_number || !baseTx.sequence)) { + _context2.next = 17; + break; + } + + _context2.next = 14; + return this.client.auth.queryAccount(keyObj.address); + + case 14: + account = _context2.sent; + + if (account.accountNumber) { + accountNumber = String(account.accountNumber) || '0'; + } + + if (account.sequence) { + sequence = String(account.sequence) || '0'; } - }); - if (!offline) { + + case 17: // Query account info from block chain - const addr = keyObj.address; - const account = yield this.client.bank.queryAccount(addr); - const sigs = [ - { - pub_key: account.public_key, - account_number: account.account_number, - sequence: account.sequence, - signature: '', - }, - ]; - stdTx.value.signatures = sigs; + privKey = this.client.config.keyDAO.decrypt(keyObj.privateKey, baseTx.password); + + if (privKey) { + _context2.next = 20; + break; + } + + throw new _errors.SdkError("decrypto the private key error", _errors.CODES.InvalidPassword); + + case 20: + if (!stdTx.hasPubKey()) { + pubKey = _utils.Crypto.getPublicKeyFromPrivateKey(privKey, baseTx.pubkeyType); + stdTx.setPubKey(pubKey, sequence || undefined); + } + + signature = _utils.Crypto.generateSignature(stdTx.getSignDoc(accountNumber || undefined, this.client.config.chainId).serializeBinary(), privKey, baseTx.pubkeyType); + stdTx.addSignature(signature); + return _context2.abrupt("return", stdTx); + + case 24: + case "end": + return _context2.stop(); } - // Build msg to sign - const sig = stdTx.value.signatures[0]; - const signMsg = { - account_number: sig.account_number, - chain_id: this.client.config.chainId, - fee: stdTx.value.fee, - memo: stdTx.value.memo, - msgs, - sequence: sig.sequence, - }; - // Signing - const privKey = this.client.config.keyDAO.decrypt(keyObj.privKey, password); - const signature = utils_1.Crypto.generateSignature(utils_1.Utils.str2hexstring(JSON.stringify(utils_1.Utils.sortObject(signMsg))), privKey); - sig.signature = signature.toString('base64'); - sig.pub_key = utils_1.Crypto.getPublicKeySecp256k1FromPrivateKey(privKey); - stdTx.value.signatures[0] = sig; - return stdTx; - }); + } + }, _callee2, this); + })); + + function sign(_x3, _x4) { + return _sign.apply(this, arguments); + } + + return sign; + }() + /** + * Single sign a transaction with signDoc + * + * @param signDoc from protobuf + * @param name Name of the key to sign the tx + * @param password Password of the key + * @param type pubkey Type + * @returns signature + * @since v0.17 + */ + + }, { + key: "sign_signDoc", + value: function sign_signDoc(signDoc, name, password) { + var type = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : types.PubkeyType.secp256k1; + + if (is.empty(name)) { + throw new _errors.SdkError("Name of the key can not be empty"); + } + + if (is.empty(password)) { + throw new _errors.SdkError("Password of the key can not be empty"); + } + + if (!this.client.config.keyDAO.decrypt) { + throw new _errors.SdkError("Decrypt method of KeyDAO not implemented"); + } + + var keyObj = this.client.config.keyDAO.read(name); + + if (!keyObj) { + throw new _errors.SdkError("Key with name '".concat(name, "' not found"), _errors.CODES.KeyNotFound); + } + + var privKey = this.client.config.keyDAO.decrypt(keyObj.privateKey, password); + + var signature = _utils.Crypto.generateSignature(signDoc, privKey, type); + + return signature; } /** * Broadcast tx async * @param txBytes The tx bytes with signatures * @returns */ - broadcastTxAsync(txBytes) { - return this.broadcastTx(txBytes, types.RpcMethods.BroadcastTxAsync); + + }, { + key: "broadcastTxAsync", + value: function broadcastTxAsync(txBytes) { + return this.broadcastTx(txBytes, types.RpcMethods.BroadcastTxAsync); } /** * Broadcast tx sync * @param txBytes The tx bytes with signatures * @returns The result object of broadcasting */ - broadcastTxSync(txBytes) { - return this.broadcastTx(txBytes, types.RpcMethods.BroadcastTxSync); + + }, { + key: "broadcastTxSync", + value: function broadcastTxSync(txBytes) { + return this.broadcastTx(txBytes, types.RpcMethods.BroadcastTxSync); } /** * Broadcast tx and wait for it to be included in a block. * @param txBytes The tx bytes with signatures * @returns The result object of broadcasting */ - broadcastTxCommit(txBytes) { - return this.client.rpcClient - .request(types.RpcMethods.BroadcastTxCommit, { - tx: belt_1.bytesToBase64(txBytes), - }) - .then(response => { - var _a, _b, _c, _d; - // Check tx error - if (response.check_tx && response.check_tx.code > 0) { - throw new errors_1.SdkError(response.check_tx.log, response.check_tx.code); - } - // Deliver tx error - if (response.deliver_tx && response.deliver_tx.code > 0) { - throw new errors_1.SdkError(response.deliver_tx.log, response.deliver_tx.code); - } - if (response.deliver_tx && response.deliver_tx.tags) { - response.deliver_tx.tags = utils_1.Utils.decodeTags(response.deliver_tx.tags); - } - return { - hash: response.hash, - height: response.height, - gas_wanted: (_a = response.deliver_tx) === null || _a === void 0 ? void 0 : _a.gas_wanted, - gas_used: (_b = response.deliver_tx) === null || _b === void 0 ? void 0 : _b.gas_used, - info: (_c = response.deliver_tx) === null || _c === void 0 ? void 0 : _c.info, - tags: (_d = response.deliver_tx) === null || _d === void 0 ? void 0 : _d.tags, - }; - }); + + }, { + key: "broadcastTxCommit", + value: function broadcastTxCommit(txBytes) { + return this.client.rpcClient.request(types.RpcMethods.BroadcastTxCommit, { + tx: _utils.Utils.bytesToBase64(txBytes) + }).then(function (response) { + var _response$deliver_tx, _response$deliver_tx2, _response$deliver_tx3, _response$deliver_tx4; + + // Check tx error + if (response.check_tx && response.check_tx.code > 0) { + console.error(response.check_tx); + throw new _errors.SdkError(response.check_tx.log, response.check_tx.code); + } // Deliver tx error + + + if (response.deliver_tx && response.deliver_tx.code > 0) { + console.error(response.deliver_tx); + throw new _errors.SdkError(response.deliver_tx.log, response.deliver_tx.code); + } + + if (response.deliver_tx && response.deliver_tx.tags) { + response.deliver_tx.tags = _utils.Utils.decodeTags(response.deliver_tx.tags); + } + + return { + hash: response.hash, + height: response.height, + gas_wanted: (_response$deliver_tx = response.deliver_tx) === null || _response$deliver_tx === void 0 ? void 0 : _response$deliver_tx.gas_wanted, + gas_used: (_response$deliver_tx2 = response.deliver_tx) === null || _response$deliver_tx2 === void 0 ? void 0 : _response$deliver_tx2.gas_used, + info: (_response$deliver_tx3 = response.deliver_tx) === null || _response$deliver_tx3 === void 0 ? void 0 : _response$deliver_tx3.info, + tags: (_response$deliver_tx4 = response.deliver_tx) === null || _response$deliver_tx4 === void 0 ? void 0 : _response$deliver_tx4.tags + }; + }); } /** * Broadcast tx sync or async @@ -192,45 +375,198 @@ class Tx { * @param signedTx The tx object with signatures * @returns The result object of broadcasting */ - broadcastTx(txBytes, method) { - // Only accepts 'broadcast_tx_sync' and 'broadcast_tx_async' - if (is.not.inArray(method, [ - types.RpcMethods.BroadcastTxSync, - types.RpcMethods.BroadcastTxAsync, - ])) { - throw new errors_1.SdkError(`Unsupported broadcast method: ${method}`); + + }, { + key: "broadcastTx", + value: function broadcastTx(txBytes, method) { + // Only accepts 'broadcast_tx_sync' and 'broadcast_tx_async' + if (is.not.inArray(method, [types.RpcMethods.BroadcastTxSync, types.RpcMethods.BroadcastTxAsync])) { + throw new _errors.SdkError("Unsupported broadcast method: ".concat(method), _errors.CODES.Internal); + } + + return this.client.rpcClient.request(method, { + tx: _utils.Utils.bytesToBase64(txBytes) + }).then(function (response) { + if (response.code && response.code > 0) { + throw new _errors.SdkError(response.log, response.code); } - return this.client.rpcClient - .request(method, { - tx: belt_1.bytesToBase64(txBytes), - }) - .then(response => { - if (response.code && response.code > 0) { - throw new errors_1.SdkError(response.data, response.code); - } - return response; - }); + + return response; + }); + } // private marshal(stdTx: types.Tx): types.Tx { + // const copyStdTx: types.Tx = stdTx; + // Object.assign(copyStdTx, stdTx); + // stdTx.value.msg.forEach((msg, idx) => { + // if (msg.marshal) { + // copyStdTx.value.msg[idx] = msg.marshal(); + // } + // }); + // return copyStdTx; + // } + + }, { + key: "newTxResult", + value: function newTxResult(hash, height, deliverTx) { + return { + hash: hash, + height: height, + gas_wanted: deliverTx === null || deliverTx === void 0 ? void 0 : deliverTx.gas_wanted, + gas_used: deliverTx === null || deliverTx === void 0 ? void 0 : deliverTx.gas_used, + info: deliverTx === null || deliverTx === void 0 ? void 0 : deliverTx.info, + tags: deliverTx === null || deliverTx === void 0 ? void 0 : deliverTx.tags + }; } - marshal(stdTx) { - const copyStdTx = stdTx; - Object.assign(copyStdTx, stdTx); - stdTx.value.msg.forEach((msg, idx) => { - if (msg.marshal) { - copyStdTx.value.msg[idx] = msg.marshal(); - } - }); - return copyStdTx; - } - newTxResult(hash, height, deliverTx) { - return { - hash, - height, - gas_wanted: deliverTx === null || deliverTx === void 0 ? void 0 : deliverTx.gas_wanted, - gas_used: deliverTx === null || deliverTx === void 0 ? void 0 : deliverTx.gas_used, - info: deliverTx === null || deliverTx === void 0 ? void 0 : deliverTx.info, - tags: deliverTx === null || deliverTx === void 0 ? void 0 : deliverTx.tags, - }; + /** + * create message + * @param {[type]} txMsg:{type:string, value:any} message + * @return {[type]} message instance of types.Msg + */ + + }, { + key: "createMsg", + value: function createMsg(txMsg) { + var msg = {}; + + switch (txMsg.type) { + //bank + case types.TxType.MsgSend: + { + msg = new types.MsgSend(txMsg.value); + break; + } + + case types.TxType.MsgMultiSend: + { + msg = new types.MsgMultiSend(txMsg.value); + break; + } + //staking + + case types.TxType.MsgDelegate: + { + msg = new types.MsgDelegate(txMsg.value); + break; + } + + case types.TxType.MsgUndelegate: + { + msg = new types.MsgUndelegate(txMsg.value); + break; + } + + case types.TxType.MsgBeginRedelegate: + { + msg = new types.MsgRedelegate(txMsg.value); + break; + } + //distribution + + case types.TxType.MsgWithdrawDelegatorReward: + { + msg = new types.MsgWithdrawDelegatorReward(txMsg.value); + break; + } + + case types.TxType.MsgSetWithdrawAddress: + { + msg = new types.MsgSetWithdrawAddress(txMsg.value); + break; + } + + case types.TxType.MsgWithdrawValidatorCommission: + { + msg = new types.MsgWithdrawValidatorCommission(txMsg.value); + break; + } + + case types.TxType.MsgFundCommunityPool: + { + msg = new types.MsgFundCommunityPool(txMsg.value); + break; + } + //token + + case types.TxType.MsgIssueToken: + { + msg = new types.MsgIssueToken(txMsg.value); + break; + } + + case types.TxType.MsgEditToken: + { + msg = new types.MsgEditToken(txMsg.value); + break; + } + + case types.TxType.MsgMintToken: + { + msg = new types.MsgMintToken(txMsg.value); + break; + } + + case types.TxType.MsgTransferTokenOwner: + { + msg = new types.MsgTransferTokenOwner(txMsg.value); + break; + } + //coinswap + + case types.TxType.MsgAddLiquidity: + { + break; + } + + case types.TxType.MsgRemoveLiquidity: + { + break; + } + + case types.TxType.MsgSwapOrder: + { + break; + } + //nft + + case types.TxType.MsgIssueDenom: + { + msg = new types.MsgIssueDenom(txMsg.value); + break; + } + + case types.TxType.MsgMintNFT: + { + msg = new types.MsgMintNFT(txMsg.value); + break; + } + + case types.TxType.MsgEditNFT: + { + msg = new types.MsgEditNFT(txMsg.value); + break; + } + + case types.TxType.MsgTransferNFT: + { + msg = new types.MsgTransferNFT(txMsg.value); + break; + } + + case types.TxType.MsgBurnNFT: + { + msg = new types.MsgBurnNFT(txMsg.value); + break; + } + + default: + { + throw new _errors.SdkError("not exist tx type", _errors.CODES.InvalidType); + } + } + + return msg; } -} -exports.Tx = Tx; -//# sourceMappingURL=tx.js.map \ No newline at end of file + }]); + return Tx; +}(); + +exports.Tx = Tx; \ No newline at end of file diff --git a/dist/src/modules/tx.js.map b/dist/src/modules/tx.js.map deleted file mode 100644 index 096112a9..00000000 --- a/dist/src/modules/tx.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tx.js","sourceRoot":"","sources":["../../../src/modules/tx.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,4BAA4B;AAC5B,kCAAkC;AAClC,sCAAqC;AACrC,oCAAyC;AACzC,gDAA8C;AAC9C,2CAAiD;AAEjD;;;;;GAKG;AACH,MAAa,EAAE;IAGb,cAAc;IACd,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACG,YAAY,CAChB,IAAiB,EACjB,MAAoB;;YAEpB,oBAAoB;YACpB,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;YAE3D,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAC5E,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC;YAElC,UAAU;YACV,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC3E,eAAe;YACf,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QAC/C,CAAC;KAAA;IAED;;;;;;OAMG;IACH,SAAS,CACP,QAA+B,EAC/B,IAA0B;QAE1B,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAClC,MAAM,OAAO,GAAG,oBAAS,CAAC,QAAQ,CAAC,CAAC;QACpC,QAAQ,IAAI,EAAE;YACZ,KAAK,KAAK,CAAC,aAAa,CAAC,MAAM;gBAC7B,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;YACzC,KAAK,KAAK,CAAC,aAAa,CAAC,IAAI;gBAC3B,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;oBACnD,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;gBACzC,CAAC,CAAC,CAAC;YACL;gBACE,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;oBACpD,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;gBACzC,CAAC,CAAC,CAAC;SACN;IACH,CAAC;IAED;;;;;;;;;OASG;IACG,IAAI,CACR,KAA4B,EAC5B,IAAY,EACZ,QAAgB,EAChB,OAAO,GAAG,KAAK;;YAEf,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;gBAClB,MAAM,IAAI,iBAAQ,CAAC,kCAAkC,CAAC,CAAC;aACxD;YACD,IAAI,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;gBACtB,MAAM,IAAI,iBAAQ,CAAC,sCAAsC,CAAC,CAAC;aAC5D;YACD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;gBACtC,MAAM,IAAI,iBAAQ,CAAC,0CAA0C,CAAC,CAAC;aAChE;YACD,IACE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC;gBACnB,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC;gBACzB,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAC7B;gBACA,MAAM,IAAI,iBAAQ,CAAC,uBAAuB,CAAC,CAAC;aAC7C;YACD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACpD,IAAI,CAAC,MAAM,EAAE;gBACX,MAAM,IAAI,iBAAQ,CAAC,kBAAkB,IAAI,aAAa,CAAC,CAAC;aACzD;YAED,MAAM,IAAI,GAAa,EAAE,CAAC;YAC1B,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBAC5B,IAAI,GAAG,CAAC,YAAY,EAAE;oBACpB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC;iBAC/B;YACH,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,OAAO,EAAE;gBACZ,sCAAsC;gBACtC,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;gBAC5B,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;gBAC1D,MAAM,IAAI,GAAyB;oBACjC;wBACE,OAAO,EAAE,OAAO,CAAC,UAAU;wBAC3B,cAAc,EAAE,OAAO,CAAC,cAAc;wBACtC,QAAQ,EAAE,OAAO,CAAC,QAAQ;wBAC1B,SAAS,EAAE,EAAE;qBACd;iBACF,CAAC;gBAEF,KAAK,CAAC,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC;aAC/B;YAED,oBAAoB;YACpB,MAAM,GAAG,GAAuB,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAC1D,MAAM,OAAO,GAAqB;gBAChC,cAAc,EAAE,GAAG,CAAC,cAAc;gBAClC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO;gBACpC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG;gBACpB,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI;gBACtB,IAAI;gBACJ,QAAQ,EAAE,GAAG,CAAC,QAAQ;aACvB,CAAC;YAEF,UAAU;YACV,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YAC5E,MAAM,SAAS,GAAG,cAAM,CAAC,iBAAiB,CACxC,aAAK,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,aAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAC9D,OAAO,CACR,CAAC;YACF,GAAG,CAAC,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAC7C,GAAG,CAAC,OAAO,GAAG,cAAM,CAAC,mCAAmC,CAAC,OAAO,CAAC,CAAC;YAClE,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;YAChC,OAAO,KAAK,CAAC;QACf,CAAC;KAAA;IAED;;;;OAIG;IACK,gBAAgB,CACtB,OAAmB;QAEnB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;IACtE,CAAC;IAED;;;;OAIG;IACK,eAAe,CACrB,OAAmB;QAEnB,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IACrE,CAAC;IAED;;;;OAIG;IACK,iBAAiB,CAAC,OAAmB;QAC3C,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS;aACzB,OAAO,CAA0B,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE;YACpE,EAAE,EAAE,oBAAa,CAAC,OAAO,CAAC;SAC3B,CAAC;aACD,IAAI,CAAC,QAAQ,CAAC,EAAE;;YACf,iBAAiB;YACjB,IAAI,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,EAAE;gBACnD,MAAM,IAAI,iBAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;aACnE;YAED,mBAAmB;YACnB,IAAI,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,GAAG,CAAC,EAAE;gBACvD,MAAM,IAAI,iBAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;aACvE;YAED,IAAI,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE;gBACnD,QAAQ,CAAC,UAAU,CAAC,IAAI,GAAG,aAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;aACvE;YACD,OAAO;gBACL,IAAI,EAAE,QAAQ,CAAC,IAAI;gBACnB,MAAM,EAAE,QAAQ,CAAC,MAAM;gBACvB,UAAU,QAAE,QAAQ,CAAC,UAAU,0CAAE,UAAU;gBAC3C,QAAQ,QAAE,QAAQ,CAAC,UAAU,0CAAE,QAAQ;gBACvC,IAAI,QAAE,QAAQ,CAAC,UAAU,0CAAE,IAAI;gBAC/B,IAAI,QAAE,QAAQ,CAAC,UAAU,0CAAE,IAAI;aAChC,CAAC;QACJ,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;;OAKG;IACK,WAAW,CACjB,OAAmB,EACnB,MAAc;QAEd,4DAA4D;QAC5D,IACE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE;YACrB,KAAK,CAAC,UAAU,CAAC,eAAe;YAChC,KAAK,CAAC,UAAU,CAAC,gBAAgB;SAClC,CAAC,EACF;YACA,MAAM,IAAI,iBAAQ,CAAC,iCAAiC,MAAM,EAAE,CAAC,CAAC;SAC/D;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS;aACzB,OAAO,CAA+B,MAAM,EAAE;YAC7C,EAAE,EAAE,oBAAa,CAAC,OAAO,CAAC;SAC3B,CAAC;aACD,IAAI,CAAC,QAAQ,CAAC,EAAE;YACf,IAAI,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,IAAI,GAAG,CAAC,EAAE;gBACtC,MAAM,IAAI,iBAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;aAClD;YAED,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAC,CAAC;IACP,CAAC;IAEO,OAAO,CAAC,KAA4B;QAC1C,MAAM,SAAS,GAA0B,KAAK,CAAC;QAC/C,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAChC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YACnC,IAAI,GAAG,CAAC,OAAO,EAAE;gBACf,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;aAC1C;QACH,CAAC,CAAC,CAAC;QACH,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,WAAW,CACjB,IAAY,EACZ,MAAe,EACf,SAA0B;QAE1B,OAAO;YACL,IAAI;YACJ,MAAM;YACN,UAAU,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,UAAU;YACjC,QAAQ,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,QAAQ;YAC7B,IAAI,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI;YACrB,IAAI,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI;SACtB,CAAC;IACJ,CAAC;CACF;AAhQD,gBAgQC"} \ No newline at end of file diff --git a/dist/src/modules/utils.d.ts b/dist/src/modules/utils.d.ts index 61bcf53b..19c50b9d 100644 --- a/dist/src/modules/utils.d.ts +++ b/dist/src/modules/utils.d.ts @@ -8,8 +8,11 @@ import * as types from '../types'; export declare class Utils { /** @hidden */ private client; + /** @hidden */ private tokenMap; + /** @hidden */ private mathConfig; + /** @hidden */ private math; /** @hidden */ constructor(client: Client); diff --git a/dist/src/modules/utils.js b/dist/src/modules/utils.js index ef31cc56..0c6f1ae9 100644 --- a/dist/src/modules/utils.js +++ b/dist/src/modules/utils.js @@ -1,118 +1,268 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const mathjs = require("mathjs"); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Utils = void 0; + +var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); + +var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var mathjs = _interopRequireWildcard(require("mathjs")); + /** * Utils for the IRISHub SDK * @category Modules * @since v0.17 */ -class Utils { - /** @hidden */ - constructor(client) { - this.mathConfig = { - number: 'BigNumber', - precision: 64, - }; - this.client = client; - this.tokenMap = new Map(); - this.math = mathjs.create(mathjs.all, this.mathConfig); - } - /** - * Convert the coin object to min unit - * - * @param coin Coin object to be converted - * @returns - * @since v0.17 - */ - toMinCoin(coin) { - return __awaiter(this, void 0, void 0, function* () { - const amt = this.math.bignumber(coin.amount); - const token = this.tokenMap.get(coin.denom); - if (token) { - if (coin.denom === token.min_unit) - return coin; - return { - denom: token.min_unit, - amount: this.math.multiply(amt, this.math.pow(10, token.scale)).toString(), - }; +var Utils = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + + /** @hidden */ + + /** @hidden */ + + /** @hidden */ + function Utils(client) { + (0, _classCallCheck2["default"])(this, Utils); + (0, _defineProperty2["default"])(this, "client", void 0); + (0, _defineProperty2["default"])(this, "tokenMap", void 0); + (0, _defineProperty2["default"])(this, "mathConfig", { + number: 'BigNumber', + // Choose 'number' (default), 'BigNumber', or 'Fraction' + precision: 64 // 64 by default, only applicable for BigNumbers + + }); + (0, _defineProperty2["default"])(this, "math", void 0); + this.client = client; + this.tokenMap = new Map(); + this.math = mathjs.create(mathjs.all, this.mathConfig); + } + /** + * Convert the coin object to min unit + * + * @param coin Coin object to be converted + * @returns + * @since v0.17 + */ + + + (0, _createClass2["default"])(Utils, [{ + key: "toMinCoin", + value: function () { + var _toMinCoin = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(coin) { + var _this = this; + + var amt, token; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + amt = this.math.bignumber(coin.amount); + token = this.tokenMap.get(coin.denom); + + if (!token) { + _context.next = 6; + break; + } + + if (!(coin.denom === token.min_unit)) { + _context.next = 5; + break; + } + + return _context.abrupt("return", coin); + + case 5: + return _context.abrupt("return", { + denom: token.min_unit, + amount: this.math.multiply(amt, this.math.pow(10, token.scale)).toString() + }); + + case 6: + return _context.abrupt("return", this.client.token.queryToken(coin.denom).then(function (token) { + if (token) { + _this.tokenMap.set(coin.denom, token); + } + + return _this.toMinCoin(coin); + })); + + case 7: + case "end": + return _context.stop(); } - // If token not found in local memory, then query from the blockchain - return this.client.asset.queryToken(coin.denom).then(token => { - this.tokenMap.set(coin.denom, token); - return this.toMinCoin(coin); - }); - }); - } + } + }, _callee, this); + })); + + function toMinCoin(_x) { + return _toMinCoin.apply(this, arguments); + } + + return toMinCoin; + }() /** * Convert the coin array to min unit * @param coins Coin array to be converted * @returns * @since v0.17 */ - toMinCoins(coins) { - return __awaiter(this, void 0, void 0, function* () { - const promises = new Array(); - coins.forEach(amt => { - const promise = this.toMinCoin(amt); - promises.push(promise); - }); - return Promise.all(promises).then(coins => { - return coins; - }); - }); - } + + }, { + key: "toMinCoins", + value: function () { + var _toMinCoins = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(coins) { + var _this2 = this; + + var promises; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + promises = new Array(); + coins.forEach(function (amt) { + var promise = _this2.toMinCoin(amt); + + promises.push(promise); + }); + return _context2.abrupt("return", Promise.all(promises).then(function (coins) { + return coins; + })); + + case 3: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + function toMinCoins(_x2) { + return _toMinCoins.apply(this, arguments); + } + + return toMinCoins; + }() /** * Convert the coin object to main unit * * @returns * @since v0.17 */ - toMainCoin(coin) { - return __awaiter(this, void 0, void 0, function* () { - const amt = this.math.bignumber(coin.amount); - const token = this.tokenMap.get(coin.denom); - if (token) { - if (coin.denom === token.symbol) - return coin; - return { - denom: token.symbol, - amount: this.math.divide(amt, this.math.pow(10, token.scale)).toString(), - }; + + }, { + key: "toMainCoin", + value: function () { + var _toMainCoin = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(coin) { + var _this3 = this; + + var amt, token; + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + amt = this.math.bignumber(coin.amount); + token = this.tokenMap.get(coin.denom); + + if (!token) { + _context3.next = 6; + break; + } + + if (!(coin.denom === token.symbol)) { + _context3.next = 5; + break; + } + + return _context3.abrupt("return", coin); + + case 5: + return _context3.abrupt("return", { + denom: token.symbol, + amount: this.math.divide(amt, this.math.pow(10, token.scale)).toString() + }); + + case 6: + return _context3.abrupt("return", this.client.token.queryToken(coin.denom).then(function (token) { + if (token) { + _this3.tokenMap.set(coin.denom, token); + } + + return _this3.toMainCoin(coin); + })); + + case 7: + case "end": + return _context3.stop(); } - // If token not found in local memory, then query from the blockchain - return this.client.asset.queryToken(coin.denom).then(token => { - this.tokenMap.set(coin.denom, token); - return this.toMainCoin(coin); - }); - }); - } + } + }, _callee3, this); + })); + + function toMainCoin(_x3) { + return _toMainCoin.apply(this, arguments); + } + + return toMainCoin; + }() /** * Convert the coin array to main unit * @param coins Coin array to be converted * @returns * @since v0.17 */ - toMainCoins(coins) { - return __awaiter(this, void 0, void 0, function* () { - const promises = new Array(); - coins.forEach(amt => { - const promise = this.toMainCoin(amt); - promises.push(promise); - }); - return Promise.all(promises).then(coins => { - return coins; - }); - }); - } -} -exports.Utils = Utils; -//# sourceMappingURL=utils.js.map \ No newline at end of file + + }, { + key: "toMainCoins", + value: function () { + var _toMainCoins = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(coins) { + var _this4 = this; + + var promises; + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + promises = new Array(); + coins.forEach(function (amt) { + var promise = _this4.toMainCoin(amt); + + promises.push(promise); + }); + return _context4.abrupt("return", Promise.all(promises).then(function (coins) { + return coins; + })); + + case 3: + case "end": + return _context4.stop(); + } + } + }, _callee4); + })); + + function toMainCoins(_x4) { + return _toMainCoins.apply(this, arguments); + } + + return toMainCoins; + }() + }]); + return Utils; +}(); + +exports.Utils = Utils; \ No newline at end of file diff --git a/dist/src/modules/utils.js.map b/dist/src/modules/utils.js.map deleted file mode 100644 index 7e5b7edb..00000000 --- a/dist/src/modules/utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/modules/utils.ts"],"names":[],"mappings":";;;;;;;;;;;AAEA,iCAAiC;AAEjC;;;;GAIG;AACH,MAAa,KAAK;IAUhB,cAAc;IACd,YAAY,MAAc;QAPlB,eAAU,GAAG;YACnB,MAAM,EAAE,WAAW;YACnB,SAAS,EAAE,EAAE;SACd,CAAC;QAKA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,EAAuB,CAAC;QAC/C,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACzD,CAAC;IAED;;;;;;OAMG;IACG,SAAS,CAAC,IAAgB;;YAC9B,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,SAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC5C,IAAI,KAAK,EAAE;gBACT,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,QAAQ;oBAAE,OAAO,IAAI,CAAC;gBAC/C,OAAO;oBACL,KAAK,EAAE,KAAK,CAAC,QAAQ;oBACrB,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,QAAS,CACzB,GAAG,EACH,IAAI,CAAC,IAAI,CAAC,GAAI,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAChC,CAAC,QAAQ,EAAE;iBACb,CAAC;aACH;YAED,qEAAqE;YACrE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;gBAC3D,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;gBACrC,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YAC9B,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;IAED;;;;;OAKG;IACG,UAAU,CAAC,KAAmB;;YAClC,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAuB,CAAC;YAClD,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBAClB,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;gBACpC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzB,CAAC,CAAC,CAAC;YACH,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;gBACxC,OAAO,KAAK,CAAC;YACf,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;IAED;;;;;OAKG;IACG,UAAU,CAAC,IAAgB;;YAC/B,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,SAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC9C,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC5C,IAAI,KAAK,EAAE;gBACT,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,MAAM;oBAAE,OAAO,IAAI,CAAC;gBAC7C,OAAO;oBACL,KAAK,EAAE,KAAK,CAAC,MAAM;oBACnB,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAO,CACvB,GAAG,EACH,IAAI,CAAC,IAAI,CAAC,GAAI,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAChC,CAAC,QAAQ,EAAE;iBACb,CAAC;aACH;YAED,qEAAqE;YACrE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;gBAC3D,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;gBACrC,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;IAED;;;;;OAKG;IACG,WAAW,CAAC,KAAmB;;YACnC,MAAM,QAAQ,GAAG,IAAI,KAAK,EAAuB,CAAC;YAClD,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBAClB,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;gBACrC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACzB,CAAC,CAAC,CAAC;YACH,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;gBACxC,OAAO,KAAK,CAAC;YACf,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AAzGD,sBAyGC"} \ No newline at end of file diff --git a/dist/src/nets/event-listener.js b/dist/src/nets/event-listener.js index 7da7e2ae..74cb4bbd 100644 --- a/dist/src/nets/event-listener.js +++ b/dist/src/nets/event-listener.js @@ -1,127 +1,208 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const amino_js_1 = require("@irisnet/amino-js"); -const belt_1 = require("@tendermint/belt"); -const errors_1 = require("../errors"); -const types = require("../types"); -const utils_1 = require("../utils"); -const is = require("is_js"); -const ws_client_1 = require("./ws-client"); -const types_1 = require("../types"); -const amino_js_2 = require("@irisnet/amino-js"); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.EventListener = void 0; + +var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); + +var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _errors = require("../errors"); + +var types = _interopRequireWildcard(require("../types")); + +var _utils = require("../utils"); + +var is = _interopRequireWildcard(require("is_js")); + +var _wsClient = require("./ws-client"); + /** Internal event dao for caching the events */ -class EventDAO { - constructor() { - this.subscriptions = new Map(); - } - setSubscription(id, subscription) { - this.subscriptions.set(id, subscription); +var EventDAO = /*#__PURE__*/function () { + function EventDAO() { + (0, _classCallCheck2["default"])(this, EventDAO); + (0, _defineProperty2["default"])(this, "subscriptions", new Map()); + } + + (0, _createClass2["default"])(EventDAO, [{ + key: "setSubscription", + value: function setSubscription(id, subscription) { + this.subscriptions.set(id, subscription); } - deleteSubscription(id) { - this.subscriptions.delete(id); + }, { + key: "deleteSubscription", + value: function deleteSubscription(id) { + this.subscriptions["delete"](id); } - getAllSubscriptions() { - return this.subscriptions; + }, { + key: "getAllSubscriptions", + value: function getAllSubscriptions() { + return this.subscriptions; } - clear() { - this.subscriptions.clear(); + }, { + key: "clear", + value: function clear() { + this.subscriptions.clear(); } -} + }]); + return EventDAO; +}(); /** * IRISHub Event Listener * @since v0.17 */ -class EventListener { - /** @hidden */ - constructor(client) { - this.client = client; - this.wsClient = new ws_client_1.WsClient(this.client.config.node); - this.eventDAO = new EventDAO(); - this.wsClient.eventEmitter.on('open', () => { - const subscriptions = this.eventDAO.getAllSubscriptions(); - if (subscriptions) { - subscriptions.forEach(sub => { - // Subscribe all events in context - console.log('Subscribe: ' + sub.query); - this.wsClient.send(types.RpcMethods.Subscribe, sub.id, sub.query); - const event = sub.id + '#event'; - this.wsClient.eventEmitter.removeAllListeners(event); // just in case dup of listeners - switch (sub.eventType) { - case types.EventTypes.NewBlock: { - // Listen for new blocks, decode and callback - this.wsClient.eventEmitter.on(event, (error, data) => { - this.newBlockHandler(sub.callback, error, data); - }); - return; - } - case types.EventTypes.NewBlockHeader: { - // Listen for new block headers, decode and callback - this.wsClient.eventEmitter.on(event, (error, data) => { - this.newBlockHeaderHandler(sub.callback, error, data); - }); - return; - } - case types.EventTypes.ValidatorSetUpdates: { - // Listen for validator set updates, decode and callback - this.wsClient.eventEmitter.on(event, (error, data) => { - this.validatorSetUpdatesHandler(sub.callback, error, data); - }); - return; - } - case types.EventTypes.Tx: { - // Listen for txs, decode and callback - this.wsClient.eventEmitter.on(event, (error, data) => { - this.txHandler(sub.callback, error, data); - }); - return; - } - default: { - return; - } - } + + +var EventListener = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + + /** @hidden */ + + /** @hidden */ + function EventListener(client) { + var _this = this; + + (0, _classCallCheck2["default"])(this, EventListener); + (0, _defineProperty2["default"])(this, "wsClient", void 0); + (0, _defineProperty2["default"])(this, "eventDAO", void 0); + (0, _defineProperty2["default"])(this, "client", void 0); + this.client = client; + this.wsClient = new _wsClient.WsClient(this.client.config.node); + this.eventDAO = new EventDAO(); + this.wsClient.eventEmitter.on('open', function () { + var subscriptions = _this.eventDAO.getAllSubscriptions(); + + if (subscriptions) { + subscriptions.forEach(function (sub) { + // Subscribe all events in context + console.log('Subscribe: ' + sub.query); + + _this.wsClient.send(types.RpcMethods.Subscribe, sub.id, sub.query); + + var event = sub.id + '#event'; + + _this.wsClient.eventEmitter.removeAllListeners(event); // just in case dup of listeners + + + switch (sub.eventType) { + case types.EventTypes.NewBlock: + { + // Listen for new blocks, decode and callback + _this.wsClient.eventEmitter.on(event, function (error, data) { + _this.newBlockHandler(sub.callback, error, data); }); - } - }); - // If the connection is closed subjectively, this event will not be triggered - // see also: disconnect() - this.wsClient.eventEmitter.on('close', () => { - // Disconnected unexpectedly, try reconnecting - console.log('Reconnecting...'); - setTimeout(() => { - this.connect(); - }, 5000); // try reconnecting every 5s - }); - this.wsClient.eventEmitter.on('error', err => { - // TODO + + return; + } + + case types.EventTypes.NewBlockHeader: + { + // Listen for new block headers, decode and callback + _this.wsClient.eventEmitter.on(event, function (error, data) { + _this.newBlockHeaderHandler(sub.callback, error, data); + }); + + return; + } + + case types.EventTypes.ValidatorSetUpdates: + { + // Listen for validator set updates, decode and callback + _this.wsClient.eventEmitter.on(event, function (error, data) { + _this.validatorSetUpdatesHandler(sub.callback, error, data); + }); + + return; + } + + case types.EventTypes.Tx: + { + // Listen for txs, decode and callback + _this.wsClient.eventEmitter.on(event, function (error, data) { + _this.txHandler(sub.callback, error, data); + }); + + return; + } + + default: + { + return; + } + } }); - } - /** - * Connect to server - * @since v0.17 - */ - connect() { - this.wsClient.connect(); + } + }); // If the connection is closed subjectively, this event will not be triggered + // see also: disconnect() + + this.wsClient.eventEmitter.on('close', function () { + // Disconnected unexpectedly, try reconnecting + console.log('Reconnecting...'); + setTimeout(function () { + _this.connect(); + }, 5000); // try reconnecting every 5s + }); + this.wsClient.eventEmitter.on('error', function (err) {// TODO + }); + } + /** + * Connect to server + * @since v0.17 + */ + + + (0, _createClass2["default"])(EventListener, [{ + key: "connect", + value: function connect() { + this.wsClient.connect(); } /** * Disconnect from server and clear all the listeners * @since v0.17 */ - disconnect() { - return __awaiter(this, void 0, void 0, function* () { - return this.wsClient.disconnect().then(() => { - this.eventDAO.clear(); - }); - }); - } + + }, { + key: "disconnect", + value: function () { + var _disconnect = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() { + var _this2 = this; + + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", this.wsClient.disconnect().then(function () { + _this2.eventDAO.clear(); + })); + + case 1: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function disconnect() { + return _disconnect.apply(this, arguments); + } + + return disconnect; + }() /** * Subscribe new block notifications * @param conditions Query conditions @@ -129,29 +210,37 @@ class EventListener { * @returns * @since v0.17 */ - subscribeNewBlock(callback, conditions) { - // Build and send subscription - const eventType = types.EventTypes.NewBlock; - const id = eventType + Math.random().toString(16); - const queryBuilder = conditions ? conditions : new types_1.EventQueryBuilder(); - const query = queryBuilder - .addCondition(new types.Condition(types_1.EventKey.Type).eq(eventType)) - .build(); - if (this.wsClient.isReady()) { - this.wsClient.send(types.RpcMethods.Subscribe, id, query); - // Listen for new blocks, decode and callback - this.wsClient.eventEmitter.on(id + '#event', (error, data) => { - this.newBlockHandler(callback, error, data); - }); - } - this.eventDAO.setSubscription(id, { - id, - query, - eventType, - callback, + + }, { + key: "subscribeNewBlock", + value: function subscribeNewBlock(callback, conditions) { + var _this3 = this; + + // Build and send subscription + var eventType = types.EventTypes.NewBlock; + var id = eventType + Math.random().toString(16); + var queryBuilder = conditions ? conditions : new types.EventQueryBuilder(); + var query = queryBuilder.addCondition(new types.Condition(types.EventKey.Type).eq(eventType)).build(); + + if (this.wsClient.isReady()) { + this.wsClient.send(types.RpcMethods.Subscribe, id, query); // Listen for new blocks, decode and callback + + this.wsClient.eventEmitter.on(id + '#event', function (error, data) { + _this3.newBlockHandler(callback, error, data); }); - // Return an types.EventSubscription instance, so client could use to unsubscribe this context - return { id, query }; + } + + this.eventDAO.setSubscription(id, { + id: id, + query: query, + eventType: eventType, + callback: callback + }); // Return an types.EventSubscription instance, so client could use to unsubscribe this context + + return { + id: id, + query: query + }; } /** * Subscribe new block header notifications @@ -160,28 +249,36 @@ class EventListener { * @returns * @since v0.17 */ - subscribeNewBlockHeader(callback) { - // Build and send subscription - const eventType = types.EventTypes.NewBlockHeader; - const id = eventType + Math.random().toString(16); - const query = new types_1.EventQueryBuilder() - .addCondition(new types.Condition(types_1.EventKey.Type).eq(eventType)) - .build(); - if (this.wsClient.isReady()) { - this.wsClient.send(types.RpcMethods.Subscribe, id, query); - // Listen for new block headers, decode and callback - this.wsClient.eventEmitter.on(id + '#event', (error, data) => { - this.newBlockHeaderHandler(callback, error, data); - }); - } - this.eventDAO.setSubscription(id, { - id, - query, - eventType, - callback, + + }, { + key: "subscribeNewBlockHeader", + value: function subscribeNewBlockHeader(callback) { + var _this4 = this; + + // Build and send subscription + var eventType = types.EventTypes.NewBlockHeader; + var id = eventType + Math.random().toString(16); + var query = new types.EventQueryBuilder().addCondition(new types.Condition(types.EventKey.Type).eq(eventType)).build(); + + if (this.wsClient.isReady()) { + this.wsClient.send(types.RpcMethods.Subscribe, id, query); // Listen for new block headers, decode and callback + + this.wsClient.eventEmitter.on(id + '#event', function (error, data) { + _this4.newBlockHeaderHandler(callback, error, data); }); - // Return an types.EventSubscription instance, so client could use to unsubscribe this context - return { id, query }; + } + + this.eventDAO.setSubscription(id, { + id: id, + query: query, + eventType: eventType, + callback: callback + }); // Return an types.EventSubscription instance, so client could use to unsubscribe this context + + return { + id: id, + query: query + }; } /** * Subscribe validator set update notifications @@ -190,28 +287,36 @@ class EventListener { * @returns * @since v0.17 */ - subscribeValidatorSetUpdates(callback) { - // Build and send subscription - const eventType = types.EventTypes.ValidatorSetUpdates; - const id = eventType + Math.random().toString(16); - const query = new types_1.EventQueryBuilder() - .addCondition(new types.Condition(types_1.EventKey.Type).eq(eventType)) - .build(); - if (this.wsClient.isReady()) { - this.wsClient.send(types.RpcMethods.Subscribe, id, query); - // Listen for validator set updates, decode and callback - this.wsClient.eventEmitter.on(id + '#event', (error, data) => { - this.validatorSetUpdatesHandler(callback, error, data); - }); - } - this.eventDAO.setSubscription(id, { - id, - query, - eventType, - callback, + + }, { + key: "subscribeValidatorSetUpdates", + value: function subscribeValidatorSetUpdates(callback) { + var _this5 = this; + + // Build and send subscription + var eventType = types.EventTypes.ValidatorSetUpdates; + var id = eventType + Math.random().toString(16); + var query = new types.EventQueryBuilder().addCondition(new types.Condition(types.EventKey.Type).eq(eventType)).build(); + + if (this.wsClient.isReady()) { + this.wsClient.send(types.RpcMethods.Subscribe, id, query); // Listen for validator set updates, decode and callback + + this.wsClient.eventEmitter.on(id + '#event', function (error, data) { + _this5.validatorSetUpdatesHandler(callback, error, data); }); - // Return an types.EventSubscription instance, so client could use to unsubscribe this context - return { id, query }; + } + + this.eventDAO.setSubscription(id, { + id: id, + query: query, + eventType: eventType, + callback: callback + }); // Return an types.EventSubscription instance, so client could use to unsubscribe this context + + return { + id: id, + query: query + }; } /** * Subscribe successful Txs notifications @@ -220,188 +325,237 @@ class EventListener { * @returns * @since v0.17 */ - subscribeTx(conditions, callback) { - // Build and send subscription - const eventType = types.EventTypes.Tx; - const id = eventType + Math.random().toString(16); - const queryBuilder = conditions ? conditions : new types_1.EventQueryBuilder(); - const query = queryBuilder - .addCondition(new types.Condition(types_1.EventKey.Type).eq(eventType)) - .build(); - if (this.wsClient.isReady()) { - this.wsClient.send(types.RpcMethods.Subscribe, id, query); - // Listen for txs, decode and callback - this.wsClient.eventEmitter.on(id + '#event', (error, data) => { - this.txHandler(callback, error, data); - }); - } - this.eventDAO.setSubscription(id, { - id, - query, - eventType, - callback, + + }, { + key: "subscribeTx", + value: function subscribeTx(conditions, callback) { + var _this6 = this; + + // Build and send subscription + var eventType = types.EventTypes.Tx; + var id = eventType + Math.random().toString(16); + var queryBuilder = conditions ? conditions : new types.EventQueryBuilder(); + var query = queryBuilder.addCondition(new types.Condition(types.EventKey.Type).eq(eventType)).build(); + + if (this.wsClient.isReady()) { + this.wsClient.send(types.RpcMethods.Subscribe, id, query); // Listen for txs, decode and callback + + this.wsClient.eventEmitter.on(id + '#event', function (error, data) { + _this6.txHandler(callback, error, data); }); - // Return an types.EventSubscription instance, so client could use to unsubscribe this context - return { id, query }; + } + + this.eventDAO.setSubscription(id, { + id: id, + query: query, + eventType: eventType, + callback: callback + }); // Return an types.EventSubscription instance, so client could use to unsubscribe this context + + return { + id: id, + query: query + }; } /** * Unsubscribe the specified event * @param subscription The event subscription instance * @since v0.17 */ - unsubscribe(subscription) { - // Unsubscribe the specified event from server - this.wsClient.send(types.RpcMethods.Unsubscribe, 'unsubscribe#' + subscription.id, subscription.query); - this.wsClient.eventEmitter.on('unsubscribe#' + subscription.id, (error, data) => { - console.log(error); - console.log(data); - // Remove the subscription listeners - this.wsClient.eventEmitter.removeAllListeners(subscription.id + '#event'); - // Remove the current `unsubscribe` operation listener - this.wsClient.eventEmitter.removeAllListeners('unsubscribe#' + subscription.id); - }); + + }, { + key: "unsubscribe", + value: function unsubscribe(subscription) { + var _this7 = this; + + // Unsubscribe the specified event from server + this.wsClient.send(types.RpcMethods.Unsubscribe, 'unsubscribe#' + subscription.id, subscription.query); + this.wsClient.eventEmitter.on('unsubscribe#' + subscription.id, function (error, data) { + console.log(error); + console.log(data); // Remove the subscription listeners + + _this7.wsClient.eventEmitter.removeAllListeners(subscription.id + '#event'); // Remove the current `unsubscribe` operation listener + + + _this7.wsClient.eventEmitter.removeAllListeners('unsubscribe#' + subscription.id); + }); } - newBlockHandler(callback, error, data) { - if (error) { - callback(new errors_1.SdkError(error.message, error.code), undefined); - } - if (!data || !data.data || !data.data.value) { - return; - } - const blockData = data.data.value; - // Decode txs - if (blockData.block && blockData.block.data && blockData.block.data.txs) { - const txs = blockData.block.data.txs; - const decodedTxs = new Array(); - txs.forEach(msg => { - decodedTxs.push(amino_js_1.unmarshalTx(belt_1.base64ToBytes(msg))); - }); - blockData.block.data.txs = decodedTxs; - } - // Decode proposer address - if (blockData.block) { - blockData.block.header.bech32_proposer_address = utils_1.Crypto.encodeAddress(blockData.block.header.proposer_address, this.client.config.bech32Prefix.ConsAddr); - } - // Decode begin block tags - if (blockData.result_begin_block) { - blockData.result_begin_block.tags = utils_1.Utils.decodeTags(blockData.result_begin_block.tags); - } - if (blockData.result_end_block) { - // Decode end block tags - blockData.result_end_block.tags = utils_1.Utils.decodeTags(blockData.result_end_block.tags); - // Decode validator updates - if (blockData.result_end_block.validator_updates) { - const validators = []; - blockData.result_end_block.validator_updates.forEach((v) => { - let type = ''; - switch (v.pub_key.type) { - case 'secp256k1': { - type = 'tendermint/PubKeySecp256k1'; - break; - } - case 'ed25519': { - type = 'tendermint/PubKeyEd25519'; - break; - } - default: - throw new errors_1.SdkError(`Unsupported pubkey type: ${v.pub_key.type}`); - } - const valPubkey = { - type, - value: v.pub_key.data, - }; - const bech32Pubkey = utils_1.Crypto.encodeAddress(utils_1.Utils.ab2hexstring(amino_js_2.marshalPubKey(valPubkey, false)), this.client.config.bech32Prefix.ConsPub); - validators.push({ - bech32_pubkey: bech32Pubkey, - pub_key: valPubkey, - voting_power: v.power, - }); - }); - blockData.result_end_block.validator_updates = validators; + }, { + key: "newBlockHandler", + value: function newBlockHandler(callback, error, data) { + var _this8 = this; + + if (error) { + callback(new _errors.SdkError(error.message, error.code), undefined); + } + + if (!data || !data.data || !data.data.value) { + return; + } + + var blockData = data.data.value; // Decode txs + + if (blockData.block && blockData.block.data && blockData.block.data.txs) { + var txs = blockData.block.data.txs; + var decodedTxs = new Array(); + txs.forEach(function (msg) { + decodedTxs.push(_this8.client.protobuf.deserializeTx(msg)); + }); + blockData.block.data.txs = decodedTxs; + } // Decode proposer address + + + if (blockData.block) { + blockData.block.header.bech32_proposer_address = _utils.Crypto.encodeAddress(blockData.block.header.proposer_address, this.client.config.bech32Prefix.ConsAddr); + } // Decode begin block tags + + + if (blockData.result_begin_block) { + blockData.result_begin_block.tags = _utils.Utils.decodeTags(blockData.result_begin_block.tags); + } + + if (blockData.result_end_block) { + // Decode end block tags + blockData.result_end_block.tags = _utils.Utils.decodeTags(blockData.result_end_block.tags); // Decode validator updates + + if (blockData.result_end_block.validator_updates) { + var validators = []; + blockData.result_end_block.validator_updates.forEach(function (v) { + var type = types.PubkeyType.secp256k1; + + switch (v.pub_key.type) { + case 'secp256k1': + { + type = types.PubkeyType.secp256k1; + break; + } + + case 'ed25519': + { + type = types.PubkeyType.ed25519; + break; + } + + default: + throw new _errors.SdkError("Unsupported pubkey type: ".concat(v.pub_key.type), _errors.CODES.InvalidPubkey); } + + var valPubkey = { + type: type, + value: v.pub_key.data + }; + + var bech32Pubkey = _utils.Crypto.encodeAddress(_utils.Crypto.aminoMarshalPubKey(valPubkey, false), _this8.client.config.bech32Prefix.ConsPub); + + validators.push({ + bech32_pubkey: bech32Pubkey, + pub_key: valPubkey, + voting_power: v.power + }); + }); + blockData.result_end_block.validator_updates = validators; } - const eventBlock = blockData; - callback(undefined, eventBlock); + } + + var eventBlock = blockData; + callback(undefined, eventBlock); } - newBlockHeaderHandler(callback, error, data) { - if (error) { - callback(new errors_1.SdkError(error.message, error.code), undefined); - } - if (!data.data || !data.data.value) { - return; - } - const blockHeader = data.data.value; - // Decode proposer address - blockHeader.header.bech32_proposer_address = utils_1.Crypto.encodeAddress(blockHeader.header.proposer_address, this.client.config.bech32Prefix.ConsAddr); - // Decode begin block tags - if (blockHeader.result_begin_block) { - blockHeader.result_begin_block.tags = utils_1.Utils.decodeTags(blockHeader.result_begin_block.tags); - } - if (blockHeader.result_end_block) { - // Decode end block tags - blockHeader.result_end_block.tags = utils_1.Utils.decodeTags(blockHeader.result_end_block.tags); - // Decode validator updates - if (blockHeader.result_end_block.validator_updates) { - const validators = []; - blockHeader.result_end_block.validator_updates.forEach((v) => { - const type = v.pub_key.type === 'secp256k1' - ? 'tendermint/PubKeySecp256k1' - : 'tendermint/PubKeyEd25519'; - const valPubkey = { - type, - value: v.pub_key.data, - }; - const bech32Pubkey = utils_1.Crypto.encodeAddress(utils_1.Utils.ab2hexstring(amino_js_2.marshalPubKey(valPubkey, false)), this.client.config.bech32Prefix.ConsPub); - validators.push({ - bech32_pubkey: bech32Pubkey, - pub_key: valPubkey, - voting_power: v.power, - }); - }); - blockHeader.result_end_block.validator_updates = validators; - } + }, { + key: "newBlockHeaderHandler", + value: function newBlockHeaderHandler(callback, error, data) { + var _this9 = this; + + if (error) { + callback(new _errors.SdkError(error.message, error.code), undefined); + } + + if (!data.data || !data.data.value) { + return; + } + + var blockHeader = data.data.value; // Decode proposer address + + blockHeader.header.bech32_proposer_address = _utils.Crypto.encodeAddress(blockHeader.header.proposer_address, this.client.config.bech32Prefix.ConsAddr); // Decode begin block tags + + if (blockHeader.result_begin_block) { + blockHeader.result_begin_block.tags = _utils.Utils.decodeTags(blockHeader.result_begin_block.tags); + } + + if (blockHeader.result_end_block) { + // Decode end block tags + blockHeader.result_end_block.tags = _utils.Utils.decodeTags(blockHeader.result_end_block.tags); // Decode validator updates + + if (blockHeader.result_end_block.validator_updates) { + var validators = []; + blockHeader.result_end_block.validator_updates.forEach(function (v) { + var type = v.pub_key.type === 'secp256k1' ? types.PubkeyType.secp256k1 : types.PubkeyType.ed25519; + var valPubkey = { + type: type, + value: v.pub_key.data + }; + + var bech32Pubkey = _utils.Crypto.encodeAddress(_utils.Crypto.aminoMarshalPubKey(valPubkey, false), _this9.client.config.bech32Prefix.ConsPub); + + validators.push({ + bech32_pubkey: bech32Pubkey, + pub_key: valPubkey, + voting_power: v.power + }); + }); + blockHeader.result_end_block.validator_updates = validators; } - callback(undefined, blockHeader); + } + + callback(undefined, blockHeader); } - validatorSetUpdatesHandler(callback, error, data) { - if (error) { - callback(new errors_1.SdkError(error.message, error.code), undefined); - } - if (!data.data || !data.data.value || !data.data.value.validator_updates) { - return; - } - const eventValidatorUpdates = data.data.value - .validator_updates; - callback(undefined, eventValidatorUpdates); + }, { + key: "validatorSetUpdatesHandler", + value: function validatorSetUpdatesHandler(callback, error, data) { + if (error) { + callback(new _errors.SdkError(error.message, error.code), undefined); + } + + if (!data.data || !data.data.value || !data.data.value.validator_updates) { + return; + } + + var eventValidatorUpdates = data.data.value.validator_updates; + callback(undefined, eventValidatorUpdates); } - txHandler(callback, error, data) { - if (error) { - callback(new errors_1.SdkError(error.message, error.code), undefined); - } - if (!data || !data.data || !data.data.value || !data.data.value.TxResult) { - return; - } - const txResult = data.data.value.TxResult; - txResult.tx = amino_js_1.unmarshalTx(belt_1.base64ToBytes(txResult.tx)); - // Decode tags from base64 - if (txResult.result.tags) { - const tags = txResult.result.tags; - const decodedTags = new Array(); - tags.forEach(element => { - const key = utils_1.Utils.base64ToString(element.key); - const value = !element.value || is.empty(element.value) - ? '' - : utils_1.Utils.base64ToString(element.value); - decodedTags.push({ - key, - value, - }); - }); - txResult.result.tags = decodedTags; - } - txResult.hash = utils_1.Crypto.generateTxHash(txResult.tx); - callback(undefined, txResult); + }, { + key: "txHandler", + value: function txHandler(callback, error, data) { + if (error) { + callback(new _errors.SdkError(error.message, error.code), undefined); + } + + if (!data || !data.data || !data.data.value || !data.data.value.TxResult) { + return; + } + + var txResult = data.data.value.TxResult; + txResult.tx = this.client.protobuf.deserializeTx(txResult.tx); + + if (txResult.result.tags) { + var tags = txResult.result.tags; + var decodedTags = new Array(); + tags.forEach(function (element) { + var key = _utils.Utils.base64ToString(element.key); + + var value = !element.value || is.empty(element.value) ? '' : _utils.Utils.base64ToString(element.value); + decodedTags.push({ + key: key, + value: value + }); + }); + txResult.result.tags = decodedTags; + } + + txResult.hash = _utils.Crypto.generateTxHash(txResult.tx); + callback(undefined, txResult); } -} -exports.EventListener = EventListener; -//# sourceMappingURL=event-listener.js.map \ No newline at end of file + }]); + return EventListener; +}(); + +exports.EventListener = EventListener; \ No newline at end of file diff --git a/dist/src/nets/event-listener.js.map b/dist/src/nets/event-listener.js.map deleted file mode 100644 index 394fde8a..00000000 --- a/dist/src/nets/event-listener.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"event-listener.js","sourceRoot":"","sources":["../../../src/nets/event-listener.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gDAAgD;AAChD,2CAAiD;AACjD,sCAAqC;AACrC,kCAAkC;AAClC,oCAAyC;AACzC,4BAA4B;AAC5B,2CAAuC;AACvC,oCAAuD;AACvD,gDAAkD;AAWlD,gDAAgD;AAChD,MAAM,QAAQ;IAAd;QACU,kBAAa,GAAG,IAAI,GAAG,EAAwB,CAAC;IAa1D,CAAC;IAZC,eAAe,CAAC,EAAU,EAAE,YAA0B;QACpD,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;IAC3C,CAAC;IACD,kBAAkB,CAAC,EAAU;QAC3B,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAChC,CAAC;IACD,mBAAmB;QACjB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IACD,KAAK;QACH,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;IAC7B,CAAC;CACF;AAED;;;GAGG;AACH,MAAa,aAAa;IAQxB,cAAc;IACd,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,QAAQ,GAAG,IAAI,oBAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtD,IAAI,CAAC,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;QAE/B,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;YACzC,MAAM,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,mBAAmB,EAAE,CAAC;YAC1D,IAAI,aAAa,EAAE;gBACjB,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;oBAC1B,kCAAkC;oBAClC,OAAO,CAAC,GAAG,CAAC,aAAa,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;oBACvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;oBAClE,MAAM,KAAK,GAAG,GAAG,CAAC,EAAE,GAAG,QAAQ,CAAC;oBAChC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,gCAAgC;oBAEtF,QAAQ,GAAG,CAAC,SAAS,EAAE;wBACrB,KAAK,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;4BAC9B,6CAA6C;4BAC7C,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;gCACnD,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;4BAClD,CAAC,CAAC,CAAC;4BACH,OAAO;yBACR;wBACD,KAAK,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;4BACpC,oDAAoD;4BACpD,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;gCACnD,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;4BACxD,CAAC,CAAC,CAAC;4BACH,OAAO;yBACR;wBACD,KAAK,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;4BACzC,wDAAwD;4BACxD,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;gCACnD,IAAI,CAAC,0BAA0B,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;4BAC7D,CAAC,CAAC,CAAC;4BACH,OAAO;yBACR;wBACD,KAAK,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;4BACxB,sCAAsC;4BACtC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;gCACnD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;4BAC5C,CAAC,CAAC,CAAC;4BACH,OAAO;yBACR;wBACD,OAAO,CAAC,CAAC;4BACP,OAAO;yBACR;qBACF;gBACH,CAAC,CAAC,CAAC;aACJ;QACH,CAAC,CAAC,CAAC;QAEH,6EAA6E;QAC7E,yBAAyB;QACzB,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YAC1C,8CAA8C;YAC9C,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;YAC/B,UAAU,CAAC,GAAG,EAAE;gBACd,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,4BAA4B;QACxC,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE;YAC3C,OAAO;QACT,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACG,UAAU;;YACd,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC1C,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACxB,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;IAED;;;;;;OAMG;IACH,iBAAiB,CACf,QAAoE,EACpE,UAA8B;QAE9B,8BAA8B;QAC9B,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC;QAC5C,MAAM,EAAE,GAAG,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAClD,MAAM,YAAY,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,yBAAiB,EAAE,CAAC;QACvE,MAAM,KAAK,GAAG,YAAY;aACvB,YAAY,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,gBAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;aAC9D,KAAK,EAAE,CAAC;QAEX,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;YAC1D,6CAA6C;YAC7C,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;gBAC3D,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;YAC9C,CAAC,CAAC,CAAC;SACJ;QAED,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,EAAE;YAChC,EAAE;YACF,KAAK;YACL,SAAS;YACT,QAAQ;SACT,CAAC,CAAC;QACH,8FAA8F;QAC9F,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACH,uBAAuB,CACrB,QAA0E;QAE1E,8BAA8B;QAC9B,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC;QAClD,MAAM,EAAE,GAAG,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAClD,MAAM,KAAK,GAAG,IAAI,yBAAiB,EAAE;aAClC,YAAY,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,gBAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;aAC9D,KAAK,EAAE,CAAC;QAEX,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;YAC1D,oDAAoD;YACpD,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;gBAC3D,IAAI,CAAC,qBAAqB,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;YACpD,CAAC,CAAC,CAAC;SACJ;QAED,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,EAAE;YAChC,EAAE;YACF,KAAK;YACL,SAAS;YACT,QAAQ;SACT,CAAC,CAAC;QACH,8FAA8F;QAC9F,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACH,4BAA4B,CAC1B,QAGS;QAET,8BAA8B;QAC9B,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC;QACvD,MAAM,EAAE,GAAG,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAClD,MAAM,KAAK,GAAG,IAAI,yBAAiB,EAAE;aAClC,YAAY,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,gBAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;aAC9D,KAAK,EAAE,CAAC;QAEX,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;YAC1D,wDAAwD;YACxD,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;gBAC3D,IAAI,CAAC,0BAA0B,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;YACzD,CAAC,CAAC,CAAC;SACJ;QACD,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,EAAE;YAChC,EAAE;YACF,KAAK;YACL,SAAS;YACT,QAAQ;SACT,CAAC,CAAC;QACH,8FAA8F;QAC9F,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACH,WAAW,CACT,UAA6B,EAC7B,QAAoE;QAEpE,8BAA8B;QAC9B,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;QACtC,MAAM,EAAE,GAAG,SAAS,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAClD,MAAM,YAAY,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,yBAAiB,EAAE,CAAC;QACvE,MAAM,KAAK,GAAG,YAAY;aACvB,YAAY,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,gBAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;aAC9D,KAAK,EAAE,CAAC;QAEX,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;YAC1D,sCAAsC;YACtC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;gBAC3D,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;YACxC,CAAC,CAAC,CAAC;SACJ;QACD,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,EAAE;YAChC,EAAE;YACF,KAAK;YACL,SAAS;YACT,QAAQ;SACT,CAAC,CAAC;QACH,8FAA8F;QAC9F,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,WAAW,CAAC,YAAqC;QAC/C,8CAA8C;QAC9C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAChB,KAAK,CAAC,UAAU,CAAC,WAAW,EAC5B,cAAc,GAAG,YAAY,CAAC,EAAE,EAChC,YAAY,CAAC,KAAK,CACnB,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAC3B,cAAc,GAAG,YAAY,CAAC,EAAE,EAChC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;YACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACnB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAClB,oCAAoC;YACpC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,kBAAkB,CAC3C,YAAY,CAAC,EAAE,GAAG,QAAQ,CAC3B,CAAC;YACF,sDAAsD;YACtD,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,kBAAkB,CAC3C,cAAc,GAAG,YAAY,CAAC,EAAE,CACjC,CAAC;QACJ,CAAC,CACF,CAAC;IACJ,CAAC;IAEO,eAAe,CACrB,QAAoE,EACpE,KAAW,EACX,IAAU;QAEV,IAAI,KAAK,EAAE;YACT,QAAQ,CAAC,IAAI,iBAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC;SAC9D;QAED,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YAC3C,OAAO;SACR;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;QAElC,aAAa;QACb,IAAI,SAAS,CAAC,KAAK,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE;YACvE,MAAM,GAAG,GAAa,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;YAC/C,MAAM,UAAU,GAAG,IAAI,KAAK,EAAyB,CAAC;YACtD,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBAChB,UAAU,CAAC,IAAI,CACb,sBAAW,CAAC,oBAAa,CAAC,GAAG,CAAC,CAA0B,CACzD,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC;SACvC;QAED,0BAA0B;QAC1B,IAAI,SAAS,CAAC,KAAK,EAAE;YACnB,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,uBAAuB,GAAG,cAAM,CAAC,aAAa,CACnE,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB,EACvC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CACzC,CAAC;SACH;QAED,0BAA0B;QAC1B,IAAI,SAAS,CAAC,kBAAkB,EAAE;YAChC,SAAS,CAAC,kBAAkB,CAAC,IAAI,GAAG,aAAK,CAAC,UAAU,CAClD,SAAS,CAAC,kBAAkB,CAAC,IAAI,CAClC,CAAC;SACH;QAED,IAAI,SAAS,CAAC,gBAAgB,EAAE;YAC9B,wBAAwB;YACxB,SAAS,CAAC,gBAAgB,CAAC,IAAI,GAAG,aAAK,CAAC,UAAU,CAChD,SAAS,CAAC,gBAAgB,CAAC,IAAI,CAChC,CAAC;YAEF,2BAA2B;YAC3B,IAAI,SAAS,CAAC,gBAAgB,CAAC,iBAAiB,EAAE;gBAChD,MAAM,UAAU,GAAqC,EAAE,CAAC;gBACxD,SAAS,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAM,EAAE,EAAE;oBAC9D,IAAI,IAAI,GAAG,EAAE,CAAC;oBACd,QAAQ,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE;wBACtB,KAAK,WAAW,CAAC,CAAC;4BAChB,IAAI,GAAG,4BAA4B,CAAC;4BACpC,MAAM;yBACP;wBACD,KAAK,SAAS,CAAC,CAAC;4BACd,IAAI,GAAG,0BAA0B,CAAC;4BAClC,MAAM;yBACP;wBACD;4BACE,MAAM,IAAI,iBAAQ,CAAC,4BAA4B,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;qBACpE;oBACD,MAAM,SAAS,GAAiB;wBAC9B,IAAI;wBACJ,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI;qBACtB,CAAC;oBACF,MAAM,YAAY,GAAG,cAAM,CAAC,aAAa,CACvC,aAAK,CAAC,YAAY,CAAC,wBAAa,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,EACnD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CACxC,CAAC;oBACF,UAAU,CAAC,IAAI,CAAC;wBACd,aAAa,EAAE,YAAY;wBAC3B,OAAO,EAAE,SAAS;wBAClB,YAAY,EAAE,CAAC,CAAC,KAAK;qBACtB,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;gBACH,SAAS,CAAC,gBAAgB,CAAC,iBAAiB,GAAG,UAAU,CAAC;aAC3D;SACF;QAED,MAAM,UAAU,GAAG,SAAoC,CAAC;QACxD,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAClC,CAAC;IAEO,qBAAqB,CAC3B,QAA0E,EAC1E,KAAU,EACV,IAAS;QAET,IAAI,KAAK,EAAE;YACT,QAAQ,CAAC,IAAI,iBAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC;SAC9D;QAED,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YAClC,OAAO;SACR;QAED,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;QACpC,0BAA0B;QAC1B,WAAW,CAAC,MAAM,CAAC,uBAAuB,GAAG,cAAM,CAAC,aAAa,CAC/D,WAAW,CAAC,MAAM,CAAC,gBAAgB,EACnC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,CACzC,CAAC;QAEF,0BAA0B;QAC1B,IAAI,WAAW,CAAC,kBAAkB,EAAE;YAClC,WAAW,CAAC,kBAAkB,CAAC,IAAI,GAAG,aAAK,CAAC,UAAU,CACpD,WAAW,CAAC,kBAAkB,CAAC,IAAI,CACpC,CAAC;SACH;QAED,IAAI,WAAW,CAAC,gBAAgB,EAAE;YAChC,wBAAwB;YACxB,WAAW,CAAC,gBAAgB,CAAC,IAAI,GAAG,aAAK,CAAC,UAAU,CAClD,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAClC,CAAC;YAEF,2BAA2B;YAC3B,IAAI,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,EAAE;gBAClD,MAAM,UAAU,GAAqC,EAAE,CAAC;gBACxD,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAM,EAAE,EAAE;oBAChE,MAAM,IAAI,GACR,CAAC,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;wBAC5B,CAAC,CAAC,4BAA4B;wBAC9B,CAAC,CAAC,0BAA0B,CAAC;oBACjC,MAAM,SAAS,GAAiB;wBAC9B,IAAI;wBACJ,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI;qBACtB,CAAC;oBACF,MAAM,YAAY,GAAG,cAAM,CAAC,aAAa,CACvC,aAAK,CAAC,YAAY,CAAC,wBAAa,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,EACnD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CACxC,CAAC;oBACF,UAAU,CAAC,IAAI,CAAC;wBACd,aAAa,EAAE,YAAY;wBAC3B,OAAO,EAAE,SAAS;wBAClB,YAAY,EAAE,CAAC,CAAC,KAAK;qBACtB,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;gBACH,WAAW,CAAC,gBAAgB,CAAC,iBAAiB,GAAG,UAAU,CAAC;aAC7D;SACF;QAED,QAAQ,CAAC,SAAS,EAAE,WAA4C,CAAC,CAAC;IACpE,CAAC;IAEO,0BAA0B,CAChC,QAGS,EACT,KAAU,EACV,IAAS;QAET,IAAI,KAAK,EAAE;YACT,QAAQ,CAAC,IAAI,iBAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC;SAC9D;QAED,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE;YACxE,OAAO;SACR;QACD,MAAM,qBAAqB,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK;aAC1C,iBAAyD,CAAC;QAC7D,QAAQ,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC;IAC7C,CAAC;IAEO,SAAS,CACf,QAAoE,EACpE,KAAU,EACV,IAAS;QAET,IAAI,KAAK,EAAE;YACT,QAAQ,CAAC,IAAI,iBAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC;SAC9D;QAED,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;YACxE,OAAO;SACR;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;QAC1C,QAAQ,CAAC,EAAE,GAAG,sBAAW,CAAC,oBAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QAEtD,0BAA0B;QAC1B,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE;YACxB,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAmB,CAAC;YACjD,MAAM,WAAW,GAAG,IAAI,KAAK,EAAa,CAAC;YAC3C,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;gBACrB,MAAM,GAAG,GAAG,aAAK,CAAC,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;gBAC9C,MAAM,KAAK,GACT,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;oBACvC,CAAC,CAAC,EAAE;oBACJ,CAAC,CAAC,aAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;gBAC1C,WAAW,CAAC,IAAI,CAAC;oBACf,GAAG;oBACH,KAAK;iBACN,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YACH,QAAQ,CAAC,MAAM,CAAC,IAAI,GAAG,WAAW,CAAC;SACpC;QAED,QAAQ,CAAC,IAAI,GAAG,cAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAEnD,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAChC,CAAC;CACF;AA3dD,sCA2dC"} \ No newline at end of file diff --git a/dist/src/nets/rpc-client.d.ts b/dist/src/nets/rpc-client.d.ts index ce33ed4b..cddc835a 100644 --- a/dist/src/nets/rpc-client.d.ts +++ b/dist/src/nets/rpc-client.d.ts @@ -1,11 +1,13 @@ -import { AxiosInstance, AxiosRequestConfig } from 'axios'; +import { AxiosRequestConfig } from 'axios'; /** * Tendermint JSON RPC Client * @since v0.17 */ export declare class RpcClient { /** @hidden */ - instance: AxiosInstance; + private instance; + /** @hidden */ + private config; /** * Initialize Tendermint JSON RPC Client * @param url Rpc address of irishub node @@ -23,6 +25,16 @@ export declare class RpcClient { * @since v0.17 */ request(method: string, params?: object): Promise; + /** + * Tendermint ABCI protobuf Query + * + * @param path Querier path + * @param protoRequest protobuf Request + * @param protoResponse protobuf Response so if "protoResponse" exists, well deserialize "ABCI Response" with "protoResponse" and return json object, else return base64 string + * @returns + * @since v0.17 + */ + protoQuery(path: string, protoRequest?: any, protoResponse?: any): Promise; /** * Tendermint ABCI Query * diff --git a/dist/src/nets/rpc-client.js b/dist/src/nets/rpc-client.js index 217cf696..b75cb446 100644 --- a/dist/src/nets/rpc-client.js +++ b/dist/src/nets/rpc-client.js @@ -1,63 +1,142 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const axios_1 = require("axios"); -const utils_1 = require("../utils"); -const errors_1 = require("../errors"); -const is = require("is_js"); -const types = require("../types"); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.RpcClient = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _axios = _interopRequireDefault(require("axios")); + +var _utils = require("../utils"); + +var _errors = require("../errors"); + +var is = _interopRequireWildcard(require("is_js")); + +var types = _interopRequireWildcard(require("../types")); + /** * Tendermint JSON RPC Client * @since v0.17 */ -class RpcClient { - /** - * Initialize Tendermint JSON RPC Client - * @param url Rpc address of irishub node - * @param config The other configurations, refer to { [[AxiosRequestConfig]] } - * @returns - * @since v0.17 - */ - constructor(config) { - if (is.empty(config)) { - throw new errors_1.SdkError('RpcClient Config not initialized'); - } - if (is.empty(config.baseURL)) { - throw new errors_1.SdkError('baseURL of RpcClient cannot be empty'); - } - if (is.empty(config.timeout)) { - config.timeout = 2000; // Set default timeout +var RpcClient = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + + /** + * Initialize Tendermint JSON RPC Client + * @param url Rpc address of irishub node + * @param config The other configurations, refer to { [[AxiosRequestConfig]] } + * @returns + * @since v0.17 + */ + function RpcClient(config) { + (0, _classCallCheck2["default"])(this, RpcClient); + (0, _defineProperty2["default"])(this, "instance", void 0); + (0, _defineProperty2["default"])(this, "config", void 0); + + if (is.empty(config)) { + throw new _errors.SdkError('RpcClient Config not initialized'); + } + + if (is.empty(config.baseURL)) { + throw new _errors.SdkError('baseURL of RpcClient cannot be empty'); + } + + if (is.empty(config.timeout)) { + config.timeout = 2000; // Set default timeout + } + + config.url = '/'; // Fixed url + + this.config = config; + this.instance = _axios["default"].create(config); + } + /** + * Post Tendermint JSON RPC Request + * + * @param method Tendermint RPC method + * @param params Request params + * @returns + * @since v0.17 + */ + + + (0, _createClass2["default"])(RpcClient, [{ + key: "request", + value: function request(method) { + var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var data = { + jsonrpc: '2.0', + id: 'jsonrpc-client', + method: method, + params: params + }; + return this.instance.post(this.config.baseURL, data).then(function (response) { + var res = response.data; // Internal error + + if (res.error) { + console.error(res.error); + throw new _errors.SdkError(res.error.message, res.error.code); } - config.url = '/'; // Fixed url - this.instance = axios_1.default.create(config); + + return res.result; + }); } /** - * Post Tendermint JSON RPC Request + * Tendermint ABCI protobuf Query * - * @param method Tendermint RPC method - * @param params Request params + * @param path Querier path + * @param protoRequest protobuf Request + * @param protoResponse protobuf Response so if "protoResponse" exists, well deserialize "ABCI Response" with "protoResponse" and return json object, else return base64 string * @returns * @since v0.17 */ - request(method, params = {}) { - const data = { - jsonrpc: '2.0', - id: 'jsonrpc-client', - method, - params, - }; - return this.instance - .request({ - data, - }) - .then(response => { - const res = response.data; - // Internal error - if (res.error) { - console.log(res.error); - throw new errors_1.SdkError(res.error.message, res.error.code); + + }, { + key: "protoQuery", + value: function protoQuery(path, protoRequest, protoResponse) { + var params = { + path: path + }; + + if (protoRequest && protoRequest.serializeBinary) { + params.data = Buffer.from(protoRequest.serializeBinary()).toString('hex'); + } + + return this.request(types.RpcMethods.AbciQuery, params).then(function (response) { + if (response && response.response) { + if (response.response.value) { + if (protoResponse) { + try { + return protoResponse.deserializeBinary(response.response.value).toObject(); + } catch (err) { + console.error("protobuf deserialize error from ".concat(path)); + return response.response.value; + } + } else { + return response.response.value; } - return res.result; - }); + } else if (response.response.code) { + throw new _errors.SdkError(response.response.log, response.response.code); + } else { + return null; + } + } + + throw new _errors.SdkError("Internal Error from ".concat(path, ":").concat(response.response.log)); + }); } /** * Tendermint ABCI Query @@ -68,34 +147,45 @@ class RpcClient { * @returns * @since v0.17 */ - abciQuery(path, data, height) { - const params = { - path, - }; - if (data) { - params.data = utils_1.Utils.obj2hexstring(data); - } - if (height) { - params.height = height; + + }, { + key: "abciQuery", + value: function abciQuery(path, data, height) { + var params = { + path: path + }; + + if (data) { + params.data = _utils.Utils.obj2hexstring(data); + } + + if (height) { + params.height = String(height); + } + + return this.request(types.RpcMethods.AbciQuery, params).then(function (response) { + if (response && response.response) { + if (response.response.value) { + var value = Buffer.from(response.response.value, 'base64').toString(); + + try { + return JSON.parse(value).value; + } catch (err) { + return value; + } // const res = JSON.parse(value); + // if (!res) return {}; + // if (res.type && res.value) return res.value; + // return res; + + } else if (response.response.code) { + throw new _errors.SdkError(response.response.log, response.response.code); + } else { + return null; + } } - return this.request(types.RpcMethods.AbciQuery, params).then(response => { - if (response.response) { - if (response.response.value) { - const value = Buffer.from(response.response.value, 'base64').toString(); - const res = JSON.parse(value); - if (!res) - return {}; - if (res.type && res.value) - return res.value; - return res; - } - else if (response.response.code) { - throw new errors_1.SdkError('Bad Request', response.response.code); - } - } - console.log(response); - throw new errors_1.SdkError('Bad Request'); - }); + + throw new _errors.SdkError("Internal Error from ".concat(path, ":").concat(response.response.log)); + }); } /** * @@ -105,15 +195,20 @@ class RpcClient { * @returns * @since v0.17 */ - queryStore(key, storeName, height) { - const path = `/store/${storeName}/key`; - const params = { - path, - data: utils_1.Utils.ab2hexstring(key), - height: height ? String(height) : '0', - }; - return this.request(types.RpcMethods.AbciQuery, params); + + }, { + key: "queryStore", + value: function queryStore(key, storeName, height) { + var path = "/store/".concat(storeName, "/key"); + var params = { + path: path, + data: _utils.Utils.ab2hexstring(key), + height: height ? String(height) : '0' + }; + return this.request(types.RpcMethods.AbciQuery, params); } -} -exports.RpcClient = RpcClient; -//# sourceMappingURL=rpc-client.js.map \ No newline at end of file + }]); + return RpcClient; +}(); + +exports.RpcClient = RpcClient; \ No newline at end of file diff --git a/dist/src/nets/rpc-client.js.map b/dist/src/nets/rpc-client.js.map deleted file mode 100644 index 56106ff0..00000000 --- a/dist/src/nets/rpc-client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rpc-client.js","sourceRoot":"","sources":["../../../src/nets/rpc-client.ts"],"names":[],"mappings":";;AAAA,iCAAiE;AACjE,oCAAiC;AACjC,sCAAqC;AACrC,4BAA4B;AAC5B,kCAAkC;AAElC;;;GAGG;AACH,MAAa,SAAS;IAIpB;;;;;;OAMG;IACH,YAAY,MAA0B;QACpC,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;YACpB,MAAM,IAAI,iBAAQ,CAAC,kCAAkC,CAAC,CAAC;SACxD;QACD,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;YAC5B,MAAM,IAAI,iBAAQ,CAAC,sCAAsC,CAAC,CAAC;SAC5D;QACD,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;YAC5B,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,sBAAsB;SAC9C;QAED,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,YAAY;QAE9B,IAAI,CAAC,QAAQ,GAAG,eAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CAAI,MAAc,EAAE,SAAiB,EAAE;QAC5C,MAAM,IAAI,GAAG;YACX,OAAO,EAAE,KAAK;YACd,EAAE,EAAE,gBAAgB;YACpB,MAAM;YACN,MAAM;SACP,CAAC;QACF,OAAO,IAAI,CAAC,QAAQ;aACjB,OAAO,CAA2B;YACjC,IAAI;SACL,CAAC;aACD,IAAI,CAAC,QAAQ,CAAC,EAAE;YACf,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC;YAE1B,iBAAiB;YACjB,IAAI,GAAG,CAAC,KAAK,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBACvB,MAAM,IAAI,iBAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;aACvD;YAED,OAAO,GAAG,CAAC,MAAM,CAAC;QACpB,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;;;;;;;OAQG;IACH,SAAS,CAAI,IAAY,EAAE,IAAa,EAAE,MAAe;QACvD,MAAM,MAAM,GAA2B;YACrC,IAAI;SACL,CAAC;QACF,IAAI,IAAI,EAAE;YACR,MAAM,CAAC,IAAI,GAAG,aAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;SACzC;QACD,IAAI,MAAM,EAAE;YACV,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;SACxB;QAED,OAAO,IAAI,CAAC,OAAO,CACjB,KAAK,CAAC,UAAU,CAAC,SAAS,EAC1B,MAAM,CACP,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YAChB,IAAI,QAAQ,CAAC,QAAQ,EAAE;gBACrB,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE;oBAC3B,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CACvB,QAAQ,CAAC,QAAQ,CAAC,KAAK,EACvB,QAAQ,CACT,CAAC,QAAQ,EAAE,CAAC;oBACb,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;oBAE9B,IAAI,CAAC,GAAG;wBAAE,OAAO,EAAE,CAAC;oBACpB,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,KAAK;wBAAE,OAAO,GAAG,CAAC,KAAK,CAAC;oBAC5C,OAAO,GAAG,CAAC;iBACZ;qBAAM,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE;oBACjC,MAAM,IAAI,iBAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;iBAC3D;aACF;YACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACtB,MAAM,IAAI,iBAAQ,CAAC,aAAa,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,UAAU,CACR,GAAe,EACf,SAAiB,EACjB,MAAe;QAEf,MAAM,IAAI,GAAG,UAAU,SAAS,MAAM,CAAC;QACvC,MAAM,MAAM,GAAG;YACb,IAAI;YACJ,IAAI,EAAE,aAAK,CAAC,YAAY,CAAC,GAAG,CAAC;YAC7B,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG;SACtC,CAAC;QACF,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC;CACF;AA5HD,8BA4HC"} \ No newline at end of file diff --git a/dist/src/nets/ws-client.d.ts b/dist/src/nets/ws-client.d.ts index 33df0f61..52544aad 100644 --- a/dist/src/nets/ws-client.d.ts +++ b/dist/src/nets/ws-client.d.ts @@ -1,5 +1,5 @@ /// -import * as EventEmitter from 'events'; +import EventEmitter from 'events'; /** * IRISHub Websocket Client * @since v0.17 diff --git a/dist/src/nets/ws-client.js b/dist/src/nets/ws-client.js index c5f4d389..3db78531 100644 --- a/dist/src/nets/ws-client.js +++ b/dist/src/nets/ws-client.js @@ -1,90 +1,161 @@ "use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const types = require("../types"); -const EventEmitter = require("events"); -const Websocket = require("isomorphic-ws"); -const errors_1 = require("../errors"); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.WsClient = void 0; + +var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); + +var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var types = _interopRequireWildcard(require("../types")); + +var _events = _interopRequireDefault(require("events")); + +var _isomorphicWs = _interopRequireDefault(require("isomorphic-ws")); + +var _errors = require("../errors"); + /** * IRISHub Websocket Client * @since v0.17 */ -class WsClient { - constructor(url) { - this.url = url; - this.eventEmitter = new EventEmitter(); - } - /** - * Initialize ws client - * @since v0.17 - */ - connect() { - this.ws = new Websocket(this.url + '/websocket'); - if (!this.ws) { - throw new errors_1.SdkError('Websocket client not initialized'); // Should not happen - } - this.ws.onopen = () => { - console.log('Websocket connected'); - this.eventEmitter.emit('open'); - }; - this.ws.onclose = () => { - console.log('Websocket disconnected'); - this.eventEmitter.emit('close'); - }; - this.ws.onmessage = (resp) => { - const data = JSON.parse(resp.data.toString()); - if (!data.id) { - this.eventEmitter.emit('error', 'Unexpected response: ' + JSON.stringify(data)); - } - // Route the data to the specified subscriber based on the request ID - this.eventEmitter.emit(data.id, data.error, data.result); - }; - this.ws.onerror = (err) => { - console.log('Websocket error'); - this.eventEmitter.emit('error', err); - }; +var WsClient = /*#__PURE__*/function () { + /** @hidden */ + + /** @hidden */ + + /** Event emitter */ + function WsClient(url) { + (0, _classCallCheck2["default"])(this, WsClient); + (0, _defineProperty2["default"])(this, "url", void 0); + (0, _defineProperty2["default"])(this, "ws", void 0); + (0, _defineProperty2["default"])(this, "eventEmitter", void 0); + this.url = url; + this.eventEmitter = new _events["default"](); + } + /** + * Initialize ws client + * @since v0.17 + */ + + + (0, _createClass2["default"])(WsClient, [{ + key: "connect", + value: function connect() { + var _this = this; + + this.ws = new _isomorphicWs["default"](this.url + '/websocket'); + + if (!this.ws) { + throw new _errors.SdkError('Websocket client not initialized', _errors.CODES.Internal); // Should not happen + } + + this.ws.onopen = function () { + console.log('Websocket connected'); + + _this.eventEmitter.emit('open'); + }; + + this.ws.onclose = function () { + console.log('Websocket disconnected'); + + _this.eventEmitter.emit('close'); + }; + + this.ws.onmessage = function (resp) { + var data = JSON.parse(resp.data.toString()); + + if (!data.id) { + _this.eventEmitter.emit('error', 'Unexpected response: ' + JSON.stringify(data)); + } // Route the data to the specified subscriber based on the request ID + + + _this.eventEmitter.emit(data.id, data.error, data.result); + }; + + this.ws.onerror = function (err) { + console.log('Websocket error'); + + _this.eventEmitter.emit('error', err); + }; } /** * Disconnect from server * @since v0.17 */ - disconnect() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise(reslove => { - // Unsubscribe all from server - const id = 'unsubscribe_all'; - this.send(types.RpcMethods.UnsubscribeAll, id); - this.eventEmitter.on(id, error => { + + }, { + key: "disconnect", + value: function () { + var _disconnect = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() { + var _this2 = this; + + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", new Promise(function (reslove) { + // Unsubscribe all from server + var id = 'unsubscribe_all'; + + _this2.send(types.RpcMethods.UnsubscribeAll, id); + + _this2.eventEmitter.on(id, function (error) { if (error) { - throw new errors_1.SdkError(error.message); - } - if (!this.ws) { - throw new errors_1.SdkError('Websocket client not initialized'); // Should not happen + throw new _errors.SdkError(error.message, _errors.CODES.Internal); } - // Remove all listeners - this.eventEmitter.removeAllListeners(); - // Destroy ws instance - this.ws.terminate(); + + if (!_this2.ws) { + throw new _errors.SdkError('Websocket client not initialized', _errors.CODES.Internal); // Should not happen + } // Remove all listeners + + + _this2.eventEmitter.removeAllListeners(); // Destroy ws instance + + + _this2.ws.terminate(); + reslove(); - }); - }); - }); - } + }); + })); + + case 1: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + function disconnect() { + return _disconnect.apply(this, arguments); + } + + return disconnect; + }() /** * Check if the ws client is connected or not * @since v0.17 */ - isReady() { - var _a; - return ((_a = this.ws) === null || _a === void 0 ? void 0 : _a.readyState) === 1; + + }, { + key: "isReady", + value: function isReady() { + var _this$ws; + + return ((_this$ws = this.ws) === null || _this$ws === void 0 ? void 0 : _this$ws.readyState) === 1; } /** * Send subscription to tendermint @@ -93,19 +164,25 @@ class WsClient { * @param query The tendermint query string * @since v0.17 */ - send(method, id, query) { - if (!this.ws) { - throw new errors_1.SdkError('Websocket client not initialized'); // Should not happen + + }, { + key: "send", + value: function send(method, id, query) { + if (!this.ws) { + throw new _errors.SdkError('Websocket client not initialized', _errors.CODES.Internal); // Should not happen + } + + this.ws.send(JSON.stringify({ + jsonrpc: '2.0', + method: method, + id: id, + params: { + query: query } - this.ws.send(JSON.stringify({ - jsonrpc: '2.0', - method, - id, - params: { - query, - }, - })); + })); } -} -exports.WsClient = WsClient; -//# sourceMappingURL=ws-client.js.map \ No newline at end of file + }]); + return WsClient; +}(); + +exports.WsClient = WsClient; \ No newline at end of file diff --git a/dist/src/nets/ws-client.js.map b/dist/src/nets/ws-client.js.map deleted file mode 100644 index 94af814d..00000000 --- a/dist/src/nets/ws-client.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ws-client.js","sourceRoot":"","sources":["../../../src/nets/ws-client.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,kCAAkC;AAClC,uCAAuC;AACvC,2CAA2C;AAC3C,sCAAqC;AAErC;;;GAGG;AACH,MAAa,QAAQ;IAQnB,YAAY,GAAW;QACrB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;IACzC,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,IAAI,CAAC,EAAE,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,GAAG,GAAG,YAAY,CAAC,CAAC;QACjD,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACZ,MAAM,IAAI,iBAAQ,CAAC,kCAAkC,CAAC,CAAC,CAAC,oBAAoB;SAC7E;QAED,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,GAAG,EAAE;YACpB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;YACnC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACjC,CAAC,CAAC;QAEF,IAAI,CAAC,EAAE,CAAC,OAAO,GAAG,GAAG,EAAE;YACrB,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;YACtC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClC,CAAC,CAAC;QAEF,IAAI,CAAC,EAAE,CAAC,SAAS,GAAG,CAAC,IAA4B,EAAE,EAAE;YACnD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC9C,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;gBACZ,IAAI,CAAC,YAAY,CAAC,IAAI,CACpB,OAAO,EACP,uBAAuB,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAC/C,CAAC;aACH;YACD,qEAAqE;YACrE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC3D,CAAC,CAAC;QAEF,IAAI,CAAC,EAAE,CAAC,OAAO,GAAG,CAAC,GAAyB,EAAE,EAAE;YAC9C,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;YAC/B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACvC,CAAC,CAAC;IACJ,CAAC;IAED;;;OAGG;IACG,UAAU;;YACd,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;gBAC3B,8BAA8B;gBAC9B,MAAM,EAAE,GAAG,iBAAiB,CAAC;gBAC7B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;gBAC/C,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE;oBAC/B,IAAI,KAAK,EAAE;wBACT,MAAM,IAAI,iBAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;qBACnC;oBAED,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;wBACZ,MAAM,IAAI,iBAAQ,CAAC,kCAAkC,CAAC,CAAC,CAAC,oBAAoB;qBAC7E;oBAED,uBAAuB;oBACvB,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,CAAC;oBACvC,sBAAsB;oBACtB,IAAI,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC;oBAEpB,OAAO,EAAE,CAAC;gBACZ,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;IAED;;;OAGG;IACH,OAAO;;QACL,OAAO,OAAA,IAAI,CAAC,EAAE,0CAAE,UAAU,MAAK,CAAC,CAAC;IACnC,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CAAC,MAAc,EAAE,EAAU,EAAE,KAAc;QAC7C,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;YACZ,MAAM,IAAI,iBAAQ,CAAC,kCAAkC,CAAC,CAAC,CAAC,oBAAoB;SAC7E;QACD,IAAI,CAAC,EAAE,CAAC,IAAI,CACV,IAAI,CAAC,SAAS,CAAC;YACb,OAAO,EAAE,KAAK;YACd,MAAM;YACN,EAAE;YACF,MAAM,EAAE;gBACN,KAAK;aACN;SACF,CAAC,CACH,CAAC;IACJ,CAAC;CACF;AA7GD,4BA6GC"} \ No newline at end of file diff --git a/dist/src/types/abci-query.d.ts b/dist/src/types/abci-query.d.ts index 710f1f01..23d3601c 100644 --- a/dist/src/types/abci-query.d.ts +++ b/dist/src/types/abci-query.d.ts @@ -8,7 +8,7 @@ export interface AbciQueryRequest { /** Input params */ data?: string; /** Use a specific height to query state at (this can error if the node is pruning state) */ - height?: number; + height?: string; /** TODO */ prove?: boolean; } diff --git a/dist/src/types/abci-query.js b/dist/src/types/abci-query.js index bf72c673..9a390c31 100644 --- a/dist/src/types/abci-query.js +++ b/dist/src/types/abci-query.js @@ -1,3 +1 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=abci-query.js.map \ No newline at end of file +"use strict"; \ No newline at end of file diff --git a/dist/src/types/abci-query.js.map b/dist/src/types/abci-query.js.map deleted file mode 100644 index 3f6ffaa8..00000000 --- a/dist/src/types/abci-query.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"abci-query.js","sourceRoot":"","sources":["../../../src/types/abci-query.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/src/types/asset.d.ts b/dist/src/types/asset.d.ts deleted file mode 100644 index 3d3b7cbb..00000000 --- a/dist/src/types/asset.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Coin } from './types'; -export interface Token { - symbol: string; - name: string; - scale: number; - min_unit: string; - initial_supply: string; - max_supply: string; - mintable: boolean; - owner: string; -} -export interface TokenFees { - exist: boolean; - issue_fee: Coin; - mint_fee: Coin; -} diff --git a/dist/src/types/asset.js b/dist/src/types/asset.js deleted file mode 100644 index 1836ea09..00000000 --- a/dist/src/types/asset.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=asset.js.map \ No newline at end of file diff --git a/dist/src/types/asset.js.map b/dist/src/types/asset.js.map deleted file mode 100644 index 09836a3d..00000000 --- a/dist/src/types/asset.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"asset.js","sourceRoot":"","sources":["../../../src/types/asset.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/src/types/auth.d.ts b/dist/src/types/auth.d.ts index 58759172..a2f023f9 100644 --- a/dist/src/types/auth.d.ts +++ b/dist/src/types/auth.d.ts @@ -1,5 +1,4 @@ -import { PubKey } from '@irisnet/amino-js/types'; -import { Coin, Msg, TxValue } from './types'; +import { Coin, Msg, TxValue, PubkeyType } from './types'; /** Standard Tx */ export interface StdTx extends TxValue { msg: Msg[]; @@ -10,14 +9,12 @@ export interface StdTx extends TxValue { /** Standard Fee */ export interface StdFee { amount: Coin[]; - gas: string; + gasLimit: string; } /** Standard Signature */ export interface StdSignature { - pub_key?: PubKey; + pub_key?: string; signature?: string; - account_number: string; - sequence: string; } /** Base params for the transaction */ export interface BaseTx { @@ -28,6 +25,11 @@ export interface BaseTx { gas?: string | undefined; fee?: Coin | undefined; memo?: string | undefined; + /** Account_number required for offline signatures */ + account_number?: string | undefined; + /** Sequence required for offline signatures */ + sequence?: string | undefined; + pubkeyType?: PubkeyType; /** default secp256k1 */ mode?: BroadcastMode | undefined; } /** @@ -44,9 +46,17 @@ export declare enum BroadcastMode { /** Standard Msg to sign */ export interface StdSignMsg { account_number: string; + sequence: string; chain_id: string; fee: StdFee; memo: string; msgs: object[]; - sequence: string; +} +export interface BaseAccount { + address: string; + pubKey: { + key: string; + }; + accountNumber: number; + sequence: number; } diff --git a/dist/src/types/auth.js b/dist/src/types/auth.js index 98ad3de9..39df8587 100644 --- a/dist/src/types/auth.js +++ b/dist/src/types/auth.js @@ -1,5 +1,18 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.BroadcastMode = void 0; + +/** Standard Tx */ + +/** Standard Fee */ + +/** Standard Signature */ + +/** Base params for the transaction */ + /** * Broadcast Mode * - Sync: Broadcast transactions synchronously and wait for the recipient node to validate the txs @@ -7,9 +20,12 @@ Object.defineProperty(exports, "__esModule", { value: true }); * - Commit: Broadcast transactions and wait until the transactions are included by a block */ var BroadcastMode; +/** Standard Msg to sign */ + +exports.BroadcastMode = BroadcastMode; + (function (BroadcastMode) { - BroadcastMode[BroadcastMode["Sync"] = 0] = "Sync"; - BroadcastMode[BroadcastMode["Async"] = 1] = "Async"; - BroadcastMode[BroadcastMode["Commit"] = 2] = "Commit"; -})(BroadcastMode = exports.BroadcastMode || (exports.BroadcastMode = {})); -//# sourceMappingURL=auth.js.map \ No newline at end of file + BroadcastMode[BroadcastMode["Sync"] = 0] = "Sync"; + BroadcastMode[BroadcastMode["Async"] = 1] = "Async"; + BroadcastMode[BroadcastMode["Commit"] = 2] = "Commit"; +})(BroadcastMode || (exports.BroadcastMode = BroadcastMode = {})); \ No newline at end of file diff --git a/dist/src/types/auth.js.map b/dist/src/types/auth.js.map deleted file mode 100644 index 1c96f3e6..00000000 --- a/dist/src/types/auth.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/types/auth.ts"],"names":[],"mappings":";;AAqCA;;;;;GAKG;AACH,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,iDAAQ,CAAA;IACR,mDAAK,CAAA;IACL,qDAAM,CAAA;AACR,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB"} \ No newline at end of file diff --git a/dist/src/types/bank.d.ts b/dist/src/types/bank.d.ts index 7dd1784d..4fba8cf2 100644 --- a/dist/src/types/bank.d.ts +++ b/dist/src/types/bank.d.ts @@ -4,42 +4,38 @@ import { Coin, Msg, Pubkey } from './types'; * * @hidden */ -export declare class MsgSend implements Msg { - type: string; +export declare class MsgSend extends Msg { value: { - inputs: Input[]; - outputs: Output[]; + from_address: string; + to_address: string; + amount: Coin[]; }; - constructor(inputs: Input[], outputs: Output[]); - getSignBytes(): object; + constructor(msg: { + from_address: string; + to_address: string; + amount: Coin[]; + }); + static getModelClass(): any; + getModel(): any; + validate(): void; } /** - * Msg for burning coins - * - * @hidden - */ -export declare class MsgBurn implements Msg { - type: string; - value: { - owner: string; - coins: Coin[]; - }; - constructor(owner: string, coins: Coin[]); - getSignBytes(): object; -} -/** - * Msg for setting memo regexp for an address + * Msg for sending coins * * @hidden */ -export declare class MsgSetMemoRegexp implements Msg { - type: string; +export declare class MsgMultiSend extends Msg { value: { - owner: string; - memo_regexp: string; + inputs: Input[]; + outputs: Output[]; }; - constructor(owner: string, memoRegexp: string); - getSignBytes(): object; + constructor(msg: { + inputs: Input[]; + outputs: Output[]; + }); + static getModelClass(): any; + getModel(): any; + validate(): void; } /** Base input and output struct */ export interface InputOutput { @@ -53,17 +49,6 @@ export interface Input extends InputOutput { /** Output implemention of [[InputOutput]] */ export interface Output extends InputOutput { } -/** Token statistics */ -export interface TokenStats { - /** Non bonded tokens */ - loose_tokens: Coin[]; - /** Bonded tokens */ - bonded_tokens: Coin[]; - /** Burned tokens */ - burned_tokens: Coin[]; - /** Total supply */ - total_supply: Coin[]; -} export interface EventDataMsgSend { height: string; hash: string; @@ -71,7 +56,7 @@ export interface EventDataMsgSend { to: string; amount: Coin[]; } -export interface BaseAccount { +export interface Account { /** Bech32 account address */ address: string; coins: Coin[]; diff --git a/dist/src/types/bank.js b/dist/src/types/bank.js index 17507c58..9201cfa5 100644 --- a/dist/src/types/bank.js +++ b/dist/src/types/bank.js @@ -1,57 +1,160 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.MsgMultiSend = exports.MsgSend = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); + +var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); + +var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); + +var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _types = require("./types"); + +var _helper = require("../helper"); + +var pbs = _interopRequireWildcard(require("./proto")); + +var _errors = require("../errors"); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + /** * Msg for sending coins * * @hidden */ -class MsgSend { - constructor(inputs, outputs) { - this.type = 'irishub/bank/Send'; - this.value = { - inputs, - outputs, - }; +var MsgSend = /*#__PURE__*/function (_Msg) { + (0, _inherits2["default"])(MsgSend, _Msg); + + var _super = _createSuper(MsgSend); + + function MsgSend(msg) { + var _this; + + (0, _classCallCheck2["default"])(this, MsgSend); + _this = _super.call(this, _types.TxType.MsgSend); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "value", void 0); + _this.value = msg; + return _this; + } + + (0, _createClass2["default"])(MsgSend, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())(); + msg.setFromAddress(this.value.from_address); + msg.setToAddress(this.value.to_address); + this.value.amount.forEach(function (item) { + msg.addAmount(_helper.TxModelCreator.createCoinModel(item.denom, item.amount)); + }); + return msg; } - getSignBytes() { - return this.value; + }, { + key: "validate", + value: function validate() { + if (!this.value.from_address) { + throw new _errors.SdkError("from_address is empty"); + } + + if (!this.value.to_address) { + throw new _errors.SdkError("to_address is empty"); + } + + if (!(this.value.amount && this.value.amount.length)) { + throw new _errors.SdkError("amount is empty"); + } } -} -exports.MsgSend = MsgSend; -/** - * Msg for burning coins - * - * @hidden - */ -class MsgBurn { - constructor(owner, coins) { - this.type = 'irishub/bank/Burn'; - this.value = { - owner, - coins, - }; + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.bank_tx_pb.MsgSend; } - getSignBytes() { - return this; - } -} -exports.MsgBurn = MsgBurn; + }]); + return MsgSend; +}(_types.Msg); /** - * Msg for setting memo regexp for an address + * Msg for sending coins * * @hidden */ -class MsgSetMemoRegexp { - constructor(owner, memoRegexp) { - this.type = 'irishub/bank/SetMemoRegexp'; - this.value = { - owner, - memo_regexp: memoRegexp, - }; + + +exports.MsgSend = MsgSend; + +var MsgMultiSend = /*#__PURE__*/function (_Msg2) { + (0, _inherits2["default"])(MsgMultiSend, _Msg2); + + var _super2 = _createSuper(MsgMultiSend); + + function MsgMultiSend(msg) { + var _this2; + + (0, _classCallCheck2["default"])(this, MsgMultiSend); + _this2 = _super2.call(this, _types.TxType.MsgMultiSend); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "value", void 0); + _this2.value = msg; + return _this2; + } + + (0, _createClass2["default"])(MsgMultiSend, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())(); + this.value.inputs.forEach(function (item) { + var input = new pbs.bank_tx_pb.Input(); + input.setAddress(item.address); + item.coins.forEach(function (coin) { + input.addCoins(_helper.TxModelCreator.createCoinModel(coin.denom, coin.amount)); + }); + msg.addInputs(input); + }); + this.value.outputs.forEach(function (item) { + var output = new pbs.bank_tx_pb.Output(); + output.setAddress(item.address); + item.coins.forEach(function (coin) { + output.addCoins(_helper.TxModelCreator.createCoinModel(coin.denom, coin.amount)); + }); + msg.addOutputs(output); + }); + return msg; + } + }, { + key: "validate", + value: function validate() { + if (!this.value.inputs) { + throw new _errors.SdkError("inputs is empty"); + } + + if (!this.value.outputs) { + throw new _errors.SdkError("outputs is empty"); + } } - getSignBytes() { - return this; + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.bank_tx_pb.MsgMultiSend; } -} -exports.MsgSetMemoRegexp = MsgSetMemoRegexp; -//# sourceMappingURL=bank.js.map \ No newline at end of file + }]); + return MsgMultiSend; +}(_types.Msg); +/** Base input and output struct */ + + +exports.MsgMultiSend = MsgMultiSend; \ No newline at end of file diff --git a/dist/src/types/bank.js.map b/dist/src/types/bank.js.map deleted file mode 100644 index 460b091d..00000000 --- a/dist/src/types/bank.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bank.js","sourceRoot":"","sources":["../../../src/types/bank.ts"],"names":[],"mappings":";;AAEA;;;;GAIG;AACH,MAAa,OAAO;IAOlB,YAAY,MAAe,EAAE,OAAiB;QAC5C,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAChC,IAAI,CAAC,KAAK,GAAG;YACX,MAAM;YACN,OAAO;SACR,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AAlBD,0BAkBC;AAED;;;;GAIG;AACH,MAAa,OAAO;IAOlB,YAAY,KAAa,EAAE,KAAa;QACtC,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAChC,IAAI,CAAC,KAAK,GAAG;YACX,KAAK;YACL,KAAK;SACN,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlBD,0BAkBC;AAED;;;;GAIG;AACH,MAAa,gBAAgB;IAG3B,YAAY,KAAa,EAAE,UAAkB;QAC3C,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC;QACzC,IAAI,CAAC,KAAK,GAAG;YACX,KAAK;YACL,WAAW,EAAE,UAAU;SACxB,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAdD,4CAcC"} \ No newline at end of file diff --git a/dist/src/types/block-result.js b/dist/src/types/block-result.js index 94118006..9a390c31 100644 --- a/dist/src/types/block-result.js +++ b/dist/src/types/block-result.js @@ -1,3 +1 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=block-result.js.map \ No newline at end of file +"use strict"; \ No newline at end of file diff --git a/dist/src/types/block-result.js.map b/dist/src/types/block-result.js.map deleted file mode 100644 index 205c4cfb..00000000 --- a/dist/src/types/block-result.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"block-result.js","sourceRoot":"","sources":["../../../src/types/block-result.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/src/types/block.js b/dist/src/types/block.js index e50e90b1..9a390c31 100644 --- a/dist/src/types/block.js +++ b/dist/src/types/block.js @@ -1,3 +1 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=block.js.map \ No newline at end of file +"use strict"; \ No newline at end of file diff --git a/dist/src/types/block.js.map b/dist/src/types/block.js.map deleted file mode 100644 index f0839c8b..00000000 --- a/dist/src/types/block.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"block.js","sourceRoot":"","sources":["../../../src/types/block.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/src/types/coinswap.d.ts b/dist/src/types/coinswap.d.ts new file mode 100644 index 00000000..72123b96 --- /dev/null +++ b/dist/src/types/coinswap.d.ts @@ -0,0 +1,45 @@ +import { Coin, Msg } from './types'; +export interface Liquidity { + standard: Coin; + token: Coin; + liquidity: Coin; + fee: string; +} +export interface DepositRequest { + max_token: Coin; + exact_standard_amt: number; + min_liquidity: number; + deadline: number; +} +export interface WithdrawRequest { + min_token: number; + withdraw_liquidity: Coin; + min_standard_amt: number; + deadline: number; +} +export interface SwapOrderRequest { + input: { + address: string; + coin: Coin; + }; + output: { + address: string; + coin: Coin; + }; + deadline: number; +} +export declare class MsgAddLiquidity extends Msg { + value: object; + constructor(request: DepositRequest, sender: string); + getSignBytes(): object; +} +export declare class MsgRemoveLiquidity extends Msg { + value: object; + constructor(request: WithdrawRequest, sender: string); + getSignBytes(): object; +} +export declare class MsgSwapOrder extends Msg { + value: object; + constructor(request: SwapOrderRequest, isBuyOrder: boolean); + getSignBytes(): object; +} diff --git a/dist/src/types/coinswap.js b/dist/src/types/coinswap.js new file mode 100644 index 00000000..bd325d89 --- /dev/null +++ b/dist/src/types/coinswap.js @@ -0,0 +1,129 @@ +"use strict"; + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.MsgSwapOrder = exports.MsgRemoveLiquidity = exports.MsgAddLiquidity = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); + +var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); + +var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); + +var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _types = require("./types"); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +var MsgAddLiquidity = /*#__PURE__*/function (_Msg) { + (0, _inherits2["default"])(MsgAddLiquidity, _Msg); + + var _super = _createSuper(MsgAddLiquidity); + + function MsgAddLiquidity(request, sender) { + var _this; + + (0, _classCallCheck2["default"])(this, MsgAddLiquidity); + _this = _super.call(this, 'irismod/coinswap/MsgAddLiquidity'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "value", void 0); + var deadline = new Date(); + deadline.setTime(deadline.getTime() + request.deadline); + _this.value = { + max_token: request.max_token, + exact_standard_amt: String(request.exact_standard_amt), + min_liquidity: String(request.min_liquidity), + deadline: deadline.getTime().toString(), + sender: sender + }; + return _this; + } + + (0, _createClass2["default"])(MsgAddLiquidity, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; + } + }]); + return MsgAddLiquidity; +}(_types.Msg); + +exports.MsgAddLiquidity = MsgAddLiquidity; + +var MsgRemoveLiquidity = /*#__PURE__*/function (_Msg2) { + (0, _inherits2["default"])(MsgRemoveLiquidity, _Msg2); + + var _super2 = _createSuper(MsgRemoveLiquidity); + + function MsgRemoveLiquidity(request, sender) { + var _this2; + + (0, _classCallCheck2["default"])(this, MsgRemoveLiquidity); + _this2 = _super2.call(this, 'irismod/coinswap/MsgRemoveLiquidity'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "value", void 0); + var deadline = new Date(); + deadline.setMilliseconds(deadline.getTime() + request.deadline); + _this2.value = { + min_token: String(request.min_token), + withdraw_liquidity: request.withdraw_liquidity, + min_standard_amt: String(request.min_standard_amt), + deadline: deadline.getTime().toString(), + sender: sender + }; + return _this2; + } + + (0, _createClass2["default"])(MsgRemoveLiquidity, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; + } + }]); + return MsgRemoveLiquidity; +}(_types.Msg); + +exports.MsgRemoveLiquidity = MsgRemoveLiquidity; + +var MsgSwapOrder = /*#__PURE__*/function (_Msg3) { + (0, _inherits2["default"])(MsgSwapOrder, _Msg3); + + var _super3 = _createSuper(MsgSwapOrder); + + function MsgSwapOrder(request, isBuyOrder) { + var _this3; + + (0, _classCallCheck2["default"])(this, MsgSwapOrder); + _this3 = _super3.call(this, 'irismod/coinswap/MsgSwapOrder'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this3), "value", void 0); + var deadline = new Date(); + deadline.setTime(deadline.getTime() + request.deadline); + _this3.value = { + input: request.input, + output: request.output, + deadline: deadline.getTime().toString(), + is_buy_order: isBuyOrder + }; + return _this3; + } + + (0, _createClass2["default"])(MsgSwapOrder, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; + } + }]); + return MsgSwapOrder; +}(_types.Msg); + +exports.MsgSwapOrder = MsgSwapOrder; \ No newline at end of file diff --git a/dist/src/types/constants.d.ts b/dist/src/types/constants.d.ts index f8f451d4..bc11ba2b 100644 --- a/dist/src/types/constants.d.ts +++ b/dist/src/types/constants.d.ts @@ -16,6 +16,8 @@ export declare enum RpcMethods { BlockResults = "block_results", Tx = "tx", TxSearch = "tx_search", - Validators = "validators" + Validators = "validators", + NetInfo = "net_info" } -export declare const IRIS = "iris", IRIS_ATTO = "iris-atto", MIN_UNIT_SUFFIX = "-min"; +export declare const doNotModify = "[do-not-modify]"; +export declare const STD_DENOM = "tiris", IRIS_ATTO = "iris-atto", MIN_UNIT_SUFFIX = "-min"; diff --git a/dist/src/types/constants.js b/dist/src/types/constants.js index 039f3ae4..e065f1f3 100644 --- a/dist/src/types/constants.js +++ b/dist/src/types/constants.js @@ -1,26 +1,44 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.MIN_UNIT_SUFFIX = exports.IRIS_ATTO = exports.STD_DENOM = exports.doNotModify = exports.RpcMethods = exports.Network = void 0; + /** Network type config */ var Network; +exports.Network = Network; + (function (Network) { - Network[Network["Mainnet"] = 0] = "Mainnet"; - Network[Network["Testnet"] = 1] = "Testnet"; -})(Network = exports.Network || (exports.Network = {})); + Network[Network["Mainnet"] = 0] = "Mainnet"; + Network[Network["Testnet"] = 1] = "Testnet"; +})(Network || (exports.Network = Network = {})); + var RpcMethods; +exports.RpcMethods = RpcMethods; + (function (RpcMethods) { - RpcMethods["BroadcastTxSync"] = "broadcast_tx_sync"; - RpcMethods["BroadcastTxAsync"] = "broadcast_tx_async"; - RpcMethods["BroadcastTxCommit"] = "broadcast_tx_commit"; - RpcMethods["AbciQuery"] = "abci_query"; - RpcMethods["Subscribe"] = "subscribe"; - RpcMethods["Unsubscribe"] = "unsubscribe"; - RpcMethods["UnsubscribeAll"] = "unsubscribe_all"; - RpcMethods["Health"] = "health"; - RpcMethods["Block"] = "block"; - RpcMethods["BlockResults"] = "block_results"; - RpcMethods["Tx"] = "tx"; - RpcMethods["TxSearch"] = "tx_search"; - RpcMethods["Validators"] = "validators"; -})(RpcMethods = exports.RpcMethods || (exports.RpcMethods = {})); -exports.IRIS = 'iris', exports.IRIS_ATTO = 'iris-atto', exports.MIN_UNIT_SUFFIX = '-min'; -//# sourceMappingURL=constants.js.map \ No newline at end of file + RpcMethods["BroadcastTxSync"] = "broadcast_tx_sync"; + RpcMethods["BroadcastTxAsync"] = "broadcast_tx_async"; + RpcMethods["BroadcastTxCommit"] = "broadcast_tx_commit"; + RpcMethods["AbciQuery"] = "abci_query"; + RpcMethods["Subscribe"] = "subscribe"; + RpcMethods["Unsubscribe"] = "unsubscribe"; + RpcMethods["UnsubscribeAll"] = "unsubscribe_all"; + RpcMethods["Health"] = "health"; + RpcMethods["Block"] = "block"; + RpcMethods["BlockResults"] = "block_results"; + RpcMethods["Tx"] = "tx"; + RpcMethods["TxSearch"] = "tx_search"; + RpcMethods["Validators"] = "validators"; + RpcMethods["NetInfo"] = "net_info"; +})(RpcMethods || (exports.RpcMethods = RpcMethods = {})); + +var doNotModify = '[do-not-modify]'; +exports.doNotModify = doNotModify; +var STD_DENOM = 'tiris', + IRIS_ATTO = 'iris-atto', + MIN_UNIT_SUFFIX = '-min'; +exports.MIN_UNIT_SUFFIX = MIN_UNIT_SUFFIX; +exports.IRIS_ATTO = IRIS_ATTO; +exports.STD_DENOM = STD_DENOM; \ No newline at end of file diff --git a/dist/src/types/constants.js.map b/dist/src/types/constants.js.map deleted file mode 100644 index 59a8b487..00000000 --- a/dist/src/types/constants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/types/constants.ts"],"names":[],"mappings":";;AAAA,0BAA0B;AAC1B,IAAY,OAGX;AAHD,WAAY,OAAO;IACjB,2CAAW,CAAA;IACX,2CAAW,CAAA;AACb,CAAC,EAHW,OAAO,GAAP,eAAO,KAAP,eAAO,QAGlB;AAED,IAAY,UAcX;AAdD,WAAY,UAAU;IACpB,mDAAqC,CAAA;IACrC,qDAAuC,CAAA;IACvC,uDAAyC,CAAA;IACzC,sCAAwB,CAAA;IACxB,qCAAuB,CAAA;IACvB,yCAA2B,CAAA;IAC3B,gDAAkC,CAAA;IAClC,+BAAiB,CAAA;IACjB,6BAAe,CAAA;IACf,4CAA8B,CAAA;IAC9B,uBAAS,CAAA;IACT,oCAAsB,CAAA;IACtB,uCAAyB,CAAA;AAC3B,CAAC,EAdW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAcrB;AAEY,QAAA,IAAI,GAAG,MAAM,EACxB,QAAA,SAAS,GAAG,WAAW,EACxB,QAAA,eAAe,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/dist/src/types/distribution.d.ts b/dist/src/types/distribution.d.ts index bc7785f6..43465fc9 100644 --- a/dist/src/types/distribution.d.ts +++ b/dist/src/types/distribution.d.ts @@ -1,23 +1,40 @@ import { Coin, Msg } from './types'; +/** + * param struct for set withdraw address tx + */ +export interface SetWithdrawAddressTxParam { + delegator_address: string; + withdraw_address: string; +} +/** + * param struct for withdraw delegator reward tx + */ +export interface WithdrawDelegatorRewardTxParam { + delegator_address: string; + validator_address: string; +} /** * Msg struct for changing the withdraw address for a delegator (or validator self-delegation) * @hidden */ -export declare class MsgSetWithdrawAddress implements Msg { - type: string; - value: { - delegator_addr: string; - withdraw_addr: string; - }; - constructor(delegatorAddr: string, withdrawAddr: string); - getSignBytes(): object; +export declare class MsgSetWithdrawAddress extends Msg { + value: SetWithdrawAddressTxParam; + constructor(msg: SetWithdrawAddressTxParam); + static getModelClass(): any; + getModel(): any; + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean; } /** * Msg struct for delegation withdraw for all of the delegator's delegations * @hidden */ -export declare class MsgWithdrawDelegatorRewardsAll implements Msg { - type: string; +export declare class MsgWithdrawDelegatorRewardsAll extends Msg { value: { delegator_addr: string; }; @@ -28,26 +45,62 @@ export declare class MsgWithdrawDelegatorRewardsAll implements Msg { * Msg struct for delegation withdraw from a single validator * @hidden */ -export declare class MsgWithdrawDelegatorReward implements Msg { - type: string; +export declare class MsgWithdrawDelegatorReward extends Msg { + value: WithdrawDelegatorRewardTxParam; + constructor(msg: WithdrawDelegatorRewardTxParam); + getModel(): any; + static getModelClass(): any; + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean; +} +/** + * Msg struct forWithdraw Validator Commission. + * @hidden + */ +export declare class MsgWithdrawValidatorCommission extends Msg { value: { - delegator_addr: string; - validator_addr: string; + validator_address: string; }; - constructor(delegatorAddr: string, validatorAddr: string); - getSignBytes(): object; + constructor(msg: { + validator_address: string; + }); + static getModelClass(): any; + getModel(): any; + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean; } /** - * Msg struct for validator withdraw + * Msg struct Msg Fund Community Pool. * @hidden */ -export declare class MsgWithdrawValidatorRewardsAll implements Msg { - type: string; +export declare class MsgFundCommunityPool extends Msg { value: { - validator_addr: string; + amount: Coin[]; + depositor: string; }; - constructor(validatorAddr: string); - getSignBytes(): object; + constructor(msg: { + amount: Coin[]; + depositor: string; + }); + static getModelClass(): any; + getModel(): any; + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean; } /** Common rewards struct */ export interface Rewards { diff --git a/dist/src/types/distribution.js b/dist/src/types/distribution.js index 2b02967e..31e65024 100644 --- a/dist/src/types/distribution.js +++ b/dist/src/types/distribution.js @@ -1,69 +1,315 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.MsgFundCommunityPool = exports.MsgWithdrawValidatorCommission = exports.MsgWithdrawDelegatorReward = exports.MsgWithdrawDelegatorRewardsAll = exports.MsgSetWithdrawAddress = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); + +var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); + +var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); + +var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _types = require("./types"); + +var pbs = _interopRequireWildcard(require("./proto")); + +var is = _interopRequireWildcard(require("is_js")); + +var _helper = require("../helper"); + +var _errors = require("../errors"); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + /** * Msg struct for changing the withdraw address for a delegator (or validator self-delegation) * @hidden */ -class MsgSetWithdrawAddress { - constructor(delegatorAddr, withdrawAddr) { - this.type = 'irishub/distr/MsgModifyWithdrawAddress'; - this.value = { - delegator_addr: delegatorAddr, - withdraw_addr: withdrawAddr, - }; +var MsgSetWithdrawAddress = /*#__PURE__*/function (_Msg) { + (0, _inherits2["default"])(MsgSetWithdrawAddress, _Msg); + + var _super = _createSuper(MsgSetWithdrawAddress); + + function MsgSetWithdrawAddress(msg) { + var _this; + + (0, _classCallCheck2["default"])(this, MsgSetWithdrawAddress); + _this = _super.call(this, _types.TxType.MsgSetWithdrawAddress); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "value", void 0); + _this.value = msg; + return _this; + } + + (0, _createClass2["default"])(MsgSetWithdrawAddress, [{ + key: "getModel", + value: function getModel() { + return new (this.constructor.getModelClass())().setDelegatorAddress(this.value.delegator_address).setWithdrawAddress(this.value.withdraw_address); } - getSignBytes() { - return this; + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + + }, { + key: "validate", + value: function validate() { + if (is.empty(this.value.delegator_address)) { + throw new _errors.SdkError("delegator address can not be empty"); + } + + if (is.empty(this.value.withdraw_address)) { + throw new _errors.SdkError("withdraw address can not be empty"); + } + + return true; } -} -exports.MsgSetWithdrawAddress = MsgSetWithdrawAddress; + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.distribution_tx_pb.MsgSetWithdrawAddress; + } + }]); + return MsgSetWithdrawAddress; +}(_types.Msg); /** * Msg struct for delegation withdraw for all of the delegator's delegations * @hidden */ -class MsgWithdrawDelegatorRewardsAll { - constructor(delegatorAddr) { - this.type = 'irishub/distr/MsgWithdrawDelegationRewardsAll'; - this.value = { - delegator_addr: delegatorAddr, - }; - } - getSignBytes() { - return this; + + +exports.MsgSetWithdrawAddress = MsgSetWithdrawAddress; + +var MsgWithdrawDelegatorRewardsAll = /*#__PURE__*/function (_Msg2) { + (0, _inherits2["default"])(MsgWithdrawDelegatorRewardsAll, _Msg2); + + var _super2 = _createSuper(MsgWithdrawDelegatorRewardsAll); + + function MsgWithdrawDelegatorRewardsAll(delegatorAddr) { + var _this2; + + (0, _classCallCheck2["default"])(this, MsgWithdrawDelegatorRewardsAll); + _this2 = _super2.call(this, 'irishub/distr/MsgWithdrawDelegationRewardsAll'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "value", void 0); + _this2.value = { + delegator_addr: delegatorAddr + }; + return _this2; + } + + (0, _createClass2["default"])(MsgWithdrawDelegatorRewardsAll, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; } -} -exports.MsgWithdrawDelegatorRewardsAll = MsgWithdrawDelegatorRewardsAll; + }]); + return MsgWithdrawDelegatorRewardsAll; +}(_types.Msg); /** * Msg struct for delegation withdraw from a single validator * @hidden */ -class MsgWithdrawDelegatorReward { - constructor(delegatorAddr, validatorAddr) { - this.type = 'irishub/distr/MsgWithdrawDelegationReward'; - this.value = { - delegator_addr: delegatorAddr, - validator_addr: validatorAddr, - }; + + +exports.MsgWithdrawDelegatorRewardsAll = MsgWithdrawDelegatorRewardsAll; + +var MsgWithdrawDelegatorReward = /*#__PURE__*/function (_Msg3) { + (0, _inherits2["default"])(MsgWithdrawDelegatorReward, _Msg3); + + var _super3 = _createSuper(MsgWithdrawDelegatorReward); + + function MsgWithdrawDelegatorReward(msg) { + var _this3; + + (0, _classCallCheck2["default"])(this, MsgWithdrawDelegatorReward); + _this3 = _super3.call(this, _types.TxType.MsgWithdrawDelegatorReward); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this3), "value", void 0); + _this3.value = msg; + return _this3; + } + + (0, _createClass2["default"])(MsgWithdrawDelegatorReward, [{ + key: "getModel", + value: function getModel() { + return new (this.constructor.getModelClass())().setDelegatorAddress(this.value.delegator_address).setValidatorAddress(this.value.validator_address); + } + }, { + key: "validate", + + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + value: function validate() { + if (is.empty(this.value.delegator_address)) { + throw new _errors.SdkError("delegator address can not be empty"); + } + + if (is.empty(this.value.validator_address)) { + throw new _errors.SdkError("validator address can not be empty"); + } + + return true; } - getSignBytes() { - return this; + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.distribution_tx_pb.MsgWithdrawDelegatorReward; } -} + }]); + return MsgWithdrawDelegatorReward; +}(_types.Msg); +/** + * Msg struct forWithdraw Validator Commission. + * @hidden + */ + + exports.MsgWithdrawDelegatorReward = MsgWithdrawDelegatorReward; + +var MsgWithdrawValidatorCommission = /*#__PURE__*/function (_Msg4) { + (0, _inherits2["default"])(MsgWithdrawValidatorCommission, _Msg4); + + var _super4 = _createSuper(MsgWithdrawValidatorCommission); + + function MsgWithdrawValidatorCommission(msg) { + var _this4; + + (0, _classCallCheck2["default"])(this, MsgWithdrawValidatorCommission); + _this4 = _super4.call(this, _types.TxType.MsgWithdrawValidatorCommission); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this4), "value", void 0); + _this4.value = msg; + return _this4; + } + + (0, _createClass2["default"])(MsgWithdrawValidatorCommission, [{ + key: "getModel", + value: function getModel() { + return new (this.constructor.getModelClass())().setValidatorAddress(this.value.validator_address); + } + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + + }, { + key: "validate", + value: function validate() { + if (is.empty(this.value.validator_address)) { + throw new _errors.SdkError("validator address can not be empty"); + } + + return true; + } + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.distribution_tx_pb.MsgWithdrawValidatorCommission; + } + }]); + return MsgWithdrawValidatorCommission; +}(_types.Msg); /** - * Msg struct for validator withdraw + * Msg struct Msg Fund Community Pool. * @hidden */ -class MsgWithdrawValidatorRewardsAll { - constructor(validatorAddr) { - this.type = 'irishub/distr/MsgWithdrawValidatorRewardsAll'; - this.value = { - validator_addr: validatorAddr, - }; + + +exports.MsgWithdrawValidatorCommission = MsgWithdrawValidatorCommission; + +var MsgFundCommunityPool = /*#__PURE__*/function (_Msg5) { + (0, _inherits2["default"])(MsgFundCommunityPool, _Msg5); + + var _super5 = _createSuper(MsgFundCommunityPool); + + function MsgFundCommunityPool(msg) { + var _this5; + + (0, _classCallCheck2["default"])(this, MsgFundCommunityPool); + _this5 = _super5.call(this, _types.TxType.MsgFundCommunityPool); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this5), "value", void 0); + _this5.value = msg; + return _this5; + } + + (0, _createClass2["default"])(MsgFundCommunityPool, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())(); + msg.setDepositor(this.value.depositor); + this.value.amount.forEach(function (item) { + msg.addAmount(_helper.TxModelCreator.createCoinModel(item.denom, item.amount)); + }); + return msg; + } + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + + }, { + key: "validate", + value: function validate() { + if (is.empty(this.value.depositor)) { + throw new _errors.SdkError("depositor can not be empty"); + } + + if (!(this.value.amount && this.value.amount.length)) { + throw new _errors.SdkError("amount can not be empty"); + } + + return true; } - getSignBytes() { - return this; + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.distribution_tx_pb.MsgFundCommunityPool; } -} -exports.MsgWithdrawValidatorRewardsAll = MsgWithdrawValidatorRewardsAll; -//# sourceMappingURL=distribution.js.map \ No newline at end of file + }]); + return MsgFundCommunityPool; +}(_types.Msg); // /** +// * Msg struct for validator withdraw +// * @hidden +// */ +// export class MsgWithdrawValidatorRewardsAll extends Msg { +// value: { +// validator_addr: string; +// }; +// constructor(validatorAddr: string) { +// super('irishub/distr/MsgWithdrawValidatorRewardsAll') +// this.value = { +// validator_addr: validatorAddr, +// }; +// } +// getSignBytes(): object { +// return this; +// } +// } + +/** Common rewards struct */ + + +exports.MsgFundCommunityPool = MsgFundCommunityPool; \ No newline at end of file diff --git a/dist/src/types/distribution.js.map b/dist/src/types/distribution.js.map deleted file mode 100644 index c2d33310..00000000 --- a/dist/src/types/distribution.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"distribution.js","sourceRoot":"","sources":["../../../src/types/distribution.ts"],"names":[],"mappings":";;AAEA;;;GAGG;AACH,MAAa,qBAAqB;IAOhC,YAAY,aAAqB,EAAE,YAAoB;QACrD,IAAI,CAAC,IAAI,GAAG,wCAAwC,CAAC;QACrD,IAAI,CAAC,KAAK,GAAG;YACX,cAAc,EAAE,aAAa;YAC7B,aAAa,EAAE,YAAY;SAC5B,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlBD,sDAkBC;AAED;;;GAGG;AACH,MAAa,8BAA8B;IAMzC,YAAY,aAAqB;QAC/B,IAAI,CAAC,IAAI,GAAG,+CAA+C,CAAC;QAC5D,IAAI,CAAC,KAAK,GAAG;YACX,cAAc,EAAE,aAAa;SAC9B,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAhBD,wEAgBC;AAED;;;GAGG;AACH,MAAa,0BAA0B;IAOrC,YAAY,aAAqB,EAAE,aAAqB;QACtD,IAAI,CAAC,IAAI,GAAG,2CAA2C,CAAC;QACxD,IAAI,CAAC,KAAK,GAAG;YACX,cAAc,EAAE,aAAa;YAC7B,cAAc,EAAE,aAAa;SAC9B,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlBD,gEAkBC;AAED;;;GAGG;AACH,MAAa,8BAA8B;IAMzC,YAAY,aAAqB;QAC/B,IAAI,CAAC,IAAI,GAAG,8CAA8C,CAAC;QAC3D,IAAI,CAAC,KAAK,GAAG;YACX,cAAc,EAAE,aAAa;SAC9B,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAhBD,wEAgBC"} \ No newline at end of file diff --git a/dist/src/types/events.js b/dist/src/types/events.js index 78df3057..166994b5 100644 --- a/dist/src/types/events.js +++ b/dist/src/types/events.js @@ -1,10 +1,19 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.EventTypes = void 0; var EventTypes; +/** + * Returns by subscriptions, for clients to unscribe the specified events + */ + +exports.EventTypes = EventTypes; + (function (EventTypes) { - EventTypes["NewBlock"] = "NewBlock"; - EventTypes["NewBlockHeader"] = "NewBlockHeader"; - EventTypes["ValidatorSetUpdates"] = "ValidatorSetUpdates"; - EventTypes["Tx"] = "Tx"; -})(EventTypes = exports.EventTypes || (exports.EventTypes = {})); -//# sourceMappingURL=events.js.map \ No newline at end of file + EventTypes["NewBlock"] = "NewBlock"; + EventTypes["NewBlockHeader"] = "NewBlockHeader"; + EventTypes["ValidatorSetUpdates"] = "ValidatorSetUpdates"; + EventTypes["Tx"] = "Tx"; +})(EventTypes || (exports.EventTypes = EventTypes = {})); \ No newline at end of file diff --git a/dist/src/types/events.js.map b/dist/src/types/events.js.map deleted file mode 100644 index ff9fcad8..00000000 --- a/dist/src/types/events.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/types/events.ts"],"names":[],"mappings":";;AAGA,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,mCAAqB,CAAA;IACrB,+CAAiC,CAAA;IACjC,yDAA2C,CAAA;IAC3C,uBAAS,CAAA;AACX,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB"} \ No newline at end of file diff --git a/dist/src/types/gov.d.ts b/dist/src/types/gov.d.ts index 337c25b1..0cfb032a 100644 --- a/dist/src/types/gov.d.ts +++ b/dist/src/types/gov.d.ts @@ -146,8 +146,7 @@ export interface ParameterChangeProposal extends BaseProposal { * Msg struct for submitting a ParameterChangeProposal * @hidden */ -export declare class MsgSubmitParameterChangeProposal implements Msg { - type: string; +export declare class MsgSubmitParameterChangeProposal extends Msg { value: ParameterChangeProposal; constructor(params: ParameterChangeProposal); getSignBytes(): object; @@ -163,8 +162,7 @@ export interface PlainTextProposal extends BaseProposal { * Msg struct for submitting a PlainTextProposal * @hidden */ -export declare class MsgSubmitPlainTextProposal implements Msg { - type: string; +export declare class MsgSubmitPlainTextProposal extends Msg { value: PlainTextProposal; constructor(params: PlainTextProposal); getSignBytes(): object; @@ -183,8 +181,7 @@ export interface CommunityTaxUsageProposal extends BaseProposal { * Msg struct for submitting a CommunityTaxUsageProposal * @hidden */ -export declare class MsgSubmitCommunityTaxUsageProposal implements Msg { - type: string; +export declare class MsgSubmitCommunityTaxUsageProposal extends Msg { value: CommunityTaxUsageProposal; constructor(params: CommunityTaxUsageProposal); getSignBytes(): object; @@ -194,8 +191,7 @@ export declare class MsgSubmitCommunityTaxUsageProposal implements Msg { * Msg struct for depositing to an active proposal in `depositing` period * @hidden */ -export declare class MsgDeposit implements Msg { - type: string; +export declare class MsgDeposit extends Msg { value: { proposal_id: string; depositor: string; @@ -208,8 +204,7 @@ export declare class MsgDeposit implements Msg { * Msg struct for voting to an active proposal in `voting` period * @hidden */ -export declare class MsgVote implements Msg { - type: string; +export declare class MsgVote extends Msg { value: { proposal_id: string; voter: string; diff --git a/dist/src/types/gov.js b/dist/src/types/gov.js index 1e952055..f139e5c1 100644 --- a/dist/src/types/gov.js +++ b/dist/src/types/gov.js @@ -1,166 +1,310 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.MsgVote = exports.MsgDeposit = exports.MsgSubmitCommunityTaxUsageProposal = exports.MsgSubmitPlainTextProposal = exports.MsgSubmitParameterChangeProposal = exports.VoteOption = exports.CommunityTaxUsageType = exports.ProposalType = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); + +var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); + +var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); + +var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _types = require("./types"); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + /** * Proposal Types * @hidden */ var ProposalType; -(function (ProposalType) { - ProposalType[ProposalType["Parameter"] = 1] = "Parameter"; - ProposalType[ProposalType["SoftwareUpgrade"] = 2] = "SoftwareUpgrade"; - ProposalType[ProposalType["SystemHalt"] = 3] = "SystemHalt"; - ProposalType[ProposalType["CommunityTaxUsage"] = 4] = "CommunityTaxUsage"; - ProposalType[ProposalType["PlainText"] = 5] = "PlainText"; - ProposalType[ProposalType["TokenAddition"] = 6] = "TokenAddition"; -})(ProposalType = exports.ProposalType || (exports.ProposalType = {})); /** * Types for community tax usage */ + +exports.ProposalType = ProposalType; + +(function (ProposalType) { + ProposalType[ProposalType["Parameter"] = 1] = "Parameter"; + ProposalType[ProposalType["SoftwareUpgrade"] = 2] = "SoftwareUpgrade"; + ProposalType[ProposalType["SystemHalt"] = 3] = "SystemHalt"; + ProposalType[ProposalType["CommunityTaxUsage"] = 4] = "CommunityTaxUsage"; + ProposalType[ProposalType["PlainText"] = 5] = "PlainText"; + ProposalType[ProposalType["TokenAddition"] = 6] = "TokenAddition"; +})(ProposalType || (exports.ProposalType = ProposalType = {})); + var CommunityTaxUsageType; -(function (CommunityTaxUsageType) { - CommunityTaxUsageType[CommunityTaxUsageType["Burn"] = 1] = "Burn"; - CommunityTaxUsageType[CommunityTaxUsageType["Distribute"] = 2] = "Distribute"; - CommunityTaxUsageType[CommunityTaxUsageType["Grant"] = 3] = "Grant"; -})(CommunityTaxUsageType = exports.CommunityTaxUsageType || (exports.CommunityTaxUsageType = {})); /** * Vote options */ + +exports.CommunityTaxUsageType = CommunityTaxUsageType; + +(function (CommunityTaxUsageType) { + CommunityTaxUsageType[CommunityTaxUsageType["Burn"] = 1] = "Burn"; + CommunityTaxUsageType[CommunityTaxUsageType["Distribute"] = 2] = "Distribute"; + CommunityTaxUsageType[CommunityTaxUsageType["Grant"] = 3] = "Grant"; +})(CommunityTaxUsageType || (exports.CommunityTaxUsageType = CommunityTaxUsageType = {})); + var VoteOption; +/** + * Basic proposal result properties + */ + +exports.VoteOption = VoteOption; + (function (VoteOption) { - VoteOption[VoteOption["Empty"] = 0] = "Empty"; - VoteOption[VoteOption["Yes"] = 1] = "Yes"; - VoteOption[VoteOption["Abstain"] = 2] = "Abstain"; - VoteOption[VoteOption["No"] = 3] = "No"; - VoteOption[VoteOption["NoWithVeto"] = 4] = "NoWithVeto"; -})(VoteOption = exports.VoteOption || (exports.VoteOption = {})); + VoteOption[VoteOption["Empty"] = 0] = "Empty"; + VoteOption[VoteOption["Yes"] = 1] = "Yes"; + VoteOption[VoteOption["Abstain"] = 2] = "Abstain"; + VoteOption[VoteOption["No"] = 3] = "No"; + VoteOption[VoteOption["NoWithVeto"] = 4] = "NoWithVeto"; +})(VoteOption || (exports.VoteOption = VoteOption = {})); + /** * Msg struct for submitting a ParameterChangeProposal * @hidden */ -class MsgSubmitParameterChangeProposal { - constructor(params) { - this.type = 'irishub/gov/MsgSubmitProposal'; - params.proposal_type = ProposalType[ProposalType.Parameter]; - this.value = params; - } - getSignBytes() { - return this.value; +var MsgSubmitParameterChangeProposal = /*#__PURE__*/function (_Msg) { + (0, _inherits2["default"])(MsgSubmitParameterChangeProposal, _Msg); + + var _super = _createSuper(MsgSubmitParameterChangeProposal); + + function MsgSubmitParameterChangeProposal(params) { + var _this; + + (0, _classCallCheck2["default"])(this, MsgSubmitParameterChangeProposal); + _this = _super.call(this, 'irishub/gov/MsgSubmitProposal'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "value", void 0); + params.proposal_type = ProposalType[ProposalType.Parameter]; + _this.value = params; + return _this; + } + + (0, _createClass2["default"])(MsgSubmitParameterChangeProposal, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this.value; } - marshal() { - return { - type: this.type, - value: { - proposal_type: ProposalType.Parameter, - title: this.value.title, - description: this.value.description, - proposer: this.value.proposer, - initial_deposit: this.value.initial_deposit, - params: this.value.params, - }, - }; + }, { + key: "marshal", + value: function marshal() { + return { + type: this.type, + value: { + proposal_type: ProposalType.Parameter, + title: this.value.title, + description: this.value.description, + proposer: this.value.proposer, + initial_deposit: this.value.initial_deposit, + params: this.value.params + } + }; } -} + }]); + return MsgSubmitParameterChangeProposal; +}(_types.Msg); // ------------------- PlainTextProposal ------------------------- + +/** + * Params for submitting a PlainTextProposal + * @hidden + */ + + exports.MsgSubmitParameterChangeProposal = MsgSubmitParameterChangeProposal; + /** * Msg struct for submitting a PlainTextProposal * @hidden */ -class MsgSubmitPlainTextProposal { - constructor(params) { - this.type = 'irishub/gov/MsgSubmitProposal'; - params.proposal_type = ProposalType[ProposalType.PlainText]; - params.params = null; // TODO: Historical issue: Proposals except `ParameterChange` must specify the `params` to be null - this.value = params; - } - getSignBytes() { - return this.value; +var MsgSubmitPlainTextProposal = /*#__PURE__*/function (_Msg2) { + (0, _inherits2["default"])(MsgSubmitPlainTextProposal, _Msg2); + + var _super2 = _createSuper(MsgSubmitPlainTextProposal); + + function MsgSubmitPlainTextProposal(params) { + var _this2; + + (0, _classCallCheck2["default"])(this, MsgSubmitPlainTextProposal); + _this2 = _super2.call(this, 'irishub/gov/MsgSubmitProposal'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "value", void 0); + params.proposal_type = ProposalType[ProposalType.PlainText]; + params.params = null; // TODO: Historical issue: Proposals except `ParameterChange` must specify the `params` to be null + + _this2.value = params; + return _this2; + } + + (0, _createClass2["default"])(MsgSubmitPlainTextProposal, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this.value; } - marshal() { - return { - type: this.type, - value: { - proposal_type: ProposalType.PlainText, - title: this.value.title, - description: this.value.description, - proposer: this.value.proposer, - initial_deposit: this.value.initial_deposit, - }, - }; + }, { + key: "marshal", + value: function marshal() { + return { + type: this.type, + value: { + proposal_type: ProposalType.PlainText, + title: this.value.title, + description: this.value.description, + proposer: this.value.proposer, + initial_deposit: this.value.initial_deposit + } + }; } -} + }]); + return MsgSubmitPlainTextProposal; +}(_types.Msg); // ------------------- CommunityTaxUsageProposal ------------------------- + +/** + * Params for submitting a CommunityTaxUsageProposal + * @hidden + */ + + exports.MsgSubmitPlainTextProposal = MsgSubmitPlainTextProposal; + /** * Msg struct for submitting a CommunityTaxUsageProposal * @hidden */ -class MsgSubmitCommunityTaxUsageProposal { - constructor(params) { - this.type = 'irishub/gov/MsgSubmitCommunityTaxUsageProposal'; - params.proposal_type = ProposalType[ProposalType.CommunityTaxUsage]; - params.params = null; // TODO: Historical issue: Proposals except `ParameterChange` must specify the `params` to be null - this.value = params; - } - getSignBytes() { - return this.value; +var MsgSubmitCommunityTaxUsageProposal = /*#__PURE__*/function (_Msg3) { + (0, _inherits2["default"])(MsgSubmitCommunityTaxUsageProposal, _Msg3); + + var _super3 = _createSuper(MsgSubmitCommunityTaxUsageProposal); + + function MsgSubmitCommunityTaxUsageProposal(params) { + var _this3; + + (0, _classCallCheck2["default"])(this, MsgSubmitCommunityTaxUsageProposal); + _this3 = _super3.call(this, 'irishub/gov/MsgSubmitCommunityTaxUsageProposal'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this3), "value", void 0); + params.proposal_type = ProposalType[ProposalType.CommunityTaxUsage]; + params.params = null; // TODO: Historical issue: Proposals except `ParameterChange` must specify the `params` to be null + + _this3.value = params; + return _this3; + } + + (0, _createClass2["default"])(MsgSubmitCommunityTaxUsageProposal, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this.value; } - marshal() { - return { - type: this.type, - value: { - proposal_type: ProposalType.CommunityTaxUsage, - title: this.value.title, - description: this.value.description, - proposer: this.value.proposer, - initial_deposit: this.value.initial_deposit, - }, - }; + }, { + key: "marshal", + value: function marshal() { + return { + type: this.type, + value: { + proposal_type: ProposalType.CommunityTaxUsage, + title: this.value.title, + description: this.value.description, + proposer: this.value.proposer, + initial_deposit: this.value.initial_deposit + } + }; } -} -exports.MsgSubmitCommunityTaxUsageProposal = MsgSubmitCommunityTaxUsageProposal; + }]); + return MsgSubmitCommunityTaxUsageProposal; +}(_types.Msg); /** * Msg struct for depositing to an active proposal in `depositing` period * @hidden */ -class MsgDeposit { - constructor(proposalID, depositor, amount) { - this.type = 'irishub/gov/MsgDeposit'; - this.value = { - proposal_id: proposalID, - depositor: depositor, - amount: amount, - }; - } - getSignBytes() { - return this.value; + + +exports.MsgSubmitCommunityTaxUsageProposal = MsgSubmitCommunityTaxUsageProposal; + +var MsgDeposit = /*#__PURE__*/function (_Msg4) { + (0, _inherits2["default"])(MsgDeposit, _Msg4); + + var _super4 = _createSuper(MsgDeposit); + + function MsgDeposit(proposalID, depositor, amount) { + var _this4; + + (0, _classCallCheck2["default"])(this, MsgDeposit); + _this4 = _super4.call(this, 'irishub/gov/MsgDeposit'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this4), "value", void 0); + _this4.value = { + proposal_id: proposalID, + depositor: depositor, + amount: amount + }; + return _this4; + } + + (0, _createClass2["default"])(MsgDeposit, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this.value; } -} -exports.MsgDeposit = MsgDeposit; + }]); + return MsgDeposit; +}(_types.Msg); /** * Msg struct for voting to an active proposal in `voting` period * @hidden */ -class MsgVote { - constructor(proposalID, voter, option) { - this.type = 'irishub/gov/MsgVote'; - this.value = { - proposal_id: proposalID, - voter: voter, - option: VoteOption[option], - }; - } - getSignBytes() { - return this.value; + + +exports.MsgDeposit = MsgDeposit; + +var MsgVote = /*#__PURE__*/function (_Msg5) { + (0, _inherits2["default"])(MsgVote, _Msg5); + + var _super5 = _createSuper(MsgVote); + + function MsgVote(proposalID, voter, option) { + var _this5; + + (0, _classCallCheck2["default"])(this, MsgVote); + _this5 = _super5.call(this, 'irishub/gov/MsgVote'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this5), "value", void 0); + _this5.value = { + proposal_id: proposalID, + voter: voter, + option: VoteOption[option] + }; + return _this5; + } + + (0, _createClass2["default"])(MsgVote, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this.value; } - marshal() { - return { - type: this.type, - value: { - proposal_id: this.value.proposal_id, - voter: this.value.voter, - option: VoteOption[this.value.option], - }, - }; + }, { + key: "marshal", + value: function marshal() { + return { + type: this.type, + value: { + proposal_id: this.value.proposal_id, + voter: this.value.voter, + option: VoteOption[this.value.option] + } + }; } -} -exports.MsgVote = MsgVote; -//# sourceMappingURL=gov.js.map \ No newline at end of file + }]); + return MsgVote; +}(_types.Msg); + +exports.MsgVote = MsgVote; \ No newline at end of file diff --git a/dist/src/types/gov.js.map b/dist/src/types/gov.js.map deleted file mode 100644 index 1e784aa7..00000000 --- a/dist/src/types/gov.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gov.js","sourceRoot":"","sources":["../../../src/types/gov.ts"],"names":[],"mappings":";;AAEA;;;GAGG;AACH,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,yDAAgB,CAAA;IAChB,qEAAsB,CAAA;IACtB,2DAAiB,CAAA;IACjB,yEAAwB,CAAA;IACxB,yDAAgB,CAAA;IAChB,iEAAoB,CAAA;AACtB,CAAC,EAPW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAOvB;AAED;;GAEG;AACH,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,iEAAW,CAAA;IACX,6EAAiB,CAAA;IACjB,mEAAY,CAAA;AACd,CAAC,EAJW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAIhC;AAED;;GAEG;AACH,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,6CAAY,CAAA;IACZ,yCAAU,CAAA;IACV,iDAAc,CAAA;IACd,uCAAS,CAAA;IACT,uDAAiB,CAAA;AACnB,CAAC,EANW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAMrB;AA4HD;;;GAGG;AACH,MAAa,gCAAgC;IAI3C,YAAY,MAA+B;QACzC,IAAI,CAAC,IAAI,GAAG,+BAA+B,CAAC;QAC5C,MAAM,CAAC,aAAa,GAAG,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QAC5D,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;IACtB,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,OAAO;QACL,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE;gBACL,aAAa,EAAE,YAAY,CAAC,SAAS;gBACrC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;gBACvB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;gBACnC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;gBAC7B,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe;gBAC3C,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM;aAC1B;SACF,CAAC;IACJ,CAAC;CACF;AA3BD,4EA2BC;AAUD;;;GAGG;AACH,MAAa,0BAA0B;IAIrC,YAAY,MAAyB;QACnC,IAAI,CAAC,IAAI,GAAG,+BAA+B,CAAC;QAC5C,MAAM,CAAC,aAAa,GAAG,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;QAC5D,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,kGAAkG;QACxH,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;IACtB,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,OAAO;QACL,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE;gBACL,aAAa,EAAE,YAAY,CAAC,SAAS;gBACrC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;gBACvB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;gBACnC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;gBAC7B,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe;aAC5C;SACF,CAAC;IACJ,CAAC;CACF;AA3BD,gEA2BC;AAcD;;;GAGG;AACH,MAAa,kCAAkC;IAI7C,YAAY,MAAiC;QAC3C,IAAI,CAAC,IAAI,GAAG,gDAAgD,CAAC;QAC7D,MAAM,CAAC,aAAa,GAAG,YAAY,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;QACpE,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,kGAAkG;QACxH,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;IACtB,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,OAAO;QACL,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE;gBACL,aAAa,EAAE,YAAY,CAAC,iBAAiB;gBAC7C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;gBACvB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;gBACnC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ;gBAC7B,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe;aAC5C;SACF,CAAC;IACJ,CAAC;CACF;AA3BD,gFA2BC;AAED;;;GAGG;AACH,MAAa,UAAU;IAQrB,YAAY,UAAkB,EAAE,SAAiB,EAAE,MAAc;QAC/D,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG;YACX,WAAW,EAAE,UAAU;YACvB,SAAS,EAAE,SAAS;YACpB,MAAM,EAAE,MAAM;SACf,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AApBD,gCAoBC;AAED;;;GAGG;AACH,MAAa,OAAO;IAQlB,YAAY,UAAkB,EAAE,KAAa,EAAE,MAAkB;QAC/D,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,KAAK,GAAG;YACX,WAAW,EAAE,UAAU;YACvB,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC;SAC3B,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,OAAO;QACL,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE;gBACL,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW;gBACnC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;gBACvB,MAAM,EAAQ,UAAW,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;aAC7C;SACF,CAAC;IACJ,CAAC;CACF;AA/BD,0BA+BC"} \ No newline at end of file diff --git a/dist/src/types/index.d.ts b/dist/src/types/index.d.ts index 9ac277c3..2ed50816 100644 --- a/dist/src/types/index.d.ts +++ b/dist/src/types/index.d.ts @@ -14,8 +14,12 @@ export * from './service'; export * from './oracle'; export * from './random'; export * from './events'; -export * from './asset'; +export * from './token'; export * from './block'; export * from './block-result'; export * from './validator'; export * from './query-builder'; +export * from './coinswap'; +export * from './protoTx'; +export * from './nft'; +export * from './proto'; diff --git a/dist/src/types/index.js b/dist/src/types/index.js index a9562753..fac1f4c0 100644 --- a/dist/src/types/index.js +++ b/dist/src/types/index.js @@ -1,18 +1,330 @@ "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./auth")); -__export(require("./bank")); -__export(require("./constants")); -__export(require("./keystore")); -__export(require("./staking")); -__export(require("./gov")); -__export(require("./slashing")); -__export(require("./distribution")); -__export(require("./service")); -__export(require("./random")); -__export(require("./events")); -__export(require("./query-builder")); -//# sourceMappingURL=index.js.map \ No newline at end of file + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _auth = require("./auth"); + +Object.keys(_auth).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _auth[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _auth[key]; + } + }); +}); + +var _bank = require("./bank"); + +Object.keys(_bank).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _bank[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _bank[key]; + } + }); +}); + +var _constants = require("./constants"); + +Object.keys(_constants).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _constants[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _constants[key]; + } + }); +}); + +var _types = require("./types"); + +Object.keys(_types).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _types[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _types[key]; + } + }); +}); + +var _keystore = require("./keystore"); + +Object.keys(_keystore).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _keystore[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _keystore[key]; + } + }); +}); + +var _tx = require("./tx"); + +Object.keys(_tx).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _tx[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _tx[key]; + } + }); +}); + +var _abciQuery = require("./abci-query"); + +Object.keys(_abciQuery).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _abciQuery[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _abciQuery[key]; + } + }); +}); + +var _staking = require("./staking"); + +Object.keys(_staking).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _staking[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _staking[key]; + } + }); +}); + +var _params = require("./params"); + +Object.keys(_params).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _params[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _params[key]; + } + }); +}); + +var _gov = require("./gov"); + +Object.keys(_gov).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _gov[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _gov[key]; + } + }); +}); + +var _slashing = require("./slashing"); + +Object.keys(_slashing).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _slashing[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _slashing[key]; + } + }); +}); + +var _distribution = require("./distribution"); + +Object.keys(_distribution).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _distribution[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _distribution[key]; + } + }); +}); + +var _service = require("./service"); + +Object.keys(_service).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _service[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _service[key]; + } + }); +}); + +var _oracle = require("./oracle"); + +Object.keys(_oracle).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _oracle[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _oracle[key]; + } + }); +}); + +var _random = require("./random"); + +Object.keys(_random).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _random[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _random[key]; + } + }); +}); + +var _events = require("./events"); + +Object.keys(_events).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _events[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _events[key]; + } + }); +}); + +var _token = require("./token"); + +Object.keys(_token).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _token[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _token[key]; + } + }); +}); + +var _block = require("./block"); + +Object.keys(_block).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _block[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _block[key]; + } + }); +}); + +var _blockResult = require("./block-result"); + +Object.keys(_blockResult).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _blockResult[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _blockResult[key]; + } + }); +}); + +var _validator = require("./validator"); + +Object.keys(_validator).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _validator[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _validator[key]; + } + }); +}); + +var _queryBuilder = require("./query-builder"); + +Object.keys(_queryBuilder).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _queryBuilder[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _queryBuilder[key]; + } + }); +}); + +var _coinswap = require("./coinswap"); + +Object.keys(_coinswap).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _coinswap[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _coinswap[key]; + } + }); +}); + +var _protoTx = require("./protoTx"); + +Object.keys(_protoTx).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _protoTx[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _protoTx[key]; + } + }); +}); + +var _nft = require("./nft"); + +Object.keys(_nft).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _nft[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _nft[key]; + } + }); +}); + +var _proto = require("./proto"); + +Object.keys(_proto).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _proto[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _proto[key]; + } + }); +}); \ No newline at end of file diff --git a/dist/src/types/index.js.map b/dist/src/types/index.js.map deleted file mode 100644 index 4da76882..00000000 --- a/dist/src/types/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;AAAA,4BAAuB;AACvB,4BAAuB;AACvB,iCAA4B;AAE5B,gCAA2B;AAG3B,+BAA0B;AAE1B,2BAAsB;AACtB,gCAA2B;AAC3B,oCAA+B;AAC/B,+BAA0B;AAE1B,8BAAyB;AACzB,8BAAyB;AAKzB,qCAAgC"} \ No newline at end of file diff --git a/dist/src/types/keystore.d.ts b/dist/src/types/keystore.d.ts index 6c5d2b96..28c0c368 100644 --- a/dist/src/types/keystore.d.ts +++ b/dist/src/types/keystore.d.ts @@ -16,6 +16,21 @@ export interface Key { address: string; privKey: string; } +/** + * Key struct + * @hidden + */ +interface KeyPair { + privateKey: string; + publicKey: string; +} +/** + * wallet struct + */ +export interface Wallet extends KeyPair { + address: string; + mnemonic?: string; +} /** * Crypto struct * @hidden @@ -54,3 +69,4 @@ export declare enum StoreType { Keystore = 0, Key = 1 } +export {}; diff --git a/dist/src/types/keystore.js b/dist/src/types/keystore.js index b5a12747..71c22367 100644 --- a/dist/src/types/keystore.js +++ b/dist/src/types/keystore.js @@ -1,14 +1,54 @@ "use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.StoreType = void 0; // Generated by https://quicktype.io -Object.defineProperty(exports, "__esModule", { value: true }); + +/** + * Keystore struct + * @hidden + */ + +/** + * Keys struct + * @hidden + */ + +/** + * Key struct + * @hidden + */ + /** + * wallet struct + */ + +/** + * Crypto struct + * @hidden + */ + +/** + * Cipherparams struct + * @hidden + */ + +/** + * Kdfparams struct + * @hidden + */ + +/** * StoreType of a key * - Keystore: save the key as an encrypted keystore * - Key: save the key as a plaintext private key */ var StoreType; +exports.StoreType = StoreType; + (function (StoreType) { - StoreType[StoreType["Keystore"] = 0] = "Keystore"; - StoreType[StoreType["Key"] = 1] = "Key"; -})(StoreType = exports.StoreType || (exports.StoreType = {})); -//# sourceMappingURL=keystore.js.map \ No newline at end of file + StoreType[StoreType["Keystore"] = 0] = "Keystore"; + StoreType[StoreType["Key"] = 1] = "Key"; +})(StoreType || (exports.StoreType = StoreType = {})); \ No newline at end of file diff --git a/dist/src/types/keystore.js.map b/dist/src/types/keystore.js.map deleted file mode 100644 index 6cea5494..00000000 --- a/dist/src/types/keystore.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"keystore.js","sourceRoot":"","sources":["../../../src/types/keystore.ts"],"names":[],"mappings":";AAAA,oCAAoC;;AAsDpC;;;;GAIG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,iDAAY,CAAA;IACZ,uCAAO,CAAA;AACT,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"} \ No newline at end of file diff --git a/dist/src/types/nft.d.ts b/dist/src/types/nft.d.ts new file mode 100644 index 00000000..686846b3 --- /dev/null +++ b/dist/src/types/nft.d.ts @@ -0,0 +1,119 @@ +import { Msg } from './index'; +/** + * param struct for issue denom tx + */ +export interface IssueDenomParam { + id: string; + name: string; + schema: string; + sender: string; +} +/** + * Msg for issue denom + * + * @hidden + */ +export declare class MsgIssueDenom extends Msg { + value: IssueDenomParam; + constructor(msg: IssueDenomParam); + static getModelClass(): any; + getModel(): any; + Validate(): void; +} +/** + * param struct for Mint NFT + */ +export interface MintNFTParam { + id: string; + denom_id: string; + name: string; + uri: string; + data: string; + sender: string; + recipient: string; +} +/** + * Msg for Mint NFT + * + * @hidden + */ +export declare class MsgMintNFT extends Msg { + value: MintNFTParam; + constructor(msg: MintNFTParam); + static getModelClass(): any; + getModel(): any; + Validate(): void; +} +/** + * param struct for Edit NFT tx + */ +export interface EditNFTParam { + id: string; + denom_id: string; + name?: string; + uri?: string; + data?: string; + sender: string; +} +/** + * Msg for Edit NFT + * + * @hidden + */ +export declare class MsgEditNFT extends Msg { + value: EditNFTParam; + constructor(msg: EditNFTParam); + static getModelClass(): any; + getModel(): any; + Validate(): void; +} +/** + * param struct for Transfer NFT tx + */ +export interface TransferNFTParam { + id: string; + denom_id: string; + name?: string; + uri?: string; + data?: string; + sender: string; + recipient: string; +} +/** + * Msg for Transfer NFT + * + * @hidden + */ +export declare class MsgTransferNFT extends Msg { + value: TransferNFTParam; + constructor(msg: TransferNFTParam); + static getModelClass(): any; + getModel(): any; + Validate(): void; +} +/** + * param struct for Burn NFT tx + */ +export interface BurnNFTParam { + id: string; + denom_id: string; + sender: string; +} +/** + * Msg for Burn NFT + * + * @hidden + */ +export declare class MsgBurnNFT extends Msg { + value: BurnNFTParam; + constructor(msg: BurnNFTParam); + static getModelClass(): any; + getModel(): any; + Validate(): void; +} +export interface Denom { + id: string; + name: string; + schema: string; + creator: string; +} diff --git a/dist/src/types/nft.js b/dist/src/types/nft.js new file mode 100644 index 00000000..a676622a --- /dev/null +++ b/dist/src/types/nft.js @@ -0,0 +1,393 @@ +"use strict"; + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.MsgBurnNFT = exports.MsgTransferNFT = exports.MsgEditNFT = exports.MsgMintNFT = exports.MsgIssueDenom = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); + +var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); + +var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); + +var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _index = require("./index"); + +var pbs = _interopRequireWildcard(require("./proto")); + +var _errors = require("../errors"); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +/** + * Msg for issue denom + * + * @hidden + */ +var MsgIssueDenom = /*#__PURE__*/function (_Msg) { + (0, _inherits2["default"])(MsgIssueDenom, _Msg); + + var _super = _createSuper(MsgIssueDenom); + + function MsgIssueDenom(msg) { + var _this; + + (0, _classCallCheck2["default"])(this, MsgIssueDenom); + _this = _super.call(this, _index.TxType.MsgIssueDenom); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "value", void 0); + _this.value = msg; + return _this; + } + + (0, _createClass2["default"])(MsgIssueDenom, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())(); + msg.setId(this.value.id); + msg.setName(this.value.name); + msg.setSchema(this.value.schema); + msg.setSender(this.value.sender); + return msg; + } + }, { + key: "Validate", + value: function Validate() { + if (!this.value.id) { + throw new _errors.SdkError("id can not be empty"); + } + + if (!this.value.name) { + throw new _errors.SdkError("name can not be empty"); + } + + if (!this.value.schema) { + throw new _errors.SdkError("schema can not be empty"); + } + + if (!this.value.sender) { + throw new _errors.SdkError("sender can not be empty"); + } + } + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.nft_tx_pb.MsgIssueDenom; + } + }]); + return MsgIssueDenom; +}(_index.Msg); +/** + * param struct for Mint NFT + */ + + +exports.MsgIssueDenom = MsgIssueDenom; + +/** + * Msg for Mint NFT + * + * @hidden + */ +var MsgMintNFT = /*#__PURE__*/function (_Msg2) { + (0, _inherits2["default"])(MsgMintNFT, _Msg2); + + var _super2 = _createSuper(MsgMintNFT); + + function MsgMintNFT(msg) { + var _this2; + + (0, _classCallCheck2["default"])(this, MsgMintNFT); + _this2 = _super2.call(this, _index.TxType.MsgMintNFT); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "value", void 0); + _this2.value = msg; + return _this2; + } + + (0, _createClass2["default"])(MsgMintNFT, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())(); + msg.setId(this.value.id); + msg.setDenomId(this.value.denom_id); + msg.setName(this.value.name); + msg.setUri(this.value.uri); + msg.setData(this.value.data); + msg.setSender(this.value.sender); + msg.setRecipient(this.value.recipient); + return msg; + } + }, { + key: "Validate", + value: function Validate() { + if (!this.value.id) { + throw new _errors.SdkError("id can not be empty"); + } + + if (!this.value.denom_id) { + throw new _errors.SdkError("denom_id can not be empty"); + } + + if (!this.value.name) { + throw new _errors.SdkError("name can not be empty"); + } + + if (!this.value.uri) { + throw new _errors.SdkError("uri can not be empty"); + } + + if (!this.value.data) { + throw new _errors.SdkError("data can not be empty"); + } + + if (!this.value.sender) { + throw new _errors.SdkError("sender can not be empty"); + } + + if (!this.value.recipient) { + throw new _errors.SdkError("recipient can not be empty"); + } + } + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.nft_tx_pb.MsgMintNFT; + } + }]); + return MsgMintNFT; +}(_index.Msg); +/** + * param struct for Edit NFT tx + */ + + +exports.MsgMintNFT = MsgMintNFT; + +/** + * Msg for Edit NFT + * + * @hidden + */ +var MsgEditNFT = /*#__PURE__*/function (_Msg3) { + (0, _inherits2["default"])(MsgEditNFT, _Msg3); + + var _super3 = _createSuper(MsgEditNFT); + + function MsgEditNFT(msg) { + var _this3; + + (0, _classCallCheck2["default"])(this, MsgEditNFT); + _this3 = _super3.call(this, _index.TxType.MsgEditNFT); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this3), "value", void 0); + _this3.value = msg; + return _this3; + } + + (0, _createClass2["default"])(MsgEditNFT, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())(); + msg.setId(this.value.id); + msg.setDenomId(this.value.denom_id); + msg.setSender(this.value.sender); + + if (typeof this.value.name === 'undefined') { + msg.setName(_index.doNotModify); + } else { + msg.setName(this.value.name); + } + + if (typeof this.value.uri === 'undefined') { + msg.setUri(_index.doNotModify); + } else { + msg.setUri(this.value.uri); + } + + if (typeof this.value.data === 'undefined') { + msg.setData(_index.doNotModify); + } else { + msg.setData(this.value.data); + } + + return msg; + } + }, { + key: "Validate", + value: function Validate() { + if (!this.value.id) { + throw new _errors.SdkError("id can not be empty"); + } + + if (!this.value.denom_id) { + throw new _errors.SdkError("denom_id can not be empty"); + } + + if (!this.value.sender) { + throw new _errors.SdkError("sender can not be empty"); + } + } + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.nft_tx_pb.MsgEditNFT; + } + }]); + return MsgEditNFT; +}(_index.Msg); +/** + * param struct for Transfer NFT tx + */ + + +exports.MsgEditNFT = MsgEditNFT; + +/** + * Msg for Transfer NFT + * + * @hidden + */ +var MsgTransferNFT = /*#__PURE__*/function (_Msg4) { + (0, _inherits2["default"])(MsgTransferNFT, _Msg4); + + var _super4 = _createSuper(MsgTransferNFT); + + function MsgTransferNFT(msg) { + var _this4; + + (0, _classCallCheck2["default"])(this, MsgTransferNFT); + _this4 = _super4.call(this, _index.TxType.MsgTransferNFT); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this4), "value", void 0); + _this4.value = msg; + return _this4; + } + + (0, _createClass2["default"])(MsgTransferNFT, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())(); + msg.setId(this.value.id); + msg.setDenomId(this.value.denom_id); + msg.setSender(this.value.sender); + msg.setRecipient(this.value.recipient); + + if (typeof this.value.name === 'undefined') { + msg.setName(_index.doNotModify); + } else { + msg.setName(this.value.name); + } + + if (typeof this.value.uri === 'undefined') { + msg.setUri(_index.doNotModify); + } else { + msg.setUri(this.value.uri); + } + + if (typeof this.value.data === 'undefined') { + msg.setData(_index.doNotModify); + } else { + msg.setData(this.value.data); + } + + return msg; + } + }, { + key: "Validate", + value: function Validate() { + if (!this.value.id) { + throw new _errors.SdkError("id can not be empty"); + } + + if (!this.value.denom_id) { + throw new _errors.SdkError("denom_id can not be empty"); + } + + if (!this.value.sender) { + throw new _errors.SdkError("sender can not be empty"); + } + + if (!this.value.recipient) { + throw new _errors.SdkError("recipient can not be empty"); + } + } + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.nft_tx_pb.MsgTransferNFT; + } + }]); + return MsgTransferNFT; +}(_index.Msg); +/** + * param struct for Burn NFT tx + */ + + +exports.MsgTransferNFT = MsgTransferNFT; + +/** + * Msg for Burn NFT + * + * @hidden + */ +var MsgBurnNFT = /*#__PURE__*/function (_Msg5) { + (0, _inherits2["default"])(MsgBurnNFT, _Msg5); + + var _super5 = _createSuper(MsgBurnNFT); + + function MsgBurnNFT(msg) { + var _this5; + + (0, _classCallCheck2["default"])(this, MsgBurnNFT); + _this5 = _super5.call(this, _index.TxType.MsgBurnNFT); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this5), "value", void 0); + _this5.value = msg; + return _this5; + } + + (0, _createClass2["default"])(MsgBurnNFT, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())(); + msg.setId(this.value.id); + msg.setDenomId(this.value.denom_id); + msg.setSender(this.value.sender); + return msg; + } + }, { + key: "Validate", + value: function Validate() { + if (!this.value.id) { + throw new _errors.SdkError("id can not be empty"); + } + + if (!this.value.denom_id) { + throw new _errors.SdkError("denom_id can not be empty"); + } + + if (!this.value.sender) { + throw new _errors.SdkError("sender can not be empty"); + } + } + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.nft_tx_pb.MsgBurnNFT; + } + }]); + return MsgBurnNFT; +}(_index.Msg); + +exports.MsgBurnNFT = MsgBurnNFT; \ No newline at end of file diff --git a/dist/src/types/oracle.js b/dist/src/types/oracle.js index 2e8b51c4..9a390c31 100644 --- a/dist/src/types/oracle.js +++ b/dist/src/types/oracle.js @@ -1,3 +1 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=oracle.js.map \ No newline at end of file +"use strict"; \ No newline at end of file diff --git a/dist/src/types/oracle.js.map b/dist/src/types/oracle.js.map deleted file mode 100644 index a3f727f2..00000000 --- a/dist/src/types/oracle.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"oracle.js","sourceRoot":"","sources":["../../../src/types/oracle.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/src/types/params.js b/dist/src/types/params.js index ce34436d..9a390c31 100644 --- a/dist/src/types/params.js +++ b/dist/src/types/params.js @@ -1,3 +1 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=params.js.map \ No newline at end of file +"use strict"; \ No newline at end of file diff --git a/dist/src/types/params.js.map b/dist/src/types/params.js.map deleted file mode 100644 index 94052566..00000000 --- a/dist/src/types/params.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"params.js","sourceRoot":"","sources":["../../../src/types/params.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/src/types/proto-types/confio/proofs_pb.js b/dist/src/types/proto-types/confio/proofs_pb.js new file mode 100644 index 00000000..7be46dea --- /dev/null +++ b/dist/src/types/proto-types/confio/proofs_pb.js @@ -0,0 +1,3744 @@ +// source: confio/proofs.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 value = /** @type {!Array} */ (reader.readPackedInt32()); + msg.setChildOrderList(value); + 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 value = /** @type {!Array} */ (reader.readPackedInt32()); + msg.setPathList(value); + 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/dist/src/types/proto-types/cosmos/auth/v1beta1/auth_pb.js b/dist/src/types/proto-types/cosmos/auth/v1beta1/auth_pb.js new file mode 100644 index 00000000..f9b97d44 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/auth/v1beta1/auth_pb.js @@ -0,0 +1,815 @@ +// source: cosmos/auth/v1beta1/auth.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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); +goog.exportSymbol('proto.cosmos.auth.v1beta1.BaseAccount', null, global); +goog.exportSymbol('proto.cosmos.auth.v1beta1.ModuleAccount', null, global); +goog.exportSymbol('proto.cosmos.auth.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.cosmos.auth.v1beta1.BaseAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.BaseAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.BaseAccount.displayName = 'proto.cosmos.auth.v1beta1.BaseAccount'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.auth.v1beta1.ModuleAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.auth.v1beta1.ModuleAccount.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.ModuleAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.ModuleAccount.displayName = 'proto.cosmos.auth.v1beta1.ModuleAccount'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.auth.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.Params.displayName = 'proto.cosmos.auth.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.cosmos.auth.v1beta1.BaseAccount.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.v1beta1.BaseAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.auth.v1beta1.BaseAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.BaseAccount.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + pubKey: (f = msg.getPubKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + accountNumber: jspb.Message.getFieldWithDefault(msg, 3, 0), + sequence: 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.auth.v1beta1.BaseAccount} + */ +proto.cosmos.auth.v1beta1.BaseAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.BaseAccount; + return proto.cosmos.auth.v1beta1.BaseAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.BaseAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.BaseAccount} + */ +proto.cosmos.auth.v1beta1.BaseAccount.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 google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setPubKey(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAccountNumber(value); + break; + case 4: + 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.cosmos.auth.v1beta1.BaseAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.v1beta1.BaseAccount.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.auth.v1beta1.BaseAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.BaseAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPubKey(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getAccountNumber(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.auth.v1beta1.BaseAccount} returns this + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any pub_key = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.getPubKey = 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.cosmos.auth.v1beta1.BaseAccount} returns this +*/ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.setPubKey = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.auth.v1beta1.BaseAccount} returns this + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.clearPubKey = function() { + return this.setPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.hasPubKey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 account_number = 3; + * @return {number} + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.getAccountNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.auth.v1beta1.BaseAccount} returns this + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.setAccountNumber = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 sequence = 4; + * @return {number} + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.auth.v1beta1.BaseAccount} returns this + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.auth.v1beta1.ModuleAccount.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.auth.v1beta1.ModuleAccount.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.v1beta1.ModuleAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.auth.v1beta1.ModuleAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.ModuleAccount.toObject = function(includeInstance, msg) { + var f, obj = { + baseAccount: (f = msg.getBaseAccount()) && proto.cosmos.auth.v1beta1.BaseAccount.toObject(includeInstance, f), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + permissionsList: (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.auth.v1beta1.ModuleAccount} + */ +proto.cosmos.auth.v1beta1.ModuleAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.ModuleAccount; + return proto.cosmos.auth.v1beta1.ModuleAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.ModuleAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.ModuleAccount} + */ +proto.cosmos.auth.v1beta1.ModuleAccount.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.auth.v1beta1.BaseAccount; + reader.readMessage(value,proto.cosmos.auth.v1beta1.BaseAccount.deserializeBinaryFromReader); + msg.setBaseAccount(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addPermissions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.v1beta1.ModuleAccount.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.auth.v1beta1.ModuleAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.ModuleAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBaseAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.auth.v1beta1.BaseAccount.serializeBinaryToWriter + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPermissionsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } +}; + + +/** + * optional BaseAccount base_account = 1; + * @return {?proto.cosmos.auth.v1beta1.BaseAccount} + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.getBaseAccount = function() { + return /** @type{?proto.cosmos.auth.v1beta1.BaseAccount} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.auth.v1beta1.BaseAccount, 1)); +}; + + +/** + * @param {?proto.cosmos.auth.v1beta1.BaseAccount|undefined} value + * @return {!proto.cosmos.auth.v1beta1.ModuleAccount} returns this +*/ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.setBaseAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.auth.v1beta1.ModuleAccount} returns this + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.clearBaseAccount = function() { + return this.setBaseAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.hasBaseAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.auth.v1beta1.ModuleAccount} returns this + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated string permissions = 3; + * @return {!Array} + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.getPermissionsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.auth.v1beta1.ModuleAccount} returns this + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.setPermissionsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.auth.v1beta1.ModuleAccount} returns this + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.addPermissions = 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.auth.v1beta1.ModuleAccount} returns this + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.clearPermissionsList = function() { + return this.setPermissionsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.auth.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.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.cosmos.auth.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + maxMemoCharacters: jspb.Message.getFieldWithDefault(msg, 1, 0), + txSigLimit: jspb.Message.getFieldWithDefault(msg, 2, 0), + txSizeCostPerByte: jspb.Message.getFieldWithDefault(msg, 3, 0), + sigVerifyCostEd25519: jspb.Message.getFieldWithDefault(msg, 4, 0), + sigVerifyCostSecp256k1: 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.cosmos.auth.v1beta1.Params} + */ +proto.cosmos.auth.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.Params; + return proto.cosmos.auth.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.Params} + */ +proto.cosmos.auth.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.setMaxMemoCharacters(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTxSigLimit(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTxSizeCostPerByte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSigVerifyCostEd25519(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSigVerifyCostSecp256k1(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.auth.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.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.cosmos.auth.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxMemoCharacters(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getTxSigLimit(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getTxSizeCostPerByte(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getSigVerifyCostEd25519(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getSigVerifyCostSecp256k1(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } +}; + + +/** + * optional uint64 max_memo_characters = 1; + * @return {number} + */ +proto.cosmos.auth.v1beta1.Params.prototype.getMaxMemoCharacters = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.auth.v1beta1.Params} returns this + */ +proto.cosmos.auth.v1beta1.Params.prototype.setMaxMemoCharacters = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 tx_sig_limit = 2; + * @return {number} + */ +proto.cosmos.auth.v1beta1.Params.prototype.getTxSigLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.auth.v1beta1.Params} returns this + */ +proto.cosmos.auth.v1beta1.Params.prototype.setTxSigLimit = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 tx_size_cost_per_byte = 3; + * @return {number} + */ +proto.cosmos.auth.v1beta1.Params.prototype.getTxSizeCostPerByte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.auth.v1beta1.Params} returns this + */ +proto.cosmos.auth.v1beta1.Params.prototype.setTxSizeCostPerByte = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 sig_verify_cost_ed25519 = 4; + * @return {number} + */ +proto.cosmos.auth.v1beta1.Params.prototype.getSigVerifyCostEd25519 = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.auth.v1beta1.Params} returns this + */ +proto.cosmos.auth.v1beta1.Params.prototype.setSigVerifyCostEd25519 = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 sig_verify_cost_secp256k1 = 5; + * @return {number} + */ +proto.cosmos.auth.v1beta1.Params.prototype.getSigVerifyCostSecp256k1 = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.auth.v1beta1.Params} returns this + */ +proto.cosmos.auth.v1beta1.Params.prototype.setSigVerifyCostSecp256k1 = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +goog.object.extend(exports, proto.cosmos.auth.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/auth/v1beta1/genesis_pb.js b/dist/src/types/proto-types/cosmos/auth/v1beta1/genesis_pb.js new file mode 100644 index 00000000..23761428 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/auth/v1beta1/genesis_pb.js @@ -0,0 +1,254 @@ +// source: cosmos/auth/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_auth_v1beta1_auth_pb = require('../../../cosmos/auth/v1beta1/auth_pb.js'); +goog.object.extend(proto, cosmos_auth_v1beta1_auth_pb); +goog.exportSymbol('proto.cosmos.auth.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.cosmos.auth.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.auth.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.GenesisState.displayName = 'proto.cosmos.auth.v1beta1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.auth.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.cosmos.auth.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.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.cosmos.auth.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_auth_v1beta1_auth_pb.Params.toObject(includeInstance, f), + accountsList: jspb.Message.toObjectList(msg.getAccountsList(), + 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.cosmos.auth.v1beta1.GenesisState} + */ +proto.cosmos.auth.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.GenesisState; + return proto.cosmos.auth.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.GenesisState} + */ +proto.cosmos.auth.v1beta1.GenesisState.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.Params; + reader.readMessage(value,cosmos_auth_v1beta1_auth_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addAccounts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.auth.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.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.cosmos.auth.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_auth_v1beta1_auth_pb.Params.serializeBinaryToWriter + ); + } + f = message.getAccountsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.auth.v1beta1.Params} + */ +proto.cosmos.auth.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.cosmos.auth.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_auth_v1beta1_auth_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.auth.v1beta1.Params|undefined} value + * @return {!proto.cosmos.auth.v1beta1.GenesisState} returns this +*/ +proto.cosmos.auth.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.auth.v1beta1.GenesisState} returns this + */ +proto.cosmos.auth.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.auth.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated google.protobuf.Any accounts = 2; + * @return {!Array} + */ +proto.cosmos.auth.v1beta1.GenesisState.prototype.getAccountsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.auth.v1beta1.GenesisState} returns this +*/ +proto.cosmos.auth.v1beta1.GenesisState.prototype.setAccountsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.cosmos.auth.v1beta1.GenesisState.prototype.addAccounts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.auth.v1beta1.GenesisState} returns this + */ +proto.cosmos.auth.v1beta1.GenesisState.prototype.clearAccountsList = function() { + return this.setAccountsList([]); +}; + + +goog.object.extend(exports, proto.cosmos.auth.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/auth/v1beta1/query_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/auth/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..8806d0cb --- /dev/null +++ b/dist/src/types/proto-types/cosmos/auth/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,246 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.auth.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_auth_v1beta1_auth_pb = require('../../../cosmos/auth/v1beta1/auth_pb.js') + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.auth = {}; +proto.cosmos.auth.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.auth.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.auth.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.auth.v1beta1.QueryAccountRequest, + * !proto.cosmos.auth.v1beta1.QueryAccountResponse>} + */ +const methodDescriptor_Query_Account = new grpc.web.MethodDescriptor( + '/cosmos.auth.v1beta1.Query/Account', + grpc.web.MethodType.UNARY, + proto.cosmos.auth.v1beta1.QueryAccountRequest, + proto.cosmos.auth.v1beta1.QueryAccountResponse, + /** + * @param {!proto.cosmos.auth.v1beta1.QueryAccountRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.auth.v1beta1.QueryAccountResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.auth.v1beta1.QueryAccountRequest, + * !proto.cosmos.auth.v1beta1.QueryAccountResponse>} + */ +const methodInfo_Query_Account = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.auth.v1beta1.QueryAccountResponse, + /** + * @param {!proto.cosmos.auth.v1beta1.QueryAccountRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.auth.v1beta1.QueryAccountResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.auth.v1beta1.QueryAccountRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.auth.v1beta1.QueryAccountResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.auth.v1beta1.QueryClient.prototype.account = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.auth.v1beta1.Query/Account', + request, + metadata || {}, + methodDescriptor_Query_Account, + callback); +}; + + +/** + * @param {!proto.cosmos.auth.v1beta1.QueryAccountRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.auth.v1beta1.QueryPromiseClient.prototype.account = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.auth.v1beta1.Query/Account', + request, + metadata || {}, + methodDescriptor_Query_Account); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.auth.v1beta1.QueryParamsRequest, + * !proto.cosmos.auth.v1beta1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/cosmos.auth.v1beta1.Query/Params', + grpc.web.MethodType.UNARY, + proto.cosmos.auth.v1beta1.QueryParamsRequest, + proto.cosmos.auth.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.auth.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.auth.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.auth.v1beta1.QueryParamsRequest, + * !proto.cosmos.auth.v1beta1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.auth.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.auth.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.auth.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.auth.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.auth.v1beta1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.auth.v1beta1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.auth.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.cosmos.auth.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.auth.v1beta1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.auth.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +module.exports = proto.cosmos.auth.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/auth/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/auth/v1beta1/query_pb.js new file mode 100644 index 00000000..160afd51 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/auth/v1beta1/query_pb.js @@ -0,0 +1,646 @@ +// source: cosmos/auth/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_auth_v1beta1_auth_pb = require('../../../cosmos/auth/v1beta1/auth_pb.js'); +goog.object.extend(proto, cosmos_auth_v1beta1_auth_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +goog.exportSymbol('proto.cosmos.auth.v1beta1.QueryAccountRequest', null, global); +goog.exportSymbol('proto.cosmos.auth.v1beta1.QueryAccountResponse', null, global); +goog.exportSymbol('proto.cosmos.auth.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryAccountRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.QueryAccountRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.QueryAccountRequest.displayName = 'proto.cosmos.auth.v1beta1.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.auth.v1beta1.QueryAccountResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.QueryAccountResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.QueryAccountResponse.displayName = 'proto.cosmos.auth.v1beta1.QueryAccountResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.auth.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.QueryParamsRequest.displayName = 'proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.QueryParamsResponse.displayName = 'proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryAccountRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.v1beta1.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.auth.v1beta1.QueryAccountRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.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.auth.v1beta1.QueryAccountRequest} + */ +proto.cosmos.auth.v1beta1.QueryAccountRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.QueryAccountRequest; + return proto.cosmos.auth.v1beta1.QueryAccountRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.QueryAccountRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.QueryAccountRequest} + */ +proto.cosmos.auth.v1beta1.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.auth.v1beta1.QueryAccountRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.v1beta1.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.auth.v1beta1.QueryAccountRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.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.auth.v1beta1.QueryAccountRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.auth.v1beta1.QueryAccountRequest} returns this + */ +proto.cosmos.auth.v1beta1.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.auth.v1beta1.QueryAccountResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.v1beta1.QueryAccountResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.auth.v1beta1.QueryAccountResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.QueryAccountResponse.toObject = function(includeInstance, msg) { + var f, obj = { + account: (f = msg.getAccount()) && 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.cosmos.auth.v1beta1.QueryAccountResponse} + */ +proto.cosmos.auth.v1beta1.QueryAccountResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.QueryAccountResponse; + return proto.cosmos.auth.v1beta1.QueryAccountResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.QueryAccountResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.QueryAccountResponse} + */ +proto.cosmos.auth.v1beta1.QueryAccountResponse.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.setAccount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.auth.v1beta1.QueryAccountResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.v1beta1.QueryAccountResponse.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.auth.v1beta1.QueryAccountResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.QueryAccountResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Any account = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.auth.v1beta1.QueryAccountResponse.prototype.getAccount = 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.cosmos.auth.v1beta1.QueryAccountResponse} returns this +*/ +proto.cosmos.auth.v1beta1.QueryAccountResponse.prototype.setAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.auth.v1beta1.QueryAccountResponse} returns this + */ +proto.cosmos.auth.v1beta1.QueryAccountResponse.prototype.clearAccount = function() { + return this.setAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.auth.v1beta1.QueryAccountResponse.prototype.hasAccount = 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.auth.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryParamsRequest} + */ +proto.cosmos.auth.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.QueryParamsRequest; + return proto.cosmos.auth.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.QueryParamsRequest} + */ +proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_auth_v1beta1_auth_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.cosmos.auth.v1beta1.QueryParamsResponse} + */ +proto.cosmos.auth.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.QueryParamsResponse; + return proto.cosmos.auth.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.QueryParamsResponse} + */ +proto.cosmos.auth.v1beta1.QueryParamsResponse.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.Params; + reader.readMessage(value,cosmos_auth_v1beta1_auth_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.cosmos.auth.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_auth_v1beta1_auth_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.auth.v1beta1.Params} + */ +proto.cosmos.auth.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.cosmos.auth.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_auth_v1beta1_auth_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.auth.v1beta1.Params|undefined} value + * @return {!proto.cosmos.auth.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.auth.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.auth.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.auth.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.auth.v1beta1.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.cosmos.auth.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/bank/v1beta1/bank_pb.js b/dist/src/types/proto-types/cosmos/bank/v1beta1/bank_pb.js new file mode 100644 index 00000000..82261386 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/bank/v1beta1/bank_pb.js @@ -0,0 +1,1531 @@ +// source: cosmos/bank/v1beta1/bank.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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.cosmos.bank.v1beta1.DenomUnit', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.Input', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.Metadata', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.Output', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.Params', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.SendEnabled', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.Supply', 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.bank.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.Params.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.Params.displayName = 'proto.cosmos.bank.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.cosmos.bank.v1beta1.SendEnabled = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.SendEnabled, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.SendEnabled.displayName = 'proto.cosmos.bank.v1beta1.SendEnabled'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Input = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.Input.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.Input, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.Input.displayName = 'proto.cosmos.bank.v1beta1.Input'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Output = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.Output.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.Output, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.Output.displayName = 'proto.cosmos.bank.v1beta1.Output'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Supply = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.Supply.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.Supply, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.Supply.displayName = 'proto.cosmos.bank.v1beta1.Supply'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.DenomUnit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.DenomUnit.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.DenomUnit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.DenomUnit.displayName = 'proto.cosmos.bank.v1beta1.DenomUnit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Metadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.Metadata.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.Metadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.Metadata.displayName = 'proto.cosmos.bank.v1beta1.Metadata'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.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.cosmos.bank.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.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.cosmos.bank.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + sendEnabledList: jspb.Message.toObjectList(msg.getSendEnabledList(), + proto.cosmos.bank.v1beta1.SendEnabled.toObject, includeInstance), + defaultSendEnabled: 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.cosmos.bank.v1beta1.Params} + */ +proto.cosmos.bank.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.Params; + return proto.cosmos.bank.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.Params} + */ +proto.cosmos.bank.v1beta1.Params.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.SendEnabled; + reader.readMessage(value,proto.cosmos.bank.v1beta1.SendEnabled.deserializeBinaryFromReader); + msg.addSendEnabled(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDefaultSendEnabled(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.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.cosmos.bank.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSendEnabledList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.bank.v1beta1.SendEnabled.serializeBinaryToWriter + ); + } + f = message.getDefaultSendEnabled(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * repeated SendEnabled send_enabled = 1; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.Params.prototype.getSendEnabledList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.bank.v1beta1.SendEnabled, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.Params} returns this +*/ +proto.cosmos.bank.v1beta1.Params.prototype.setSendEnabledList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.SendEnabled=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.bank.v1beta1.SendEnabled} + */ +proto.cosmos.bank.v1beta1.Params.prototype.addSendEnabled = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.bank.v1beta1.SendEnabled, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.bank.v1beta1.Params} returns this + */ +proto.cosmos.bank.v1beta1.Params.prototype.clearSendEnabledList = function() { + return this.setSendEnabledList([]); +}; + + +/** + * optional bool default_send_enabled = 2; + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.Params.prototype.getDefaultSendEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.bank.v1beta1.Params} returns this + */ +proto.cosmos.bank.v1beta1.Params.prototype.setDefaultSendEnabled = 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.cosmos.bank.v1beta1.SendEnabled.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.SendEnabled.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.SendEnabled} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.SendEnabled.toObject = function(includeInstance, msg) { + var f, obj = { + denom: jspb.Message.getFieldWithDefault(msg, 1, ""), + enabled: 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.cosmos.bank.v1beta1.SendEnabled} + */ +proto.cosmos.bank.v1beta1.SendEnabled.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.SendEnabled; + return proto.cosmos.bank.v1beta1.SendEnabled.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.SendEnabled} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.SendEnabled} + */ +proto.cosmos.bank.v1beta1.SendEnabled.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 {boolean} */ (reader.readBool()); + msg.setEnabled(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.SendEnabled.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.SendEnabled.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.SendEnabled} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.SendEnabled.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenom(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getEnabled(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional string denom = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.SendEnabled.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.SendEnabled} returns this + */ +proto.cosmos.bank.v1beta1.SendEnabled.prototype.setDenom = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool enabled = 2; + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.SendEnabled.prototype.getEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.bank.v1beta1.SendEnabled} returns this + */ +proto.cosmos.bank.v1beta1.SendEnabled.prototype.setEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.Input.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.bank.v1beta1.Input.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.Input.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Input} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Input.toObject = function(includeInstance, msg) { + var f, obj = { + address: 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.cosmos.bank.v1beta1.Input} + */ +proto.cosmos.bank.v1beta1.Input.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.Input; + return proto.cosmos.bank.v1beta1.Input.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.Input} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.Input} + */ +proto.cosmos.bank.v1beta1.Input.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.addCoins(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.Input.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.Input.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.Input} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Input.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + 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 address = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.Input.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.Input} returns this + */ +proto.cosmos.bank.v1beta1.Input.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin coins = 2; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.Input.prototype.getCoinsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.Input} returns this +*/ +proto.cosmos.bank.v1beta1.Input.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.cosmos.bank.v1beta1.Input.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.cosmos.bank.v1beta1.Input} returns this + */ +proto.cosmos.bank.v1beta1.Input.prototype.clearCoinsList = function() { + return this.setCoinsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.Output.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.bank.v1beta1.Output.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.Output.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Output} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Output.toObject = function(includeInstance, msg) { + var f, obj = { + address: 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.cosmos.bank.v1beta1.Output} + */ +proto.cosmos.bank.v1beta1.Output.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.Output; + return proto.cosmos.bank.v1beta1.Output.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.Output} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.Output} + */ +proto.cosmos.bank.v1beta1.Output.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.addCoins(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.Output.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.Output.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.Output} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Output.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + 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 address = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.Output.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.Output} returns this + */ +proto.cosmos.bank.v1beta1.Output.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin coins = 2; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.Output.prototype.getCoinsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.Output} returns this +*/ +proto.cosmos.bank.v1beta1.Output.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.cosmos.bank.v1beta1.Output.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.cosmos.bank.v1beta1.Output} returns this + */ +proto.cosmos.bank.v1beta1.Output.prototype.clearCoinsList = function() { + return this.setCoinsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.Supply.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.Supply.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.Supply.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Supply} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Supply.toObject = function(includeInstance, msg) { + var f, obj = { + totalList: jspb.Message.toObjectList(msg.getTotalList(), + 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.bank.v1beta1.Supply} + */ +proto.cosmos.bank.v1beta1.Supply.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.Supply; + return proto.cosmos.bank.v1beta1.Supply.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.Supply} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.Supply} + */ +proto.cosmos.bank.v1beta1.Supply.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.addTotal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.Supply.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.Supply.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.Supply} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Supply.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotalList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin total = 1; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.Supply.prototype.getTotalList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.Supply} returns this +*/ +proto.cosmos.bank.v1beta1.Supply.prototype.setTotalList = 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.cosmos.bank.v1beta1.Supply.prototype.addTotal = 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.cosmos.bank.v1beta1.Supply} returns this + */ +proto.cosmos.bank.v1beta1.Supply.prototype.clearTotalList = function() { + return this.setTotalList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.DenomUnit.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.bank.v1beta1.DenomUnit.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.DenomUnit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.DenomUnit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.DenomUnit.toObject = function(includeInstance, msg) { + var f, obj = { + denom: jspb.Message.getFieldWithDefault(msg, 1, ""), + exponent: jspb.Message.getFieldWithDefault(msg, 2, 0), + aliasesList: (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.bank.v1beta1.DenomUnit} + */ +proto.cosmos.bank.v1beta1.DenomUnit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.DenomUnit; + return proto.cosmos.bank.v1beta1.DenomUnit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.DenomUnit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.DenomUnit} + */ +proto.cosmos.bank.v1beta1.DenomUnit.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.readUint32()); + msg.setExponent(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addAliases(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.DenomUnit.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.DenomUnit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.DenomUnit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenom(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExponent(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getAliasesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } +}; + + +/** + * optional string denom = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.DenomUnit} returns this + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.setDenom = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint32 exponent = 2; + * @return {number} + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.getExponent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.bank.v1beta1.DenomUnit} returns this + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.setExponent = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated string aliases = 3; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.getAliasesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.DenomUnit} returns this + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.setAliasesList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.bank.v1beta1.DenomUnit} returns this + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.addAliases = 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.v1beta1.DenomUnit} returns this + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.clearAliasesList = function() { + return this.setAliasesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.Metadata.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.bank.v1beta1.Metadata.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.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.bank.v1beta1.Metadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Metadata.toObject = function(includeInstance, msg) { + var f, obj = { + description: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomUnitsList: jspb.Message.toObjectList(msg.getDenomUnitsList(), + proto.cosmos.bank.v1beta1.DenomUnit.toObject, includeInstance), + base: jspb.Message.getFieldWithDefault(msg, 3, ""), + display: 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.cosmos.bank.v1beta1.Metadata} + */ +proto.cosmos.bank.v1beta1.Metadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.Metadata; + return proto.cosmos.bank.v1beta1.Metadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.Metadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.Metadata} + */ +proto.cosmos.bank.v1beta1.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.setDescription(value); + break; + case 2: + var value = new proto.cosmos.bank.v1beta1.DenomUnit; + reader.readMessage(value,proto.cosmos.bank.v1beta1.DenomUnit.deserializeBinaryFromReader); + msg.addDenomUnits(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBase(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setDisplay(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.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.bank.v1beta1.Metadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Metadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomUnitsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.bank.v1beta1.DenomUnit.serializeBinaryToWriter + ); + } + f = message.getBase(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDisplay(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string description = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.Metadata} returns this + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated DenomUnit denom_units = 2; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.getDenomUnitsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.bank.v1beta1.DenomUnit, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.Metadata} returns this +*/ +proto.cosmos.bank.v1beta1.Metadata.prototype.setDenomUnitsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.DenomUnit=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.bank.v1beta1.DenomUnit} + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.addDenomUnits = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.bank.v1beta1.DenomUnit, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.bank.v1beta1.Metadata} returns this + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.clearDenomUnitsList = function() { + return this.setDenomUnitsList([]); +}; + + +/** + * optional string base = 3; + * @return {string} + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.getBase = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.Metadata} returns this + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.setBase = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string display = 4; + * @return {string} + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.getDisplay = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.Metadata} returns this + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.setDisplay = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +goog.object.extend(exports, proto.cosmos.bank.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/bank/v1beta1/genesis_pb.js b/dist/src/types/proto-types/cosmos/bank/v1beta1/genesis_pb.js new file mode 100644 index 00000000..024ead7a --- /dev/null +++ b/dist/src/types/proto-types/cosmos/bank/v1beta1/genesis_pb.js @@ -0,0 +1,572 @@ +// source: cosmos/bank/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var cosmos_bank_v1beta1_bank_pb = require('../../../cosmos/bank/v1beta1/bank_pb.js'); +goog.object.extend(proto, cosmos_bank_v1beta1_bank_pb); +goog.exportSymbol('proto.cosmos.bank.v1beta1.Balance', null, global); +goog.exportSymbol('proto.cosmos.bank.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.cosmos.bank.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.GenesisState.displayName = 'proto.cosmos.bank.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.cosmos.bank.v1beta1.Balance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.Balance.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.Balance, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.Balance.displayName = 'proto.cosmos.bank.v1beta1.Balance'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.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.cosmos.bank.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.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.cosmos.bank.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_bank_v1beta1_bank_pb.Params.toObject(includeInstance, f), + balancesList: jspb.Message.toObjectList(msg.getBalancesList(), + proto.cosmos.bank.v1beta1.Balance.toObject, includeInstance), + supplyList: jspb.Message.toObjectList(msg.getSupplyList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + denomMetadataList: jspb.Message.toObjectList(msg.getDenomMetadataList(), + cosmos_bank_v1beta1_bank_pb.Metadata.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.bank.v1beta1.GenesisState} + */ +proto.cosmos.bank.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.GenesisState; + return proto.cosmos.bank.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.GenesisState} + */ +proto.cosmos.bank.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_bank_v1beta1_bank_pb.Params; + reader.readMessage(value,cosmos_bank_v1beta1_bank_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new proto.cosmos.bank.v1beta1.Balance; + reader.readMessage(value,proto.cosmos.bank.v1beta1.Balance.deserializeBinaryFromReader); + msg.addBalances(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addSupply(value); + break; + case 4: + var value = new cosmos_bank_v1beta1_bank_pb.Metadata; + reader.readMessage(value,cosmos_bank_v1beta1_bank_pb.Metadata.deserializeBinaryFromReader); + msg.addDenomMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.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.cosmos.bank.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_bank_v1beta1_bank_pb.Params.serializeBinaryToWriter + ); + } + f = message.getBalancesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.bank.v1beta1.Balance.serializeBinaryToWriter + ); + } + f = message.getSupplyList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getDenomMetadataList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_bank_v1beta1_bank_pb.Metadata.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.bank.v1beta1.Params} + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.cosmos.bank.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_bank_v1beta1_bank_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.bank.v1beta1.Params|undefined} value + * @return {!proto.cosmos.bank.v1beta1.GenesisState} returns this +*/ +proto.cosmos.bank.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.GenesisState} returns this + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Balance balances = 2; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.getBalancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.bank.v1beta1.Balance, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.GenesisState} returns this +*/ +proto.cosmos.bank.v1beta1.GenesisState.prototype.setBalancesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.Balance=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.bank.v1beta1.Balance} + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.addBalances = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.bank.v1beta1.Balance, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.bank.v1beta1.GenesisState} returns this + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.clearBalancesList = function() { + return this.setBalancesList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin supply = 3; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.getSupplyList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.GenesisState} returns this +*/ +proto.cosmos.bank.v1beta1.GenesisState.prototype.setSupplyList = 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.bank.v1beta1.GenesisState.prototype.addSupply = 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.bank.v1beta1.GenesisState} returns this + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.clearSupplyList = function() { + return this.setSupplyList([]); +}; + + +/** + * repeated Metadata denom_metadata = 4; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.getDenomMetadataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_bank_v1beta1_bank_pb.Metadata, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.GenesisState} returns this +*/ +proto.cosmos.bank.v1beta1.GenesisState.prototype.setDenomMetadataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.Metadata=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.bank.v1beta1.Metadata} + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.addDenomMetadata = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.bank.v1beta1.Metadata, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.bank.v1beta1.GenesisState} returns this + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.clearDenomMetadataList = function() { + return this.setDenomMetadataList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.Balance.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.bank.v1beta1.Balance.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.Balance.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Balance} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Balance.toObject = function(includeInstance, msg) { + var f, obj = { + address: 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.cosmos.bank.v1beta1.Balance} + */ +proto.cosmos.bank.v1beta1.Balance.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.Balance; + return proto.cosmos.bank.v1beta1.Balance.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.Balance} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.Balance} + */ +proto.cosmos.bank.v1beta1.Balance.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.addCoins(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.Balance.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.Balance.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.Balance} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Balance.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + 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 address = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.Balance.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.Balance} returns this + */ +proto.cosmos.bank.v1beta1.Balance.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin coins = 2; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.Balance.prototype.getCoinsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.Balance} returns this +*/ +proto.cosmos.bank.v1beta1.Balance.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.cosmos.bank.v1beta1.Balance.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.cosmos.bank.v1beta1.Balance} returns this + */ +proto.cosmos.bank.v1beta1.Balance.prototype.clearCoinsList = function() { + return this.setCoinsList([]); +}; + + +goog.object.extend(exports, proto.cosmos.bank.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/bank/v1beta1/query_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/bank/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..46575ede --- /dev/null +++ b/dist/src/types/proto-types/cosmos/bank/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,486 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.bank.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_bank_v1beta1_bank_pb = require('../../../cosmos/bank/v1beta1/bank_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.bank = {}; +proto.cosmos.bank.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.bank.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.bank.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.bank.v1beta1.QueryBalanceRequest, + * !proto.cosmos.bank.v1beta1.QueryBalanceResponse>} + */ +const methodDescriptor_Query_Balance = new grpc.web.MethodDescriptor( + '/cosmos.bank.v1beta1.Query/Balance', + grpc.web.MethodType.UNARY, + proto.cosmos.bank.v1beta1.QueryBalanceRequest, + proto.cosmos.bank.v1beta1.QueryBalanceResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QueryBalanceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QueryBalanceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.bank.v1beta1.QueryBalanceRequest, + * !proto.cosmos.bank.v1beta1.QueryBalanceResponse>} + */ +const methodInfo_Query_Balance = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.bank.v1beta1.QueryBalanceResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QueryBalanceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QueryBalanceResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.bank.v1beta1.QueryBalanceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.bank.v1beta1.QueryBalanceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.bank.v1beta1.QueryClient.prototype.balance = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/Balance', + request, + metadata || {}, + methodDescriptor_Query_Balance, + callback); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.QueryBalanceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.bank.v1beta1.QueryPromiseClient.prototype.balance = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/Balance', + request, + metadata || {}, + methodDescriptor_Query_Balance); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.bank.v1beta1.QueryAllBalancesRequest, + * !proto.cosmos.bank.v1beta1.QueryAllBalancesResponse>} + */ +const methodDescriptor_Query_AllBalances = new grpc.web.MethodDescriptor( + '/cosmos.bank.v1beta1.Query/AllBalances', + grpc.web.MethodType.UNARY, + proto.cosmos.bank.v1beta1.QueryAllBalancesRequest, + proto.cosmos.bank.v1beta1.QueryAllBalancesResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.bank.v1beta1.QueryAllBalancesRequest, + * !proto.cosmos.bank.v1beta1.QueryAllBalancesResponse>} + */ +const methodInfo_Query_AllBalances = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.bank.v1beta1.QueryAllBalancesResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.bank.v1beta1.QueryAllBalancesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.bank.v1beta1.QueryClient.prototype.allBalances = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/AllBalances', + request, + metadata || {}, + methodDescriptor_Query_AllBalances, + callback); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.bank.v1beta1.QueryPromiseClient.prototype.allBalances = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/AllBalances', + request, + metadata || {}, + methodDescriptor_Query_AllBalances); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest, + * !proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse>} + */ +const methodDescriptor_Query_TotalSupply = new grpc.web.MethodDescriptor( + '/cosmos.bank.v1beta1.Query/TotalSupply', + grpc.web.MethodType.UNARY, + proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest, + proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest, + * !proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse>} + */ +const methodInfo_Query_TotalSupply = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.bank.v1beta1.QueryClient.prototype.totalSupply = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/TotalSupply', + request, + metadata || {}, + methodDescriptor_Query_TotalSupply, + callback); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.bank.v1beta1.QueryPromiseClient.prototype.totalSupply = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/TotalSupply', + request, + metadata || {}, + methodDescriptor_Query_TotalSupply); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.bank.v1beta1.QuerySupplyOfRequest, + * !proto.cosmos.bank.v1beta1.QuerySupplyOfResponse>} + */ +const methodDescriptor_Query_SupplyOf = new grpc.web.MethodDescriptor( + '/cosmos.bank.v1beta1.Query/SupplyOf', + grpc.web.MethodType.UNARY, + proto.cosmos.bank.v1beta1.QuerySupplyOfRequest, + proto.cosmos.bank.v1beta1.QuerySupplyOfResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QuerySupplyOfRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.bank.v1beta1.QuerySupplyOfRequest, + * !proto.cosmos.bank.v1beta1.QuerySupplyOfResponse>} + */ +const methodInfo_Query_SupplyOf = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.bank.v1beta1.QuerySupplyOfResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QuerySupplyOfRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.bank.v1beta1.QuerySupplyOfRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.bank.v1beta1.QuerySupplyOfResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.bank.v1beta1.QueryClient.prototype.supplyOf = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/SupplyOf', + request, + metadata || {}, + methodDescriptor_Query_SupplyOf, + callback); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.QuerySupplyOfRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.bank.v1beta1.QueryPromiseClient.prototype.supplyOf = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/SupplyOf', + request, + metadata || {}, + methodDescriptor_Query_SupplyOf); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.bank.v1beta1.QueryParamsRequest, + * !proto.cosmos.bank.v1beta1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/cosmos.bank.v1beta1.Query/Params', + grpc.web.MethodType.UNARY, + proto.cosmos.bank.v1beta1.QueryParamsRequest, + proto.cosmos.bank.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.bank.v1beta1.QueryParamsRequest, + * !proto.cosmos.bank.v1beta1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.bank.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.bank.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.bank.v1beta1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.bank.v1beta1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.bank.v1beta1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +module.exports = proto.cosmos.bank.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/bank/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/bank/v1beta1/query_pb.js new file mode 100644 index 00000000..bb1ec404 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/bank/v1beta1/query_pb.js @@ -0,0 +1,1742 @@ +// source: cosmos/bank/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_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_bank_v1beta1_bank_pb = require('../../../cosmos/bank/v1beta1/bank_pb.js'); +goog.object.extend(proto, cosmos_bank_v1beta1_bank_pb); +goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryAllBalancesRequest', null, global); +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.QueryParamsRequest', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.QuerySupplyOfRequest', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.QuerySupplyOfResponse', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse', 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.bank.v1beta1.QueryBalanceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryBalanceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryBalanceRequest.displayName = 'proto.cosmos.bank.v1beta1.QueryBalanceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryBalanceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryBalanceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryBalanceResponse.displayName = 'proto.cosmos.bank.v1beta1.QueryBalanceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryAllBalancesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryAllBalancesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.displayName = 'proto.cosmos.bank.v1beta1.QueryAllBalancesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryAllBalancesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryAllBalancesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.displayName = 'proto.cosmos.bank.v1beta1.QueryAllBalancesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryTotalSupplyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.displayName = 'proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryTotalSupplyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.displayName = 'proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QuerySupplyOfRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QuerySupplyOfRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.displayName = 'proto.cosmos.bank.v1beta1.QuerySupplyOfRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QuerySupplyOfResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QuerySupplyOfResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.displayName = 'proto.cosmos.bank.v1beta1.QuerySupplyOfResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryParamsRequest.displayName = 'proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryParamsResponse.displayName = 'proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryBalanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryBalanceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryBalanceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + denom: 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.bank.v1beta1.QueryBalanceRequest} + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryBalanceRequest; + return proto.cosmos.bank.v1beta1.QueryBalanceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryBalanceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryBalanceRequest} + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.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.setDenom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QueryBalanceRequest.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.QueryBalanceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenom(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.QueryBalanceRequest} returns this + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom = 2; + * @return {string} + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.QueryBalanceRequest} returns this + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.prototype.setDenom = 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.bank.v1beta1.QueryBalanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryBalanceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryBalanceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryBalanceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + 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.QueryBalanceResponse} + */ +proto.cosmos.bank.v1beta1.QueryBalanceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryBalanceResponse; + return proto.cosmos.bank.v1beta1.QueryBalanceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryBalanceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryBalanceResponse} + */ +proto.cosmos.bank.v1beta1.QueryBalanceResponse.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.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.QueryBalanceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QueryBalanceResponse.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.QueryBalanceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryBalanceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBalance(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin balance = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.bank.v1beta1.QueryBalanceResponse.prototype.getBalance = 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.cosmos.bank.v1beta1.QueryBalanceResponse} returns this +*/ +proto.cosmos.bank.v1beta1.QueryBalanceResponse.prototype.setBalance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QueryBalanceResponse} returns this + */ +proto.cosmos.bank.v1beta1.QueryBalanceResponse.prototype.clearBalance = function() { + return this.setBalance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QueryBalanceResponse.prototype.hasBalance = 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.bank.v1beta1.QueryAllBalancesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryAllBalancesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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) + }; + + 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.QueryAllBalancesRequest} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryAllBalancesRequest; + return proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.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_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.QueryAllBalancesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.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.QueryAllBalancesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + 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 string address = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} returns this + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.prototype.setAddress = 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.QueryAllBalancesRequest.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.QueryAllBalancesRequest} returns this +*/ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} returns this + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.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.QueryAllBalancesResponse.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.QueryAllBalancesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryAllBalancesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + balancesList: jspb.Message.toObjectList(msg.getBalancesList(), + cosmos_base_v1beta1_coin_pb.Coin.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.QueryAllBalancesResponse} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryAllBalancesResponse; + return proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryAllBalancesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryAllBalancesResponse} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.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.addBalances(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.QueryAllBalancesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.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.QueryAllBalancesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBalancesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin balances = 1; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.prototype.getBalancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.QueryAllBalancesResponse} returns this +*/ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.prototype.setBalancesList = 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.cosmos.bank.v1beta1.QueryAllBalancesResponse.prototype.addBalances = 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.cosmos.bank.v1beta1.QueryAllBalancesResponse} returns this + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.prototype.clearBalancesList = function() { + return this.setBalancesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.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.QueryAllBalancesResponse} returns this +*/ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QueryAllBalancesResponse} returns this + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.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.QueryTotalSupplyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryTotalSupplyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.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.bank.v1beta1.QueryTotalSupplyRequest} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest; + return proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.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.bank.v1beta1.QueryTotalSupplyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.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.QueryTotalSupplyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.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.QueryTotalSupplyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryTotalSupplyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + supplyList: jspb.Message.toObjectList(msg.getSupplyList(), + 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.bank.v1beta1.QueryTotalSupplyResponse} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse; + return proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.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.addSupply(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.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.QueryTotalSupplyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSupplyList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin supply = 1; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.getSupplyList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse} returns this +*/ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.setSupplyList = 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.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.addSupply = 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.cosmos.bank.v1beta1.QueryTotalSupplyResponse} returns this + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.clearSupplyList = function() { + return this.setSupplyList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.QuerySupplyOfRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QuerySupplyOfRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.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.cosmos.bank.v1beta1.QuerySupplyOfRequest} + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QuerySupplyOfRequest; + return proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QuerySupplyOfRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QuerySupplyOfRequest} + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.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.cosmos.bank.v1beta1.QuerySupplyOfRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.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.QuerySupplyOfRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.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.cosmos.bank.v1beta1.QuerySupplyOfRequest.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.QuerySupplyOfRequest} returns this + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.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.cosmos.bank.v1beta1.QuerySupplyOfResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QuerySupplyOfResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.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.cosmos.bank.v1beta1.QuerySupplyOfResponse} + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QuerySupplyOfResponse; + return proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QuerySupplyOfResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QuerySupplyOfResponse} + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.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.cosmos.bank.v1beta1.QuerySupplyOfResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.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.QuerySupplyOfResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.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.cosmos.bank.v1beta1.QuerySupplyOfResponse.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.cosmos.bank.v1beta1.QuerySupplyOfResponse} returns this +*/ +proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.prototype.setAmount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QuerySupplyOfResponse} returns this + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.prototype.hasAmount = 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.bank.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryParamsRequest} + */ +proto.cosmos.bank.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryParamsRequest; + return proto.cosmos.bank.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryParamsRequest} + */ +proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_bank_v1beta1_bank_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.cosmos.bank.v1beta1.QueryParamsResponse} + */ +proto.cosmos.bank.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryParamsResponse; + return proto.cosmos.bank.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryParamsResponse} + */ +proto.cosmos.bank.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_bank_v1beta1_bank_pb.Params; + reader.readMessage(value,cosmos_bank_v1beta1_bank_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.cosmos.bank.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_bank_v1beta1_bank_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.bank.v1beta1.Params} + */ +proto.cosmos.bank.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.cosmos.bank.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_bank_v1beta1_bank_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.bank.v1beta1.Params|undefined} value + * @return {!proto.cosmos.bank.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.bank.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.bank.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.cosmos.bank.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/bank/v1beta1/tx_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/bank/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..2eecc972 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/bank/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,242 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.bank.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_bank_v1beta1_bank_pb = require('../../../cosmos/bank/v1beta1/bank_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.bank = {}; +proto.cosmos.bank.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.bank.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.bank.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.bank.v1beta1.MsgSend, + * !proto.cosmos.bank.v1beta1.MsgSendResponse>} + */ +const methodDescriptor_Msg_Send = new grpc.web.MethodDescriptor( + '/cosmos.bank.v1beta1.Msg/Send', + grpc.web.MethodType.UNARY, + proto.cosmos.bank.v1beta1.MsgSend, + proto.cosmos.bank.v1beta1.MsgSendResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.MsgSend} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.MsgSendResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.bank.v1beta1.MsgSend, + * !proto.cosmos.bank.v1beta1.MsgSendResponse>} + */ +const methodInfo_Msg_Send = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.bank.v1beta1.MsgSendResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.MsgSend} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.MsgSendResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.bank.v1beta1.MsgSend} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.bank.v1beta1.MsgSendResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.bank.v1beta1.MsgClient.prototype.send = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.bank.v1beta1.Msg/Send', + request, + metadata || {}, + methodDescriptor_Msg_Send, + callback); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.MsgSend} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.bank.v1beta1.MsgPromiseClient.prototype.send = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.bank.v1beta1.Msg/Send', + request, + metadata || {}, + methodDescriptor_Msg_Send); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.bank.v1beta1.MsgMultiSend, + * !proto.cosmos.bank.v1beta1.MsgMultiSendResponse>} + */ +const methodDescriptor_Msg_MultiSend = new grpc.web.MethodDescriptor( + '/cosmos.bank.v1beta1.Msg/MultiSend', + grpc.web.MethodType.UNARY, + proto.cosmos.bank.v1beta1.MsgMultiSend, + proto.cosmos.bank.v1beta1.MsgMultiSendResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.MsgMultiSend} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.MsgMultiSendResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.bank.v1beta1.MsgMultiSend, + * !proto.cosmos.bank.v1beta1.MsgMultiSendResponse>} + */ +const methodInfo_Msg_MultiSend = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.bank.v1beta1.MsgMultiSendResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.MsgMultiSend} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.MsgMultiSendResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.bank.v1beta1.MsgMultiSend} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.bank.v1beta1.MsgMultiSendResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.bank.v1beta1.MsgClient.prototype.multiSend = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.bank.v1beta1.Msg/MultiSend', + request, + metadata || {}, + methodDescriptor_Msg_MultiSend, + callback); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.MsgMultiSend} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.bank.v1beta1.MsgPromiseClient.prototype.multiSend = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.bank.v1beta1.Msg/MultiSend', + request, + metadata || {}, + methodDescriptor_Msg_MultiSend); +}; + + +module.exports = proto.cosmos.bank.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/bank/v1beta1/tx_pb.js b/dist/src/types/proto-types/cosmos/bank/v1beta1/tx_pb.js new file mode 100644 index 00000000..e7082b16 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/bank/v1beta1/tx_pb.js @@ -0,0 +1,744 @@ +// source: cosmos/bank/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var cosmos_bank_v1beta1_bank_pb = require('../../../cosmos/bank/v1beta1/bank_pb.js'); +goog.object.extend(proto, cosmos_bank_v1beta1_bank_pb); +goog.exportSymbol('proto.cosmos.bank.v1beta1.MsgMultiSend', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.MsgMultiSendResponse', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.MsgSend', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.MsgSendResponse', 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.bank.v1beta1.MsgSend = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.MsgSend.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.MsgSend, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.MsgSend.displayName = 'proto.cosmos.bank.v1beta1.MsgSend'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgSendResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.MsgSendResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.MsgSendResponse.displayName = 'proto.cosmos.bank.v1beta1.MsgSendResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgMultiSend = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.MsgMultiSend.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.MsgMultiSend, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.MsgMultiSend.displayName = 'proto.cosmos.bank.v1beta1.MsgMultiSend'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgMultiSendResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.MsgMultiSendResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.MsgMultiSendResponse.displayName = 'proto.cosmos.bank.v1beta1.MsgMultiSendResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.MsgSend.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.bank.v1beta1.MsgSend.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.MsgSend.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgSend} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.MsgSend.toObject = function(includeInstance, msg) { + var f, obj = { + fromAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + toAddress: 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.bank.v1beta1.MsgSend} + */ +proto.cosmos.bank.v1beta1.MsgSend.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.MsgSend; + return proto.cosmos.bank.v1beta1.MsgSend.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.MsgSend} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.MsgSend} + */ +proto.cosmos.bank.v1beta1.MsgSend.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.setFromAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setToAddress(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.bank.v1beta1.MsgSend.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.MsgSend.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.MsgSend} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.MsgSend.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFromAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getToAddress(); + 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 from_address = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.MsgSend.prototype.getFromAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.MsgSend} returns this + */ +proto.cosmos.bank.v1beta1.MsgSend.prototype.setFromAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string to_address = 2; + * @return {string} + */ +proto.cosmos.bank.v1beta1.MsgSend.prototype.getToAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.MsgSend} returns this + */ +proto.cosmos.bank.v1beta1.MsgSend.prototype.setToAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 3; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.MsgSend.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.MsgSend} returns this +*/ +proto.cosmos.bank.v1beta1.MsgSend.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.bank.v1beta1.MsgSend.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.bank.v1beta1.MsgSend} returns this + */ +proto.cosmos.bank.v1beta1.MsgSend.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.bank.v1beta1.MsgSendResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.MsgSendResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgSendResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.MsgSendResponse.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.bank.v1beta1.MsgSendResponse} + */ +proto.cosmos.bank.v1beta1.MsgSendResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.MsgSendResponse; + return proto.cosmos.bank.v1beta1.MsgSendResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.MsgSendResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.MsgSendResponse} + */ +proto.cosmos.bank.v1beta1.MsgSendResponse.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.bank.v1beta1.MsgSendResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.MsgSendResponse.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.MsgSendResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.MsgSendResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.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.bank.v1beta1.MsgMultiSend.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.MsgMultiSend.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgMultiSend} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.toObject = function(includeInstance, msg) { + var f, obj = { + inputsList: jspb.Message.toObjectList(msg.getInputsList(), + cosmos_bank_v1beta1_bank_pb.Input.toObject, includeInstance), + outputsList: jspb.Message.toObjectList(msg.getOutputsList(), + cosmos_bank_v1beta1_bank_pb.Output.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.bank.v1beta1.MsgMultiSend} + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.MsgMultiSend; + return proto.cosmos.bank.v1beta1.MsgMultiSend.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.MsgMultiSend} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.MsgMultiSend} + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_bank_v1beta1_bank_pb.Input; + reader.readMessage(value,cosmos_bank_v1beta1_bank_pb.Input.deserializeBinaryFromReader); + msg.addInputs(value); + break; + case 2: + var value = new cosmos_bank_v1beta1_bank_pb.Output; + reader.readMessage(value,cosmos_bank_v1beta1_bank_pb.Output.deserializeBinaryFromReader); + msg.addOutputs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.MsgMultiSend.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.MsgMultiSend} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInputsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_bank_v1beta1_bank_pb.Input.serializeBinaryToWriter + ); + } + f = message.getOutputsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_bank_v1beta1_bank_pb.Output.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Input inputs = 1; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.getInputsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_bank_v1beta1_bank_pb.Input, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.MsgMultiSend} returns this +*/ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.setInputsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.Input=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.bank.v1beta1.Input} + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.addInputs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.bank.v1beta1.Input, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.bank.v1beta1.MsgMultiSend} returns this + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.clearInputsList = function() { + return this.setInputsList([]); +}; + + +/** + * repeated Output outputs = 2; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.getOutputsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_bank_v1beta1_bank_pb.Output, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.MsgMultiSend} returns this +*/ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.setOutputsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.Output=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.bank.v1beta1.Output} + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.addOutputs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.bank.v1beta1.Output, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.bank.v1beta1.MsgMultiSend} returns this + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.clearOutputsList = function() { + return this.setOutputsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.MsgMultiSendResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.MsgMultiSendResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgMultiSendResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.MsgMultiSendResponse.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.bank.v1beta1.MsgMultiSendResponse} + */ +proto.cosmos.bank.v1beta1.MsgMultiSendResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.MsgMultiSendResponse; + return proto.cosmos.bank.v1beta1.MsgMultiSendResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.MsgMultiSendResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.MsgMultiSendResponse} + */ +proto.cosmos.bank.v1beta1.MsgMultiSendResponse.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.bank.v1beta1.MsgMultiSendResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.MsgMultiSendResponse.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.MsgMultiSendResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.MsgMultiSendResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cosmos.bank.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/base/abci/v1beta1/abci_pb.js b/dist/src/types/proto-types/cosmos/base/abci/v1beta1/abci_pb.js new file mode 100644 index 00000000..69e19465 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/base/abci/v1beta1/abci_pb.js @@ -0,0 +1,2582 @@ +// source: cosmos/base/abci/v1beta1/abci.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 tendermint_abci_types_pb = require('../../../../tendermint/abci/types_pb.js'); +goog.object.extend(proto, tendermint_abci_types_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); +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.SearchTxsResult', null, global); +goog.exportSymbol('proto.cosmos.base.abci.v1beta1.SimulationResponse', null, global); +goog.exportSymbol('proto.cosmos.base.abci.v1beta1.StringEvent', null, global); +goog.exportSymbol('proto.cosmos.base.abci.v1beta1.TxMsgData', null, global); +goog.exportSymbol('proto.cosmos.base.abci.v1beta1.TxResponse', 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.abci.v1beta1.TxResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.abci.v1beta1.TxResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.TxResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.TxResponse.displayName = 'proto.cosmos.base.abci.v1beta1.TxResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ABCIMessageLog = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.abci.v1beta1.ABCIMessageLog.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.ABCIMessageLog, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.ABCIMessageLog.displayName = 'proto.cosmos.base.abci.v1beta1.ABCIMessageLog'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.StringEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.abci.v1beta1.StringEvent.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.StringEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.StringEvent.displayName = 'proto.cosmos.base.abci.v1beta1.StringEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Attribute = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.Attribute, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.Attribute.displayName = 'proto.cosmos.base.abci.v1beta1.Attribute'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.GasInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.GasInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.GasInfo.displayName = 'proto.cosmos.base.abci.v1beta1.GasInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Result = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.abci.v1beta1.Result.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.Result, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.Result.displayName = 'proto.cosmos.base.abci.v1beta1.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.cosmos.base.abci.v1beta1.SimulationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.SimulationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.SimulationResponse.displayName = 'proto.cosmos.base.abci.v1beta1.SimulationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.MsgData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.MsgData.displayName = 'proto.cosmos.base.abci.v1beta1.MsgData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.TxMsgData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.abci.v1beta1.TxMsgData.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.TxMsgData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.TxMsgData.displayName = 'proto.cosmos.base.abci.v1beta1.TxMsgData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.SearchTxsResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.abci.v1beta1.SearchTxsResult.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.SearchTxsResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.SearchTxsResult.displayName = 'proto.cosmos.base.abci.v1beta1.SearchTxsResult'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.abci.v1beta1.TxResponse.repeatedFields_ = [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.cosmos.base.abci.v1beta1.TxResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.TxResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.TxResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.TxResponse.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + txhash: jspb.Message.getFieldWithDefault(msg, 2, ""), + codespace: jspb.Message.getFieldWithDefault(msg, 3, ""), + code: jspb.Message.getFieldWithDefault(msg, 4, 0), + data: jspb.Message.getFieldWithDefault(msg, 5, ""), + rawLog: jspb.Message.getFieldWithDefault(msg, 6, ""), + logsList: jspb.Message.toObjectList(msg.getLogsList(), + proto.cosmos.base.abci.v1beta1.ABCIMessageLog.toObject, includeInstance), + info: jspb.Message.getFieldWithDefault(msg, 8, ""), + gasWanted: jspb.Message.getFieldWithDefault(msg, 9, 0), + gasUsed: jspb.Message.getFieldWithDefault(msg, 10, 0), + tx: (f = msg.getTx()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + timestamp: jspb.Message.getFieldWithDefault(msg, 12, "") + }; + + 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.TxResponse} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.TxResponse; + return proto.cosmos.base.abci.v1beta1.TxResponse.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.TxResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.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 = /** @type {string} */ (reader.readString()); + msg.setTxhash(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setCodespace(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCode(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setRawLog(value); + break; + case 7: + var value = new proto.cosmos.base.abci.v1beta1.ABCIMessageLog; + reader.readMessage(value,proto.cosmos.base.abci.v1beta1.ABCIMessageLog.deserializeBinaryFromReader); + msg.addLogs(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGasWanted(value); + break; + case 10: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGasUsed(value); + break; + case 11: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setTx(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setTimestamp(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.TxResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.TxResponse.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.TxResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.TxResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getTxhash(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCodespace(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getRawLog(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getLogsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.cosmos.base.abci.v1beta1.ABCIMessageLog.serializeBinaryToWriter + ); + } + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getGasWanted(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getGasUsed(); + if (f !== 0) { + writer.writeInt64( + 10, + f + ); + } + f = message.getTx(); + if (f != null) { + writer.writeMessage( + 11, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getTimestamp(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string txhash = 2; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getTxhash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setTxhash = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string codespace = 3; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getCodespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setCodespace = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint32 code = 4; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string data = 5; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string raw_log = 6; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getRawLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setRawLog = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * repeated ABCIMessageLog logs = 7; + * @return {!Array} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getLogsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.abci.v1beta1.ABCIMessageLog, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this +*/ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setLogsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.cosmos.base.abci.v1beta1.ABCIMessageLog=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.abci.v1beta1.ABCIMessageLog} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.addLogs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.cosmos.base.abci.v1beta1.ABCIMessageLog, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.clearLogsList = function() { + return this.setLogsList([]); +}; + + +/** + * optional string info = 8; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setInfo = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional int64 gas_wanted = 9; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getGasWanted = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setGasWanted = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional int64 gas_used = 10; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getGasUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setGasUsed = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional google.protobuf.Any tx = 11; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getTx = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 11)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this +*/ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setTx = function(value) { + return jspb.Message.setWrapperField(this, 11, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.clearTx = function() { + return this.setTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.hasTx = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional string timestamp = 12; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getTimestamp = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.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.abci.v1beta1.ABCIMessageLog.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.ABCIMessageLog.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ABCIMessageLog} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.toObject = function(includeInstance, msg) { + var f, obj = { + msgIndex: jspb.Message.getFieldWithDefault(msg, 1, 0), + log: jspb.Message.getFieldWithDefault(msg, 2, ""), + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.cosmos.base.abci.v1beta1.StringEvent.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.ABCIMessageLog} + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.ABCIMessageLog; + return proto.cosmos.base.abci.v1beta1.ABCIMessageLog.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.ABCIMessageLog} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.ABCIMessageLog} + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.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.setMsgIndex(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLog(value); + break; + case 3: + var value = new proto.cosmos.base.abci.v1beta1.StringEvent; + reader.readMessage(value,proto.cosmos.base.abci.v1beta1.StringEvent.deserializeBinaryFromReader); + msg.addEvents(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.ABCIMessageLog.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.ABCIMessageLog.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.ABCIMessageLog} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMsgIndex(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getLog(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.base.abci.v1beta1.StringEvent.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint32 msg_index = 1; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.prototype.getMsgIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.ABCIMessageLog} returns this + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.prototype.setMsgIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string log = 2; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.ABCIMessageLog} returns this + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated StringEvent events = 3; + * @return {!Array} + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.abci.v1beta1.StringEvent, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.abci.v1beta1.ABCIMessageLog} returns this +*/ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.abci.v1beta1.StringEvent=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.abci.v1beta1.StringEvent} + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.abci.v1beta1.StringEvent, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.abci.v1beta1.ABCIMessageLog} returns this + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.abci.v1beta1.StringEvent.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.base.abci.v1beta1.StringEvent.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.StringEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.StringEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.StringEvent.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + attributesList: jspb.Message.toObjectList(msg.getAttributesList(), + proto.cosmos.base.abci.v1beta1.Attribute.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.StringEvent} + */ +proto.cosmos.base.abci.v1beta1.StringEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.StringEvent; + return proto.cosmos.base.abci.v1beta1.StringEvent.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.StringEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.StringEvent} + */ +proto.cosmos.base.abci.v1beta1.StringEvent.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.setType(value); + break; + case 2: + var value = new proto.cosmos.base.abci.v1beta1.Attribute; + reader.readMessage(value,proto.cosmos.base.abci.v1beta1.Attribute.deserializeBinaryFromReader); + msg.addAttributes(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.StringEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.StringEvent.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.StringEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.StringEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAttributesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.base.abci.v1beta1.Attribute.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.StringEvent.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.StringEvent} returns this + */ +proto.cosmos.base.abci.v1beta1.StringEvent.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated Attribute attributes = 2; + * @return {!Array} + */ +proto.cosmos.base.abci.v1beta1.StringEvent.prototype.getAttributesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.abci.v1beta1.Attribute, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.abci.v1beta1.StringEvent} returns this +*/ +proto.cosmos.base.abci.v1beta1.StringEvent.prototype.setAttributesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.abci.v1beta1.Attribute=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.abci.v1beta1.Attribute} + */ +proto.cosmos.base.abci.v1beta1.StringEvent.prototype.addAttributes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.abci.v1beta1.Attribute, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.abci.v1beta1.StringEvent} returns this + */ +proto.cosmos.base.abci.v1beta1.StringEvent.prototype.clearAttributesList = function() { + return this.setAttributesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.Attribute.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.Attribute.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Attribute} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.Attribute.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + value: 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.base.abci.v1beta1.Attribute} + */ +proto.cosmos.base.abci.v1beta1.Attribute.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.Attribute; + return proto.cosmos.base.abci.v1beta1.Attribute.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.Attribute} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.Attribute} + */ +proto.cosmos.base.abci.v1beta1.Attribute.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.abci.v1beta1.Attribute.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.Attribute.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.Attribute} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.Attribute.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 + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.Attribute.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.Attribute} returns this + */ +proto.cosmos.base.abci.v1beta1.Attribute.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string value = 2; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.Attribute.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.Attribute} returns this + */ +proto.cosmos.base.abci.v1beta1.Attribute.prototype.setValue = 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.base.abci.v1beta1.GasInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.GasInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.GasInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.GasInfo.toObject = function(includeInstance, msg) { + var f, obj = { + gasWanted: jspb.Message.getFieldWithDefault(msg, 1, 0), + gasUsed: 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.abci.v1beta1.GasInfo} + */ +proto.cosmos.base.abci.v1beta1.GasInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.GasInfo; + return proto.cosmos.base.abci.v1beta1.GasInfo.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.GasInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.GasInfo} + */ +proto.cosmos.base.abci.v1beta1.GasInfo.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.setGasWanted(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGasUsed(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.GasInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.GasInfo.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.GasInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.GasInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGasWanted(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getGasUsed(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 gas_wanted = 1; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.GasInfo.prototype.getGasWanted = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.GasInfo} returns this + */ +proto.cosmos.base.abci.v1beta1.GasInfo.prototype.setGasWanted = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 gas_used = 2; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.GasInfo.prototype.getGasUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.GasInfo} returns this + */ +proto.cosmos.base.abci.v1beta1.GasInfo.prototype.setGasUsed = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.abci.v1beta1.Result.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.abci.v1beta1.Result.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.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.cosmos.base.abci.v1beta1.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.Result.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64(), + log: jspb.Message.getFieldWithDefault(msg, 2, ""), + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + tendermint_abci_types_pb.Event.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.Result} + */ +proto.cosmos.base.abci.v1beta1.Result.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.Result; + return proto.cosmos.base.abci.v1beta1.Result.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.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.Result} + */ +proto.cosmos.base.abci.v1beta1.Result.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 {string} */ (reader.readString()); + msg.setLog(value); + break; + case 3: + var value = new tendermint_abci_types_pb.Event; + reader.readMessage(value,tendermint_abci_types_pb.Event.deserializeBinaryFromReader); + msg.addEvents(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.Result.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.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.cosmos.base.abci.v1beta1.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.Result.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getLog(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + tendermint_abci_types_pb.Event.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.abci.v1beta1.Result.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.cosmos.base.abci.v1beta1.Result.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.cosmos.base.abci.v1beta1.Result.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.abci.v1beta1.Result} returns this + */ +proto.cosmos.base.abci.v1beta1.Result.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string log = 2; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.Result.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.Result} returns this + */ +proto.cosmos.base.abci.v1beta1.Result.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated tendermint.abci.Event events = 3; + * @return {!Array} + */ +proto.cosmos.base.abci.v1beta1.Result.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, tendermint_abci_types_pb.Event, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.abci.v1beta1.Result} returns this +*/ +proto.cosmos.base.abci.v1beta1.Result.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.tendermint.abci.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Event} + */ +proto.cosmos.base.abci.v1beta1.Result.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.tendermint.abci.Event, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.abci.v1beta1.Result} returns this + */ +proto.cosmos.base.abci.v1beta1.Result.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.SimulationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.SimulationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.SimulationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + gasInfo: (f = msg.getGasInfo()) && proto.cosmos.base.abci.v1beta1.GasInfo.toObject(includeInstance, f), + result: (f = msg.getResult()) && proto.cosmos.base.abci.v1beta1.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.cosmos.base.abci.v1beta1.SimulationResponse} + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.SimulationResponse; + return proto.cosmos.base.abci.v1beta1.SimulationResponse.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.SimulationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.SimulationResponse} + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.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.abci.v1beta1.GasInfo; + reader.readMessage(value,proto.cosmos.base.abci.v1beta1.GasInfo.deserializeBinaryFromReader); + msg.setGasInfo(value); + break; + case 2: + var value = new proto.cosmos.base.abci.v1beta1.Result; + reader.readMessage(value,proto.cosmos.base.abci.v1beta1.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.cosmos.base.abci.v1beta1.SimulationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.SimulationResponse.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.SimulationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGasInfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.abci.v1beta1.GasInfo.serializeBinaryToWriter + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.base.abci.v1beta1.Result.serializeBinaryToWriter + ); + } +}; + + +/** + * optional GasInfo gas_info = 1; + * @return {?proto.cosmos.base.abci.v1beta1.GasInfo} + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.prototype.getGasInfo = function() { + return /** @type{?proto.cosmos.base.abci.v1beta1.GasInfo} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.abci.v1beta1.GasInfo, 1)); +}; + + +/** + * @param {?proto.cosmos.base.abci.v1beta1.GasInfo|undefined} value + * @return {!proto.cosmos.base.abci.v1beta1.SimulationResponse} returns this +*/ +proto.cosmos.base.abci.v1beta1.SimulationResponse.prototype.setGasInfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.abci.v1beta1.SimulationResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.prototype.clearGasInfo = function() { + return this.setGasInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.prototype.hasGasInfo = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Result result = 2; + * @return {?proto.cosmos.base.abci.v1beta1.Result} + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.prototype.getResult = function() { + return /** @type{?proto.cosmos.base.abci.v1beta1.Result} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.abci.v1beta1.Result, 2)); +}; + + +/** + * @param {?proto.cosmos.base.abci.v1beta1.Result|undefined} value + * @return {!proto.cosmos.base.abci.v1beta1.SimulationResponse} returns this +*/ +proto.cosmos.base.abci.v1beta1.SimulationResponse.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.abci.v1beta1.SimulationResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.prototype.clearResult = function() { + return this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.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.cosmos.base.abci.v1beta1.MsgData.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.MsgData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.MsgData.toObject = function(includeInstance, msg) { + var f, obj = { + msgType: 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.cosmos.base.abci.v1beta1.MsgData} + */ +proto.cosmos.base.abci.v1beta1.MsgData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.MsgData; + return proto.cosmos.base.abci.v1beta1.MsgData.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.MsgData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.MsgData} + */ +proto.cosmos.base.abci.v1beta1.MsgData.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.setMsgType(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.cosmos.base.abci.v1beta1.MsgData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.MsgData.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.MsgData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.MsgData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMsgType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string msg_type = 1; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.MsgData.prototype.getMsgType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.MsgData} returns this + */ +proto.cosmos.base.abci.v1beta1.MsgData.prototype.setMsgType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.abci.v1beta1.MsgData.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.cosmos.base.abci.v1beta1.MsgData.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.cosmos.base.abci.v1beta1.MsgData.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.abci.v1beta1.MsgData} returns this + */ +proto.cosmos.base.abci.v1beta1.MsgData.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.abci.v1beta1.TxMsgData.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.abci.v1beta1.TxMsgData.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.TxMsgData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.TxMsgData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.TxMsgData.toObject = function(includeInstance, msg) { + var f, obj = { + dataList: jspb.Message.toObjectList(msg.getDataList(), + proto.cosmos.base.abci.v1beta1.MsgData.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.TxMsgData} + */ +proto.cosmos.base.abci.v1beta1.TxMsgData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.TxMsgData; + return proto.cosmos.base.abci.v1beta1.TxMsgData.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.TxMsgData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.TxMsgData} + */ +proto.cosmos.base.abci.v1beta1.TxMsgData.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.abci.v1beta1.MsgData; + reader.readMessage(value,proto.cosmos.base.abci.v1beta1.MsgData.deserializeBinaryFromReader); + msg.addData(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.TxMsgData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.TxMsgData.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.TxMsgData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.TxMsgData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.base.abci.v1beta1.MsgData.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated MsgData data = 1; + * @return {!Array} + */ +proto.cosmos.base.abci.v1beta1.TxMsgData.prototype.getDataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.abci.v1beta1.MsgData, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.abci.v1beta1.TxMsgData} returns this +*/ +proto.cosmos.base.abci.v1beta1.TxMsgData.prototype.setDataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.abci.v1beta1.MsgData=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.abci.v1beta1.MsgData} + */ +proto.cosmos.base.abci.v1beta1.TxMsgData.prototype.addData = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.abci.v1beta1.MsgData, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.abci.v1beta1.TxMsgData} returns this + */ +proto.cosmos.base.abci.v1beta1.TxMsgData.prototype.clearDataList = function() { + return this.setDataList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.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.SearchTxsResult.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.SearchTxsResult.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.SearchTxsResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.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), + txsList: jspb.Message.toObjectList(msg.getTxsList(), + proto.cosmos.base.abci.v1beta1.TxResponse.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.SearchTxsResult} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.SearchTxsResult; + return proto.cosmos.base.abci.v1beta1.SearchTxsResult.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.SearchTxsResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.SearchTxsResult} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.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.setTotalCount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCount(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPageNumber(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPageTotal(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLimit(value); + break; + case 6: + var value = new proto.cosmos.base.abci.v1beta1.TxResponse; + reader.readMessage(value,proto.cosmos.base.abci.v1beta1.TxResponse.deserializeBinaryFromReader); + msg.addTxs(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.SearchTxsResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.SearchTxsResult.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.SearchTxsResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotalCount(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getCount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getPageNumber(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getPageTotal(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getTxsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.cosmos.base.abci.v1beta1.TxResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 total_count = 1; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.getTotalCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchTxsResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.setTotalCount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 count = 2; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchTxsResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.setCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 page_number = 3; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.getPageNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchTxsResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.setPageNumber = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 page_total = 4; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.getPageTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchTxsResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.setPageTotal = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 limit = 5; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchTxsResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.setLimit = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * repeated TxResponse txs = 6; + * @return {!Array} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.getTxsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.abci.v1beta1.TxResponse, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchTxsResult} returns this +*/ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.setTxsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.cosmos.base.abci.v1beta1.TxResponse=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.addTxs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cosmos.base.abci.v1beta1.TxResponse, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.abci.v1beta1.SearchTxsResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.clearTxsList = function() { + return this.setTxsList([]); +}; + + +goog.object.extend(exports, proto.cosmos.base.abci.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/base/kv/v1beta1/kv_pb.js b/dist/src/types/proto-types/cosmos/base/kv/v1beta1/kv_pb.js new file mode 100644 index 00000000..abe89db1 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/base/kv/v1beta1/kv_pb.js @@ -0,0 +1,429 @@ +// source: cosmos/base/kv/v1beta1/kv.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.base.kv.v1beta1.Pair', null, global); +goog.exportSymbol('proto.cosmos.base.kv.v1beta1.Pairs', 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.kv.v1beta1.Pairs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.kv.v1beta1.Pairs.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.kv.v1beta1.Pairs, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.kv.v1beta1.Pairs.displayName = 'proto.cosmos.base.kv.v1beta1.Pairs'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.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); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.kv.v1beta1.Pair.displayName = 'proto.cosmos.base.kv.v1beta1.Pair'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.kv.v1beta1.Pairs.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.kv.v1beta1.Pairs.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.kv.v1beta1.Pairs.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.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) { + var f, obj = { + pairsList: jspb.Message.toObjectList(msg.getPairsList(), + proto.cosmos.base.kv.v1beta1.Pair.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.kv.v1beta1.Pairs} + */ +proto.cosmos.base.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.kv.v1beta1.Pairs} + */ +proto.cosmos.base.kv.v1beta1.Pairs.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.kv.v1beta1.Pair; + reader.readMessage(value,proto.cosmos.base.kv.v1beta1.Pair.deserializeBinaryFromReader); + msg.addPairs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.kv.v1beta1.Pairs.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.kv.v1beta1.Pairs.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.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) { + var f = undefined; + f = message.getPairsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.base.kv.v1beta1.Pair.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Pair pairs = 1; + * @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)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.kv.v1beta1.Pairs} returns this +*/ +proto.cosmos.base.kv.v1beta1.Pairs.prototype.setPairsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.kv.v1beta1.Pair=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.kv.v1beta1.Pairs} returns this + */ +proto.cosmos.base.kv.v1beta1.Pairs.prototype.clearPairsList = function() { + return this.setPairsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.kv.v1beta1.Pair.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.kv.v1beta1.Pair.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.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) { + 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.kv.v1beta1.Pair} + */ +proto.cosmos.base.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.kv.v1beta1.Pair} + */ +proto.cosmos.base.kv.v1beta1.Pair.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.kv.v1beta1.Pair.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.kv.v1beta1.Pair.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.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) { + 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.kv.v1beta1.Pair.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.kv.v1beta1.Pair.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.kv.v1beta1.Pair.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.kv.v1beta1.Pair} returns this + */ +proto.cosmos.base.kv.v1beta1.Pair.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes value = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.kv.v1beta1.Pair.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.kv.v1beta1.Pair.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.kv.v1beta1.Pair.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.kv.v1beta1.Pair} returns this + */ +proto.cosmos.base.kv.v1beta1.Pair.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.kv.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/base/query/v1beta1/pagination_pb.js b/dist/src/types/proto-types/cosmos/base/query/v1beta1/pagination_pb.js new file mode 100644 index 00000000..42631712 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/base/query/v1beta1/pagination_pb.js @@ -0,0 +1,487 @@ +// source: cosmos/base/query/v1beta1/pagination.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.cosmos.base.query.v1beta1.PageRequest', null, global); +goog.exportSymbol('proto.cosmos.base.query.v1beta1.PageResponse', 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.query.v1beta1.PageRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.query.v1beta1.PageRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.query.v1beta1.PageRequest.displayName = 'proto.cosmos.base.query.v1beta1.PageRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.query.v1beta1.PageResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.query.v1beta1.PageResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.query.v1beta1.PageResponse.displayName = 'proto.cosmos.base.query.v1beta1.PageResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.query.v1beta1.PageRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.query.v1beta1.PageRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.query.v1beta1.PageRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.query.v1beta1.PageRequest.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_asB64(), + offset: jspb.Message.getFieldWithDefault(msg, 2, 0), + limit: jspb.Message.getFieldWithDefault(msg, 3, 0), + countTotal: 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.cosmos.base.query.v1beta1.PageRequest} + */ +proto.cosmos.base.query.v1beta1.PageRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.query.v1beta1.PageRequest; + return proto.cosmos.base.query.v1beta1.PageRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.query.v1beta1.PageRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.cosmos.base.query.v1beta1.PageRequest.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 {number} */ (reader.readUint64()); + msg.setOffset(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLimit(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCountTotal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.query.v1beta1.PageRequest.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.query.v1beta1.PageRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.query.v1beta1.PageRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getOffset(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getCountTotal(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.query.v1beta1.PageRequest.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.query.v1beta1.PageRequest.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.query.v1beta1.PageRequest.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.query.v1beta1.PageRequest} returns this + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 offset = 2; + * @return {number} + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.getOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.query.v1beta1.PageRequest} returns this + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.setOffset = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 limit = 3; + * @return {number} + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.query.v1beta1.PageRequest} returns this + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.setLimit = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bool count_total = 4; + * @return {boolean} + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.getCountTotal = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.base.query.v1beta1.PageRequest} returns this + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.setCountTotal = 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.cosmos.base.query.v1beta1.PageResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.query.v1beta1.PageResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.query.v1beta1.PageResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.query.v1beta1.PageResponse.toObject = function(includeInstance, msg) { + var f, obj = { + nextKey: msg.getNextKey_asB64(), + total: 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.query.v1beta1.PageResponse} + */ +proto.cosmos.base.query.v1beta1.PageResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.query.v1beta1.PageResponse; + return proto.cosmos.base.query.v1beta1.PageResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.query.v1beta1.PageResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.base.query.v1beta1.PageResponse.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.setNextKey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.query.v1beta1.PageResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.query.v1beta1.PageResponse.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.query.v1beta1.PageResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.query.v1beta1.PageResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNextKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getTotal(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes next_key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.query.v1beta1.PageResponse.prototype.getNextKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes next_key = 1; + * This is a type-conversion wrapper around `getNextKey()` + * @return {string} + */ +proto.cosmos.base.query.v1beta1.PageResponse.prototype.getNextKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNextKey())); +}; + + +/** + * optional bytes next_key = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNextKey()` + * @return {!Uint8Array} + */ +proto.cosmos.base.query.v1beta1.PageResponse.prototype.getNextKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNextKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.query.v1beta1.PageResponse} returns this + */ +proto.cosmos.base.query.v1beta1.PageResponse.prototype.setNextKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 total = 2; + * @return {number} + */ +proto.cosmos.base.query.v1beta1.PageResponse.prototype.getTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.query.v1beta1.PageResponse} returns this + */ +proto.cosmos.base.query.v1beta1.PageResponse.prototype.setTotal = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.query.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/base/reflection/v1beta1/reflection_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/base/reflection/v1beta1/reflection_grpc_web_pb.js new file mode 100644 index 00000000..2076bb10 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/base/reflection/v1beta1/reflection_grpc_web_pb.js @@ -0,0 +1,239 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.base.reflection.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.base = {}; +proto.cosmos.base.reflection = {}; +proto.cosmos.base.reflection.v1beta1 = require('./reflection_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.base.reflection.v1beta1.ReflectionServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.base.reflection.v1beta1.ReflectionServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest, + * !proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse>} + */ +const methodDescriptor_ReflectionService_ListAllInterfaces = new grpc.web.MethodDescriptor( + '/cosmos.base.reflection.v1beta1.ReflectionService/ListAllInterfaces', + grpc.web.MethodType.UNARY, + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest, + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse, + /** + * @param {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest, + * !proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse>} + */ +const methodInfo_ReflectionService_ListAllInterfaces = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse, + /** + * @param {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.reflection.v1beta1.ReflectionServiceClient.prototype.listAllInterfaces = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.reflection.v1beta1.ReflectionService/ListAllInterfaces', + request, + metadata || {}, + methodDescriptor_ReflectionService_ListAllInterfaces, + callback); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.reflection.v1beta1.ReflectionServicePromiseClient.prototype.listAllInterfaces = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.reflection.v1beta1.ReflectionService/ListAllInterfaces', + request, + metadata || {}, + methodDescriptor_ReflectionService_ListAllInterfaces); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest, + * !proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse>} + */ +const methodDescriptor_ReflectionService_ListImplementations = new grpc.web.MethodDescriptor( + '/cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations', + grpc.web.MethodType.UNARY, + proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest, + proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse, + /** + * @param {!proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest, + * !proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse>} + */ +const methodInfo_ReflectionService_ListImplementations = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse, + /** + * @param {!proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.reflection.v1beta1.ReflectionServiceClient.prototype.listImplementations = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations', + request, + metadata || {}, + methodDescriptor_ReflectionService_ListImplementations, + callback); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.reflection.v1beta1.ReflectionServicePromiseClient.prototype.listImplementations = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations', + request, + metadata || {}, + methodDescriptor_ReflectionService_ListImplementations); +}; + + +module.exports = proto.cosmos.base.reflection.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/base/reflection/v1beta1/reflection_pb.js b/dist/src/types/proto-types/cosmos/base/reflection/v1beta1/reflection_pb.js new file mode 100644 index 00000000..b8a60fa8 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/base/reflection/v1beta1/reflection_pb.js @@ -0,0 +1,648 @@ +// source: cosmos/base/reflection/v1beta1/reflection.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse', 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.reflection.v1beta1.ListAllInterfacesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.displayName = 'proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.reflection.v1beta1.ListAllInterfacesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.displayName = 'proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.reflection.v1beta1.ListImplementationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.displayName = 'proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.reflection.v1beta1.ListImplementationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.displayName = 'proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.reflection.v1beta1.ListAllInterfacesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.reflection.v1beta1.ListAllInterfacesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.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.reflection.v1beta1.ListAllInterfacesRequest} + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest; + return proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.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.reflection.v1beta1.ListAllInterfacesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.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.reflection.v1beta1.ListAllInterfacesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.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.reflection.v1beta1.ListAllInterfacesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.reflection.v1beta1.ListAllInterfacesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + interfaceNamesList: (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.base.reflection.v1beta1.ListAllInterfacesResponse} + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse; + return proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse} + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.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.addInterfaceNames(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.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.reflection.v1beta1.ListAllInterfacesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInterfaceNamesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string interface_names = 1; + * @return {!Array} + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.prototype.getInterfaceNamesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse} returns this + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.prototype.setInterfaceNamesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse} returns this + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.prototype.addInterfaceNames = 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.reflection.v1beta1.ListAllInterfacesResponse} returns this + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.prototype.clearInterfaceNamesList = function() { + return this.setInterfaceNamesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.reflection.v1beta1.ListImplementationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.reflection.v1beta1.ListImplementationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + interfaceName: 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.reflection.v1beta1.ListImplementationsRequest} + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest; + return proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest} + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.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.setInterfaceName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.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.reflection.v1beta1.ListImplementationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInterfaceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string interface_name = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.prototype.getInterfaceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest} returns this + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.prototype.setInterfaceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.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.reflection.v1beta1.ListImplementationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.reflection.v1beta1.ListImplementationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + implementationMessageNamesList: (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.base.reflection.v1beta1.ListImplementationsResponse} + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse; + return proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse} + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.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.addImplementationMessageNames(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.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.reflection.v1beta1.ListImplementationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getImplementationMessageNamesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string implementation_message_names = 1; + * @return {!Array} + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.prototype.getImplementationMessageNamesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse} returns this + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.prototype.setImplementationMessageNamesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse} returns this + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.prototype.addImplementationMessageNames = 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.reflection.v1beta1.ListImplementationsResponse} returns this + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.prototype.clearImplementationMessageNamesList = function() { + return this.setImplementationMessageNamesList([]); +}; + + +goog.object.extend(exports, proto.cosmos.base.reflection.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/base/snapshots/v1beta1/snapshot_pb.js b/dist/src/types/proto-types/cosmos/base/snapshots/v1beta1/snapshot_pb.js new file mode 100644 index 00000000..909320a7 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/base/snapshots/v1beta1/snapshot_pb.js @@ -0,0 +1,536 @@ +// source: cosmos/base/snapshots/v1beta1/snapshot.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.base.snapshots.v1beta1.Metadata', null, global); +goog.exportSymbol('proto.cosmos.base.snapshots.v1beta1.Snapshot', 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'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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([]); +}; + + +goog.object.extend(exports, proto.cosmos.base.snapshots.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/base/store/v1beta1/commit_info_pb.js b/dist/src/types/proto-types/cosmos/base/store/v1beta1/commit_info_pb.js new file mode 100644 index 00000000..2d4b90af --- /dev/null +++ b/dist/src/types/proto-types/cosmos/base/store/v1beta1/commit_info_pb.js @@ -0,0 +1,638 @@ +// source: cosmos/base/store/v1beta1/commit_info.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +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); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.CommitInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.store.v1beta1.CommitInfo.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.store.v1beta1.CommitInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.store.v1beta1.CommitInfo.displayName = 'proto.cosmos.base.store.v1beta1.CommitInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.StoreInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.store.v1beta1.StoreInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.store.v1beta1.StoreInfo.displayName = 'proto.cosmos.base.store.v1beta1.StoreInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.CommitID = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.store.v1beta1.CommitID, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.store.v1beta1.CommitID.displayName = 'proto.cosmos.base.store.v1beta1.CommitID'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.store.v1beta1.CommitInfo.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.base.store.v1beta1.CommitInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.store.v1beta1.CommitInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.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) { + var f, obj = { + version: jspb.Message.getFieldWithDefault(msg, 1, 0), + storeInfosList: jspb.Message.toObjectList(msg.getStoreInfosList(), + proto.cosmos.base.store.v1beta1.StoreInfo.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.store.v1beta1.CommitInfo} + */ +proto.cosmos.base.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.store.v1beta1.CommitInfo} + */ +proto.cosmos.base.store.v1beta1.CommitInfo.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.setVersion(value); + break; + case 2: + var value = new proto.cosmos.base.store.v1beta1.StoreInfo; + reader.readMessage(value,proto.cosmos.base.store.v1beta1.StoreInfo.deserializeBinaryFromReader); + msg.addStoreInfos(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.CommitInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.store.v1beta1.CommitInfo.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.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) { + var f = undefined; + f = message.getVersion(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getStoreInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.base.store.v1beta1.StoreInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 version = 1; + * @return {number} + */ +proto.cosmos.base.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 + */ +proto.cosmos.base.store.v1beta1.CommitInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated StoreInfo store_infos = 2; + * @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)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.store.v1beta1.CommitInfo} returns this +*/ +proto.cosmos.base.store.v1beta1.CommitInfo.prototype.setStoreInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.store.v1beta1.StoreInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.store.v1beta1.CommitInfo} returns this + */ +proto.cosmos.base.store.v1beta1.CommitInfo.prototype.clearStoreInfosList = function() { + return this.setStoreInfosList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.StoreInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.store.v1beta1.StoreInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.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) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + commitId: (f = msg.getCommitId()) && proto.cosmos.base.store.v1beta1.CommitID.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.StoreInfo} + */ +proto.cosmos.base.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.store.v1beta1.StoreInfo} + */ +proto.cosmos.base.store.v1beta1.StoreInfo.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 = new proto.cosmos.base.store.v1beta1.CommitID; + reader.readMessage(value,proto.cosmos.base.store.v1beta1.CommitID.deserializeBinaryFromReader); + msg.setCommitId(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.StoreInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.store.v1beta1.StoreInfo.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.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) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCommitId(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.base.store.v1beta1.CommitID.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cosmos.base.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 + */ +proto.cosmos.base.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} + */ +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)); +}; + + +/** + * @param {?proto.cosmos.base.store.v1beta1.CommitID|undefined} value + * @return {!proto.cosmos.base.store.v1beta1.StoreInfo} returns this +*/ +proto.cosmos.base.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 + */ +proto.cosmos.base.store.v1beta1.StoreInfo.prototype.clearCommitId = function() { + return this.setCommitId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.store.v1beta1.StoreInfo.prototype.hasCommitId = 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.base.store.v1beta1.CommitID.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.store.v1beta1.CommitID.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.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) { + var f, obj = { + version: jspb.Message.getFieldWithDefault(msg, 1, 0), + hash: msg.getHash_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.CommitID} + */ +proto.cosmos.base.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.store.v1beta1.CommitID} + */ +proto.cosmos.base.store.v1beta1.CommitID.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.setVersion(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(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.CommitID.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.store.v1beta1.CommitID.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.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) { + var f = undefined; + f = message.getVersion(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional int64 version = 1; + * @return {number} + */ +proto.cosmos.base.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 + */ +proto.cosmos.base.store.v1beta1.CommitID.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.store.v1beta1.CommitID.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes hash = 2; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.cosmos.base.store.v1beta1.CommitID.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 2; + * 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.store.v1beta1.CommitID.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.store.v1beta1.CommitID} returns this + */ +proto.cosmos.base.store.v1beta1.CommitID.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.store.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/base/store/v1beta1/snapshot_pb.js b/dist/src/types/proto-types/cosmos/base/store/v1beta1/snapshot_pb.js new file mode 100644 index 00000000..58fc7ddd --- /dev/null +++ b/dist/src/types/proto-types/cosmos/base/store/v1beta1/snapshot_pb.js @@ -0,0 +1,710 @@ +// source: cosmos/base/store/v1beta1/snapshot.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.base.store.v1beta1.SnapshotIAVLItem', null, global); +goog.exportSymbol('proto.cosmos.base.store.v1beta1.SnapshotItem', null, global); +goog.exportSymbol('proto.cosmos.base.store.v1beta1.SnapshotItem.ItemCase', null, global); +goog.exportSymbol('proto.cosmos.base.store.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.store.v1beta1.SnapshotItem = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cosmos.base.store.v1beta1.SnapshotItem.oneofGroups_); +}; +goog.inherits(proto.cosmos.base.store.v1beta1.SnapshotItem, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.store.v1beta1.SnapshotItem.displayName = 'proto.cosmos.base.store.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.store.v1beta1.SnapshotStoreItem = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.store.v1beta1.SnapshotStoreItem, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.store.v1beta1.SnapshotStoreItem.displayName = 'proto.cosmos.base.store.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.store.v1beta1.SnapshotIAVLItem = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.store.v1beta1.SnapshotIAVLItem, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.displayName = 'proto.cosmos.base.store.v1beta1.SnapshotIAVLItem'; +} + +/** + * 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.store.v1beta1.SnapshotItem.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.ItemCase = { + ITEM_NOT_SET: 0, + STORE: 1, + IAVL: 2 +}; + +/** + * @return {proto.cosmos.base.store.v1beta1.SnapshotItem.ItemCase} + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.getItemCase = function() { + return /** @type {proto.cosmos.base.store.v1beta1.SnapshotItem.ItemCase} */(jspb.Message.computeOneofCase(this, proto.cosmos.base.store.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.store.v1beta1.SnapshotItem.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.store.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.store.v1beta1.SnapshotItem} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.toObject = function(includeInstance, msg) { + var f, obj = { + store: (f = msg.getStore()) && proto.cosmos.base.store.v1beta1.SnapshotStoreItem.toObject(includeInstance, f), + iavl: (f = msg.getIavl()) && proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.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.SnapshotItem} + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.store.v1beta1.SnapshotItem; + return proto.cosmos.base.store.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.store.v1beta1.SnapshotItem} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.store.v1beta1.SnapshotItem} + */ +proto.cosmos.base.store.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.store.v1beta1.SnapshotStoreItem; + reader.readMessage(value,proto.cosmos.base.store.v1beta1.SnapshotStoreItem.deserializeBinaryFromReader); + msg.setStore(value); + break; + case 2: + var value = new proto.cosmos.base.store.v1beta1.SnapshotIAVLItem; + reader.readMessage(value,proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.deserializeBinaryFromReader); + msg.setIavl(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.SnapshotItem.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.store.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.store.v1beta1.SnapshotItem} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStore(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.store.v1beta1.SnapshotStoreItem.serializeBinaryToWriter + ); + } + f = message.getIavl(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.serializeBinaryToWriter + ); + } +}; + + +/** + * optional SnapshotStoreItem store = 1; + * @return {?proto.cosmos.base.store.v1beta1.SnapshotStoreItem} + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.getStore = function() { + return /** @type{?proto.cosmos.base.store.v1beta1.SnapshotStoreItem} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.store.v1beta1.SnapshotStoreItem, 1)); +}; + + +/** + * @param {?proto.cosmos.base.store.v1beta1.SnapshotStoreItem|undefined} value + * @return {!proto.cosmos.base.store.v1beta1.SnapshotItem} returns this +*/ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.setStore = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.cosmos.base.store.v1beta1.SnapshotItem.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.store.v1beta1.SnapshotItem} returns this + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.clearStore = function() { + return this.setStore(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.hasStore = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional SnapshotIAVLItem iavl = 2; + * @return {?proto.cosmos.base.store.v1beta1.SnapshotIAVLItem} + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.getIavl = function() { + return /** @type{?proto.cosmos.base.store.v1beta1.SnapshotIAVLItem} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.store.v1beta1.SnapshotIAVLItem, 2)); +}; + + +/** + * @param {?proto.cosmos.base.store.v1beta1.SnapshotIAVLItem|undefined} value + * @return {!proto.cosmos.base.store.v1beta1.SnapshotItem} returns this +*/ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.setIavl = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.cosmos.base.store.v1beta1.SnapshotItem.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.store.v1beta1.SnapshotItem} returns this + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.clearIavl = function() { + return this.setIavl(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.hasIavl = 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.base.store.v1beta1.SnapshotStoreItem.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.store.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.store.v1beta1.SnapshotStoreItem} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.store.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.store.v1beta1.SnapshotStoreItem} + */ +proto.cosmos.base.store.v1beta1.SnapshotStoreItem.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.store.v1beta1.SnapshotStoreItem; + return proto.cosmos.base.store.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.store.v1beta1.SnapshotStoreItem} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.store.v1beta1.SnapshotStoreItem} + */ +proto.cosmos.base.store.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.store.v1beta1.SnapshotStoreItem.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.store.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.store.v1beta1.SnapshotStoreItem} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.store.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.store.v1beta1.SnapshotStoreItem.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.store.v1beta1.SnapshotStoreItem} returns this + */ +proto.cosmos.base.store.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.store.v1beta1.SnapshotIAVLItem.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.store.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.store.v1beta1.SnapshotIAVLItem} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.store.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.store.v1beta1.SnapshotIAVLItem} + */ +proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.store.v1beta1.SnapshotIAVLItem; + return proto.cosmos.base.store.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.store.v1beta1.SnapshotIAVLItem} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.store.v1beta1.SnapshotIAVLItem} + */ +proto.cosmos.base.store.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.store.v1beta1.SnapshotIAVLItem.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.store.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.store.v1beta1.SnapshotIAVLItem} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.store.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.store.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.store.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.store.v1beta1.SnapshotIAVLItem.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.store.v1beta1.SnapshotIAVLItem} returns this + */ +proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes value = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.store.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.store.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.store.v1beta1.SnapshotIAVLItem.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.store.v1beta1.SnapshotIAVLItem} returns this + */ +proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional int64 version = 3; + * @return {number} + */ +proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.prototype.getVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.store.v1beta1.SnapshotIAVLItem} returns this + */ +proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 height = 4; + * @return {number} + */ +proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.store.v1beta1.SnapshotIAVLItem} returns this + */ +proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.store.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..fe7add89 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,571 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.base.tendermint_1.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js') + +var tendermint_p2p_types_pb = require('../../../../tendermint/p2p/types_pb.js') + +var tendermint_types_block_pb = require('../../../../tendermint/types/block_pb.js') + +var tendermint_types_types_pb = require('../../../../tendermint/types/types_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../../cosmos/base/query/v1beta1/pagination_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.base = {}; +proto.cosmos.base.tendermint_1 = {}; +proto.cosmos.base.tendermint_1.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.base.tendermint_1.v1beta1.ServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.base.tendermint_1.v1beta1.ServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse>} + */ +const methodDescriptor_Service_GetNodeInfo = new grpc.web.MethodDescriptor( + '/cosmos.base.tendermint_1.v1beta1.Service/GetNodeInfo', + grpc.web.MethodType.UNARY, + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest, + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse>} + */ +const methodInfo_Service_GetNodeInfo = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.tendermint_1.v1beta1.ServiceClient.prototype.getNodeInfo = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetNodeInfo', + request, + metadata || {}, + methodDescriptor_Service_GetNodeInfo, + callback); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.tendermint_1.v1beta1.ServicePromiseClient.prototype.getNodeInfo = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetNodeInfo', + request, + metadata || {}, + methodDescriptor_Service_GetNodeInfo); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse>} + */ +const methodDescriptor_Service_GetSyncing = new grpc.web.MethodDescriptor( + '/cosmos.base.tendermint_1.v1beta1.Service/GetSyncing', + grpc.web.MethodType.UNARY, + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest, + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse>} + */ +const methodInfo_Service_GetSyncing = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.tendermint_1.v1beta1.ServiceClient.prototype.getSyncing = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetSyncing', + request, + metadata || {}, + methodDescriptor_Service_GetSyncing, + callback); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.tendermint_1.v1beta1.ServicePromiseClient.prototype.getSyncing = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetSyncing', + request, + metadata || {}, + methodDescriptor_Service_GetSyncing); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse>} + */ +const methodDescriptor_Service_GetLatestBlock = new grpc.web.MethodDescriptor( + '/cosmos.base.tendermint_1.v1beta1.Service/GetLatestBlock', + grpc.web.MethodType.UNARY, + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest, + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse>} + */ +const methodInfo_Service_GetLatestBlock = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.tendermint_1.v1beta1.ServiceClient.prototype.getLatestBlock = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetLatestBlock', + request, + metadata || {}, + methodDescriptor_Service_GetLatestBlock, + callback); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.tendermint_1.v1beta1.ServicePromiseClient.prototype.getLatestBlock = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetLatestBlock', + request, + metadata || {}, + methodDescriptor_Service_GetLatestBlock); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse>} + */ +const methodDescriptor_Service_GetBlockByHeight = new grpc.web.MethodDescriptor( + '/cosmos.base.tendermint_1.v1beta1.Service/GetBlockByHeight', + grpc.web.MethodType.UNARY, + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest, + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse>} + */ +const methodInfo_Service_GetBlockByHeight = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.tendermint_1.v1beta1.ServiceClient.prototype.getBlockByHeight = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetBlockByHeight', + request, + metadata || {}, + methodDescriptor_Service_GetBlockByHeight, + callback); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.tendermint_1.v1beta1.ServicePromiseClient.prototype.getBlockByHeight = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetBlockByHeight', + request, + metadata || {}, + methodDescriptor_Service_GetBlockByHeight); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse>} + */ +const methodDescriptor_Service_GetLatestValidatorSet = new grpc.web.MethodDescriptor( + '/cosmos.base.tendermint_1.v1beta1.Service/GetLatestValidatorSet', + grpc.web.MethodType.UNARY, + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest, + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse>} + */ +const methodInfo_Service_GetLatestValidatorSet = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.tendermint_1.v1beta1.ServiceClient.prototype.getLatestValidatorSet = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetLatestValidatorSet', + request, + metadata || {}, + methodDescriptor_Service_GetLatestValidatorSet, + callback); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.tendermint_1.v1beta1.ServicePromiseClient.prototype.getLatestValidatorSet = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetLatestValidatorSet', + request, + metadata || {}, + methodDescriptor_Service_GetLatestValidatorSet); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse>} + */ +const methodDescriptor_Service_GetValidatorSetByHeight = new grpc.web.MethodDescriptor( + '/cosmos.base.tendermint_1.v1beta1.Service/GetValidatorSetByHeight', + grpc.web.MethodType.UNARY, + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest, + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse>} + */ +const methodInfo_Service_GetValidatorSetByHeight = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.tendermint_1.v1beta1.ServiceClient.prototype.getValidatorSetByHeight = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetValidatorSetByHeight', + request, + metadata || {}, + methodDescriptor_Service_GetValidatorSetByHeight, + callback); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.tendermint_1.v1beta1.ServicePromiseClient.prototype.getValidatorSetByHeight = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetValidatorSetByHeight', + request, + metadata || {}, + methodDescriptor_Service_GetValidatorSetByHeight); +}; + + +module.exports = proto.cosmos.base.tendermint_1.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_pb.js new file mode 100644 index 00000000..29fa9747 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_pb.js @@ -0,0 +1,3113 @@ +// source: cosmos/base/tendermint/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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'); +goog.object.extend(proto, google_api_annotations_pb); +var tendermint_p2p_types_pb = require('../../../../tendermint/p2p/types_pb.js'); +goog.object.extend(proto, tendermint_p2p_types_pb); +var tendermint_types_block_pb = require('../../../../tendermint/types/block_pb.js'); +goog.object.extend(proto, tendermint_types_block_pb); +var tendermint_types_types_pb = require('../../../../tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_types_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.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.Module', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.Validator', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.VersionInfo', 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.tendermint_1.v1beta1.GetValidatorSetByHeightRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetValidatorSetByHeightResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetLatestValidatorSetRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetLatestValidatorSetResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.Validator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.Validator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.Validator.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.Validator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetBlockByHeightRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetBlockByHeightResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetLatestBlockRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetLatestBlockResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetSyncingRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetSyncingResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetNodeInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetNodeInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.VersionInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.VersionInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.VersionInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.Module = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.Module, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.Module.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.Module'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.toObject = function(includeInstance, msg) { + var f, obj = { + height: 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.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest; + return proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.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 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.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.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.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.prototype.setHeight = 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.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.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.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.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.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.toObject = function(includeInstance, msg) { + var f, obj = { + blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + proto.cosmos.base.tendermint_1.v1beta1.Validator.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.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse; + return proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.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.cosmos.base.tendermint_1.v1beta1.Validator; + reader.readMessage(value,proto.cosmos.base.tendermint_1.v1beta1.Validator.deserializeBinaryFromReader); + msg.addValidators(value); + break; + case 3: + 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.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.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.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.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.cosmos.base.tendermint_1.v1beta1.Validator.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 block_height = 1; + * @return {number} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated Validator validators = 2; + * @return {!Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.tendermint_1.v1beta1.Validator, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Validator} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.tendermint_1.v1beta1.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.hasPagination = 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.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetLatestValidatorSetRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.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.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest; + return proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.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.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.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.tendermint_1.v1beta1.GetLatestValidatorSetRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.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.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.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.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.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.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetLatestValidatorSetResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.toObject = function(includeInstance, msg) { + var f, obj = { + blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + proto.cosmos.base.tendermint_1.v1beta1.Validator.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.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse; + return proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.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.cosmos.base.tendermint_1.v1beta1.Validator; + reader.readMessage(value,proto.cosmos.base.tendermint_1.v1beta1.Validator.deserializeBinaryFromReader); + msg.addValidators(value); + break; + case 3: + 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.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.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.tendermint_1.v1beta1.GetLatestValidatorSetResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.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.cosmos.base.tendermint_1.v1beta1.Validator.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 block_height = 1; + * @return {number} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated Validator validators = 2; + * @return {!Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.tendermint_1.v1beta1.Validator, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Validator} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.tendermint_1.v1beta1.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.hasPagination = 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.base.tendermint_1.v1beta1.Validator.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.Validator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.Validator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + pubKey: (f = msg.getPubKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + votingPower: jspb.Message.getFieldWithDefault(msg, 3, 0), + proposerPriority: 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.tendermint_1.v1beta1.Validator} + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.Validator; + return proto.cosmos.base.tendermint_1.v1beta1.Validator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.Validator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Validator} + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.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 google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setPubKey(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setVotingPower(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setProposerPriority(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.Validator.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.tendermint_1.v1beta1.Validator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPubKey(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getVotingPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getProposerPriority(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Validator} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any pub_key = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.getPubKey = 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.cosmos.base.tendermint_1.v1beta1.Validator} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.setPubKey = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Validator} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.clearPubKey = function() { + return this.setPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.hasPubKey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 voting_power = 3; + * @return {number} + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.getVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Validator} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.setVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 proposer_priority = 4; + * @return {number} + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.getProposerPriority = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Validator} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.setProposerPriority = 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.tendermint_1.v1beta1.GetBlockByHeightRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetBlockByHeightRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.toObject = function(includeInstance, msg) { + var f, obj = { + height: 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.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest; + return proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.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.tendermint_1.v1beta1.GetBlockByHeightRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.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.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetBlockByHeightResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.toObject = function(includeInstance, msg) { + var f, obj = { + blockId: (f = msg.getBlockId()) && tendermint_types_types_pb.BlockID.toObject(includeInstance, f), + block: (f = msg.getBlock()) && tendermint_types_block_pb.Block.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.tendermint_1.v1beta1.GetBlockByHeightResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse; + return proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.BlockID; + reader.readMessage(value,tendermint_types_types_pb.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 2: + var value = new tendermint_types_block_pb.Block; + reader.readMessage(value,tendermint_types_block_pb.Block.deserializeBinaryFromReader); + msg.setBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.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.tendermint_1.v1beta1.GetBlockByHeightResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.BlockID.serializeBinaryToWriter + ); + } + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_block_pb.Block.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.types.BlockID block_id = 1; + * @return {?proto.tendermint.types.BlockID} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.BlockID, 1)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional tendermint.types.Block block = 2; + * @return {?proto.tendermint.types.Block} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.getBlock = function() { + return /** @type{?proto.tendermint.types.Block} */ ( + jspb.Message.getWrapperField(this, tendermint_types_block_pb.Block, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Block|undefined} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.setBlock = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.clearBlock = function() { + return this.setBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.hasBlock = 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.base.tendermint_1.v1beta1.GetLatestBlockRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetLatestBlockRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest.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.tendermint_1.v1beta1.GetLatestBlockRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest; + return proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest.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.tendermint_1.v1beta1.GetLatestBlockRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest.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.tendermint_1.v1beta1.GetLatestBlockRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest.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.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetLatestBlockResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.toObject = function(includeInstance, msg) { + var f, obj = { + blockId: (f = msg.getBlockId()) && tendermint_types_types_pb.BlockID.toObject(includeInstance, f), + block: (f = msg.getBlock()) && tendermint_types_block_pb.Block.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.tendermint_1.v1beta1.GetLatestBlockResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse; + return proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.BlockID; + reader.readMessage(value,tendermint_types_types_pb.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 2: + var value = new tendermint_types_block_pb.Block; + reader.readMessage(value,tendermint_types_block_pb.Block.deserializeBinaryFromReader); + msg.setBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.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.tendermint_1.v1beta1.GetLatestBlockResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.BlockID.serializeBinaryToWriter + ); + } + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_block_pb.Block.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.types.BlockID block_id = 1; + * @return {?proto.tendermint.types.BlockID} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.BlockID, 1)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional tendermint.types.Block block = 2; + * @return {?proto.tendermint.types.Block} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.getBlock = function() { + return /** @type{?proto.tendermint.types.Block} */ ( + jspb.Message.getWrapperField(this, tendermint_types_block_pb.Block, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Block|undefined} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.setBlock = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.clearBlock = function() { + return this.setBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.hasBlock = 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.base.tendermint_1.v1beta1.GetSyncingRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetSyncingRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest.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.tendermint_1.v1beta1.GetSyncingRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest; + return proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest.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.tendermint_1.v1beta1.GetSyncingRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest.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.tendermint_1.v1beta1.GetSyncingRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest.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.tendermint_1.v1beta1.GetSyncingResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetSyncingResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.toObject = function(includeInstance, msg) { + var f, obj = { + syncing: 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.base.tendermint_1.v1beta1.GetSyncingResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse; + return proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.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.setSyncing(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.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.tendermint_1.v1beta1.GetSyncingResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSyncing(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool syncing = 1; + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.prototype.getSyncing = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.prototype.setSyncing = 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.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetNodeInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.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.tendermint_1.v1beta1.GetNodeInfoRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest; + return proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.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.tendermint_1.v1beta1.GetNodeInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.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.tendermint_1.v1beta1.GetNodeInfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.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.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetNodeInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + defaultNodeInfo: (f = msg.getDefaultNodeInfo()) && tendermint_p2p_types_pb.DefaultNodeInfo.toObject(includeInstance, f), + applicationVersion: (f = msg.getApplicationVersion()) && proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.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.tendermint_1.v1beta1.GetNodeInfoResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse; + return proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_p2p_types_pb.DefaultNodeInfo; + reader.readMessage(value,tendermint_p2p_types_pb.DefaultNodeInfo.deserializeBinaryFromReader); + msg.setDefaultNodeInfo(value); + break; + case 2: + var value = new proto.cosmos.base.tendermint_1.v1beta1.VersionInfo; + reader.readMessage(value,proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.deserializeBinaryFromReader); + msg.setApplicationVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.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.tendermint_1.v1beta1.GetNodeInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDefaultNodeInfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_p2p_types_pb.DefaultNodeInfo.serializeBinaryToWriter + ); + } + f = message.getApplicationVersion(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.p2p.DefaultNodeInfo default_node_info = 1; + * @return {?proto.tendermint.p2p.DefaultNodeInfo} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.getDefaultNodeInfo = function() { + return /** @type{?proto.tendermint.p2p.DefaultNodeInfo} */ ( + jspb.Message.getWrapperField(this, tendermint_p2p_types_pb.DefaultNodeInfo, 1)); +}; + + +/** + * @param {?proto.tendermint.p2p.DefaultNodeInfo|undefined} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.setDefaultNodeInfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.clearDefaultNodeInfo = function() { + return this.setDefaultNodeInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.hasDefaultNodeInfo = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional VersionInfo application_version = 2; + * @return {?proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.getApplicationVersion = function() { + return /** @type{?proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.tendermint_1.v1beta1.VersionInfo, 2)); +}; + + +/** + * @param {?proto.cosmos.base.tendermint_1.v1beta1.VersionInfo|undefined} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.setApplicationVersion = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.clearApplicationVersion = function() { + return this.setApplicationVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.hasApplicationVersion = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.repeatedFields_ = [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.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.VersionInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + appName: jspb.Message.getFieldWithDefault(msg, 2, ""), + version: jspb.Message.getFieldWithDefault(msg, 3, ""), + gitCommit: jspb.Message.getFieldWithDefault(msg, 4, ""), + buildTags: jspb.Message.getFieldWithDefault(msg, 5, ""), + goVersion: jspb.Message.getFieldWithDefault(msg, 6, ""), + buildDepsList: jspb.Message.toObjectList(msg.getBuildDepsList(), + proto.cosmos.base.tendermint_1.v1beta1.Module.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.tendermint_1.v1beta1.VersionInfo} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.VersionInfo; + return proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.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.setAppName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setGitCommit(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setBuildTags(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setGoVersion(value); + break; + case 7: + var value = new proto.cosmos.base.tendermint_1.v1beta1.Module; + reader.readMessage(value,proto.cosmos.base.tendermint_1.v1beta1.Module.deserializeBinaryFromReader); + msg.addBuildDeps(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.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.tendermint_1.v1beta1.VersionInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAppName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getGitCommit(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getBuildTags(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getGoVersion(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getBuildDepsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.cosmos.base.tendermint_1.v1beta1.Module.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string app_name = 2; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.getAppName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.setAppName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string version = 3; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string git_commit = 4; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.getGitCommit = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.setGitCommit = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string build_tags = 5; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.getBuildTags = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.setBuildTags = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string go_version = 6; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.getGoVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.setGoVersion = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * repeated Module build_deps = 7; + * @return {!Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.getBuildDepsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.tendermint_1.v1beta1.Module, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.setBuildDepsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.Module=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Module} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.addBuildDeps = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.cosmos.base.tendermint_1.v1beta1.Module, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.clearBuildDepsList = function() { + return this.setBuildDepsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.tendermint_1.v1beta1.Module.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.Module.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.Module} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.toObject = function(includeInstance, msg) { + var f, obj = { + path: jspb.Message.getFieldWithDefault(msg, 1, ""), + version: jspb.Message.getFieldWithDefault(msg, 2, ""), + sum: 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.cosmos.base.tendermint_1.v1beta1.Module} + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.Module; + return proto.cosmos.base.tendermint_1.v1beta1.Module.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.Module} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Module} + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.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 {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSum(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.Module.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.tendermint_1.v1beta1.Module} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSum(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string path = 1; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Module} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string version = 2; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Module} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string sum = 3; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.prototype.getSum = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Module} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.prototype.setSum = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.tendermint_1.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/base/v1beta1/coin_pb.js b/dist/src/types/proto-types/cosmos/base/v1beta1/coin_pb.js new file mode 100644 index 00000000..b5ccfd9f --- /dev/null +++ b/dist/src/types/proto-types/cosmos/base/v1beta1/coin_pb.js @@ -0,0 +1,685 @@ +// source: cosmos/base/v1beta1/coin.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.base.v1beta1.Coin', null, global); +goog.exportSymbol('proto.cosmos.base.v1beta1.DecCoin', null, global); +goog.exportSymbol('proto.cosmos.base.v1beta1.DecProto', null, global); +goog.exportSymbol('proto.cosmos.base.v1beta1.IntProto', 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.v1beta1.Coin = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.v1beta1.Coin, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.v1beta1.Coin.displayName = 'proto.cosmos.base.v1beta1.Coin'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.DecCoin = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.v1beta1.DecCoin, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.v1beta1.DecCoin.displayName = 'proto.cosmos.base.v1beta1.DecCoin'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.IntProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.v1beta1.IntProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.v1beta1.IntProto.displayName = 'proto.cosmos.base.v1beta1.IntProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.DecProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.v1beta1.DecProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.v1beta1.DecProto.displayName = 'proto.cosmos.base.v1beta1.DecProto'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.v1beta1.Coin.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.v1beta1.Coin.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.Coin} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.v1beta1.Coin.toObject = function(includeInstance, msg) { + var f, obj = { + denom: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: 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.base.v1beta1.Coin} + */ +proto.cosmos.base.v1beta1.Coin.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.v1beta1.Coin; + return proto.cosmos.base.v1beta1.Coin.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.v1beta1.Coin} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.base.v1beta1.Coin.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.v1beta1.Coin.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.v1beta1.Coin.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.v1beta1.Coin} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.v1beta1.Coin.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 + ); + } +}; + + +/** + * optional string denom = 1; + * @return {string} + */ +proto.cosmos.base.v1beta1.Coin.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.v1beta1.Coin} returns this + */ +proto.cosmos.base.v1beta1.Coin.prototype.setDenom = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string amount = 2; + * @return {string} + */ +proto.cosmos.base.v1beta1.Coin.prototype.getAmount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.v1beta1.Coin} returns this + */ +proto.cosmos.base.v1beta1.Coin.prototype.setAmount = 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.base.v1beta1.DecCoin.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.v1beta1.DecCoin.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.DecCoin} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.v1beta1.DecCoin.toObject = function(includeInstance, msg) { + var f, obj = { + denom: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: 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.base.v1beta1.DecCoin} + */ +proto.cosmos.base.v1beta1.DecCoin.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.v1beta1.DecCoin; + return proto.cosmos.base.v1beta1.DecCoin.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.v1beta1.DecCoin} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.v1beta1.DecCoin} + */ +proto.cosmos.base.v1beta1.DecCoin.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.v1beta1.DecCoin.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.v1beta1.DecCoin.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.v1beta1.DecCoin} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.v1beta1.DecCoin.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 + ); + } +}; + + +/** + * optional string denom = 1; + * @return {string} + */ +proto.cosmos.base.v1beta1.DecCoin.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.v1beta1.DecCoin} returns this + */ +proto.cosmos.base.v1beta1.DecCoin.prototype.setDenom = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string amount = 2; + * @return {string} + */ +proto.cosmos.base.v1beta1.DecCoin.prototype.getAmount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.v1beta1.DecCoin} returns this + */ +proto.cosmos.base.v1beta1.DecCoin.prototype.setAmount = 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.base.v1beta1.IntProto.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.v1beta1.IntProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.IntProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.v1beta1.IntProto.toObject = function(includeInstance, msg) { + var f, obj = { + pb_int: 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.v1beta1.IntProto} + */ +proto.cosmos.base.v1beta1.IntProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.v1beta1.IntProto; + return proto.cosmos.base.v1beta1.IntProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.v1beta1.IntProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.v1beta1.IntProto} + */ +proto.cosmos.base.v1beta1.IntProto.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.setInt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.v1beta1.IntProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.v1beta1.IntProto.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.v1beta1.IntProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.v1beta1.IntProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInt(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string int = 1; + * @return {string} + */ +proto.cosmos.base.v1beta1.IntProto.prototype.getInt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.v1beta1.IntProto} returns this + */ +proto.cosmos.base.v1beta1.IntProto.prototype.setInt = 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.v1beta1.DecProto.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.v1beta1.DecProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.DecProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.v1beta1.DecProto.toObject = function(includeInstance, msg) { + var f, obj = { + dec: 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.v1beta1.DecProto} + */ +proto.cosmos.base.v1beta1.DecProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.v1beta1.DecProto; + return proto.cosmos.base.v1beta1.DecProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.v1beta1.DecProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.v1beta1.DecProto} + */ +proto.cosmos.base.v1beta1.DecProto.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.setDec(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.v1beta1.DecProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.v1beta1.DecProto.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.v1beta1.DecProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.v1beta1.DecProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDec(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string dec = 1; + * @return {string} + */ +proto.cosmos.base.v1beta1.DecProto.prototype.getDec = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.v1beta1.DecProto} returns this + */ +proto.cosmos.base.v1beta1.DecProto.prototype.setDec = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/capability/v1beta1/capability_pb.js b/dist/src/types/proto-types/cosmos/capability/v1beta1/capability_pb.js new file mode 100644 index 00000000..89e8a906 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/capability/v1beta1/capability_pb.js @@ -0,0 +1,533 @@ +// source: cosmos/capability/v1beta1/capability.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +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); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.capability.v1beta1.Capability = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.capability.v1beta1.Capability, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.capability.v1beta1.Capability.displayName = 'proto.cosmos.capability.v1beta1.Capability'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.capability.v1beta1.Owner = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.capability.v1beta1.Owner, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.capability.v1beta1.Owner.displayName = 'proto.cosmos.capability.v1beta1.Owner'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.capability.v1beta1.CapabilityOwners = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.capability.v1beta1.CapabilityOwners.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.capability.v1beta1.CapabilityOwners, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.capability.v1beta1.CapabilityOwners.displayName = 'proto.cosmos.capability.v1beta1.CapabilityOwners'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.capability.v1beta1.Capability.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.capability.v1beta1.Capability.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.capability.v1beta1.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) { + var f, obj = { + index: 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.cosmos.capability.v1beta1.Capability} + */ +proto.cosmos.capability.v1beta1.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.capability.v1beta1.Capability} + */ +proto.cosmos.capability.v1beta1.Capability.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.setIndex(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.capability.v1beta1.Capability.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.capability.v1beta1.Capability.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.capability.v1beta1.Capability} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.capability.v1beta1.Capability.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIndex(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 index = 1; + * @return {number} + */ +proto.cosmos.capability.v1beta1.Capability.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.capability.v1beta1.Capability} returns this + */ +proto.cosmos.capability.v1beta1.Capability.prototype.setIndex = 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.cosmos.capability.v1beta1.Owner.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.capability.v1beta1.Owner.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.capability.v1beta1.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) { + var f, obj = { + module: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: 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.capability.v1beta1.Owner} + */ +proto.cosmos.capability.v1beta1.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.capability.v1beta1.Owner} + */ +proto.cosmos.capability.v1beta1.Owner.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.setModule(value); + break; + case 2: + 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.capability.v1beta1.Owner.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.capability.v1beta1.Owner.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.capability.v1beta1.Owner} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.capability.v1beta1.Owner.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getModule(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string module = 1; + * @return {string} + */ +proto.cosmos.capability.v1beta1.Owner.prototype.getModule = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.capability.v1beta1.Owner} returns this + */ +proto.cosmos.capability.v1beta1.Owner.prototype.setModule = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.cosmos.capability.v1beta1.Owner.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.capability.v1beta1.Owner} returns this + */ +proto.cosmos.capability.v1beta1.Owner.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.capability.v1beta1.CapabilityOwners.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.capability.v1beta1.CapabilityOwners.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.capability.v1beta1.CapabilityOwners.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.capability.v1beta1.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) { + var f, obj = { + ownersList: jspb.Message.toObjectList(msg.getOwnersList(), + proto.cosmos.capability.v1beta1.Owner.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.capability.v1beta1.CapabilityOwners} + */ +proto.cosmos.capability.v1beta1.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.capability.v1beta1.CapabilityOwners} + */ +proto.cosmos.capability.v1beta1.CapabilityOwners.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + 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); + msg.addOwners(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.capability.v1beta1.CapabilityOwners.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.capability.v1beta1.CapabilityOwners.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.capability.v1beta1.CapabilityOwners} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.capability.v1beta1.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 + ); + } +}; + + +/** + * repeated Owner owners = 1; + * @return {!Array} + */ +proto.cosmos.capability.v1beta1.CapabilityOwners.prototype.getOwnersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.capability.v1beta1.Owner, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.capability.v1beta1.CapabilityOwners} returns this +*/ +proto.cosmos.capability.v1beta1.CapabilityOwners.prototype.setOwnersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.capability.v1beta1.Owner=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.capability.v1beta1.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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.capability.v1beta1.CapabilityOwners} returns this + */ +proto.cosmos.capability.v1beta1.CapabilityOwners.prototype.clearOwnersList = function() { + return this.setOwnersList([]); +}; + + +goog.object.extend(exports, proto.cosmos.capability.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/capability/v1beta1/genesis_pb.js b/dist/src/types/proto-types/cosmos/capability/v1beta1/genesis_pb.js new file mode 100644 index 00000000..dbd0d6cd --- /dev/null +++ b/dist/src/types/proto-types/cosmos/capability/v1beta1/genesis_pb.js @@ -0,0 +1,434 @@ +// source: cosmos/capability/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_capability_v1beta1_capability_pb = require('../../../cosmos/capability/v1beta1/capability_pb.js'); +goog.object.extend(proto, cosmos_capability_v1beta1_capability_pb); +goog.exportSymbol('proto.cosmos.capability.v1beta1.GenesisOwners', null, global); +goog.exportSymbol('proto.cosmos.capability.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.cosmos.capability.v1beta1.GenesisOwners = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.capability.v1beta1.GenesisOwners, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.capability.v1beta1.GenesisOwners.displayName = 'proto.cosmos.capability.v1beta1.GenesisOwners'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.capability.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.capability.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.capability.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.capability.v1beta1.GenesisState.displayName = 'proto.cosmos.capability.v1beta1.GenesisState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.capability.v1beta1.GenesisOwners.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.capability.v1beta1.GenesisOwners.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.capability.v1beta1.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) { + var f, obj = { + index: jspb.Message.getFieldWithDefault(msg, 1, 0), + indexOwners: (f = msg.getIndexOwners()) && cosmos_capability_v1beta1_capability_pb.CapabilityOwners.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.capability.v1beta1.GenesisOwners} + */ +proto.cosmos.capability.v1beta1.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.capability.v1beta1.GenesisOwners} + */ +proto.cosmos.capability.v1beta1.GenesisOwners.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.setIndex(value); + break; + case 2: + var value = new cosmos_capability_v1beta1_capability_pb.CapabilityOwners; + reader.readMessage(value,cosmos_capability_v1beta1_capability_pb.CapabilityOwners.deserializeBinaryFromReader); + msg.setIndexOwners(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.capability.v1beta1.GenesisOwners.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.capability.v1beta1.GenesisOwners.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.capability.v1beta1.GenesisOwners} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.capability.v1beta1.GenesisOwners.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIndex(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getIndexOwners(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_capability_v1beta1_capability_pb.CapabilityOwners.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 index = 1; + * @return {number} + */ +proto.cosmos.capability.v1beta1.GenesisOwners.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.capability.v1beta1.GenesisOwners} returns this + */ +proto.cosmos.capability.v1beta1.GenesisOwners.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional CapabilityOwners index_owners = 2; + * @return {?proto.cosmos.capability.v1beta1.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)); +}; + + +/** + * @param {?proto.cosmos.capability.v1beta1.CapabilityOwners|undefined} value + * @return {!proto.cosmos.capability.v1beta1.GenesisOwners} returns this +*/ +proto.cosmos.capability.v1beta1.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 + */ +proto.cosmos.capability.v1beta1.GenesisOwners.prototype.clearIndexOwners = function() { + return this.setIndexOwners(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.capability.v1beta1.GenesisOwners.prototype.hasIndexOwners = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.capability.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.cosmos.capability.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.capability.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.cosmos.capability.v1beta1.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) { + var f, obj = { + index: jspb.Message.getFieldWithDefault(msg, 1, 0), + ownersList: jspb.Message.toObjectList(msg.getOwnersList(), + proto.cosmos.capability.v1beta1.GenesisOwners.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.capability.v1beta1.GenesisState} + */ +proto.cosmos.capability.v1beta1.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.capability.v1beta1.GenesisState} + */ +proto.cosmos.capability.v1beta1.GenesisState.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.setIndex(value); + break; + case 2: + var value = new proto.cosmos.capability.v1beta1.GenesisOwners; + reader.readMessage(value,proto.cosmos.capability.v1beta1.GenesisOwners.deserializeBinaryFromReader); + msg.addOwners(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.capability.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.capability.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.cosmos.capability.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.capability.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIndex(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getOwnersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.capability.v1beta1.GenesisOwners.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 index = 1; + * @return {number} + */ +proto.cosmos.capability.v1beta1.GenesisState.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.capability.v1beta1.GenesisState} returns this + */ +proto.cosmos.capability.v1beta1.GenesisState.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated GenesisOwners owners = 2; + * @return {!Array} + */ +proto.cosmos.capability.v1beta1.GenesisState.prototype.getOwnersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.capability.v1beta1.GenesisOwners, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.capability.v1beta1.GenesisState} returns this +*/ +proto.cosmos.capability.v1beta1.GenesisState.prototype.setOwnersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.capability.v1beta1.GenesisOwners=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.capability.v1beta1.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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.capability.v1beta1.GenesisState} returns this + */ +proto.cosmos.capability.v1beta1.GenesisState.prototype.clearOwnersList = function() { + return this.setOwnersList([]); +}; + + +goog.object.extend(exports, proto.cosmos.capability.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/crisis/v1beta1/genesis_pb.js b/dist/src/types/proto-types/cosmos/crisis/v1beta1/genesis_pb.js new file mode 100644 index 00000000..4ecc9b0a --- /dev/null +++ b/dist/src/types/proto-types/cosmos/crisis/v1beta1/genesis_pb.js @@ -0,0 +1,192 @@ +// source: cosmos/crisis/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.cosmos.crisis.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.cosmos.crisis.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crisis.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crisis.v1beta1.GenesisState.displayName = 'proto.cosmos.crisis.v1beta1.GenesisState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.crisis.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crisis.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.cosmos.crisis.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crisis.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + constantFee: (f = msg.getConstantFee()) && 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.crisis.v1beta1.GenesisState} + */ +proto.cosmos.crisis.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crisis.v1beta1.GenesisState; + return proto.cosmos.crisis.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crisis.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crisis.v1beta1.GenesisState} + */ +proto.cosmos.crisis.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setConstantFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crisis.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crisis.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.cosmos.crisis.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crisis.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConstantFee(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin constant_fee = 3; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.crisis.v1beta1.GenesisState.prototype.getConstantFee = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.cosmos.crisis.v1beta1.GenesisState} returns this +*/ +proto.cosmos.crisis.v1beta1.GenesisState.prototype.setConstantFee = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.crisis.v1beta1.GenesisState} returns this + */ +proto.cosmos.crisis.v1beta1.GenesisState.prototype.clearConstantFee = function() { + return this.setConstantFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.crisis.v1beta1.GenesisState.prototype.hasConstantFee = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +goog.object.extend(exports, proto.cosmos.crisis.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/crisis/v1beta1/tx_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/crisis/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..6abc2fdb --- /dev/null +++ b/dist/src/types/proto-types/cosmos/crisis/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,158 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.crisis.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.crisis = {}; +proto.cosmos.crisis.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.crisis.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.crisis.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.crisis.v1beta1.MsgVerifyInvariant, + * !proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse>} + */ +const methodDescriptor_Msg_VerifyInvariant = new grpc.web.MethodDescriptor( + '/cosmos.crisis.v1beta1.Msg/VerifyInvariant', + grpc.web.MethodType.UNARY, + proto.cosmos.crisis.v1beta1.MsgVerifyInvariant, + proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse, + /** + * @param {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.crisis.v1beta1.MsgVerifyInvariant, + * !proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse>} + */ +const methodInfo_Msg_VerifyInvariant = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse, + /** + * @param {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.crisis.v1beta1.MsgClient.prototype.verifyInvariant = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.crisis.v1beta1.Msg/VerifyInvariant', + request, + metadata || {}, + methodDescriptor_Msg_VerifyInvariant, + callback); +}; + + +/** + * @param {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.crisis.v1beta1.MsgPromiseClient.prototype.verifyInvariant = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.crisis.v1beta1.Msg/VerifyInvariant', + request, + metadata || {}, + methodDescriptor_Msg_VerifyInvariant); +}; + + +module.exports = proto.cosmos.crisis.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/crisis/v1beta1/tx_pb.js b/dist/src/types/proto-types/cosmos/crisis/v1beta1/tx_pb.js new file mode 100644 index 00000000..b94043e4 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/crisis/v1beta1/tx_pb.js @@ -0,0 +1,352 @@ +// source: cosmos/crisis/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.crisis.v1beta1.MsgVerifyInvariant', null, global); +goog.exportSymbol('proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse', 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.crisis.v1beta1.MsgVerifyInvariant = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crisis.v1beta1.MsgVerifyInvariant, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.displayName = 'proto.cosmos.crisis.v1beta1.MsgVerifyInvariant'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crisis.v1beta1.MsgVerifyInvariantResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.displayName = 'proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.crisis.v1beta1.MsgVerifyInvariant.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crisis.v1beta1.MsgVerifyInvariant} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + invariantModuleName: jspb.Message.getFieldWithDefault(msg, 2, ""), + invariantRoute: 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.cosmos.crisis.v1beta1.MsgVerifyInvariant} + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crisis.v1beta1.MsgVerifyInvariant; + return proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.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 {string} */ (reader.readString()); + msg.setInvariantModuleName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setInvariantRoute(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.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.crisis.v1beta1.MsgVerifyInvariant} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getInvariantModuleName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getInvariantRoute(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} returns this + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string invariant_module_name = 2; + * @return {string} + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.prototype.getInvariantModuleName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} returns this + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.prototype.setInvariantModuleName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string invariant_route = 3; + * @return {string} + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.prototype.getInvariantRoute = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} returns this + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.prototype.setInvariantRoute = 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.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crisis.v1beta1.MsgVerifyInvariantResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.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.crisis.v1beta1.MsgVerifyInvariantResponse} + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse; + return proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.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.crisis.v1beta1.MsgVerifyInvariantResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.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.crisis.v1beta1.MsgVerifyInvariantResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cosmos.crisis.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/crypto/ed25519/keys_pb.js b/dist/src/types/proto-types/cosmos/crypto/ed25519/keys_pb.js new file mode 100644 index 00000000..9f7de8b9 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/crypto/ed25519/keys_pb.js @@ -0,0 +1,369 @@ +// source: cosmos/crypto/ed25519/keys.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.crypto.ed25519.PrivKey', null, global); +goog.exportSymbol('proto.cosmos.crypto.ed25519.PubKey', 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.crypto.ed25519.PubKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.ed25519.PubKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.ed25519.PubKey.displayName = 'proto.cosmos.crypto.ed25519.PubKey'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crypto.ed25519.PrivKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.ed25519.PrivKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.ed25519.PrivKey.displayName = 'proto.cosmos.crypto.ed25519.PrivKey'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.crypto.ed25519.PubKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.ed25519.PubKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.ed25519.PubKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.ed25519.PubKey.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_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.crypto.ed25519.PubKey} + */ +proto.cosmos.crypto.ed25519.PubKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.ed25519.PubKey; + return proto.cosmos.crypto.ed25519.PubKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.ed25519.PubKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.ed25519.PubKey} + */ +proto.cosmos.crypto.ed25519.PubKey.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.ed25519.PubKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.ed25519.PubKey.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.crypto.ed25519.PubKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.ed25519.PubKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.ed25519.PubKey.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.crypto.ed25519.PubKey.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.crypto.ed25519.PubKey.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.ed25519.PubKey} returns this + */ +proto.cosmos.crypto.ed25519.PubKey.prototype.setKey = 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.crypto.ed25519.PrivKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.ed25519.PrivKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.ed25519.PrivKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.ed25519.PrivKey.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_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.crypto.ed25519.PrivKey} + */ +proto.cosmos.crypto.ed25519.PrivKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.ed25519.PrivKey; + return proto.cosmos.crypto.ed25519.PrivKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.ed25519.PrivKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.ed25519.PrivKey} + */ +proto.cosmos.crypto.ed25519.PrivKey.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.ed25519.PrivKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.ed25519.PrivKey.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.crypto.ed25519.PrivKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.ed25519.PrivKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.ed25519.PrivKey.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.crypto.ed25519.PrivKey.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.crypto.ed25519.PrivKey.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.ed25519.PrivKey} returns this + */ +proto.cosmos.crypto.ed25519.PrivKey.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +goog.object.extend(exports, proto.cosmos.crypto.ed25519); diff --git a/dist/src/types/proto-types/cosmos/crypto/multisig/keys_pb.js b/dist/src/types/proto-types/cosmos/crypto/multisig/keys_pb.js new file mode 100644 index 00000000..a15694f2 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/crypto/multisig/keys_pb.js @@ -0,0 +1,231 @@ +// source: cosmos/crypto/multisig/keys.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +goog.exportSymbol('proto.cosmos.crypto.multisig.LegacyAminoPubKey', 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.crypto.multisig.LegacyAminoPubKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.crypto.multisig.LegacyAminoPubKey.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.crypto.multisig.LegacyAminoPubKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.multisig.LegacyAminoPubKey.displayName = 'proto.cosmos.crypto.multisig.LegacyAminoPubKey'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.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.crypto.multisig.LegacyAminoPubKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.multisig.LegacyAminoPubKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.multisig.LegacyAminoPubKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.toObject = function(includeInstance, msg) { + var f, obj = { + threshold: jspb.Message.getFieldWithDefault(msg, 1, 0), + publicKeysList: jspb.Message.toObjectList(msg.getPublicKeysList(), + 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.cosmos.crypto.multisig.LegacyAminoPubKey} + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.multisig.LegacyAminoPubKey; + return proto.cosmos.crypto.multisig.LegacyAminoPubKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.multisig.LegacyAminoPubKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.multisig.LegacyAminoPubKey} + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.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.setThreshold(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addPublicKeys(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.multisig.LegacyAminoPubKey.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.crypto.multisig.LegacyAminoPubKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getThreshold(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getPublicKeysList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint32 threshold = 1; + * @return {number} + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.prototype.getThreshold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.crypto.multisig.LegacyAminoPubKey} returns this + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.prototype.setThreshold = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated google.protobuf.Any public_keys = 2; + * @return {!Array} + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.prototype.getPublicKeysList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.crypto.multisig.LegacyAminoPubKey} returns this +*/ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.prototype.setPublicKeysList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.prototype.addPublicKeys = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.crypto.multisig.LegacyAminoPubKey} returns this + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.prototype.clearPublicKeysList = function() { + return this.setPublicKeysList([]); +}; + + +goog.object.extend(exports, proto.cosmos.crypto.multisig); diff --git a/dist/src/types/proto-types/cosmos/crypto/multisig/v1beta1/multisig_pb.js b/dist/src/types/proto-types/cosmos/crypto/multisig/v1beta1/multisig_pb.js new file mode 100644 index 00000000..25cdd8c5 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/crypto/multisig/v1beta1/multisig_pb.js @@ -0,0 +1,425 @@ +// source: cosmos/crypto/multisig/v1beta1/multisig.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.crypto.multisig.v1beta1.CompactBitArray', null, global); +goog.exportSymbol('proto.cosmos.crypto.multisig.v1beta1.MultiSignature', 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.crypto.multisig.v1beta1.MultiSignature = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.crypto.multisig.v1beta1.MultiSignature.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.crypto.multisig.v1beta1.MultiSignature, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.multisig.v1beta1.MultiSignature.displayName = 'proto.cosmos.crypto.multisig.v1beta1.MultiSignature'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crypto.multisig.v1beta1.CompactBitArray = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.multisig.v1beta1.CompactBitArray, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.displayName = 'proto.cosmos.crypto.multisig.v1beta1.CompactBitArray'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.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.crypto.multisig.v1beta1.MultiSignature.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.multisig.v1beta1.MultiSignature.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.multisig.v1beta1.MultiSignature} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.toObject = function(includeInstance, msg) { + var f, obj = { + signaturesList: msg.getSignaturesList_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.crypto.multisig.v1beta1.MultiSignature} + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.multisig.v1beta1.MultiSignature; + return proto.cosmos.crypto.multisig.v1beta1.MultiSignature.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.multisig.v1beta1.MultiSignature} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.multisig.v1beta1.MultiSignature} + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.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.addSignatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.multisig.v1beta1.MultiSignature.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.crypto.multisig.v1beta1.MultiSignature} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignaturesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes signatures = 1; + * @return {!(Array|Array)} + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.prototype.getSignaturesList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes signatures = 1; + * This is a type-conversion wrapper around `getSignaturesList()` + * @return {!Array} + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.prototype.getSignaturesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getSignaturesList())); +}; + + +/** + * repeated bytes signatures = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignaturesList()` + * @return {!Array} + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.prototype.getSignaturesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getSignaturesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.cosmos.crypto.multisig.v1beta1.MultiSignature} returns this + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.prototype.setSignaturesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.cosmos.crypto.multisig.v1beta1.MultiSignature} returns this + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.prototype.addSignatures = 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.crypto.multisig.v1beta1.MultiSignature} returns this + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.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.cosmos.crypto.multisig.v1beta1.CompactBitArray.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.multisig.v1beta1.CompactBitArray} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.toObject = function(includeInstance, msg) { + var f, obj = { + extraBitsStored: jspb.Message.getFieldWithDefault(msg, 1, 0), + elems: msg.getElems_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.crypto.multisig.v1beta1.CompactBitArray} + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.multisig.v1beta1.CompactBitArray; + return proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.multisig.v1beta1.CompactBitArray} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.multisig.v1beta1.CompactBitArray} + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.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.setExtraBitsStored(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setElems(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.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.crypto.multisig.v1beta1.CompactBitArray} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExtraBitsStored(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getElems_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional uint32 extra_bits_stored = 1; + * @return {number} + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.prototype.getExtraBitsStored = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.crypto.multisig.v1beta1.CompactBitArray} returns this + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.prototype.setExtraBitsStored = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes elems = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.prototype.getElems = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes elems = 2; + * This is a type-conversion wrapper around `getElems()` + * @return {string} + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.prototype.getElems_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getElems())); +}; + + +/** + * optional bytes elems = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getElems()` + * @return {!Uint8Array} + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.prototype.getElems_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getElems())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.multisig.v1beta1.CompactBitArray} returns this + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.prototype.setElems = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cosmos.crypto.multisig.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/crypto/secp256k1/keys_pb.js b/dist/src/types/proto-types/cosmos/crypto/secp256k1/keys_pb.js new file mode 100644 index 00000000..1a9e42b9 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/crypto/secp256k1/keys_pb.js @@ -0,0 +1,369 @@ +// source: cosmos/crypto/secp256k1/keys.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.crypto.secp256k1.PrivKey', null, global); +goog.exportSymbol('proto.cosmos.crypto.secp256k1.PubKey', 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.crypto.secp256k1.PubKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.secp256k1.PubKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.secp256k1.PubKey.displayName = 'proto.cosmos.crypto.secp256k1.PubKey'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crypto.secp256k1.PrivKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.secp256k1.PrivKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.secp256k1.PrivKey.displayName = 'proto.cosmos.crypto.secp256k1.PrivKey'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.crypto.secp256k1.PubKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.secp256k1.PubKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.secp256k1.PubKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.secp256k1.PubKey.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_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.crypto.secp256k1.PubKey} + */ +proto.cosmos.crypto.secp256k1.PubKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.secp256k1.PubKey; + return proto.cosmos.crypto.secp256k1.PubKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.secp256k1.PubKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.secp256k1.PubKey} + */ +proto.cosmos.crypto.secp256k1.PubKey.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.secp256k1.PubKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.secp256k1.PubKey.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.crypto.secp256k1.PubKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.secp256k1.PubKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.secp256k1.PubKey.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.crypto.secp256k1.PubKey.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.crypto.secp256k1.PubKey.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.secp256k1.PubKey} returns this + */ +proto.cosmos.crypto.secp256k1.PubKey.prototype.setKey = 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.crypto.secp256k1.PrivKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.secp256k1.PrivKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.secp256k1.PrivKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.secp256k1.PrivKey.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_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.crypto.secp256k1.PrivKey} + */ +proto.cosmos.crypto.secp256k1.PrivKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.secp256k1.PrivKey; + return proto.cosmos.crypto.secp256k1.PrivKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.secp256k1.PrivKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.secp256k1.PrivKey} + */ +proto.cosmos.crypto.secp256k1.PrivKey.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.secp256k1.PrivKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.secp256k1.PrivKey.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.crypto.secp256k1.PrivKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.secp256k1.PrivKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.secp256k1.PrivKey.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.crypto.secp256k1.PrivKey.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.crypto.secp256k1.PrivKey.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.secp256k1.PrivKey} returns this + */ +proto.cosmos.crypto.secp256k1.PrivKey.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +goog.object.extend(exports, proto.cosmos.crypto.secp256k1); diff --git a/dist/src/types/proto-types/cosmos/crypto/sm2/keys_pb.js b/dist/src/types/proto-types/cosmos/crypto/sm2/keys_pb.js new file mode 100644 index 00000000..2e36d672 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/crypto/sm2/keys_pb.js @@ -0,0 +1,369 @@ +// source: cosmos/crypto/sm2/keys.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.crypto.sm2.PrivKey', null, global); +goog.exportSymbol('proto.cosmos.crypto.sm2.PubKey', 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.crypto.sm2.PubKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.sm2.PubKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.sm2.PubKey.displayName = 'proto.cosmos.crypto.sm2.PubKey'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crypto.sm2.PrivKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.sm2.PrivKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.sm2.PrivKey.displayName = 'proto.cosmos.crypto.sm2.PrivKey'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.crypto.sm2.PubKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.sm2.PubKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.sm2.PubKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.sm2.PubKey.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_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.crypto.sm2.PubKey} + */ +proto.cosmos.crypto.sm2.PubKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.sm2.PubKey; + return proto.cosmos.crypto.sm2.PubKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.sm2.PubKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.sm2.PubKey} + */ +proto.cosmos.crypto.sm2.PubKey.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.sm2.PubKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.sm2.PubKey.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.crypto.sm2.PubKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.sm2.PubKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.sm2.PubKey.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.crypto.sm2.PubKey.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.crypto.sm2.PubKey.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.sm2.PubKey} returns this + */ +proto.cosmos.crypto.sm2.PubKey.prototype.setKey = 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.crypto.sm2.PrivKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.sm2.PrivKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.sm2.PrivKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.sm2.PrivKey.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_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.crypto.sm2.PrivKey} + */ +proto.cosmos.crypto.sm2.PrivKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.sm2.PrivKey; + return proto.cosmos.crypto.sm2.PrivKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.sm2.PrivKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.sm2.PrivKey} + */ +proto.cosmos.crypto.sm2.PrivKey.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.sm2.PrivKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.sm2.PrivKey.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.crypto.sm2.PrivKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.sm2.PrivKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.sm2.PrivKey.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.crypto.sm2.PrivKey.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.crypto.sm2.PrivKey.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.sm2.PrivKey} returns this + */ +proto.cosmos.crypto.sm2.PrivKey.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +goog.object.extend(exports, proto.cosmos.crypto.sm2); diff --git a/dist/src/types/proto-types/cosmos/distribution/v1beta1/distribution_pb.js b/dist/src/types/proto-types/cosmos/distribution/v1beta1/distribution_pb.js new file mode 100644 index 00000000..e49a84bb --- /dev/null +++ b/dist/src/types/proto-types/cosmos/distribution/v1beta1/distribution_pb.js @@ -0,0 +1,2563 @@ +// source: cosmos/distribution/v1beta1/distribution.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.DelegationDelegatorReward', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.DelegatorStartingInfo', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.FeePool', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.Params', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorSlashEvent', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorSlashEvents', 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.distribution.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.Params.displayName = 'proto.cosmos.distribution.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.cosmos.distribution.v1beta1.ValidatorHistoricalRewards = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorCurrentRewards = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorAccumulatedCommission = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorOutstandingRewards = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorSlashEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorSlashEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorSlashEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorSlashEvents = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorSlashEvents, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorSlashEvents'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.FeePool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.FeePool.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.FeePool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.FeePool.displayName = 'proto.cosmos.distribution.v1beta1.FeePool'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.CommunityPoolSpendProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.displayName = 'proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.DelegatorStartingInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.DelegatorStartingInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.displayName = 'proto.cosmos.distribution.v1beta1.DelegatorStartingInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.DelegationDelegatorReward = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.DelegationDelegatorReward, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.displayName = 'proto.cosmos.distribution.v1beta1.DelegationDelegatorReward'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.CommunityPoolSpendProposalWithDeposit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.displayName = 'proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.Params.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.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.cosmos.distribution.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + communityTax: jspb.Message.getFieldWithDefault(msg, 1, ""), + baseProposerReward: jspb.Message.getFieldWithDefault(msg, 2, ""), + bonusProposerReward: jspb.Message.getFieldWithDefault(msg, 3, ""), + withdrawAddrEnabled: 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.cosmos.distribution.v1beta1.Params} + */ +proto.cosmos.distribution.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.Params; + return proto.cosmos.distribution.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.Params} + */ +proto.cosmos.distribution.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.setCommunityTax(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBaseProposerReward(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBonusProposerReward(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setWithdrawAddrEnabled(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.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.cosmos.distribution.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCommunityTax(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBaseProposerReward(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getBonusProposerReward(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getWithdrawAddrEnabled(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional string community_tax = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.Params.prototype.getCommunityTax = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.Params} returns this + */ +proto.cosmos.distribution.v1beta1.Params.prototype.setCommunityTax = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string base_proposer_reward = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.Params.prototype.getBaseProposerReward = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.Params} returns this + */ +proto.cosmos.distribution.v1beta1.Params.prototype.setBaseProposerReward = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string bonus_proposer_reward = 3; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.Params.prototype.getBonusProposerReward = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.Params} returns this + */ +proto.cosmos.distribution.v1beta1.Params.prototype.setBonusProposerReward = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bool withdraw_addr_enabled = 4; + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.Params.prototype.getWithdrawAddrEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.distribution.v1beta1.Params} returns this + */ +proto.cosmos.distribution.v1beta1.Params.prototype.setWithdrawAddrEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.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.distribution.v1beta1.ValidatorHistoricalRewards.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorHistoricalRewards} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.toObject = function(includeInstance, msg) { + var f, obj = { + cumulativeRewardRatioList: jspb.Message.toObjectList(msg.getCumulativeRewardRatioList(), + cosmos_base_v1beta1_coin_pb.DecCoin.toObject, includeInstance), + referenceCount: 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.distribution.v1beta1.ValidatorHistoricalRewards} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards; + return proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.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.addCumulativeRewardRatio(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setReferenceCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.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.ValidatorHistoricalRewards} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCumulativeRewardRatioList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } + f = message.getReferenceCount(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin cumulative_reward_ratio = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.prototype.getCumulativeRewardRatioList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.prototype.setCumulativeRewardRatioList = 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.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.prototype.addCumulativeRewardRatio = 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.cosmos.distribution.v1beta1.ValidatorHistoricalRewards} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.prototype.clearCumulativeRewardRatioList = function() { + return this.setCumulativeRewardRatioList([]); +}; + + +/** + * optional uint32 reference_count = 2; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.prototype.getReferenceCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.prototype.setReferenceCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.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.distribution.v1beta1.ValidatorCurrentRewards.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorCurrentRewards} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.toObject = function(includeInstance, msg) { + var f, obj = { + rewardsList: jspb.Message.toObjectList(msg.getRewardsList(), + cosmos_base_v1beta1_coin_pb.DecCoin.toObject, includeInstance), + period: 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.distribution.v1beta1.ValidatorCurrentRewards} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards; + return proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.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.addRewards(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPeriod(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.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.ValidatorCurrentRewards} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } + f = message.getPeriod(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin rewards = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.prototype.getRewardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.prototype.setRewardsList = 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.cosmos.distribution.v1beta1.ValidatorCurrentRewards.prototype.addRewards = 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.cosmos.distribution.v1beta1.ValidatorCurrentRewards} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.prototype.clearRewardsList = function() { + return this.setRewardsList([]); +}; + + +/** + * optional uint64 period = 2; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.prototype.getPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.prototype.setPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.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.distribution.v1beta1.ValidatorAccumulatedCommission.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorAccumulatedCommission} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.toObject = function(includeInstance, msg) { + var f, obj = { + commissionList: jspb.Message.toObjectList(msg.getCommissionList(), + 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.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission; + return proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.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.addCommission(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.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.ValidatorAccumulatedCommission} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCommissionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin commission = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.prototype.getCommissionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.prototype.setCommissionList = 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.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.prototype.addCommission = 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.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.prototype.clearCommissionList = function() { + return this.setCommissionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.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.distribution.v1beta1.ValidatorOutstandingRewards.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorOutstandingRewards} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.toObject = function(includeInstance, msg) { + var f, obj = { + rewardsList: jspb.Message.toObjectList(msg.getRewardsList(), + 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.cosmos.distribution.v1beta1.ValidatorOutstandingRewards} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards; + return proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.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.addRewards(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.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.ValidatorOutstandingRewards} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin rewards = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.prototype.getRewardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.prototype.setRewardsList = 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.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.prototype.addRewards = 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.cosmos.distribution.v1beta1.ValidatorOutstandingRewards} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.prototype.clearRewardsList = function() { + return this.setRewardsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.ValidatorSlashEvent.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorSlashEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.toObject = function(includeInstance, msg) { + var f, obj = { + validatorPeriod: jspb.Message.getFieldWithDefault(msg, 1, 0), + fraction: 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.distribution.v1beta1.ValidatorSlashEvent} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorSlashEvent; + return proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvent} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.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.setValidatorPeriod(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFraction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.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.ValidatorSlashEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorPeriod(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getFraction(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint64 validator_period = 1; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.prototype.getValidatorPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvent} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.prototype.setValidatorPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string fraction = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.prototype.getFraction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvent} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.prototype.setFraction = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.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.distribution.v1beta1.ValidatorSlashEvents.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorSlashEvents} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.toObject = function(includeInstance, msg) { + var f, obj = { + validatorSlashEventsList: jspb.Message.toObjectList(msg.getValidatorSlashEventsList(), + proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.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.ValidatorSlashEvents} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorSlashEvents; + return proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvents} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvents} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.distribution.v1beta1.ValidatorSlashEvent; + reader.readMessage(value,proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.deserializeBinaryFromReader); + msg.addValidatorSlashEvents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.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.ValidatorSlashEvents} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorSlashEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ValidatorSlashEvent validator_slash_events = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.prototype.getValidatorSlashEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.distribution.v1beta1.ValidatorSlashEvent, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvents} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.prototype.setValidatorSlashEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvent=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvent} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.prototype.addValidatorSlashEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.distribution.v1beta1.ValidatorSlashEvent, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvents} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.prototype.clearValidatorSlashEventsList = function() { + return this.setValidatorSlashEventsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.FeePool.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.distribution.v1beta1.FeePool.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.FeePool.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.FeePool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.FeePool.toObject = function(includeInstance, msg) { + var f, obj = { + communityPoolList: jspb.Message.toObjectList(msg.getCommunityPoolList(), + 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.cosmos.distribution.v1beta1.FeePool} + */ +proto.cosmos.distribution.v1beta1.FeePool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.FeePool; + return proto.cosmos.distribution.v1beta1.FeePool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.FeePool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.FeePool} + */ +proto.cosmos.distribution.v1beta1.FeePool.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.addCommunityPool(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.FeePool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.FeePool.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.FeePool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.FeePool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCommunityPoolList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin community_pool = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.FeePool.prototype.getCommunityPoolList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.FeePool} returns this +*/ +proto.cosmos.distribution.v1beta1.FeePool.prototype.setCommunityPoolList = 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.cosmos.distribution.v1beta1.FeePool.prototype.addCommunityPool = 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.cosmos.distribution.v1beta1.FeePool} returns this + */ +proto.cosmos.distribution.v1beta1.FeePool.prototype.clearCommunityPoolList = function() { + return this.setCommunityPoolList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.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.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.CommunityPoolSpendProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + recipient: jspb.Message.getFieldWithDefault(msg, 3, ""), + 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.CommunityPoolSpendProposal} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal; + return proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.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.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRecipient(value); + break; + case 4: + 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.CommunityPoolSpendProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.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.CommunityPoolSpendProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRecipient(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAmountList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string recipient = 3; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.getRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.setRecipient = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 4; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal} returns this +*/ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.setAmountList = 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.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.addAmount = 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.cosmos.distribution.v1beta1.CommunityPoolSpendProposal} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.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.DelegatorStartingInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.DelegatorStartingInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.toObject = function(includeInstance, msg) { + var f, obj = { + previousPeriod: jspb.Message.getFieldWithDefault(msg, 1, 0), + stake: jspb.Message.getFieldWithDefault(msg, 2, ""), + height: 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.distribution.v1beta1.DelegatorStartingInfo} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.DelegatorStartingInfo; + return proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfo} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.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.setPreviousPeriod(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setStake(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.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.DelegatorStartingInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPreviousPeriod(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getStake(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional uint64 previous_period = 1; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.prototype.getPreviousPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfo} returns this + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.prototype.setPreviousPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string stake = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.prototype.getStake = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfo} returns this + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.prototype.setStake = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 height = 3; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfo} returns this + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.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.distribution.v1beta1.DelegationDelegatorReward.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.DelegationDelegatorReward} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + rewardList: jspb.Message.toObjectList(msg.getRewardList(), + 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.cosmos.distribution.v1beta1.DelegationDelegatorReward} + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.DelegationDelegatorReward; + return proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.DelegationDelegatorReward} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.DelegationDelegatorReward} + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.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 = new cosmos_base_v1beta1_coin_pb.DecCoin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.DecCoin.deserializeBinaryFromReader); + msg.addReward(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.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.DelegationDelegatorReward} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.DelegationDelegatorReward} returns this + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin reward = 2; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.prototype.getRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.DelegationDelegatorReward} returns this +*/ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.prototype.setRewardList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.DecCoin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.DecCoin} + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.prototype.addReward = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.DecCoin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.DelegationDelegatorReward} returns this + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.prototype.clearRewardList = function() { + return this.setRewardList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.CommunityPoolSpendProposalWithDeposit.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.CommunityPoolSpendProposalWithDeposit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + recipient: jspb.Message.getFieldWithDefault(msg, 3, ""), + amount: jspb.Message.getFieldWithDefault(msg, 4, ""), + deposit: 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.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit; + return proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.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.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRecipient(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setAmount(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDeposit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.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.CommunityPoolSpendProposalWithDeposit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRecipient(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAmount(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getDeposit(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string recipient = 3; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.getRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.setRecipient = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string amount = 4; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.getAmount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.setAmount = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string deposit = 5; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.getDeposit = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.setDeposit = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +goog.object.extend(exports, proto.cosmos.distribution.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/distribution/v1beta1/genesis_pb.js b/dist/src/types/proto-types/cosmos/distribution/v1beta1/genesis_pb.js new file mode 100644 index 00000000..062008a8 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/distribution/v1beta1/genesis_pb.js @@ -0,0 +1,2182 @@ +// source: cosmos/distribution/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var cosmos_distribution_v1beta1_distribution_pb = require('../../../cosmos/distribution/v1beta1/distribution_pb.js'); +goog.object.extend(proto, cosmos_distribution_v1beta1_distribution_pb); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.GenesisState', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord', 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.distribution.v1beta1.DelegatorWithdrawInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.displayName = 'proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorOutstandingRewardsRecord = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorAccumulatedCommissionRecord = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorHistoricalRewardsRecord = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorCurrentRewardsRecord = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.DelegatorStartingInfoRecord = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.displayName = 'proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorSlashEventRecord = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.GenesisState.displayName = 'proto.cosmos.distribution.v1beta1.GenesisState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.DelegatorWithdrawInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.DelegatorWithdrawInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + withdrawAddress: 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.distribution.v1beta1.DelegatorWithdrawInfo} + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo; + return proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo} + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.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.setDelegatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setWithdrawAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.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.DelegatorWithdrawInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getWithdrawAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo} returns this + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string withdraw_address = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.prototype.getWithdrawAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo} returns this + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.prototype.setWithdrawAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.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.distribution.v1beta1.ValidatorOutstandingRewardsRecord.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorOutstandingRewardsRecord} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + outstandingRewardsList: jspb.Message.toObjectList(msg.getOutstandingRewardsList(), + 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.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord; + return proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.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 = new cosmos_base_v1beta1_coin_pb.DecCoin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.DecCoin.deserializeBinaryFromReader); + msg.addOutstandingRewards(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.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.ValidatorOutstandingRewardsRecord} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOutstandingRewardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.prototype.getOutstandingRewardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.prototype.setOutstandingRewardsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.DecCoin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.DecCoin} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.prototype.addOutstandingRewards = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.DecCoin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.prototype.clearOutstandingRewardsList = function() { + return this.setOutstandingRewardsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.ValidatorAccumulatedCommissionRecord.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorAccumulatedCommissionRecord} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + accumulated: (f = msg.getAccumulated()) && cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission.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.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord; + return proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.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 = new cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission.deserializeBinaryFromReader); + msg.setAccumulated(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.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.ValidatorAccumulatedCommissionRecord} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAccumulated(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional ValidatorAccumulatedCommission accumulated = 2; + * @return {?proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.prototype.getAccumulated = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission, 2)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.prototype.setAccumulated = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.prototype.clearAccumulated = function() { + return this.setAccumulated(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.prototype.hasAccumulated = 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.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorHistoricalRewardsRecord} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + period: jspb.Message.getFieldWithDefault(msg, 2, 0), + rewards: (f = msg.getRewards()) && cosmos_distribution_v1beta1_distribution_pb.ValidatorHistoricalRewards.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.distribution.v1beta1.ValidatorHistoricalRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord; + return proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.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 {number} */ (reader.readUint64()); + msg.setPeriod(value); + break; + case 3: + var value = new cosmos_distribution_v1beta1_distribution_pb.ValidatorHistoricalRewards; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.ValidatorHistoricalRewards.deserializeBinaryFromReader); + msg.setRewards(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.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.ValidatorHistoricalRewardsRecord} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPeriod(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getRewards(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_distribution_v1beta1_distribution_pb.ValidatorHistoricalRewards.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 period = 2; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.getPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.setPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional ValidatorHistoricalRewards rewards = 3; + * @return {?proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.getRewards = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.ValidatorHistoricalRewards, 3)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.setRewards = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.clearRewards = function() { + return this.setRewards(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.hasRewards = 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.distribution.v1beta1.ValidatorCurrentRewardsRecord.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorCurrentRewardsRecord} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + rewards: (f = msg.getRewards()) && cosmos_distribution_v1beta1_distribution_pb.ValidatorCurrentRewards.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.distribution.v1beta1.ValidatorCurrentRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord; + return proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.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 = new cosmos_distribution_v1beta1_distribution_pb.ValidatorCurrentRewards; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.ValidatorCurrentRewards.deserializeBinaryFromReader); + msg.setRewards(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.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.ValidatorCurrentRewardsRecord} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRewards(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_distribution_v1beta1_distribution_pb.ValidatorCurrentRewards.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional ValidatorCurrentRewards rewards = 2; + * @return {?proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.prototype.getRewards = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.ValidatorCurrentRewards, 2)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.prototype.setRewards = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.prototype.clearRewards = function() { + return this.setRewards(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.prototype.hasRewards = 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.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.DelegatorStartingInfoRecord} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + startingInfo: (f = msg.getStartingInfo()) && cosmos_distribution_v1beta1_distribution_pb.DelegatorStartingInfo.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.distribution.v1beta1.DelegatorStartingInfoRecord} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord; + return proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.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.setDelegatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + case 3: + var value = new cosmos_distribution_v1beta1_distribution_pb.DelegatorStartingInfo; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.DelegatorStartingInfo.deserializeBinaryFromReader); + msg.setStartingInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.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.DelegatorStartingInfoRecord} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getStartingInfo(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_distribution_v1beta1_distribution_pb.DelegatorStartingInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} returns this + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} returns this + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional DelegatorStartingInfo starting_info = 3; + * @return {?proto.cosmos.distribution.v1beta1.DelegatorStartingInfo} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.getStartingInfo = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.DelegatorStartingInfo} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.DelegatorStartingInfo, 3)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.DelegatorStartingInfo|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} returns this +*/ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.setStartingInfo = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} returns this + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.clearStartingInfo = function() { + return this.setStartingInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.hasStartingInfo = 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.distribution.v1beta1.ValidatorSlashEventRecord.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorSlashEventRecord} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + period: jspb.Message.getFieldWithDefault(msg, 3, 0), + validatorSlashEvent: (f = msg.getValidatorSlashEvent()) && cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent.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.distribution.v1beta1.ValidatorSlashEventRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord; + return proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.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 {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPeriod(value); + break; + case 4: + var value = new cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent.deserializeBinaryFromReader); + msg.setValidatorSlashEvent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.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.ValidatorSlashEventRecord} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getPeriod(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getValidatorSlashEvent(); + if (f != null) { + writer.writeMessage( + 4, + f, + cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 height = 2; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 period = 3; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.getPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.setPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional ValidatorSlashEvent validator_slash_event = 4; + * @return {?proto.cosmos.distribution.v1beta1.ValidatorSlashEvent} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.getValidatorSlashEvent = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.ValidatorSlashEvent} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent, 4)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.ValidatorSlashEvent|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.setValidatorSlashEvent = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.clearValidatorSlashEvent = function() { + return this.setValidatorSlashEvent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.hasValidatorSlashEvent = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.GenesisState.repeatedFields_ = [3,5,6,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.cosmos.distribution.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.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.cosmos.distribution.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_distribution_v1beta1_distribution_pb.Params.toObject(includeInstance, f), + feePool: (f = msg.getFeePool()) && cosmos_distribution_v1beta1_distribution_pb.FeePool.toObject(includeInstance, f), + delegatorWithdrawInfosList: jspb.Message.toObjectList(msg.getDelegatorWithdrawInfosList(), + proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.toObject, includeInstance), + previousProposer: jspb.Message.getFieldWithDefault(msg, 4, ""), + outstandingRewardsList: jspb.Message.toObjectList(msg.getOutstandingRewardsList(), + proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.toObject, includeInstance), + validatorAccumulatedCommissionsList: jspb.Message.toObjectList(msg.getValidatorAccumulatedCommissionsList(), + proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.toObject, includeInstance), + validatorHistoricalRewardsList: jspb.Message.toObjectList(msg.getValidatorHistoricalRewardsList(), + proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.toObject, includeInstance), + validatorCurrentRewardsList: jspb.Message.toObjectList(msg.getValidatorCurrentRewardsList(), + proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.toObject, includeInstance), + delegatorStartingInfosList: jspb.Message.toObjectList(msg.getDelegatorStartingInfosList(), + proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.toObject, includeInstance), + validatorSlashEventsList: jspb.Message.toObjectList(msg.getValidatorSlashEventsList(), + proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.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.GenesisState} + */ +proto.cosmos.distribution.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.GenesisState; + return proto.cosmos.distribution.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} + */ +proto.cosmos.distribution.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_distribution_v1beta1_distribution_pb.Params; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new cosmos_distribution_v1beta1_distribution_pb.FeePool; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.FeePool.deserializeBinaryFromReader); + msg.setFeePool(value); + break; + case 3: + var value = new proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo; + reader.readMessage(value,proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.deserializeBinaryFromReader); + msg.addDelegatorWithdrawInfos(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPreviousProposer(value); + break; + case 5: + var value = new proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord; + reader.readMessage(value,proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.deserializeBinaryFromReader); + msg.addOutstandingRewards(value); + break; + case 6: + var value = new proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord; + reader.readMessage(value,proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.deserializeBinaryFromReader); + msg.addValidatorAccumulatedCommissions(value); + break; + case 7: + var value = new proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord; + reader.readMessage(value,proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.deserializeBinaryFromReader); + msg.addValidatorHistoricalRewards(value); + break; + case 8: + var value = new proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord; + reader.readMessage(value,proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.deserializeBinaryFromReader); + msg.addValidatorCurrentRewards(value); + break; + case 9: + var value = new proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord; + reader.readMessage(value,proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.deserializeBinaryFromReader); + msg.addDelegatorStartingInfos(value); + break; + case 10: + var value = new proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord; + reader.readMessage(value,proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.deserializeBinaryFromReader); + msg.addValidatorSlashEvents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.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.cosmos.distribution.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_distribution_v1beta1_distribution_pb.Params.serializeBinaryToWriter + ); + } + f = message.getFeePool(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_distribution_v1beta1_distribution_pb.FeePool.serializeBinaryToWriter + ); + } + f = message.getDelegatorWithdrawInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.serializeBinaryToWriter + ); + } + f = message.getPreviousProposer(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getOutstandingRewardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.serializeBinaryToWriter + ); + } + f = message.getValidatorAccumulatedCommissionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.serializeBinaryToWriter + ); + } + f = message.getValidatorHistoricalRewardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.serializeBinaryToWriter + ); + } + f = message.getValidatorCurrentRewardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.serializeBinaryToWriter + ); + } + f = message.getDelegatorStartingInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.serializeBinaryToWriter + ); + } + f = message.getValidatorSlashEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 10, + f, + proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.distribution.v1beta1.Params} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.Params|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional FeePool fee_pool = 2; + * @return {?proto.cosmos.distribution.v1beta1.FeePool} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getFeePool = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.FeePool} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.FeePool, 2)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.FeePool|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setFeePool = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearFeePool = function() { + return this.setFeePool(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.hasFeePool = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getDelegatorWithdrawInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setDelegatorWithdrawInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.addDelegatorWithdrawInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearDelegatorWithdrawInfosList = function() { + return this.setDelegatorWithdrawInfosList([]); +}; + + +/** + * optional string previous_proposer = 4; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getPreviousProposer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setPreviousProposer = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getOutstandingRewardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setOutstandingRewardsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.addOutstandingRewards = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearOutstandingRewardsList = function() { + return this.setOutstandingRewardsList([]); +}; + + +/** + * repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getValidatorAccumulatedCommissionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setValidatorAccumulatedCommissionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.addValidatorAccumulatedCommissions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearValidatorAccumulatedCommissionsList = function() { + return this.setValidatorAccumulatedCommissionsList([]); +}; + + +/** + * repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getValidatorHistoricalRewardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setValidatorHistoricalRewardsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.addValidatorHistoricalRewards = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearValidatorHistoricalRewardsList = function() { + return this.setValidatorHistoricalRewardsList([]); +}; + + +/** + * repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getValidatorCurrentRewardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setValidatorCurrentRewardsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.addValidatorCurrentRewards = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearValidatorCurrentRewardsList = function() { + return this.setValidatorCurrentRewardsList([]); +}; + + +/** + * repeated DelegatorStartingInfoRecord delegator_starting_infos = 9; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getDelegatorStartingInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setDelegatorStartingInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.addDelegatorStartingInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearDelegatorStartingInfosList = function() { + return this.setDelegatorStartingInfosList([]); +}; + + +/** + * repeated ValidatorSlashEventRecord validator_slash_events = 10; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getValidatorSlashEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setValidatorSlashEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 10, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.addValidatorSlashEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearValidatorSlashEventsList = function() { + return this.setValidatorSlashEventsList([]); +}; + + +goog.object.extend(exports, proto.cosmos.distribution.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/distribution/v1beta1/query_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/distribution/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..216343c8 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/distribution/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,806 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.distribution.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_distribution_v1beta1_distribution_pb = require('../../../cosmos/distribution/v1beta1/distribution_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.distribution = {}; +proto.cosmos.distribution.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.distribution.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryParamsRequest, + * !proto.cosmos.distribution.v1beta1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/Params', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryParamsRequest, + proto.cosmos.distribution.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryParamsRequest, + * !proto.cosmos.distribution.v1beta1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest, + * !proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse>} + */ +const methodDescriptor_Query_ValidatorOutstandingRewards = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest, + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest, + * !proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse>} + */ +const methodInfo_Query_ValidatorOutstandingRewards = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.validatorOutstandingRewards = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards', + request, + metadata || {}, + methodDescriptor_Query_ValidatorOutstandingRewards, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.validatorOutstandingRewards = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards', + request, + metadata || {}, + methodDescriptor_Query_ValidatorOutstandingRewards); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest, + * !proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse>} + */ +const methodDescriptor_Query_ValidatorCommission = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/ValidatorCommission', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest, + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest, + * !proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse>} + */ +const methodInfo_Query_ValidatorCommission = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.validatorCommission = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/ValidatorCommission', + request, + metadata || {}, + methodDescriptor_Query_ValidatorCommission, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.validatorCommission = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/ValidatorCommission', + request, + metadata || {}, + methodDescriptor_Query_ValidatorCommission); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest, + * !proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse>} + */ +const methodDescriptor_Query_ValidatorSlashes = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/ValidatorSlashes', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest, + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest, + * !proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse>} + */ +const methodInfo_Query_ValidatorSlashes = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.validatorSlashes = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/ValidatorSlashes', + request, + metadata || {}, + methodDescriptor_Query_ValidatorSlashes, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.validatorSlashes = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/ValidatorSlashes', + request, + metadata || {}, + methodDescriptor_Query_ValidatorSlashes); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest, + * !proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse>} + */ +const methodDescriptor_Query_DelegationRewards = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/DelegationRewards', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest, + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest, + * !proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse>} + */ +const methodInfo_Query_DelegationRewards = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.delegationRewards = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/DelegationRewards', + request, + metadata || {}, + methodDescriptor_Query_DelegationRewards, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.delegationRewards = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/DelegationRewards', + request, + metadata || {}, + methodDescriptor_Query_DelegationRewards); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest, + * !proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse>} + */ +const methodDescriptor_Query_DelegationTotalRewards = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/DelegationTotalRewards', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest, + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest, + * !proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse>} + */ +const methodInfo_Query_DelegationTotalRewards = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.delegationTotalRewards = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/DelegationTotalRewards', + request, + metadata || {}, + methodDescriptor_Query_DelegationTotalRewards, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.delegationTotalRewards = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/DelegationTotalRewards', + request, + metadata || {}, + methodDescriptor_Query_DelegationTotalRewards); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest, + * !proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse>} + */ +const methodDescriptor_Query_DelegatorValidators = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/DelegatorValidators', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest, + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest, + * !proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse>} + */ +const methodInfo_Query_DelegatorValidators = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.delegatorValidators = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/DelegatorValidators', + request, + metadata || {}, + methodDescriptor_Query_DelegatorValidators, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.delegatorValidators = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/DelegatorValidators', + request, + metadata || {}, + methodDescriptor_Query_DelegatorValidators); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest, + * !proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse>} + */ +const methodDescriptor_Query_DelegatorWithdrawAddress = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest, + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest, + * !proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse>} + */ +const methodInfo_Query_DelegatorWithdrawAddress = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.delegatorWithdrawAddress = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress', + request, + metadata || {}, + methodDescriptor_Query_DelegatorWithdrawAddress, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.delegatorWithdrawAddress = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress', + request, + metadata || {}, + methodDescriptor_Query_DelegatorWithdrawAddress); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest, + * !proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse>} + */ +const methodDescriptor_Query_CommunityPool = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/CommunityPool', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest, + proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest, + * !proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse>} + */ +const methodInfo_Query_CommunityPool = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.communityPool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/CommunityPool', + request, + metadata || {}, + methodDescriptor_Query_CommunityPool, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.communityPool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/CommunityPool', + request, + metadata || {}, + methodDescriptor_Query_CommunityPool); +}; + + +module.exports = proto.cosmos.distribution.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/distribution/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/distribution/v1beta1/query_pb.js new file mode 100644 index 00000000..bac37555 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/distribution/v1beta1/query_pb.js @@ -0,0 +1,3157 @@ +// source: cosmos/distribution/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_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_distribution_v1beta1_distribution_pb = require('../../../cosmos/distribution/v1beta1/distribution_pb.js'); +goog.object.extend(proto, cosmos_distribution_v1beta1_distribution_pb); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse', 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.distribution.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryParamsRequest.displayName = 'proto.cosmos.distribution.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.cosmos.distribution.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryParamsResponse.displayName = 'proto.cosmos.distribution.v1beta1.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.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.displayName = 'proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryValidatorOutstandingRewardsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.displayName = 'proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryValidatorCommissionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.displayName = 'proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryValidatorCommissionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.displayName = 'proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryValidatorSlashesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.displayName = 'proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryValidatorSlashesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.displayName = 'proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDelegationRewardsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.displayName = 'proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDelegationRewardsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.displayName = 'proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDelegationTotalRewardsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.displayName = 'proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDelegationTotalRewardsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.displayName = 'proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDelegatorValidatorsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.displayName = 'proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDelegatorValidatorsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.displayName = 'proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDelegatorWithdrawAddressRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.displayName = 'proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDelegatorWithdrawAddressResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.displayName = 'proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryCommunityPoolRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest.displayName = 'proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryCommunityPoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.displayName = 'proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.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.cosmos.distribution.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.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.cosmos.distribution.v1beta1.QueryParamsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryParamsRequest; + return proto.cosmos.distribution.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryParamsRequest} + */ +proto.cosmos.distribution.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.cosmos.distribution.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.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.cosmos.distribution.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.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.cosmos.distribution.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.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.cosmos.distribution.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_distribution_v1beta1_distribution_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.cosmos.distribution.v1beta1.QueryParamsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryParamsResponse; + return proto.cosmos.distribution.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryParamsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_distribution_v1beta1_distribution_pb.Params; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_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.cosmos.distribution.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.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.cosmos.distribution.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_distribution_v1beta1_distribution_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.distribution.v1beta1.Params} + */ +proto.cosmos.distribution.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.Params|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.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.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryValidatorOutstandingRewardsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.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.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest; + return proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.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.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.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.QueryValidatorOutstandingRewardsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.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.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.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.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryValidatorOutstandingRewardsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + rewards: (f = msg.getRewards()) && cosmos_distribution_v1beta1_distribution_pb.ValidatorOutstandingRewards.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.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse; + return proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_distribution_v1beta1_distribution_pb.ValidatorOutstandingRewards; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.ValidatorOutstandingRewards.deserializeBinaryFromReader); + msg.setRewards(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.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.QueryValidatorOutstandingRewardsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewards(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_distribution_v1beta1_distribution_pb.ValidatorOutstandingRewards.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ValidatorOutstandingRewards rewards = 1; + * @return {?proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.prototype.getRewards = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.ValidatorOutstandingRewards, 1)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.prototype.setRewards = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.prototype.clearRewards = function() { + return this.setRewards(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.prototype.hasRewards = 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.distribution.v1beta1.QueryValidatorCommissionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryValidatorCommissionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.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.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest; + return proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.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.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.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.QueryValidatorCommissionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.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.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.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.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryValidatorCommissionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + commission: (f = msg.getCommission()) && cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission.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.distribution.v1beta1.QueryValidatorCommissionResponse} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse; + return proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission.deserializeBinaryFromReader); + msg.setCommission(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.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.QueryValidatorCommissionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCommission(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ValidatorAccumulatedCommission commission = 1; + * @return {?proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.prototype.getCommission = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission, 1)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.prototype.setCommission = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.prototype.clearCommission = function() { + return this.setCommission(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.prototype.hasCommission = 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.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryValidatorSlashesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + startingHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + endingHeight: jspb.Message.getFieldWithDefault(msg, 3, 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.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest; + return proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.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 {number} */ (reader.readUint64()); + msg.setStartingHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setEndingHeight(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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.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.QueryValidatorSlashesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getStartingHeight(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getEndingHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 4, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 starting_height = 2; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.getStartingHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.setStartingHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 ending_height = 3; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.getEndingHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.setEndingHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 4; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.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.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.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.distribution.v1beta1.QueryValidatorSlashesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryValidatorSlashesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + slashesList: jspb.Message.toObjectList(msg.getSlashesList(), + cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent.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.distribution.v1beta1.QueryValidatorSlashesResponse} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse; + return proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent.deserializeBinaryFromReader); + msg.addSlashes(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.distribution.v1beta1.QueryValidatorSlashesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.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.QueryValidatorSlashesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSlashesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ValidatorSlashEvent slashes = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.prototype.getSlashesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.prototype.setSlashesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvent=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvent} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.prototype.addSlashes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.distribution.v1beta1.ValidatorSlashEvent, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.prototype.clearSlashesList = function() { + return this.setSlashesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.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.distribution.v1beta1.QueryValidatorSlashesResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.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.distribution.v1beta1.QueryDelegationRewardsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDelegationRewardsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: 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.distribution.v1beta1.QueryDelegationRewardsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest; + return proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.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.setDelegatorAddress(value); + break; + case 2: + 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.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.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.QueryDelegationRewardsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.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.distribution.v1beta1.QueryDelegationRewardsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDelegationRewardsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + rewardsList: jspb.Message.toObjectList(msg.getRewardsList(), + 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.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse; + return proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.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.addRewards(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.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.QueryDelegationRewardsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin rewards = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.prototype.getRewardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.prototype.setRewardsList = 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.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.prototype.addRewards = 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.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.prototype.clearRewardsList = function() { + return this.setRewardsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.QueryDelegationTotalRewardsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDelegationTotalRewardsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: 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.distribution.v1beta1.QueryDelegationTotalRewardsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest; + return proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.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.setDelegatorAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.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.QueryDelegationTotalRewardsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.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.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDelegationTotalRewardsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + rewardsList: jspb.Message.toObjectList(msg.getRewardsList(), + cosmos_distribution_v1beta1_distribution_pb.DelegationDelegatorReward.toObject, includeInstance), + totalList: jspb.Message.toObjectList(msg.getTotalList(), + 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.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse; + return proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_distribution_v1beta1_distribution_pb.DelegationDelegatorReward; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.DelegationDelegatorReward.deserializeBinaryFromReader); + msg.addRewards(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.DecCoin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.DecCoin.deserializeBinaryFromReader); + msg.addTotal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.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.QueryDelegationTotalRewardsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_distribution_v1beta1_distribution_pb.DelegationDelegatorReward.serializeBinaryToWriter + ); + } + f = message.getTotalList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DelegationDelegatorReward rewards = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.getRewardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.DelegationDelegatorReward, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.setRewardsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.DelegationDelegatorReward=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.DelegationDelegatorReward} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.addRewards = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.distribution.v1beta1.DelegationDelegatorReward, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.clearRewardsList = function() { + return this.setRewardsList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin total = 2; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.getTotalList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.setTotalList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.DecCoin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.DecCoin} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.addTotal = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.DecCoin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.clearTotalList = function() { + return this.setTotalList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.QueryDelegatorValidatorsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDelegatorValidatorsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: 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.distribution.v1beta1.QueryDelegatorValidatorsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest; + return proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.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.setDelegatorAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.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.QueryDelegatorValidatorsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.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.distribution.v1beta1.QueryDelegatorValidatorsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDelegatorValidatorsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + validatorsList: (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.distribution.v1beta1.QueryDelegatorValidatorsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse; + return proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.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.addValidators(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.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.QueryDelegatorValidatorsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string validators = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.prototype.getValidatorsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.prototype.setValidatorsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.prototype.addValidators = 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.distribution.v1beta1.QueryDelegatorValidatorsResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.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.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDelegatorWithdrawAddressRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: 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.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest; + return proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.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.setDelegatorAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.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.QueryDelegatorWithdrawAddressRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.prototype.setDelegatorAddress = 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.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDelegatorWithdrawAddressResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.toObject = function(includeInstance, msg) { + var f, obj = { + withdrawAddress: 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.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse; + return proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.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.setWithdrawAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.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.QueryDelegatorWithdrawAddressResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWithdrawAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string withdraw_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.prototype.getWithdrawAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.prototype.setWithdrawAddress = 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.distribution.v1beta1.QueryCommunityPoolRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryCommunityPoolRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest.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.QueryCommunityPoolRequest} + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest; + return proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest} + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest.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.QueryCommunityPoolRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest.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.QueryCommunityPoolRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.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.distribution.v1beta1.QueryCommunityPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryCommunityPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.toObject = function(includeInstance, msg) { + var f, obj = { + poolList: jspb.Message.toObjectList(msg.getPoolList(), + 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.cosmos.distribution.v1beta1.QueryCommunityPoolResponse} + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse; + return proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse} + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.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.addPool(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.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.QueryCommunityPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin pool = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.prototype.getPoolList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.prototype.setPoolList = 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.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.prototype.addPool = 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.cosmos.distribution.v1beta1.QueryCommunityPoolResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.prototype.clearPoolList = function() { + return this.setPoolList([]); +}; + + +goog.object.extend(exports, proto.cosmos.distribution.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/distribution/v1beta1/tx_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/distribution/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..26909c33 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/distribution/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,400 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.distribution.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.distribution = {}; +proto.cosmos.distribution.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.distribution.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.distribution.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress, + * !proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse>} + */ +const methodDescriptor_Msg_SetWithdrawAddress = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress, + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress, + * !proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse>} + */ +const methodInfo_Msg_SetWithdrawAddress = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.MsgClient.prototype.setWithdrawAddress = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress', + request, + metadata || {}, + methodDescriptor_Msg_SetWithdrawAddress, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.MsgPromiseClient.prototype.setWithdrawAddress = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress', + request, + metadata || {}, + methodDescriptor_Msg_SetWithdrawAddress); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward, + * !proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse>} + */ +const methodDescriptor_Msg_WithdrawDelegatorReward = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward, + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward, + * !proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse>} + */ +const methodInfo_Msg_WithdrawDelegatorReward = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.MsgClient.prototype.withdrawDelegatorReward = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward', + request, + metadata || {}, + methodDescriptor_Msg_WithdrawDelegatorReward, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.MsgPromiseClient.prototype.withdrawDelegatorReward = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward', + request, + metadata || {}, + methodDescriptor_Msg_WithdrawDelegatorReward); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission, + * !proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse>} + */ +const methodDescriptor_Msg_WithdrawValidatorCommission = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission, + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission, + * !proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse>} + */ +const methodInfo_Msg_WithdrawValidatorCommission = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.MsgClient.prototype.withdrawValidatorCommission = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission', + request, + metadata || {}, + methodDescriptor_Msg_WithdrawValidatorCommission, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.MsgPromiseClient.prototype.withdrawValidatorCommission = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission', + request, + metadata || {}, + methodDescriptor_Msg_WithdrawValidatorCommission); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.MsgFundCommunityPool, + * !proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse>} + */ +const methodDescriptor_Msg_FundCommunityPool = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Msg/FundCommunityPool', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.MsgFundCommunityPool, + proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.MsgFundCommunityPool, + * !proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse>} + */ +const methodInfo_Msg_FundCommunityPool = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.MsgClient.prototype.fundCommunityPool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Msg/FundCommunityPool', + request, + metadata || {}, + methodDescriptor_Msg_FundCommunityPool, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.MsgPromiseClient.prototype.fundCommunityPool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Msg/FundCommunityPool', + request, + metadata || {}, + methodDescriptor_Msg_FundCommunityPool); +}; + + +module.exports = proto.cosmos.distribution.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/distribution/v1beta1/tx_pb.js b/dist/src/types/proto-types/cosmos/distribution/v1beta1/tx_pb.js new file mode 100644 index 00000000..c59ec285 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/distribution/v1beta1/tx_pb.js @@ -0,0 +1,1239 @@ +// source: cosmos/distribution/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +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); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse', 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.distribution.v1beta1.MsgSetWithdrawAddress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.displayName = 'proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgSetWithdrawAddressResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.displayName = 'proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgWithdrawDelegatorReward = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.displayName = 'proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgWithdrawDelegatorRewardResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.displayName = 'proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgWithdrawValidatorCommission = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.displayName = 'proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgWithdrawValidatorCommissionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.displayName = 'proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgFundCommunityPool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgFundCommunityPool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.displayName = 'proto.cosmos.distribution.v1beta1.MsgFundCommunityPool'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgFundCommunityPoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.displayName = 'proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.MsgSetWithdrawAddress.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgSetWithdrawAddress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + withdrawAddress: 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.distribution.v1beta1.MsgSetWithdrawAddress} + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress; + return proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress} + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.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.setDelegatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setWithdrawAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.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.MsgSetWithdrawAddress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getWithdrawAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress} returns this + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string withdraw_address = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.prototype.getWithdrawAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress} returns this + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.prototype.setWithdrawAddress = 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.distribution.v1beta1.MsgSetWithdrawAddressResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgSetWithdrawAddressResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.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.MsgSetWithdrawAddressResponse} + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse; + return proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.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.MsgSetWithdrawAddressResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.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.MsgSetWithdrawAddressResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.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.distribution.v1beta1.MsgWithdrawDelegatorReward.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgWithdrawDelegatorReward} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: 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.distribution.v1beta1.MsgWithdrawDelegatorReward} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward; + return proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.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.setDelegatorAddress(value); + break; + case 2: + 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.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.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.MsgWithdrawDelegatorReward} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} returns this + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} returns this + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.prototype.setValidatorAddress = 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.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgWithdrawDelegatorRewardResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.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.MsgWithdrawDelegatorRewardResponse} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse; + return proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.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.MsgWithdrawDelegatorRewardResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.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.MsgWithdrawDelegatorRewardResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.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.distribution.v1beta1.MsgWithdrawValidatorCommission.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgWithdrawValidatorCommission} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.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.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission; + return proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.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.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.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.MsgWithdrawValidatorCommission} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.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.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} returns this + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.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.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgWithdrawValidatorCommissionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.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.MsgWithdrawValidatorCommissionResponse} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse; + return proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.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.MsgWithdrawValidatorCommissionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.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.MsgWithdrawValidatorCommissionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.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.distribution.v1beta1.MsgFundCommunityPool.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgFundCommunityPool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.toObject = function(includeInstance, msg) { + var f, obj = { + amountList: jspb.Message.toObjectList(msg.getAmountList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + 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.cosmos.distribution.v1beta1.MsgFundCommunityPool} + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgFundCommunityPool; + return proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPool} + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.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.addAmount(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.cosmos.distribution.v1beta1.MsgFundCommunityPool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.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.MsgFundCommunityPool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmountList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getDepositor(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPool} returns this +*/ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.prototype.setAmountList = 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.cosmos.distribution.v1beta1.MsgFundCommunityPool.prototype.addAmount = 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.cosmos.distribution.v1beta1.MsgFundCommunityPool} returns this + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + +/** + * optional string depositor = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.prototype.getDepositor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPool} returns this + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.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.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgFundCommunityPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.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.MsgFundCommunityPoolResponse} + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse; + return proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.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.MsgFundCommunityPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.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.MsgFundCommunityPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cosmos.distribution.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/evidence/v1beta1/evidence_pb.js b/dist/src/types/proto-types/cosmos/evidence/v1beta1/evidence_pb.js new file mode 100644 index 00000000..e9f58409 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/evidence/v1beta1/evidence_pb.js @@ -0,0 +1,282 @@ +// source: cosmos/evidence/v1beta1/evidence.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.cosmos.evidence.v1beta1.Equivocation', 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.evidence.v1beta1.Equivocation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.evidence.v1beta1.Equivocation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.evidence.v1beta1.Equivocation.displayName = 'proto.cosmos.evidence.v1beta1.Equivocation'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.evidence.v1beta1.Equivocation.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.evidence.v1beta1.Equivocation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.evidence.v1beta1.Equivocation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.Equivocation.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + power: jspb.Message.getFieldWithDefault(msg, 3, 0), + consensusAddress: 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.cosmos.evidence.v1beta1.Equivocation} + */ +proto.cosmos.evidence.v1beta1.Equivocation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.evidence.v1beta1.Equivocation; + return proto.cosmos.evidence.v1beta1.Equivocation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.evidence.v1beta1.Equivocation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.evidence.v1beta1.Equivocation} + */ +proto.cosmos.evidence.v1beta1.Equivocation.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 google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPower(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setConsensusAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.evidence.v1beta1.Equivocation.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.evidence.v1beta1.Equivocation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.Equivocation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getConsensusAddress(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.evidence.v1beta1.Equivocation} returns this + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.getTime = 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.evidence.v1beta1.Equivocation} returns this +*/ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.evidence.v1beta1.Equivocation} returns this + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.hasTime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 power = 3; + * @return {number} + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.evidence.v1beta1.Equivocation} returns this + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.setPower = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string consensus_address = 4; + * @return {string} + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.getConsensusAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.evidence.v1beta1.Equivocation} returns this + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.setConsensusAddress = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +goog.object.extend(exports, proto.cosmos.evidence.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/evidence/v1beta1/genesis_pb.js b/dist/src/types/proto-types/cosmos/evidence/v1beta1/genesis_pb.js new file mode 100644 index 00000000..b4ec69cc --- /dev/null +++ b/dist/src/types/proto-types/cosmos/evidence/v1beta1/genesis_pb.js @@ -0,0 +1,199 @@ +// source: cosmos/evidence/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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.evidence.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.cosmos.evidence.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.evidence.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.evidence.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.evidence.v1beta1.GenesisState.displayName = 'proto.cosmos.evidence.v1beta1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.evidence.v1beta1.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.cosmos.evidence.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.evidence.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.cosmos.evidence.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + evidenceList: jspb.Message.toObjectList(msg.getEvidenceList(), + 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.cosmos.evidence.v1beta1.GenesisState} + */ +proto.cosmos.evidence.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.evidence.v1beta1.GenesisState; + return proto.cosmos.evidence.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.evidence.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.evidence.v1beta1.GenesisState} + */ +proto.cosmos.evidence.v1beta1.GenesisState.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.addEvidence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.evidence.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.evidence.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.cosmos.evidence.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEvidenceList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated google.protobuf.Any evidence = 1; + * @return {!Array} + */ +proto.cosmos.evidence.v1beta1.GenesisState.prototype.getEvidenceList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.evidence.v1beta1.GenesisState} returns this +*/ +proto.cosmos.evidence.v1beta1.GenesisState.prototype.setEvidenceList = 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.cosmos.evidence.v1beta1.GenesisState.prototype.addEvidence = 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.cosmos.evidence.v1beta1.GenesisState} returns this + */ +proto.cosmos.evidence.v1beta1.GenesisState.prototype.clearEvidenceList = function() { + return this.setEvidenceList([]); +}; + + +goog.object.extend(exports, proto.cosmos.evidence.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/evidence/v1beta1/query_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/evidence/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..c50f9f50 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/evidence/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,244 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.evidence.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.evidence = {}; +proto.cosmos.evidence.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.evidence.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.evidence.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.evidence.v1beta1.QueryEvidenceRequest, + * !proto.cosmos.evidence.v1beta1.QueryEvidenceResponse>} + */ +const methodDescriptor_Query_Evidence = new grpc.web.MethodDescriptor( + '/cosmos.evidence.v1beta1.Query/Evidence', + grpc.web.MethodType.UNARY, + proto.cosmos.evidence.v1beta1.QueryEvidenceRequest, + proto.cosmos.evidence.v1beta1.QueryEvidenceResponse, + /** + * @param {!proto.cosmos.evidence.v1beta1.QueryEvidenceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.evidence.v1beta1.QueryEvidenceRequest, + * !proto.cosmos.evidence.v1beta1.QueryEvidenceResponse>} + */ +const methodInfo_Query_Evidence = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.evidence.v1beta1.QueryEvidenceResponse, + /** + * @param {!proto.cosmos.evidence.v1beta1.QueryEvidenceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.evidence.v1beta1.QueryEvidenceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.evidence.v1beta1.QueryEvidenceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.evidence.v1beta1.QueryClient.prototype.evidence = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.evidence.v1beta1.Query/Evidence', + request, + metadata || {}, + methodDescriptor_Query_Evidence, + callback); +}; + + +/** + * @param {!proto.cosmos.evidence.v1beta1.QueryEvidenceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.evidence.v1beta1.QueryPromiseClient.prototype.evidence = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.evidence.v1beta1.Query/Evidence', + request, + metadata || {}, + methodDescriptor_Query_Evidence); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest, + * !proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse>} + */ +const methodDescriptor_Query_AllEvidence = new grpc.web.MethodDescriptor( + '/cosmos.evidence.v1beta1.Query/AllEvidence', + grpc.web.MethodType.UNARY, + proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest, + proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse, + /** + * @param {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest, + * !proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse>} + */ +const methodInfo_Query_AllEvidence = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse, + /** + * @param {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.evidence.v1beta1.QueryClient.prototype.allEvidence = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.evidence.v1beta1.Query/AllEvidence', + request, + metadata || {}, + methodDescriptor_Query_AllEvidence, + callback); +}; + + +/** + * @param {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.evidence.v1beta1.QueryPromiseClient.prototype.allEvidence = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.evidence.v1beta1.Query/AllEvidence', + request, + metadata || {}, + methodDescriptor_Query_AllEvidence); +}; + + +module.exports = proto.cosmos.evidence.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/evidence/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/evidence/v1beta1/query_pb.js new file mode 100644 index 00000000..52c6433d --- /dev/null +++ b/dist/src/types/proto-types/cosmos/evidence/v1beta1/query_pb.js @@ -0,0 +1,778 @@ +// source: cosmos/evidence/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest', null, global); +goog.exportSymbol('proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse', null, global); +goog.exportSymbol('proto.cosmos.evidence.v1beta1.QueryEvidenceRequest', null, global); +goog.exportSymbol('proto.cosmos.evidence.v1beta1.QueryEvidenceResponse', 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.evidence.v1beta1.QueryEvidenceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.evidence.v1beta1.QueryEvidenceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.displayName = 'proto.cosmos.evidence.v1beta1.QueryEvidenceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.evidence.v1beta1.QueryEvidenceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.evidence.v1beta1.QueryEvidenceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.displayName = 'proto.cosmos.evidence.v1beta1.QueryEvidenceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.evidence.v1beta1.QueryAllEvidenceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.displayName = 'proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.evidence.v1beta1.QueryAllEvidenceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.displayName = 'proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.evidence.v1beta1.QueryEvidenceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.evidence.v1beta1.QueryEvidenceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + evidenceHash: msg.getEvidenceHash_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.evidence.v1beta1.QueryEvidenceRequest} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.evidence.v1beta1.QueryEvidenceRequest; + return proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.evidence.v1beta1.QueryEvidenceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.evidence.v1beta1.QueryEvidenceRequest} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.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.setEvidenceHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.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.evidence.v1beta1.QueryEvidenceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEvidenceHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes evidence_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.prototype.getEvidenceHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes evidence_hash = 1; + * This is a type-conversion wrapper around `getEvidenceHash()` + * @return {string} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.prototype.getEvidenceHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEvidenceHash())); +}; + + +/** + * optional bytes evidence_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEvidenceHash()` + * @return {!Uint8Array} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.prototype.getEvidenceHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEvidenceHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.evidence.v1beta1.QueryEvidenceRequest} returns this + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.prototype.setEvidenceHash = 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.evidence.v1beta1.QueryEvidenceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.evidence.v1beta1.QueryEvidenceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + evidence: (f = msg.getEvidence()) && 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.cosmos.evidence.v1beta1.QueryEvidenceResponse} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.evidence.v1beta1.QueryEvidenceResponse; + return proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.evidence.v1beta1.QueryEvidenceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.evidence.v1beta1.QueryEvidenceResponse} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.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.setEvidence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.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.evidence.v1beta1.QueryEvidenceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEvidence(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Any evidence = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.prototype.getEvidence = 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.cosmos.evidence.v1beta1.QueryEvidenceResponse} returns this +*/ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.prototype.setEvidence = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.evidence.v1beta1.QueryEvidenceResponse} returns this + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.prototype.clearEvidence = function() { + return this.setEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.prototype.hasEvidence = 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.evidence.v1beta1.QueryAllEvidenceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.evidence.v1beta1.QueryAllEvidenceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.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.evidence.v1beta1.QueryAllEvidenceRequest} + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest; + return proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest} + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.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.evidence.v1beta1.QueryAllEvidenceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.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.evidence.v1beta1.QueryAllEvidenceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.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.evidence.v1beta1.QueryAllEvidenceRequest.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.evidence.v1beta1.QueryAllEvidenceRequest} returns this +*/ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest} returns this + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.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.evidence.v1beta1.QueryAllEvidenceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.evidence.v1beta1.QueryAllEvidenceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + evidenceList: jspb.Message.toObjectList(msg.getEvidenceList(), + google_protobuf_any_pb.Any.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.evidence.v1beta1.QueryAllEvidenceResponse} + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse; + return proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse} + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.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.addEvidence(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.evidence.v1beta1.QueryAllEvidenceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.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.evidence.v1beta1.QueryAllEvidenceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEvidenceList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated google.protobuf.Any evidence = 1; + * @return {!Array} + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.prototype.getEvidenceList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse} returns this +*/ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.prototype.setEvidenceList = 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.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.prototype.addEvidence = 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.cosmos.evidence.v1beta1.QueryAllEvidenceResponse} returns this + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.prototype.clearEvidenceList = function() { + return this.setEvidenceList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.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.evidence.v1beta1.QueryAllEvidenceResponse} returns this +*/ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse} returns this + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.cosmos.evidence.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/evidence/v1beta1/tx_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/evidence/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..ad4a084a --- /dev/null +++ b/dist/src/types/proto-types/cosmos/evidence/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,162 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.evidence.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.evidence = {}; +proto.cosmos.evidence.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.evidence.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.evidence.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.evidence.v1beta1.MsgSubmitEvidence, + * !proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse>} + */ +const methodDescriptor_Msg_SubmitEvidence = new grpc.web.MethodDescriptor( + '/cosmos.evidence.v1beta1.Msg/SubmitEvidence', + grpc.web.MethodType.UNARY, + proto.cosmos.evidence.v1beta1.MsgSubmitEvidence, + proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse, + /** + * @param {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidence} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.evidence.v1beta1.MsgSubmitEvidence, + * !proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse>} + */ +const methodInfo_Msg_SubmitEvidence = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse, + /** + * @param {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidence} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidence} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.evidence.v1beta1.MsgClient.prototype.submitEvidence = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.evidence.v1beta1.Msg/SubmitEvidence', + request, + metadata || {}, + methodDescriptor_Msg_SubmitEvidence, + callback); +}; + + +/** + * @param {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidence} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.evidence.v1beta1.MsgPromiseClient.prototype.submitEvidence = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.evidence.v1beta1.Msg/SubmitEvidence', + request, + metadata || {}, + methodDescriptor_Msg_SubmitEvidence); +}; + + +module.exports = proto.cosmos.evidence.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/evidence/v1beta1/tx_pb.js b/dist/src/types/proto-types/cosmos/evidence/v1beta1/tx_pb.js new file mode 100644 index 00000000..33ba10b5 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/evidence/v1beta1/tx_pb.js @@ -0,0 +1,400 @@ +// source: cosmos/evidence/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +goog.exportSymbol('proto.cosmos.evidence.v1beta1.MsgSubmitEvidence', null, global); +goog.exportSymbol('proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse', 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.evidence.v1beta1.MsgSubmitEvidence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.evidence.v1beta1.MsgSubmitEvidence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.displayName = 'proto.cosmos.evidence.v1beta1.MsgSubmitEvidence'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.evidence.v1beta1.MsgSubmitEvidenceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.displayName = 'proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.evidence.v1beta1.MsgSubmitEvidence.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.evidence.v1beta1.MsgSubmitEvidence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.toObject = function(includeInstance, msg) { + var f, obj = { + submitter: jspb.Message.getFieldWithDefault(msg, 1, ""), + evidence: (f = msg.getEvidence()) && 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.cosmos.evidence.v1beta1.MsgSubmitEvidence} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.evidence.v1beta1.MsgSubmitEvidence; + return proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidence} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.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.setSubmitter(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setEvidence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.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.evidence.v1beta1.MsgSubmitEvidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSubmitter(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getEvidence(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string submitter = 1; + * @return {string} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.prototype.getSubmitter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidence} returns this + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.prototype.setSubmitter = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any evidence = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.prototype.getEvidence = 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.cosmos.evidence.v1beta1.MsgSubmitEvidence} returns this +*/ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.prototype.setEvidence = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidence} returns this + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.prototype.clearEvidence = function() { + return this.setEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.prototype.hasEvidence = 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.evidence.v1beta1.MsgSubmitEvidenceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.evidence.v1beta1.MsgSubmitEvidenceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + hash: msg.getHash_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.evidence.v1beta1.MsgSubmitEvidenceResponse} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse; + return proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.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.evidence.v1beta1.MsgSubmitEvidenceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional bytes hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.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.evidence.v1beta1.MsgSubmitEvidenceResponse.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.evidence.v1beta1.MsgSubmitEvidenceResponse.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} returns this + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +goog.object.extend(exports, proto.cosmos.evidence.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/genutil/v1beta1/genesis_pb.js b/dist/src/types/proto-types/cosmos/genutil/v1beta1/genesis_pb.js new file mode 100644 index 00000000..e03a3e08 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/genutil/v1beta1/genesis_pb.js @@ -0,0 +1,219 @@ +// source: cosmos/genutil/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.genutil.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.cosmos.genutil.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.genutil.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.genutil.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.genutil.v1beta1.GenesisState.displayName = 'proto.cosmos.genutil.v1beta1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.genutil.v1beta1.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.cosmos.genutil.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.genutil.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.cosmos.genutil.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.genutil.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + genTxsList: msg.getGenTxsList_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.genutil.v1beta1.GenesisState} + */ +proto.cosmos.genutil.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.genutil.v1beta1.GenesisState; + return proto.cosmos.genutil.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.genutil.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.genutil.v1beta1.GenesisState} + */ +proto.cosmos.genutil.v1beta1.GenesisState.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.addGenTxs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.genutil.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.genutil.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.cosmos.genutil.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.genutil.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGenTxsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes gen_txs = 1; + * @return {!(Array|Array)} + */ +proto.cosmos.genutil.v1beta1.GenesisState.prototype.getGenTxsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes gen_txs = 1; + * This is a type-conversion wrapper around `getGenTxsList()` + * @return {!Array} + */ +proto.cosmos.genutil.v1beta1.GenesisState.prototype.getGenTxsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getGenTxsList())); +}; + + +/** + * repeated bytes gen_txs = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getGenTxsList()` + * @return {!Array} + */ +proto.cosmos.genutil.v1beta1.GenesisState.prototype.getGenTxsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getGenTxsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.cosmos.genutil.v1beta1.GenesisState} returns this + */ +proto.cosmos.genutil.v1beta1.GenesisState.prototype.setGenTxsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.cosmos.genutil.v1beta1.GenesisState} returns this + */ +proto.cosmos.genutil.v1beta1.GenesisState.prototype.addGenTxs = 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.genutil.v1beta1.GenesisState} returns this + */ +proto.cosmos.genutil.v1beta1.GenesisState.prototype.clearGenTxsList = function() { + return this.setGenTxsList([]); +}; + + +goog.object.extend(exports, proto.cosmos.genutil.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/gov/v1beta1/genesis_pb.js b/dist/src/types/proto-types/cosmos/gov/v1beta1/genesis_pb.js new file mode 100644 index 00000000..e46d9cef --- /dev/null +++ b/dist/src/types/proto-types/cosmos/gov/v1beta1/genesis_pb.js @@ -0,0 +1,490 @@ +// source: cosmos/gov/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_gov_v1beta1_gov_pb = require('../../../cosmos/gov/v1beta1/gov_pb.js'); +goog.object.extend(proto, cosmos_gov_v1beta1_gov_pb); +goog.exportSymbol('proto.cosmos.gov.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.cosmos.gov.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.GenesisState.displayName = 'proto.cosmos.gov.v1beta1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + startingProposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), + depositsList: jspb.Message.toObjectList(msg.getDepositsList(), + cosmos_gov_v1beta1_gov_pb.Deposit.toObject, includeInstance), + votesList: jspb.Message.toObjectList(msg.getVotesList(), + cosmos_gov_v1beta1_gov_pb.Vote.toObject, includeInstance), + proposalsList: jspb.Message.toObjectList(msg.getProposalsList(), + cosmos_gov_v1beta1_gov_pb.Proposal.toObject, includeInstance), + depositParams: (f = msg.getDepositParams()) && cosmos_gov_v1beta1_gov_pb.DepositParams.toObject(includeInstance, f), + votingParams: (f = msg.getVotingParams()) && cosmos_gov_v1beta1_gov_pb.VotingParams.toObject(includeInstance, f), + tallyParams: (f = msg.getTallyParams()) && cosmos_gov_v1beta1_gov_pb.TallyParams.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.gov.v1beta1.GenesisState} + */ +proto.cosmos.gov.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.GenesisState; + return proto.cosmos.gov.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.GenesisState} + */ +proto.cosmos.gov.v1beta1.GenesisState.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.setStartingProposalId(value); + break; + case 2: + var value = new cosmos_gov_v1beta1_gov_pb.Deposit; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.Deposit.deserializeBinaryFromReader); + msg.addDeposits(value); + break; + case 3: + var value = new cosmos_gov_v1beta1_gov_pb.Vote; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.Vote.deserializeBinaryFromReader); + msg.addVotes(value); + break; + case 4: + var value = new cosmos_gov_v1beta1_gov_pb.Proposal; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.Proposal.deserializeBinaryFromReader); + msg.addProposals(value); + break; + case 5: + var value = new cosmos_gov_v1beta1_gov_pb.DepositParams; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.DepositParams.deserializeBinaryFromReader); + msg.setDepositParams(value); + break; + case 6: + var value = new cosmos_gov_v1beta1_gov_pb.VotingParams; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.VotingParams.deserializeBinaryFromReader); + msg.setVotingParams(value); + break; + case 7: + var value = new cosmos_gov_v1beta1_gov_pb.TallyParams; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.TallyParams.deserializeBinaryFromReader); + msg.setTallyParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartingProposalId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getDepositsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_gov_v1beta1_gov_pb.Deposit.serializeBinaryToWriter + ); + } + f = message.getVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_gov_v1beta1_gov_pb.Vote.serializeBinaryToWriter + ); + } + f = message.getProposalsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_gov_v1beta1_gov_pb.Proposal.serializeBinaryToWriter + ); + } + f = message.getDepositParams(); + if (f != null) { + writer.writeMessage( + 5, + f, + cosmos_gov_v1beta1_gov_pb.DepositParams.serializeBinaryToWriter + ); + } + f = message.getVotingParams(); + if (f != null) { + writer.writeMessage( + 6, + f, + cosmos_gov_v1beta1_gov_pb.VotingParams.serializeBinaryToWriter + ); + } + f = message.getTallyParams(); + if (f != null) { + writer.writeMessage( + 7, + f, + cosmos_gov_v1beta1_gov_pb.TallyParams.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 starting_proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.getStartingProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.setStartingProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated Deposit deposits = 2; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.getDepositsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_gov_v1beta1_gov_pb.Deposit, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this +*/ +proto.cosmos.gov.v1beta1.GenesisState.prototype.setDepositsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.Deposit=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.gov.v1beta1.Deposit} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.addDeposits = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.gov.v1beta1.Deposit, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.clearDepositsList = function() { + return this.setDepositsList([]); +}; + + +/** + * repeated Vote votes = 3; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.getVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_gov_v1beta1_gov_pb.Vote, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this +*/ +proto.cosmos.gov.v1beta1.GenesisState.prototype.setVotesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.Vote=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.gov.v1beta1.Vote} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.addVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.gov.v1beta1.Vote, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.clearVotesList = function() { + return this.setVotesList([]); +}; + + +/** + * repeated Proposal proposals = 4; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.getProposalsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_gov_v1beta1_gov_pb.Proposal, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this +*/ +proto.cosmos.gov.v1beta1.GenesisState.prototype.setProposalsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.Proposal=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.gov.v1beta1.Proposal} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.addProposals = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.gov.v1beta1.Proposal, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.clearProposalsList = function() { + return this.setProposalsList([]); +}; + + +/** + * optional DepositParams deposit_params = 5; + * @return {?proto.cosmos.gov.v1beta1.DepositParams} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.getDepositParams = function() { + return /** @type{?proto.cosmos.gov.v1beta1.DepositParams} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.DepositParams, 5)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.DepositParams|undefined} value + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this +*/ +proto.cosmos.gov.v1beta1.GenesisState.prototype.setDepositParams = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.clearDepositParams = function() { + return this.setDepositParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.hasDepositParams = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional VotingParams voting_params = 6; + * @return {?proto.cosmos.gov.v1beta1.VotingParams} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.getVotingParams = function() { + return /** @type{?proto.cosmos.gov.v1beta1.VotingParams} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.VotingParams, 6)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.VotingParams|undefined} value + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this +*/ +proto.cosmos.gov.v1beta1.GenesisState.prototype.setVotingParams = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.clearVotingParams = function() { + return this.setVotingParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.hasVotingParams = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional TallyParams tally_params = 7; + * @return {?proto.cosmos.gov.v1beta1.TallyParams} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.getTallyParams = function() { + return /** @type{?proto.cosmos.gov.v1beta1.TallyParams} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.TallyParams, 7)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.TallyParams|undefined} value + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this +*/ +proto.cosmos.gov.v1beta1.GenesisState.prototype.setTallyParams = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.clearTallyParams = function() { + return this.setTallyParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.hasTallyParams = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +goog.object.extend(exports, proto.cosmos.gov.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/gov/v1beta1/gov_pb.js b/dist/src/types/proto-types/cosmos/gov/v1beta1/gov_pb.js new file mode 100644 index 00000000..d2fc0985 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/gov/v1beta1/gov_pb.js @@ -0,0 +1,2168 @@ +// source: cosmos/gov/v1beta1/gov.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 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 google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_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.cosmos.gov.v1beta1.Deposit', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.DepositParams', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.Proposal', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.ProposalStatus', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.TallyParams', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.TallyResult', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.TextProposal', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.Vote', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.VoteOption', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.VotingParams', 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.v1beta1.TextProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.TextProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.TextProposal.displayName = 'proto.cosmos.gov.v1beta1.TextProposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.Deposit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.Deposit.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.Deposit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.Deposit.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.Proposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.Proposal.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.Proposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.Proposal.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.TallyResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.TallyResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.TallyResult.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.Vote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.Vote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.Vote.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.DepositParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.DepositParams.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.DepositParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.DepositParams.displayName = 'proto.cosmos.gov.v1beta1.DepositParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.VotingParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.VotingParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.VotingParams.displayName = 'proto.cosmos.gov.v1beta1.VotingParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.TallyParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.TallyParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.TallyParams.displayName = 'proto.cosmos.gov.v1beta1.TallyParams'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.v1beta1.TextProposal.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.TextProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.TextProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.TextProposal.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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.cosmos.gov.v1beta1.TextProposal} + */ +proto.cosmos.gov.v1beta1.TextProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.TextProposal; + return proto.cosmos.gov.v1beta1.TextProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.TextProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.TextProposal} + */ +proto.cosmos.gov.v1beta1.TextProposal.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.setTitle(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.cosmos.gov.v1beta1.TextProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.TextProposal.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.v1beta1.TextProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.TextProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.cosmos.gov.v1beta1.TextProposal.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.TextProposal} returns this + */ +proto.cosmos.gov.v1beta1.TextProposal.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.TextProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.TextProposal} returns this + */ +proto.cosmos.gov.v1beta1.TextProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.Deposit.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.Deposit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.Deposit.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: 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.cosmos.gov.v1beta1.Deposit} + */ +proto.cosmos.gov.v1beta1.Deposit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.Deposit; + return proto.cosmos.gov.v1beta1.Deposit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.Deposit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.Deposit} + */ +proto.cosmos.gov.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.setProposalId(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.cosmos.gov.v1beta1.Deposit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.Deposit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.Deposit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalId(); + 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 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.Deposit.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.Deposit} returns this + */ +proto.cosmos.gov.v1beta1.Deposit.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string depositor = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.Deposit.prototype.getDepositor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.Deposit} returns this + */ +proto.cosmos.gov.v1beta1.Deposit.prototype.setDepositor = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 3; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.Deposit.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.Deposit} returns this +*/ +proto.cosmos.gov.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.cosmos.gov.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.cosmos.gov.v1beta1.Deposit} returns this + */ +proto.cosmos.gov.v1beta1.Deposit.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.v1beta1.Proposal.repeatedFields_ = [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.cosmos.gov.v1beta1.Proposal.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.Proposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.Proposal.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), + content: (f = msg.getContent()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + status: jspb.Message.getFieldWithDefault(msg, 3, 0), + finalTallyResult: (f = msg.getFinalTallyResult()) && proto.cosmos.gov.v1beta1.TallyResult.toObject(includeInstance, f), + submitTime: (f = msg.getSubmitTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + depositEndTime: (f = msg.getDepositEndTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + totalDepositList: jspb.Message.toObjectList(msg.getTotalDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + votingStartTime: (f = msg.getVotingStartTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + votingEndTime: (f = msg.getVotingEndTime()) && 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.cosmos.gov.v1beta1.Proposal} + */ +proto.cosmos.gov.v1beta1.Proposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.Proposal; + return proto.cosmos.gov.v1beta1.Proposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.Proposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.Proposal} + */ +proto.cosmos.gov.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.setProposalId(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 {!proto.cosmos.gov.v1beta1.ProposalStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 4: + var value = new proto.cosmos.gov.v1beta1.TallyResult; + reader.readMessage(value,proto.cosmos.gov.v1beta1.TallyResult.deserializeBinaryFromReader); + msg.setFinalTallyResult(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setSubmitTime(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setDepositEndTime(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 = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setVotingStartTime(value); + break; + case 9: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setVotingEndTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.Proposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.Proposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalId(); + 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.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getFinalTallyResult(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.cosmos.gov.v1beta1.TallyResult.serializeBinaryToWriter + ); + } + f = message.getSubmitTime(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getDepositEndTime(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getTotalDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getVotingStartTime(); + if (f != null) { + writer.writeMessage( + 8, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getVotingEndTime(); + if (f != null) { + writer.writeMessage( + 9, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any content = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.gov.v1beta1.Proposal.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.cosmos.gov.v1beta1.Proposal} returns this +*/ +proto.cosmos.gov.v1beta1.Proposal.prototype.setContent = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.clearContent = function() { + return this.setContent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.hasContent = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ProposalStatus status = 3; + * @return {!proto.cosmos.gov.v1beta1.ProposalStatus} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.getStatus = function() { + return /** @type {!proto.cosmos.gov.v1beta1.ProposalStatus} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.ProposalStatus} value + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional TallyResult final_tally_result = 4; + * @return {?proto.cosmos.gov.v1beta1.TallyResult} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.getFinalTallyResult = function() { + return /** @type{?proto.cosmos.gov.v1beta1.TallyResult} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.gov.v1beta1.TallyResult, 4)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.TallyResult|undefined} value + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this +*/ +proto.cosmos.gov.v1beta1.Proposal.prototype.setFinalTallyResult = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.clearFinalTallyResult = function() { + return this.setFinalTallyResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.hasFinalTallyResult = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Timestamp submit_time = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.getSubmitTime = 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.cosmos.gov.v1beta1.Proposal} returns this +*/ +proto.cosmos.gov.v1beta1.Proposal.prototype.setSubmitTime = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.clearSubmitTime = function() { + return this.setSubmitTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.hasSubmitTime = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Timestamp deposit_end_time = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.getDepositEndTime = 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.cosmos.gov.v1beta1.Proposal} returns this +*/ +proto.cosmos.gov.v1beta1.Proposal.prototype.setDepositEndTime = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.clearDepositEndTime = function() { + return this.setDepositEndTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.hasDepositEndTime = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin total_deposit = 7; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.getTotalDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this +*/ +proto.cosmos.gov.v1beta1.Proposal.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.cosmos.gov.v1beta1.Proposal.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.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.clearTotalDepositList = function() { + return this.setTotalDepositList([]); +}; + + +/** + * optional google.protobuf.Timestamp voting_start_time = 8; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.getVotingStartTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this +*/ +proto.cosmos.gov.v1beta1.Proposal.prototype.setVotingStartTime = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.clearVotingStartTime = function() { + return this.setVotingStartTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.hasVotingStartTime = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional google.protobuf.Timestamp voting_end_time = 9; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.getVotingEndTime = 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.cosmos.gov.v1beta1.Proposal} returns this +*/ +proto.cosmos.gov.v1beta1.Proposal.prototype.setVotingEndTime = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.clearVotingEndTime = function() { + return this.setVotingEndTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.hasVotingEndTime = function() { + return jspb.Message.getField(this, 9) != 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.gov.v1beta1.TallyResult.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.TallyResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.TallyResult.toObject = function(includeInstance, msg) { + var f, obj = { + yes: jspb.Message.getFieldWithDefault(msg, 1, ""), + abstain: jspb.Message.getFieldWithDefault(msg, 2, ""), + no: jspb.Message.getFieldWithDefault(msg, 3, ""), + noWithVeto: 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.cosmos.gov.v1beta1.TallyResult} + */ +proto.cosmos.gov.v1beta1.TallyResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.TallyResult; + return proto.cosmos.gov.v1beta1.TallyResult.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.TallyResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.TallyResult} + */ +proto.cosmos.gov.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.setYes(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAbstain(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setNo(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setNoWithVeto(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.TallyResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.TallyResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getYes(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAbstain(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getNo(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getNoWithVeto(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string yes = 1; + * @return {string} + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.getYes = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.TallyResult} returns this + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.setYes = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string abstain = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.getAbstain = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.TallyResult} returns this + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.setAbstain = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string no = 3; + * @return {string} + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.getNo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.TallyResult} returns this + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.setNo = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string no_with_veto = 4; + * @return {string} + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.getNoWithVeto = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.TallyResult} returns this + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.setNoWithVeto = 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.cosmos.gov.v1beta1.Vote.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.Vote} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.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) + }; + + 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.v1beta1.Vote} + */ +proto.cosmos.gov.v1beta1.Vote.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.Vote; + return proto.cosmos.gov.v1beta1.Vote.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.Vote} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.Vote} + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.VoteOption} */ (reader.readEnum()); + msg.setOption(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.Vote.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.Vote} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.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 + ); + } +}; + + +/** + * optional uint64 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.Vote.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.Vote} returns this + */ +proto.cosmos.gov.v1beta1.Vote.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string voter = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.Vote.prototype.getVoter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.Vote} returns this + */ +proto.cosmos.gov.v1beta1.Vote.prototype.setVoter = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional VoteOption option = 3; + * @return {!proto.cosmos.gov.v1beta1.VoteOption} + */ +proto.cosmos.gov.v1beta1.Vote.prototype.getOption = function() { + return /** @type {!proto.cosmos.gov.v1beta1.VoteOption} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.VoteOption} value + * @return {!proto.cosmos.gov.v1beta1.Vote} returns this + */ +proto.cosmos.gov.v1beta1.Vote.prototype.setOption = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.v1beta1.DepositParams.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.gov.v1beta1.DepositParams.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.DepositParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.DepositParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.DepositParams.toObject = function(includeInstance, msg) { + var f, obj = { + minDepositList: jspb.Message.toObjectList(msg.getMinDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + maxDepositPeriod: (f = msg.getMaxDepositPeriod()) && 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.cosmos.gov.v1beta1.DepositParams} + */ +proto.cosmos.gov.v1beta1.DepositParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.DepositParams; + return proto.cosmos.gov.v1beta1.DepositParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.DepositParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.DepositParams} + */ +proto.cosmos.gov.v1beta1.DepositParams.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 = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setMaxDepositPeriod(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.DepositParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.DepositParams.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.v1beta1.DepositParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.DepositParams.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.getMaxDepositPeriod(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin min_deposit = 1; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.DepositParams.prototype.getMinDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.DepositParams} returns this +*/ +proto.cosmos.gov.v1beta1.DepositParams.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.cosmos.gov.v1beta1.DepositParams.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.cosmos.gov.v1beta1.DepositParams} returns this + */ +proto.cosmos.gov.v1beta1.DepositParams.prototype.clearMinDepositList = function() { + return this.setMinDepositList([]); +}; + + +/** + * optional google.protobuf.Duration max_deposit_period = 2; + * @return {?proto.google.protobuf.Duration} + */ +proto.cosmos.gov.v1beta1.DepositParams.prototype.getMaxDepositPeriod = 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.cosmos.gov.v1beta1.DepositParams} returns this +*/ +proto.cosmos.gov.v1beta1.DepositParams.prototype.setMaxDepositPeriod = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.DepositParams} returns this + */ +proto.cosmos.gov.v1beta1.DepositParams.prototype.clearMaxDepositPeriod = function() { + return this.setMaxDepositPeriod(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.DepositParams.prototype.hasMaxDepositPeriod = 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.gov.v1beta1.VotingParams.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.VotingParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.VotingParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.VotingParams.toObject = function(includeInstance, msg) { + var f, obj = { + votingPeriod: (f = msg.getVotingPeriod()) && 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.cosmos.gov.v1beta1.VotingParams} + */ +proto.cosmos.gov.v1beta1.VotingParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.VotingParams; + return proto.cosmos.gov.v1beta1.VotingParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.VotingParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.VotingParams} + */ +proto.cosmos.gov.v1beta1.VotingParams.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.VotingParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.VotingParams.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.v1beta1.VotingParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.VotingParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVotingPeriod(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Duration voting_period = 1; + * @return {?proto.google.protobuf.Duration} + */ +proto.cosmos.gov.v1beta1.VotingParams.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.cosmos.gov.v1beta1.VotingParams} returns this +*/ +proto.cosmos.gov.v1beta1.VotingParams.prototype.setVotingPeriod = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.VotingParams} returns this + */ +proto.cosmos.gov.v1beta1.VotingParams.prototype.clearVotingPeriod = function() { + return this.setVotingPeriod(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.VotingParams.prototype.hasVotingPeriod = 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.gov.v1beta1.TallyParams.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.TallyParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.TallyParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.TallyParams.toObject = function(includeInstance, msg) { + var f, obj = { + quorum: msg.getQuorum_asB64(), + threshold: msg.getThreshold_asB64(), + vetoThreshold: msg.getVetoThreshold_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.gov.v1beta1.TallyParams} + */ +proto.cosmos.gov.v1beta1.TallyParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.TallyParams; + return proto.cosmos.gov.v1beta1.TallyParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.TallyParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.TallyParams} + */ +proto.cosmos.gov.v1beta1.TallyParams.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.setQuorum(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setThreshold(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setVetoThreshold(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.TallyParams.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.v1beta1.TallyParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.TallyParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getQuorum_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getThreshold_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getVetoThreshold_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional bytes quorum = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getQuorum = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes quorum = 1; + * This is a type-conversion wrapper around `getQuorum()` + * @return {string} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getQuorum_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getQuorum())); +}; + + +/** + * optional bytes quorum = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getQuorum()` + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getQuorum_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getQuorum())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.gov.v1beta1.TallyParams} returns this + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.setQuorum = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes threshold = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getThreshold = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes threshold = 2; + * This is a type-conversion wrapper around `getThreshold()` + * @return {string} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getThreshold_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getThreshold())); +}; + + +/** + * optional bytes threshold = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getThreshold()` + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getThreshold_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getThreshold())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.gov.v1beta1.TallyParams} returns this + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.setThreshold = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes veto_threshold = 3; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getVetoThreshold = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes veto_threshold = 3; + * This is a type-conversion wrapper around `getVetoThreshold()` + * @return {string} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getVetoThreshold_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getVetoThreshold())); +}; + + +/** + * optional bytes veto_threshold = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getVetoThreshold()` + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getVetoThreshold_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getVetoThreshold())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.gov.v1beta1.TallyParams} returns this + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.setVetoThreshold = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * @enum {number} + */ +proto.cosmos.gov.v1beta1.VoteOption = { + VOTE_OPTION_UNSPECIFIED: 0, + VOTE_OPTION_YES: 1, + VOTE_OPTION_ABSTAIN: 2, + VOTE_OPTION_NO: 3, + VOTE_OPTION_NO_WITH_VETO: 4 +}; + +/** + * @enum {number} + */ +proto.cosmos.gov.v1beta1.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 +}; + +goog.object.extend(exports, proto.cosmos.gov.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/gov/v1beta1/query_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/gov/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..75ecabb1 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/gov/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,724 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.gov.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_gov_v1beta1_gov_pb = require('../../../cosmos/gov/v1beta1/gov_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.gov = {}; +proto.cosmos.gov.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.gov.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.QueryProposalRequest, + * !proto.cosmos.gov.v1beta1.QueryProposalResponse>} + */ +const methodDescriptor_Query_Proposal = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Query/Proposal', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.QueryProposalRequest, + proto.cosmos.gov.v1beta1.QueryProposalResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryProposalRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryProposalResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.QueryProposalRequest, + * !proto.cosmos.gov.v1beta1.QueryProposalResponse>} + */ +const methodInfo_Query_Proposal = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.QueryProposalResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryProposalRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryProposalResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryProposalRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.QueryProposalResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.QueryClient.prototype.proposal = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Proposal', + request, + metadata || {}, + methodDescriptor_Query_Proposal, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryProposalRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient.prototype.proposal = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Proposal', + request, + metadata || {}, + methodDescriptor_Query_Proposal); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.QueryProposalsRequest, + * !proto.cosmos.gov.v1beta1.QueryProposalsResponse>} + */ +const methodDescriptor_Query_Proposals = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Query/Proposals', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.QueryProposalsRequest, + proto.cosmos.gov.v1beta1.QueryProposalsResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryProposalsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.QueryProposalsRequest, + * !proto.cosmos.gov.v1beta1.QueryProposalsResponse>} + */ +const methodInfo_Query_Proposals = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.QueryProposalsResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryProposalsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.QueryProposalsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.QueryClient.prototype.proposals = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Proposals', + request, + metadata || {}, + methodDescriptor_Query_Proposals, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient.prototype.proposals = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Proposals', + request, + metadata || {}, + methodDescriptor_Query_Proposals); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.QueryVoteRequest, + * !proto.cosmos.gov.v1beta1.QueryVoteResponse>} + */ +const methodDescriptor_Query_Vote = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Query/Vote', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.QueryVoteRequest, + proto.cosmos.gov.v1beta1.QueryVoteResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryVoteRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryVoteResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.QueryVoteRequest, + * !proto.cosmos.gov.v1beta1.QueryVoteResponse>} + */ +const methodInfo_Query_Vote = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.QueryVoteResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryVoteRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryVoteResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryVoteRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.QueryVoteResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.QueryClient.prototype.vote = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Vote', + request, + metadata || {}, + methodDescriptor_Query_Vote, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryVoteRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient.prototype.vote = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Vote', + request, + metadata || {}, + methodDescriptor_Query_Vote); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.QueryVotesRequest, + * !proto.cosmos.gov.v1beta1.QueryVotesResponse>} + */ +const methodDescriptor_Query_Votes = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Query/Votes', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.QueryVotesRequest, + proto.cosmos.gov.v1beta1.QueryVotesResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryVotesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryVotesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.QueryVotesRequest, + * !proto.cosmos.gov.v1beta1.QueryVotesResponse>} + */ +const methodInfo_Query_Votes = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.QueryVotesResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryVotesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryVotesResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryVotesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.QueryVotesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.QueryClient.prototype.votes = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Votes', + request, + metadata || {}, + methodDescriptor_Query_Votes, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryVotesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient.prototype.votes = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Votes', + request, + metadata || {}, + methodDescriptor_Query_Votes); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.QueryParamsRequest, + * !proto.cosmos.gov.v1beta1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Query/Params', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.QueryParamsRequest, + proto.cosmos.gov.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.QueryParamsRequest, + * !proto.cosmos.gov.v1beta1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.QueryDepositRequest, + * !proto.cosmos.gov.v1beta1.QueryDepositResponse>} + */ +const methodDescriptor_Query_Deposit = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Query/Deposit', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.QueryDepositRequest, + proto.cosmos.gov.v1beta1.QueryDepositResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryDepositRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryDepositResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.QueryDepositRequest, + * !proto.cosmos.gov.v1beta1.QueryDepositResponse>} + */ +const methodInfo_Query_Deposit = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.QueryDepositResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryDepositRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryDepositResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryDepositRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.QueryDepositResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.QueryClient.prototype.deposit = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Deposit', + request, + metadata || {}, + methodDescriptor_Query_Deposit, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryDepositRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient.prototype.deposit = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Deposit', + request, + metadata || {}, + methodDescriptor_Query_Deposit); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.QueryDepositsRequest, + * !proto.cosmos.gov.v1beta1.QueryDepositsResponse>} + */ +const methodDescriptor_Query_Deposits = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Query/Deposits', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.QueryDepositsRequest, + proto.cosmos.gov.v1beta1.QueryDepositsResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryDepositsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryDepositsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.QueryDepositsRequest, + * !proto.cosmos.gov.v1beta1.QueryDepositsResponse>} + */ +const methodInfo_Query_Deposits = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.QueryDepositsResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryDepositsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryDepositsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryDepositsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.QueryDepositsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.QueryClient.prototype.deposits = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Deposits', + request, + metadata || {}, + methodDescriptor_Query_Deposits, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryDepositsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient.prototype.deposits = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Deposits', + request, + metadata || {}, + methodDescriptor_Query_Deposits); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.QueryTallyResultRequest, + * !proto.cosmos.gov.v1beta1.QueryTallyResultResponse>} + */ +const methodDescriptor_Query_TallyResult = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Query/TallyResult', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.QueryTallyResultRequest, + proto.cosmos.gov.v1beta1.QueryTallyResultResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryTallyResultRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryTallyResultResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.QueryTallyResultRequest, + * !proto.cosmos.gov.v1beta1.QueryTallyResultResponse>} + */ +const methodInfo_Query_TallyResult = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.QueryTallyResultResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryTallyResultRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryTallyResultResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryTallyResultRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.QueryTallyResultResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.QueryClient.prototype.tallyResult = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/TallyResult', + request, + metadata || {}, + methodDescriptor_Query_TallyResult, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryTallyResultRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient.prototype.tallyResult = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/TallyResult', + request, + metadata || {}, + methodDescriptor_Query_TallyResult); +}; + + +module.exports = proto.cosmos.gov.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/gov/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/gov/v1beta1/query_pb.js new file mode 100644 index 00000000..5cba4a80 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/gov/v1beta1/query_pb.js @@ -0,0 +1,3178 @@ +// source: cosmos/gov/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_gov_v1beta1_gov_pb = require('../../../cosmos/gov/v1beta1/gov_pb.js'); +goog.object.extend(proto, cosmos_gov_v1beta1_gov_pb); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryDepositRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryDepositResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryDepositsRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryDepositsResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryProposalRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryProposalResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryProposalsRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryProposalsResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryTallyResultRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryTallyResultResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryVoteRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryVoteResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryVotesRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.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.v1beta1.QueryProposalRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryProposalRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryProposalRequest.displayName = 'proto.cosmos.gov.v1beta1.QueryProposalRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.QueryProposalResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryProposalResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryProposalResponse.displayName = 'proto.cosmos.gov.v1beta1.QueryProposalResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.QueryProposalsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryProposalsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryProposalsRequest.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryProposalsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.QueryProposalsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryProposalsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryProposalsResponse.displayName = 'proto.cosmos.gov.v1beta1.QueryProposalsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.QueryVoteRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryVoteRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryVoteRequest.displayName = 'proto.cosmos.gov.v1beta1.QueryVoteRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.QueryVoteResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryVoteResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryVoteResponse.displayName = 'proto.cosmos.gov.v1beta1.QueryVoteResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.QueryVotesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryVotesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryVotesRequest.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryVotesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.QueryVotesResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryVotesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryVotesResponse.displayName = 'proto.cosmos.gov.v1beta1.QueryVotesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryParamsRequest.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryParamsResponse.displayName = 'proto.cosmos.gov.v1beta1.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.cosmos.gov.v1beta1.QueryDepositRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryDepositRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryDepositRequest.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryDepositResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryDepositResponse.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryDepositsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryDepositsRequest.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.QueryDepositsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryDepositsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryDepositsResponse.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryTallyResultRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryTallyResultRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryTallyResultRequest.displayName = 'proto.cosmos.gov.v1beta1.QueryTallyResultRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.QueryTallyResultResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryTallyResultResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryTallyResultResponse.displayName = 'proto.cosmos.gov.v1beta1.QueryTallyResultResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.v1beta1.QueryProposalRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.QueryProposalRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.QueryProposalRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryProposalRequest.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.cosmos.gov.v1beta1.QueryProposalRequest} + */ +proto.cosmos.gov.v1beta1.QueryProposalRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryProposalRequest; + return proto.cosmos.gov.v1beta1.QueryProposalRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryProposalRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryProposalRequest} + */ +proto.cosmos.gov.v1beta1.QueryProposalRequest.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.cosmos.gov.v1beta1.QueryProposalRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.QueryProposalRequest.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.v1beta1.QueryProposalRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryProposalRequest.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.cosmos.gov.v1beta1.QueryProposalRequest.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.QueryProposalRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryProposalRequest.prototype.setProposalId = 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.cosmos.gov.v1beta1.QueryProposalResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.QueryProposalResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.QueryProposalResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryProposalResponse.toObject = function(includeInstance, msg) { + var f, obj = { + proposal: (f = msg.getProposal()) && cosmos_gov_v1beta1_gov_pb.Proposal.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.gov.v1beta1.QueryProposalResponse} + */ +proto.cosmos.gov.v1beta1.QueryProposalResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryProposalResponse; + return proto.cosmos.gov.v1beta1.QueryProposalResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryProposalResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryProposalResponse} + */ +proto.cosmos.gov.v1beta1.QueryProposalResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_gov_v1beta1_gov_pb.Proposal; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.Proposal.deserializeBinaryFromReader); + msg.setProposal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.QueryProposalResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.QueryProposalResponse.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.v1beta1.QueryProposalResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryProposalResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposal(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_gov_v1beta1_gov_pb.Proposal.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Proposal proposal = 1; + * @return {?proto.cosmos.gov.v1beta1.Proposal} + */ +proto.cosmos.gov.v1beta1.QueryProposalResponse.prototype.getProposal = function() { + return /** @type{?proto.cosmos.gov.v1beta1.Proposal} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.Proposal, 1)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.Proposal|undefined} value + * @return {!proto.cosmos.gov.v1beta1.QueryProposalResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryProposalResponse.prototype.setProposal = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryProposalResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryProposalResponse.prototype.clearProposal = function() { + return this.setProposal(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryProposalResponse.prototype.hasProposal = 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.gov.v1beta1.QueryProposalsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.QueryProposalsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.QueryProposalsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + proposalStatus: jspb.Message.getFieldWithDefault(msg, 1, 0), + voter: jspb.Message.getFieldWithDefault(msg, 2, ""), + depositor: jspb.Message.getFieldWithDefault(msg, 3, ""), + 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.gov.v1beta1.QueryProposalsRequest} + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryProposalsRequest; + return proto.cosmos.gov.v1beta1.QueryProposalsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cosmos.gov.v1beta1.ProposalStatus} */ (reader.readEnum()); + msg.setProposalStatus(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVoter(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDepositor(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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.QueryProposalsRequest.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.v1beta1.QueryProposalsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalStatus(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getVoter(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDepositor(); + 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 ProposalStatus proposal_status = 1; + * @return {!proto.cosmos.gov.v1beta1.ProposalStatus} + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.getProposalStatus = function() { + return /** @type {!proto.cosmos.gov.v1beta1.ProposalStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.ProposalStatus} value + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.setProposalStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string voter = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.getVoter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.setVoter = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string depositor = 3; + * @return {string} + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.getDepositor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.setDepositor = 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.cosmos.gov.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.cosmos.gov.v1beta1.QueryProposalsRequest} returns this +*/ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryProposalsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.QueryProposalsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.QueryProposalsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + proposalsList: jspb.Message.toObjectList(msg.getProposalsList(), + cosmos_gov_v1beta1_gov_pb.Proposal.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.gov.v1beta1.QueryProposalsResponse} + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryProposalsResponse; + return proto.cosmos.gov.v1beta1.QueryProposalsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryProposalsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsResponse} + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_gov_v1beta1_gov_pb.Proposal; + reader.readMessage(value,cosmos_gov_v1beta1_gov_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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.QueryProposalsResponse.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.v1beta1.QueryProposalsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_gov_v1beta1_gov_pb.Proposal.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Proposal proposals = 1; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.prototype.getProposalsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_gov_v1beta1_gov_pb.Proposal, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.prototype.setProposalsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.Proposal=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.gov.v1beta1.Proposal} + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.prototype.addProposals = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.gov.v1beta1.Proposal, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.prototype.clearProposalsList = function() { + return this.setProposalsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.gov.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)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryVoteRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.QueryVoteRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.QueryVoteRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), + voter: 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.v1beta1.QueryVoteRequest} + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryVoteRequest; + return proto.cosmos.gov.v1beta1.QueryVoteRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryVoteRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryVoteRequest} + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.QueryVoteRequest.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.v1beta1.QueryVoteRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.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 + ); + } +}; + + +/** + * optional uint64 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.QueryVoteRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string voter = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.prototype.getVoter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.QueryVoteRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.prototype.setVoter = 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.v1beta1.QueryVoteResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.QueryVoteResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.QueryVoteResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryVoteResponse.toObject = function(includeInstance, msg) { + var f, obj = { + vote: (f = msg.getVote()) && cosmos_gov_v1beta1_gov_pb.Vote.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.gov.v1beta1.QueryVoteResponse} + */ +proto.cosmos.gov.v1beta1.QueryVoteResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryVoteResponse; + return proto.cosmos.gov.v1beta1.QueryVoteResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryVoteResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryVoteResponse} + */ +proto.cosmos.gov.v1beta1.QueryVoteResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_gov_v1beta1_gov_pb.Vote; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.Vote.deserializeBinaryFromReader); + msg.setVote(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.QueryVoteResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.QueryVoteResponse.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.v1beta1.QueryVoteResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryVoteResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVote(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_gov_v1beta1_gov_pb.Vote.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Vote vote = 1; + * @return {?proto.cosmos.gov.v1beta1.Vote} + */ +proto.cosmos.gov.v1beta1.QueryVoteResponse.prototype.getVote = function() { + return /** @type{?proto.cosmos.gov.v1beta1.Vote} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.Vote, 1)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.Vote|undefined} value + * @return {!proto.cosmos.gov.v1beta1.QueryVoteResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryVoteResponse.prototype.setVote = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryVoteResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryVoteResponse.prototype.clearVote = function() { + return this.setVote(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryVoteResponse.prototype.hasVote = 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.gov.v1beta1.QueryVotesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryVotesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryVotesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: 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.cosmos.gov.v1beta1.QueryVotesRequest} + */ +proto.cosmos.gov.v1beta1.QueryVotesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryVotesRequest; + return proto.cosmos.gov.v1beta1.QueryVotesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryVotesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryVotesRequest} + */ +proto.cosmos.gov.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; + 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.gov.v1beta1.QueryVotesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryVotesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryVotesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalId(); + 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 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.QueryVotesRequest.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.QueryVotesRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryVotesRequest.prototype.setProposalId = 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.cosmos.gov.v1beta1.QueryVotesRequest.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.gov.v1beta1.QueryVotesRequest} returns this +*/ +proto.cosmos.gov.v1beta1.QueryVotesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryVotesRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryVotesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryVotesRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.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.gov.v1beta1.QueryVotesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.QueryVotesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.QueryVotesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + votesList: jspb.Message.toObjectList(msg.getVotesList(), + cosmos_gov_v1beta1_gov_pb.Vote.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.gov.v1beta1.QueryVotesResponse} + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryVotesResponse; + return proto.cosmos.gov.v1beta1.QueryVotesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryVotesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryVotesResponse} + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_gov_v1beta1_gov_pb.Vote; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.Vote.deserializeBinaryFromReader); + msg.addVotes(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.gov.v1beta1.QueryVotesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryVotesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_gov_v1beta1_gov_pb.Vote.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Vote votes = 1; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.prototype.getVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_gov_v1beta1_gov_pb.Vote, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.QueryVotesResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryVotesResponse.prototype.setVotesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.Vote=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.gov.v1beta1.Vote} + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.prototype.addVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.gov.v1beta1.Vote, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1beta1.QueryVotesResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.prototype.clearVotesList = function() { + return this.setVotesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.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.gov.v1beta1.QueryVotesResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryVotesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryVotesResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.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.gov.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryParamsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + paramsType: 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.v1beta1.QueryParamsRequest} + */ +proto.cosmos.gov.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryParamsRequest; + return proto.cosmos.gov.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryParamsRequest} + */ +proto.cosmos.gov.v1beta1.QueryParamsRequest.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.setParamsType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryParamsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParamsType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string params_type = 1; + * @return {string} + */ +proto.cosmos.gov.v1beta1.QueryParamsRequest.prototype.getParamsType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.QueryParamsRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryParamsRequest.prototype.setParamsType = 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.gov.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + votingParams: (f = msg.getVotingParams()) && cosmos_gov_v1beta1_gov_pb.VotingParams.toObject(includeInstance, f), + depositParams: (f = msg.getDepositParams()) && cosmos_gov_v1beta1_gov_pb.DepositParams.toObject(includeInstance, f), + tallyParams: (f = msg.getTallyParams()) && cosmos_gov_v1beta1_gov_pb.TallyParams.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.gov.v1beta1.QueryParamsResponse} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryParamsResponse; + return proto.cosmos.gov.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryParamsResponse} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_gov_v1beta1_gov_pb.VotingParams; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.VotingParams.deserializeBinaryFromReader); + msg.setVotingParams(value); + break; + case 2: + var value = new cosmos_gov_v1beta1_gov_pb.DepositParams; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.DepositParams.deserializeBinaryFromReader); + msg.setDepositParams(value); + break; + case 3: + var value = new cosmos_gov_v1beta1_gov_pb.TallyParams; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.TallyParams.deserializeBinaryFromReader); + msg.setTallyParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVotingParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_gov_v1beta1_gov_pb.VotingParams.serializeBinaryToWriter + ); + } + f = message.getDepositParams(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_gov_v1beta1_gov_pb.DepositParams.serializeBinaryToWriter + ); + } + f = message.getTallyParams(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_gov_v1beta1_gov_pb.TallyParams.serializeBinaryToWriter + ); + } +}; + + +/** + * optional VotingParams voting_params = 1; + * @return {?proto.cosmos.gov.v1beta1.VotingParams} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.getVotingParams = function() { + return /** @type{?proto.cosmos.gov.v1beta1.VotingParams} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.VotingParams, 1)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.VotingParams|undefined} value + * @return {!proto.cosmos.gov.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.setVotingParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.clearVotingParams = function() { + return this.setVotingParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.hasVotingParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional DepositParams deposit_params = 2; + * @return {?proto.cosmos.gov.v1beta1.DepositParams} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.getDepositParams = function() { + return /** @type{?proto.cosmos.gov.v1beta1.DepositParams} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.DepositParams, 2)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.DepositParams|undefined} value + * @return {!proto.cosmos.gov.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.setDepositParams = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.clearDepositParams = function() { + return this.setDepositParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.hasDepositParams = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional TallyParams tally_params = 3; + * @return {?proto.cosmos.gov.v1beta1.TallyParams} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.getTallyParams = function() { + return /** @type{?proto.cosmos.gov.v1beta1.TallyParams} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.TallyParams, 3)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.TallyParams|undefined} value + * @return {!proto.cosmos.gov.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.setTallyParams = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.clearTallyParams = function() { + return this.setTallyParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.hasTallyParams = 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.gov.v1beta1.QueryDepositRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryDepositRequest.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: 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.cosmos.gov.v1beta1.QueryDepositRequest} + */ +proto.cosmos.gov.v1beta1.QueryDepositRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryDepositRequest; + return proto.cosmos.gov.v1beta1.QueryDepositRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryDepositRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryDepositRequest} + */ +proto.cosmos.gov.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.setProposalId(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.cosmos.gov.v1beta1.QueryDepositRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryDepositRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getDepositor(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint64 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.QueryDepositRequest.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.QueryDepositRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryDepositRequest.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string depositor = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.QueryDepositRequest.prototype.getDepositor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.QueryDepositRequest} returns this + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryDepositResponse.toObject = function(includeInstance, msg) { + var f, obj = { + deposit: (f = msg.getDeposit()) && cosmos_gov_v1beta1_gov_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.cosmos.gov.v1beta1.QueryDepositResponse} + */ +proto.cosmos.gov.v1beta1.QueryDepositResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryDepositResponse; + return proto.cosmos.gov.v1beta1.QueryDepositResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryDepositResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryDepositResponse} + */ +proto.cosmos.gov.v1beta1.QueryDepositResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_gov_v1beta1_gov_pb.Deposit; + reader.readMessage(value,cosmos_gov_v1beta1_gov_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.cosmos.gov.v1beta1.QueryDepositResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryDepositResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDeposit(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_gov_v1beta1_gov_pb.Deposit.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Deposit deposit = 1; + * @return {?proto.cosmos.gov.v1beta1.Deposit} + */ +proto.cosmos.gov.v1beta1.QueryDepositResponse.prototype.getDeposit = function() { + return /** @type{?proto.cosmos.gov.v1beta1.Deposit} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.Deposit, 1)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.Deposit|undefined} value + * @return {!proto.cosmos.gov.v1beta1.QueryDepositResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryDepositResponse.prototype.setDeposit = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryDepositResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryDepositResponse.prototype.clearDeposit = function() { + return this.setDeposit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryDepositsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: 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.cosmos.gov.v1beta1.QueryDepositsRequest} + */ +proto.cosmos.gov.v1beta1.QueryDepositsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryDepositsRequest; + return proto.cosmos.gov.v1beta1.QueryDepositsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryDepositsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryDepositsRequest} + */ +proto.cosmos.gov.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.setProposalId(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.gov.v1beta1.QueryDepositsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryDepositsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalId(); + 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 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.QueryDepositsRequest.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.QueryDepositsRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryDepositsRequest.prototype.setProposalId = 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.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsRequest} returns this +*/ +proto.cosmos.gov.v1beta1.QueryDepositsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryDepositsRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryDepositsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryDepositsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + depositsList: jspb.Message.toObjectList(msg.getDepositsList(), + cosmos_gov_v1beta1_gov_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.cosmos.gov.v1beta1.QueryDepositsResponse} + */ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryDepositsResponse; + return proto.cosmos.gov.v1beta1.QueryDepositsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryDepositsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryDepositsResponse} + */ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_gov_v1beta1_gov_pb.Deposit; + reader.readMessage(value,cosmos_gov_v1beta1_gov_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.cosmos.gov.v1beta1.QueryDepositsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDepositsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_gov_v1beta1_gov_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.cosmos.gov.v1beta1.QueryDepositsResponse.prototype.getDepositsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_gov_v1beta1_gov_pb.Deposit, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.QueryDepositsResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.prototype.setDepositsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.Deposit=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.gov.v1beta1.Deposit} + */ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.prototype.addDeposits = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.gov.v1beta1.Deposit, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1beta1.QueryDepositsResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.prototype.clearDepositsList = function() { + return this.setDepositsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryDepositsResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryTallyResultRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryTallyResultRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryTallyResultRequest.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.cosmos.gov.v1beta1.QueryTallyResultRequest} + */ +proto.cosmos.gov.v1beta1.QueryTallyResultRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryTallyResultRequest; + return proto.cosmos.gov.v1beta1.QueryTallyResultRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryTallyResultRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryTallyResultRequest} + */ +proto.cosmos.gov.v1beta1.QueryTallyResultRequest.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.cosmos.gov.v1beta1.QueryTallyResultRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.QueryTallyResultRequest.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.v1beta1.QueryTallyResultRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryTallyResultRequest.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.cosmos.gov.v1beta1.QueryTallyResultRequest.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.QueryTallyResultRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryTallyResultRequest.prototype.setProposalId = 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.cosmos.gov.v1beta1.QueryTallyResultResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.QueryTallyResultResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.QueryTallyResultResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.toObject = function(includeInstance, msg) { + var f, obj = { + tally: (f = msg.getTally()) && cosmos_gov_v1beta1_gov_pb.TallyResult.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.gov.v1beta1.QueryTallyResultResponse} + */ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryTallyResultResponse; + return proto.cosmos.gov.v1beta1.QueryTallyResultResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryTallyResultResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryTallyResultResponse} + */ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_gov_v1beta1_gov_pb.TallyResult; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.TallyResult.deserializeBinaryFromReader); + msg.setTally(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.QueryTallyResultResponse.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.v1beta1.QueryTallyResultResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTally(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_gov_v1beta1_gov_pb.TallyResult.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TallyResult tally = 1; + * @return {?proto.cosmos.gov.v1beta1.TallyResult} + */ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.prototype.getTally = function() { + return /** @type{?proto.cosmos.gov.v1beta1.TallyResult} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.TallyResult, 1)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.TallyResult|undefined} value + * @return {!proto.cosmos.gov.v1beta1.QueryTallyResultResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.prototype.setTally = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryTallyResultResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.prototype.clearTally = function() { + return this.setTally(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.prototype.hasTally = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.cosmos.gov.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/gov/v1beta1/tx_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/gov/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..bfa7e873 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/gov/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,326 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.gov.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_gov_v1beta1_gov_pb = require('../../../cosmos/gov/v1beta1/gov_pb.js') + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.gov = {}; +proto.cosmos.gov.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.gov.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.gov.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.MsgSubmitProposal, + * !proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse>} + */ +const methodDescriptor_Msg_SubmitProposal = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Msg/SubmitProposal', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.MsgSubmitProposal, + proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.MsgSubmitProposal, + * !proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse>} + */ +const methodInfo_Msg_SubmitProposal = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.MsgClient.prototype.submitProposal = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Msg/SubmitProposal', + request, + metadata || {}, + methodDescriptor_Msg_SubmitProposal, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.MsgPromiseClient.prototype.submitProposal = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Msg/SubmitProposal', + request, + metadata || {}, + methodDescriptor_Msg_SubmitProposal); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.MsgVote, + * !proto.cosmos.gov.v1beta1.MsgVoteResponse>} + */ +const methodDescriptor_Msg_Vote = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Msg/Vote', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.MsgVote, + proto.cosmos.gov.v1beta1.MsgVoteResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.MsgVote} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.MsgVoteResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.MsgVote, + * !proto.cosmos.gov.v1beta1.MsgVoteResponse>} + */ +const methodInfo_Msg_Vote = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.MsgVoteResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.MsgVote} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.MsgVoteResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.MsgVote} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.MsgVoteResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.MsgClient.prototype.vote = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Msg/Vote', + request, + metadata || {}, + methodDescriptor_Msg_Vote, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.MsgVote} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.MsgPromiseClient.prototype.vote = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Msg/Vote', + request, + metadata || {}, + methodDescriptor_Msg_Vote); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.MsgDeposit, + * !proto.cosmos.gov.v1beta1.MsgDepositResponse>} + */ +const methodDescriptor_Msg_Deposit = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Msg/Deposit', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.MsgDeposit, + proto.cosmos.gov.v1beta1.MsgDepositResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.MsgDeposit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.MsgDepositResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.MsgDeposit, + * !proto.cosmos.gov.v1beta1.MsgDepositResponse>} + */ +const methodInfo_Msg_Deposit = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.MsgDepositResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.MsgDeposit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.MsgDepositResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.MsgDeposit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.MsgDepositResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.MsgClient.prototype.deposit = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Msg/Deposit', + request, + metadata || {}, + methodDescriptor_Msg_Deposit, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.MsgDeposit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.MsgPromiseClient.prototype.deposit = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Msg/Deposit', + request, + metadata || {}, + methodDescriptor_Msg_Deposit); +}; + + +module.exports = proto.cosmos.gov.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/gov/v1beta1/tx_pb.js b/dist/src/types/proto-types/cosmos/gov/v1beta1/tx_pb.js new file mode 100644 index 00000000..f76f101c --- /dev/null +++ b/dist/src/types/proto-types/cosmos/gov/v1beta1/tx_pb.js @@ -0,0 +1,1140 @@ +// source: cosmos/gov/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var cosmos_gov_v1beta1_gov_pb = require('../../../cosmos/gov/v1beta1/gov_pb.js'); +goog.object.extend(proto, cosmos_gov_v1beta1_gov_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); +goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgDeposit', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgDepositResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgSubmitProposal', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgVote', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgVoteResponse', 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.v1beta1.MsgSubmitProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.MsgSubmitProposal.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.MsgSubmitProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.MsgSubmitProposal.displayName = 'proto.cosmos.gov.v1beta1.MsgSubmitProposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.MsgSubmitProposalResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.displayName = 'proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.MsgVote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.MsgVote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.MsgVote.displayName = 'proto.cosmos.gov.v1beta1.MsgVote'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.MsgVoteResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.MsgVoteResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.MsgVoteResponse.displayName = 'proto.cosmos.gov.v1beta1.MsgVoteResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.MsgDeposit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.MsgDeposit.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.MsgDeposit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.MsgDeposit.displayName = 'proto.cosmos.gov.v1beta1.MsgDeposit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.MsgDepositResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.MsgDepositResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.MsgDepositResponse.displayName = 'proto.cosmos.gov.v1beta1.MsgDepositResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.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.gov.v1beta1.MsgSubmitProposal.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.MsgSubmitProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.MsgSubmitProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.toObject = function(includeInstance, msg) { + var f, obj = { + content: (f = msg.getContent()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + initialDepositList: jspb.Message.toObjectList(msg.getInitialDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + proposer: 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.cosmos.gov.v1beta1.MsgSubmitProposal} + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.MsgSubmitProposal; + return proto.cosmos.gov.v1beta1.MsgSubmitProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.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 = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addInitialDeposit(value); + break; + case 3: + 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.v1beta1.MsgSubmitProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.MsgSubmitProposal.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.v1beta1.MsgSubmitProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.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.getInitialDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getProposer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional google.protobuf.Any content = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.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.cosmos.gov.v1beta1.MsgSubmitProposal} returns this +*/ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.setContent = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} returns this + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.clearContent = function() { + return this.setContent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.hasContent = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin initial_deposit = 2; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.getInitialDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} returns this +*/ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.setInitialDepositList = 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.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.addInitialDeposit = 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.cosmos.gov.v1beta1.MsgSubmitProposal} returns this + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.clearInitialDepositList = function() { + return this.setInitialDepositList([]); +}; + + +/** + * optional string proposer = 3; + * @return {string} + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.getProposer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} returns this + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.setProposer = 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.cosmos.gov.v1beta1.MsgSubmitProposalResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.MsgSubmitProposalResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.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.cosmos.gov.v1beta1.MsgSubmitProposalResponse} + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse; + return proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse} + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.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.cosmos.gov.v1beta1.MsgSubmitProposalResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.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.v1beta1.MsgSubmitProposalResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.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.cosmos.gov.v1beta1.MsgSubmitProposalResponse.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse} returns this + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.prototype.setProposalId = 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.cosmos.gov.v1beta1.MsgVote.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.MsgVote.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.MsgVote} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgVote.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) + }; + + 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.v1beta1.MsgVote} + */ +proto.cosmos.gov.v1beta1.MsgVote.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.MsgVote; + return proto.cosmos.gov.v1beta1.MsgVote.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.MsgVote} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.MsgVote} + */ +proto.cosmos.gov.v1beta1.MsgVote.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.cosmos.gov.v1beta1.VoteOption} */ (reader.readEnum()); + msg.setOption(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.MsgVote.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.MsgVote.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.v1beta1.MsgVote} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgVote.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 + ); + } +}; + + +/** + * optional uint64 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.MsgVote.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.MsgVote} returns this + */ +proto.cosmos.gov.v1beta1.MsgVote.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string voter = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.MsgVote.prototype.getVoter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.MsgVote} returns this + */ +proto.cosmos.gov.v1beta1.MsgVote.prototype.setVoter = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional VoteOption option = 3; + * @return {!proto.cosmos.gov.v1beta1.VoteOption} + */ +proto.cosmos.gov.v1beta1.MsgVote.prototype.getOption = function() { + return /** @type {!proto.cosmos.gov.v1beta1.VoteOption} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.VoteOption} value + * @return {!proto.cosmos.gov.v1beta1.MsgVote} returns this + */ +proto.cosmos.gov.v1beta1.MsgVote.prototype.setOption = 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.cosmos.gov.v1beta1.MsgVoteResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.MsgVoteResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.MsgVoteResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgVoteResponse.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.v1beta1.MsgVoteResponse} + */ +proto.cosmos.gov.v1beta1.MsgVoteResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.MsgVoteResponse; + return proto.cosmos.gov.v1beta1.MsgVoteResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.MsgVoteResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.MsgVoteResponse} + */ +proto.cosmos.gov.v1beta1.MsgVoteResponse.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.v1beta1.MsgVoteResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.MsgVoteResponse.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.v1beta1.MsgVoteResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgVoteResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.v1beta1.MsgDeposit.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.gov.v1beta1.MsgDeposit.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.MsgDeposit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.MsgDeposit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgDeposit.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: 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.cosmos.gov.v1beta1.MsgDeposit} + */ +proto.cosmos.gov.v1beta1.MsgDeposit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.MsgDeposit; + return proto.cosmos.gov.v1beta1.MsgDeposit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.MsgDeposit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.MsgDeposit} + */ +proto.cosmos.gov.v1beta1.MsgDeposit.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.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.cosmos.gov.v1beta1.MsgDeposit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.MsgDeposit.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.v1beta1.MsgDeposit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgDeposit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalId(); + 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 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.MsgDeposit.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.MsgDeposit} returns this + */ +proto.cosmos.gov.v1beta1.MsgDeposit.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string depositor = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.MsgDeposit.prototype.getDepositor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.MsgDeposit} returns this + */ +proto.cosmos.gov.v1beta1.MsgDeposit.prototype.setDepositor = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 3; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.MsgDeposit.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.MsgDeposit} returns this +*/ +proto.cosmos.gov.v1beta1.MsgDeposit.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.gov.v1beta1.MsgDeposit.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.gov.v1beta1.MsgDeposit} returns this + */ +proto.cosmos.gov.v1beta1.MsgDeposit.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.gov.v1beta1.MsgDepositResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.MsgDepositResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.MsgDepositResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgDepositResponse.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.v1beta1.MsgDepositResponse} + */ +proto.cosmos.gov.v1beta1.MsgDepositResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.MsgDepositResponse; + return proto.cosmos.gov.v1beta1.MsgDepositResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.MsgDepositResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.MsgDepositResponse} + */ +proto.cosmos.gov.v1beta1.MsgDepositResponse.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.v1beta1.MsgDepositResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.MsgDepositResponse.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.v1beta1.MsgDepositResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgDepositResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cosmos.gov.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/mint/v1beta1/genesis_pb.js b/dist/src/types/proto-types/cosmos/mint/v1beta1/genesis_pb.js new file mode 100644 index 00000000..f35eb37b --- /dev/null +++ b/dist/src/types/proto-types/cosmos/mint/v1beta1/genesis_pb.js @@ -0,0 +1,243 @@ +// source: cosmos/mint/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_mint_v1beta1_mint_pb = require('../../../cosmos/mint/v1beta1/mint_pb.js'); +goog.object.extend(proto, cosmos_mint_v1beta1_mint_pb); +goog.exportSymbol('proto.cosmos.mint.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.cosmos.mint.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.GenesisState.displayName = 'proto.cosmos.mint.v1beta1.GenesisState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.mint.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.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.cosmos.mint.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + minter: (f = msg.getMinter()) && cosmos_mint_v1beta1_mint_pb.Minter.toObject(includeInstance, f), + params: (f = msg.getParams()) && cosmos_mint_v1beta1_mint_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.cosmos.mint.v1beta1.GenesisState} + */ +proto.cosmos.mint.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.GenesisState; + return proto.cosmos.mint.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.GenesisState} + */ +proto.cosmos.mint.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_mint_v1beta1_mint_pb.Minter; + reader.readMessage(value,cosmos_mint_v1beta1_mint_pb.Minter.deserializeBinaryFromReader); + msg.setMinter(value); + break; + case 2: + var value = new cosmos_mint_v1beta1_mint_pb.Params; + reader.readMessage(value,cosmos_mint_v1beta1_mint_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.cosmos.mint.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.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.cosmos.mint.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMinter(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_mint_v1beta1_mint_pb.Minter.serializeBinaryToWriter + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_mint_v1beta1_mint_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Minter minter = 1; + * @return {?proto.cosmos.mint.v1beta1.Minter} + */ +proto.cosmos.mint.v1beta1.GenesisState.prototype.getMinter = function() { + return /** @type{?proto.cosmos.mint.v1beta1.Minter} */ ( + jspb.Message.getWrapperField(this, cosmos_mint_v1beta1_mint_pb.Minter, 1)); +}; + + +/** + * @param {?proto.cosmos.mint.v1beta1.Minter|undefined} value + * @return {!proto.cosmos.mint.v1beta1.GenesisState} returns this +*/ +proto.cosmos.mint.v1beta1.GenesisState.prototype.setMinter = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.mint.v1beta1.GenesisState} returns this + */ +proto.cosmos.mint.v1beta1.GenesisState.prototype.clearMinter = function() { + return this.setMinter(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.mint.v1beta1.GenesisState.prototype.hasMinter = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Params params = 2; + * @return {?proto.cosmos.mint.v1beta1.Params} + */ +proto.cosmos.mint.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.cosmos.mint.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_mint_v1beta1_mint_pb.Params, 2)); +}; + + +/** + * @param {?proto.cosmos.mint.v1beta1.Params|undefined} value + * @return {!proto.cosmos.mint.v1beta1.GenesisState} returns this +*/ +proto.cosmos.mint.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.mint.v1beta1.GenesisState} returns this + */ +proto.cosmos.mint.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.mint.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.cosmos.mint.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/mint/v1beta1/mint_pb.js b/dist/src/types/proto-types/cosmos/mint/v1beta1/mint_pb.js new file mode 100644 index 00000000..953f3fdb --- /dev/null +++ b/dist/src/types/proto-types/cosmos/mint/v1beta1/mint_pb.js @@ -0,0 +1,501 @@ +// source: cosmos/mint/v1beta1/mint.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.mint.v1beta1.Minter', null, global); +goog.exportSymbol('proto.cosmos.mint.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.cosmos.mint.v1beta1.Minter = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.Minter, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.Minter.displayName = 'proto.cosmos.mint.v1beta1.Minter'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.mint.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.Params.displayName = 'proto.cosmos.mint.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.cosmos.mint.v1beta1.Minter.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.v1beta1.Minter.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.mint.v1beta1.Minter} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.Minter.toObject = function(includeInstance, msg) { + var f, obj = { + inflation: jspb.Message.getFieldWithDefault(msg, 1, ""), + annualProvisions: 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.mint.v1beta1.Minter} + */ +proto.cosmos.mint.v1beta1.Minter.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.Minter; + return proto.cosmos.mint.v1beta1.Minter.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.Minter} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.Minter} + */ +proto.cosmos.mint.v1beta1.Minter.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.setInflation(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAnnualProvisions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.mint.v1beta1.Minter.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.v1beta1.Minter.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.mint.v1beta1.Minter} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.Minter.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInflation(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAnnualProvisions(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string inflation = 1; + * @return {string} + */ +proto.cosmos.mint.v1beta1.Minter.prototype.getInflation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.mint.v1beta1.Minter} returns this + */ +proto.cosmos.mint.v1beta1.Minter.prototype.setInflation = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string annual_provisions = 2; + * @return {string} + */ +proto.cosmos.mint.v1beta1.Minter.prototype.getAnnualProvisions = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.mint.v1beta1.Minter} returns this + */ +proto.cosmos.mint.v1beta1.Minter.prototype.setAnnualProvisions = 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.mint.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.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.cosmos.mint.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + mintDenom: jspb.Message.getFieldWithDefault(msg, 1, ""), + inflationRateChange: jspb.Message.getFieldWithDefault(msg, 2, ""), + inflationMax: jspb.Message.getFieldWithDefault(msg, 3, ""), + inflationMin: jspb.Message.getFieldWithDefault(msg, 4, ""), + goalBonded: jspb.Message.getFieldWithDefault(msg, 5, ""), + blocksPerYear: 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.cosmos.mint.v1beta1.Params} + */ +proto.cosmos.mint.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.Params; + return proto.cosmos.mint.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.Params} + */ +proto.cosmos.mint.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.setMintDenom(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setInflationRateChange(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setInflationMax(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInflationMin(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setGoalBonded(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlocksPerYear(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.mint.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.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.cosmos.mint.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMintDenom(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getInflationRateChange(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getInflationMax(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInflationMin(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getGoalBonded(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getBlocksPerYear(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } +}; + + +/** + * optional string mint_denom = 1; + * @return {string} + */ +proto.cosmos.mint.v1beta1.Params.prototype.getMintDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.mint.v1beta1.Params} returns this + */ +proto.cosmos.mint.v1beta1.Params.prototype.setMintDenom = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string inflation_rate_change = 2; + * @return {string} + */ +proto.cosmos.mint.v1beta1.Params.prototype.getInflationRateChange = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.mint.v1beta1.Params} returns this + */ +proto.cosmos.mint.v1beta1.Params.prototype.setInflationRateChange = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string inflation_max = 3; + * @return {string} + */ +proto.cosmos.mint.v1beta1.Params.prototype.getInflationMax = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.mint.v1beta1.Params} returns this + */ +proto.cosmos.mint.v1beta1.Params.prototype.setInflationMax = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string inflation_min = 4; + * @return {string} + */ +proto.cosmos.mint.v1beta1.Params.prototype.getInflationMin = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.mint.v1beta1.Params} returns this + */ +proto.cosmos.mint.v1beta1.Params.prototype.setInflationMin = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string goal_bonded = 5; + * @return {string} + */ +proto.cosmos.mint.v1beta1.Params.prototype.getGoalBonded = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.mint.v1beta1.Params} returns this + */ +proto.cosmos.mint.v1beta1.Params.prototype.setGoalBonded = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional uint64 blocks_per_year = 6; + * @return {number} + */ +proto.cosmos.mint.v1beta1.Params.prototype.getBlocksPerYear = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.mint.v1beta1.Params} returns this + */ +proto.cosmos.mint.v1beta1.Params.prototype.setBlocksPerYear = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +goog.object.extend(exports, proto.cosmos.mint.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/mint/v1beta1/query_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/mint/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..cab9027c --- /dev/null +++ b/dist/src/types/proto-types/cosmos/mint/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,322 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.mint.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_mint_v1beta1_mint_pb = require('../../../cosmos/mint/v1beta1/mint_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.mint = {}; +proto.cosmos.mint.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.mint.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.mint.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.mint.v1beta1.QueryParamsRequest, + * !proto.cosmos.mint.v1beta1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/cosmos.mint.v1beta1.Query/Params', + grpc.web.MethodType.UNARY, + proto.cosmos.mint.v1beta1.QueryParamsRequest, + proto.cosmos.mint.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.mint.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.mint.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.mint.v1beta1.QueryParamsRequest, + * !proto.cosmos.mint.v1beta1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.mint.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.mint.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.mint.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.mint.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.mint.v1beta1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.mint.v1beta1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.mint.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.cosmos.mint.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.mint.v1beta1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.mint.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.mint.v1beta1.QueryInflationRequest, + * !proto.cosmos.mint.v1beta1.QueryInflationResponse>} + */ +const methodDescriptor_Query_Inflation = new grpc.web.MethodDescriptor( + '/cosmos.mint.v1beta1.Query/Inflation', + grpc.web.MethodType.UNARY, + proto.cosmos.mint.v1beta1.QueryInflationRequest, + proto.cosmos.mint.v1beta1.QueryInflationResponse, + /** + * @param {!proto.cosmos.mint.v1beta1.QueryInflationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.mint.v1beta1.QueryInflationResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.mint.v1beta1.QueryInflationRequest, + * !proto.cosmos.mint.v1beta1.QueryInflationResponse>} + */ +const methodInfo_Query_Inflation = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.mint.v1beta1.QueryInflationResponse, + /** + * @param {!proto.cosmos.mint.v1beta1.QueryInflationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.mint.v1beta1.QueryInflationResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.mint.v1beta1.QueryInflationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.mint.v1beta1.QueryInflationResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.mint.v1beta1.QueryClient.prototype.inflation = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.mint.v1beta1.Query/Inflation', + request, + metadata || {}, + methodDescriptor_Query_Inflation, + callback); +}; + + +/** + * @param {!proto.cosmos.mint.v1beta1.QueryInflationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.mint.v1beta1.QueryPromiseClient.prototype.inflation = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.mint.v1beta1.Query/Inflation', + request, + metadata || {}, + methodDescriptor_Query_Inflation); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest, + * !proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse>} + */ +const methodDescriptor_Query_AnnualProvisions = new grpc.web.MethodDescriptor( + '/cosmos.mint.v1beta1.Query/AnnualProvisions', + grpc.web.MethodType.UNARY, + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest, + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse, + /** + * @param {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest, + * !proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse>} + */ +const methodInfo_Query_AnnualProvisions = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse, + /** + * @param {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.mint.v1beta1.QueryClient.prototype.annualProvisions = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.mint.v1beta1.Query/AnnualProvisions', + request, + metadata || {}, + methodDescriptor_Query_AnnualProvisions, + callback); +}; + + +/** + * @param {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.mint.v1beta1.QueryPromiseClient.prototype.annualProvisions = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.mint.v1beta1.Query/AnnualProvisions', + request, + metadata || {}, + methodDescriptor_Query_AnnualProvisions); +}; + + +module.exports = proto.cosmos.mint.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/mint/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/mint/v1beta1/query_pb.js new file mode 100644 index 00000000..d23b0930 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/mint/v1beta1/query_pb.js @@ -0,0 +1,915 @@ +// source: cosmos/mint/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_mint_v1beta1_mint_pb = require('../../../cosmos/mint/v1beta1/mint_pb.js'); +goog.object.extend(proto, cosmos_mint_v1beta1_mint_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); +goog.exportSymbol('proto.cosmos.mint.v1beta1.QueryInflationResponse', null, global); +goog.exportSymbol('proto.cosmos.mint.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.QueryParamsRequest.displayName = 'proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.QueryParamsResponse.displayName = 'proto.cosmos.mint.v1beta1.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.cosmos.mint.v1beta1.QueryInflationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.QueryInflationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.QueryInflationRequest.displayName = 'proto.cosmos.mint.v1beta1.QueryInflationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.mint.v1beta1.QueryInflationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.QueryInflationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.QueryInflationResponse.displayName = 'proto.cosmos.mint.v1beta1.QueryInflationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.mint.v1beta1.QueryAnnualProvisionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.displayName = 'proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.mint.v1beta1.QueryAnnualProvisionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.displayName = 'proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.mint.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsRequest} + */ +proto.cosmos.mint.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.QueryParamsRequest; + return proto.cosmos.mint.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.QueryParamsRequest} + */ +proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_mint_v1beta1_mint_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.cosmos.mint.v1beta1.QueryParamsResponse} + */ +proto.cosmos.mint.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.QueryParamsResponse; + return proto.cosmos.mint.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.QueryParamsResponse} + */ +proto.cosmos.mint.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_mint_v1beta1_mint_pb.Params; + reader.readMessage(value,cosmos_mint_v1beta1_mint_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.cosmos.mint.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_mint_v1beta1_mint_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.mint.v1beta1.Params} + */ +proto.cosmos.mint.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.cosmos.mint.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_mint_v1beta1_mint_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.mint.v1beta1.Params|undefined} value + * @return {!proto.cosmos.mint.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.mint.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.mint.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.mint.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.mint.v1beta1.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.cosmos.mint.v1beta1.QueryInflationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.v1beta1.QueryInflationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.mint.v1beta1.QueryInflationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryInflationRequest.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.mint.v1beta1.QueryInflationRequest} + */ +proto.cosmos.mint.v1beta1.QueryInflationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.QueryInflationRequest; + return proto.cosmos.mint.v1beta1.QueryInflationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.QueryInflationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.QueryInflationRequest} + */ +proto.cosmos.mint.v1beta1.QueryInflationRequest.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.mint.v1beta1.QueryInflationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.v1beta1.QueryInflationRequest.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.mint.v1beta1.QueryInflationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryInflationRequest.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.mint.v1beta1.QueryInflationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.v1beta1.QueryInflationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.mint.v1beta1.QueryInflationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + inflation: msg.getInflation_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.mint.v1beta1.QueryInflationResponse} + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.QueryInflationResponse; + return proto.cosmos.mint.v1beta1.QueryInflationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.QueryInflationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.QueryInflationResponse} + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.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.setInflation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.v1beta1.QueryInflationResponse.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.mint.v1beta1.QueryInflationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInflation_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes inflation = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.prototype.getInflation = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes inflation = 1; + * This is a type-conversion wrapper around `getInflation()` + * @return {string} + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.prototype.getInflation_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getInflation())); +}; + + +/** + * optional bytes inflation = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getInflation()` + * @return {!Uint8Array} + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.prototype.getInflation_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getInflation())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.mint.v1beta1.QueryInflationResponse} returns this + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.prototype.setInflation = 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.mint.v1beta1.QueryAnnualProvisionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.mint.v1beta1.QueryAnnualProvisionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.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.mint.v1beta1.QueryAnnualProvisionsRequest} + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest; + return proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.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.mint.v1beta1.QueryAnnualProvisionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.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.mint.v1beta1.QueryAnnualProvisionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.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.mint.v1beta1.QueryAnnualProvisionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.mint.v1beta1.QueryAnnualProvisionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + annualProvisions: msg.getAnnualProvisions_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.mint.v1beta1.QueryAnnualProvisionsResponse} + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse; + return proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse} + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.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.setAnnualProvisions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.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.mint.v1beta1.QueryAnnualProvisionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAnnualProvisions_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes annual_provisions = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.prototype.getAnnualProvisions = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes annual_provisions = 1; + * This is a type-conversion wrapper around `getAnnualProvisions()` + * @return {string} + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.prototype.getAnnualProvisions_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAnnualProvisions())); +}; + + +/** + * optional bytes annual_provisions = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAnnualProvisions()` + * @return {!Uint8Array} + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.prototype.getAnnualProvisions_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAnnualProvisions())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse} returns this + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.prototype.setAnnualProvisions = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +goog.object.extend(exports, proto.cosmos.mint.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/params/v1beta1/params_pb.js b/dist/src/types/proto-types/cosmos/params/v1beta1/params_pb.js new file mode 100644 index 00000000..6efc1573 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/params/v1beta1/params_pb.js @@ -0,0 +1,471 @@ +// source: cosmos/params/v1beta1/params.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.params.v1beta1.ParamChange', null, global); +goog.exportSymbol('proto.cosmos.params.v1beta1.ParameterChangeProposal', 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.params.v1beta1.ParameterChangeProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.params.v1beta1.ParameterChangeProposal.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.params.v1beta1.ParameterChangeProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.params.v1beta1.ParameterChangeProposal.displayName = 'proto.cosmos.params.v1beta1.ParameterChangeProposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.params.v1beta1.ParamChange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.params.v1beta1.ParamChange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.params.v1beta1.ParamChange.displayName = 'proto.cosmos.params.v1beta1.ParamChange'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.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.params.v1beta1.ParameterChangeProposal.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.params.v1beta1.ParameterChangeProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.params.v1beta1.ParameterChangeProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + changesList: jspb.Message.toObjectList(msg.getChangesList(), + proto.cosmos.params.v1beta1.ParamChange.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.params.v1beta1.ParameterChangeProposal} + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.params.v1beta1.ParameterChangeProposal; + return proto.cosmos.params.v1beta1.ParameterChangeProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.params.v1beta1.ParameterChangeProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.params.v1beta1.ParameterChangeProposal} + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.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.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = new proto.cosmos.params.v1beta1.ParamChange; + reader.readMessage(value,proto.cosmos.params.v1beta1.ParamChange.deserializeBinaryFromReader); + msg.addChanges(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.params.v1beta1.ParameterChangeProposal.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.params.v1beta1.ParameterChangeProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getChangesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.params.v1beta1.ParamChange.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.params.v1beta1.ParameterChangeProposal} returns this + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.params.v1beta1.ParameterChangeProposal} returns this + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated ParamChange changes = 3; + * @return {!Array} + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.getChangesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.params.v1beta1.ParamChange, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.params.v1beta1.ParameterChangeProposal} returns this +*/ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.setChangesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.params.v1beta1.ParamChange=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.params.v1beta1.ParamChange} + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.addChanges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.params.v1beta1.ParamChange, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.params.v1beta1.ParameterChangeProposal} returns this + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.clearChangesList = function() { + return this.setChangesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.params.v1beta1.ParamChange.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.params.v1beta1.ParamChange.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.params.v1beta1.ParamChange} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.params.v1beta1.ParamChange.toObject = function(includeInstance, msg) { + var f, obj = { + subspace: jspb.Message.getFieldWithDefault(msg, 1, ""), + key: jspb.Message.getFieldWithDefault(msg, 2, ""), + value: 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.cosmos.params.v1beta1.ParamChange} + */ +proto.cosmos.params.v1beta1.ParamChange.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.params.v1beta1.ParamChange; + return proto.cosmos.params.v1beta1.ParamChange.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.params.v1beta1.ParamChange} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.params.v1beta1.ParamChange} + */ +proto.cosmos.params.v1beta1.ParamChange.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.setSubspace(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.params.v1beta1.ParamChange.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.params.v1beta1.ParamChange.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.params.v1beta1.ParamChange} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.params.v1beta1.ParamChange.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSubspace(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getValue(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string subspace = 1; + * @return {string} + */ +proto.cosmos.params.v1beta1.ParamChange.prototype.getSubspace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.params.v1beta1.ParamChange} returns this + */ +proto.cosmos.params.v1beta1.ParamChange.prototype.setSubspace = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string key = 2; + * @return {string} + */ +proto.cosmos.params.v1beta1.ParamChange.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.params.v1beta1.ParamChange} returns this + */ +proto.cosmos.params.v1beta1.ParamChange.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string value = 3; + * @return {string} + */ +proto.cosmos.params.v1beta1.ParamChange.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.params.v1beta1.ParamChange} returns this + */ +proto.cosmos.params.v1beta1.ParamChange.prototype.setValue = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.cosmos.params.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/params/v1beta1/query_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/params/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..0e3c2f43 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/params/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,162 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.params.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_params_v1beta1_params_pb = require('../../../cosmos/params/v1beta1/params_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.params = {}; +proto.cosmos.params.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.params.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.params.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.params.v1beta1.QueryParamsRequest, + * !proto.cosmos.params.v1beta1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/cosmos.params.v1beta1.Query/Params', + grpc.web.MethodType.UNARY, + proto.cosmos.params.v1beta1.QueryParamsRequest, + proto.cosmos.params.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.params.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.params.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.params.v1beta1.QueryParamsRequest, + * !proto.cosmos.params.v1beta1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.params.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.params.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.params.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.params.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.params.v1beta1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.params.v1beta1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.params.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.cosmos.params.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.params.v1beta1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.params.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +module.exports = proto.cosmos.params.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/params/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/params/v1beta1/query_pb.js new file mode 100644 index 00000000..6179168a --- /dev/null +++ b/dist/src/types/proto-types/cosmos/params/v1beta1/query_pb.js @@ -0,0 +1,376 @@ +// source: cosmos/params/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_params_v1beta1_params_pb = require('../../../cosmos/params/v1beta1/params_pb.js'); +goog.object.extend(proto, cosmos_params_v1beta1_params_pb); +goog.exportSymbol('proto.cosmos.params.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.cosmos.params.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.cosmos.params.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.params.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.params.v1beta1.QueryParamsRequest.displayName = 'proto.cosmos.params.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.cosmos.params.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.params.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.params.v1beta1.QueryParamsResponse.displayName = 'proto.cosmos.params.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.cosmos.params.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.params.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.cosmos.params.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + subspace: jspb.Message.getFieldWithDefault(msg, 1, ""), + key: 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.params.v1beta1.QueryParamsRequest} + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.params.v1beta1.QueryParamsRequest; + return proto.cosmos.params.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.params.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.params.v1beta1.QueryParamsRequest} + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.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.setSubspace(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.params.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.cosmos.params.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSubspace(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string subspace = 1; + * @return {string} + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.prototype.getSubspace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.params.v1beta1.QueryParamsRequest} returns this + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.prototype.setSubspace = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string key = 2; + * @return {string} + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.params.v1beta1.QueryParamsRequest} returns this + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.prototype.setKey = 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.params.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.params.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.cosmos.params.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.params.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + param: (f = msg.getParam()) && cosmos_params_v1beta1_params_pb.ParamChange.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.params.v1beta1.QueryParamsResponse} + */ +proto.cosmos.params.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.params.v1beta1.QueryParamsResponse; + return proto.cosmos.params.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.params.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.params.v1beta1.QueryParamsResponse} + */ +proto.cosmos.params.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_params_v1beta1_params_pb.ParamChange; + reader.readMessage(value,cosmos_params_v1beta1_params_pb.ParamChange.deserializeBinaryFromReader); + msg.setParam(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.params.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.params.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.cosmos.params.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.params.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParam(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_params_v1beta1_params_pb.ParamChange.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ParamChange param = 1; + * @return {?proto.cosmos.params.v1beta1.ParamChange} + */ +proto.cosmos.params.v1beta1.QueryParamsResponse.prototype.getParam = function() { + return /** @type{?proto.cosmos.params.v1beta1.ParamChange} */ ( + jspb.Message.getWrapperField(this, cosmos_params_v1beta1_params_pb.ParamChange, 1)); +}; + + +/** + * @param {?proto.cosmos.params.v1beta1.ParamChange|undefined} value + * @return {!proto.cosmos.params.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.params.v1beta1.QueryParamsResponse.prototype.setParam = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.params.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.params.v1beta1.QueryParamsResponse.prototype.clearParam = function() { + return this.setParam(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.params.v1beta1.QueryParamsResponse.prototype.hasParam = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.cosmos.params.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/slashing/v1beta1/genesis_pb.js b/dist/src/types/proto-types/cosmos/slashing/v1beta1/genesis_pb.js new file mode 100644 index 00000000..8d2e6c27 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/slashing/v1beta1/genesis_pb.js @@ -0,0 +1,902 @@ +// source: cosmos/slashing/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_slashing_v1beta1_slashing_pb = require('../../../cosmos/slashing/v1beta1/slashing_pb.js'); +goog.object.extend(proto, cosmos_slashing_v1beta1_slashing_pb); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.GenesisState', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.MissedBlock', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.SigningInfo', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks', 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.slashing.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.slashing.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.GenesisState.displayName = 'proto.cosmos.slashing.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.cosmos.slashing.v1beta1.SigningInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.SigningInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.SigningInfo.displayName = 'proto.cosmos.slashing.v1beta1.SigningInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.slashing.v1beta1.ValidatorMissedBlocks = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.displayName = 'proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.slashing.v1beta1.MissedBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.MissedBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.MissedBlock.displayName = 'proto.cosmos.slashing.v1beta1.MissedBlock'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.slashing.v1beta1.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.cosmos.slashing.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.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.cosmos.slashing.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_slashing_v1beta1_slashing_pb.Params.toObject(includeInstance, f), + signingInfosList: jspb.Message.toObjectList(msg.getSigningInfosList(), + proto.cosmos.slashing.v1beta1.SigningInfo.toObject, includeInstance), + missedBlocksList: jspb.Message.toObjectList(msg.getMissedBlocksList(), + proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.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.slashing.v1beta1.GenesisState} + */ +proto.cosmos.slashing.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.GenesisState; + return proto.cosmos.slashing.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.GenesisState} + */ +proto.cosmos.slashing.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_slashing_v1beta1_slashing_pb.Params; + reader.readMessage(value,cosmos_slashing_v1beta1_slashing_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new proto.cosmos.slashing.v1beta1.SigningInfo; + reader.readMessage(value,proto.cosmos.slashing.v1beta1.SigningInfo.deserializeBinaryFromReader); + msg.addSigningInfos(value); + break; + case 3: + var value = new proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks; + reader.readMessage(value,proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.deserializeBinaryFromReader); + msg.addMissedBlocks(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.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.cosmos.slashing.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_slashing_v1beta1_slashing_pb.Params.serializeBinaryToWriter + ); + } + f = message.getSigningInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.slashing.v1beta1.SigningInfo.serializeBinaryToWriter + ); + } + f = message.getMissedBlocksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.slashing.v1beta1.Params} + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.cosmos.slashing.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_slashing_v1beta1_slashing_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.slashing.v1beta1.Params|undefined} value + * @return {!proto.cosmos.slashing.v1beta1.GenesisState} returns this +*/ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.slashing.v1beta1.GenesisState} returns this + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated SigningInfo signing_infos = 2; + * @return {!Array} + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.getSigningInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.slashing.v1beta1.SigningInfo, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.slashing.v1beta1.GenesisState} returns this +*/ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.setSigningInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.slashing.v1beta1.SigningInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.slashing.v1beta1.SigningInfo} + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.addSigningInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.slashing.v1beta1.SigningInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.slashing.v1beta1.GenesisState} returns this + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.clearSigningInfosList = function() { + return this.setSigningInfosList([]); +}; + + +/** + * repeated ValidatorMissedBlocks missed_blocks = 3; + * @return {!Array} + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.getMissedBlocksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.slashing.v1beta1.GenesisState} returns this +*/ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.setMissedBlocksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks} + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.addMissedBlocks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.slashing.v1beta1.GenesisState} returns this + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.clearMissedBlocksList = function() { + return this.setMissedBlocksList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.slashing.v1beta1.SigningInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.SigningInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.SigningInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.SigningInfo.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorSigningInfo: (f = msg.getValidatorSigningInfo()) && cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.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.slashing.v1beta1.SigningInfo} + */ +proto.cosmos.slashing.v1beta1.SigningInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.SigningInfo; + return proto.cosmos.slashing.v1beta1.SigningInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.SigningInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.SigningInfo} + */ +proto.cosmos.slashing.v1beta1.SigningInfo.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_slashing_v1beta1_slashing_pb.ValidatorSigningInfo; + reader.readMessage(value,cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.deserializeBinaryFromReader); + msg.setValidatorSigningInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.SigningInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.SigningInfo.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.slashing.v1beta1.SigningInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.SigningInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorSigningInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.slashing.v1beta1.SigningInfo.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.slashing.v1beta1.SigningInfo} returns this + */ +proto.cosmos.slashing.v1beta1.SigningInfo.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional ValidatorSigningInfo validator_signing_info = 2; + * @return {?proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} + */ +proto.cosmos.slashing.v1beta1.SigningInfo.prototype.getValidatorSigningInfo = function() { + return /** @type{?proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} */ ( + jspb.Message.getWrapperField(this, cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo, 2)); +}; + + +/** + * @param {?proto.cosmos.slashing.v1beta1.ValidatorSigningInfo|undefined} value + * @return {!proto.cosmos.slashing.v1beta1.SigningInfo} returns this +*/ +proto.cosmos.slashing.v1beta1.SigningInfo.prototype.setValidatorSigningInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.slashing.v1beta1.SigningInfo} returns this + */ +proto.cosmos.slashing.v1beta1.SigningInfo.prototype.clearValidatorSigningInfo = function() { + return this.setValidatorSigningInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.SigningInfo.prototype.hasValidatorSigningInfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.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.slashing.v1beta1.ValidatorMissedBlocks.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.ValidatorMissedBlocks} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + missedBlocksList: jspb.Message.toObjectList(msg.getMissedBlocksList(), + proto.cosmos.slashing.v1beta1.MissedBlock.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.slashing.v1beta1.ValidatorMissedBlocks} + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks; + return proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks} + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.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.slashing.v1beta1.MissedBlock; + reader.readMessage(value,proto.cosmos.slashing.v1beta1.MissedBlock.deserializeBinaryFromReader); + msg.addMissedBlocks(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.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.slashing.v1beta1.ValidatorMissedBlocks} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMissedBlocksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.slashing.v1beta1.MissedBlock.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks} returns this + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated MissedBlock missed_blocks = 2; + * @return {!Array} + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.prototype.getMissedBlocksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.slashing.v1beta1.MissedBlock, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks} returns this +*/ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.prototype.setMissedBlocksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.slashing.v1beta1.MissedBlock=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.slashing.v1beta1.MissedBlock} + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.prototype.addMissedBlocks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.slashing.v1beta1.MissedBlock, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks} returns this + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.prototype.clearMissedBlocksList = function() { + return this.setMissedBlocksList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.slashing.v1beta1.MissedBlock.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.MissedBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.MissedBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.MissedBlock.toObject = function(includeInstance, msg) { + var f, obj = { + index: jspb.Message.getFieldWithDefault(msg, 1, 0), + missed: 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.cosmos.slashing.v1beta1.MissedBlock} + */ +proto.cosmos.slashing.v1beta1.MissedBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.MissedBlock; + return proto.cosmos.slashing.v1beta1.MissedBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.MissedBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.MissedBlock} + */ +proto.cosmos.slashing.v1beta1.MissedBlock.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.setIndex(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMissed(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.MissedBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.MissedBlock.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.slashing.v1beta1.MissedBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.MissedBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIndex(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMissed(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional int64 index = 1; + * @return {number} + */ +proto.cosmos.slashing.v1beta1.MissedBlock.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.slashing.v1beta1.MissedBlock} returns this + */ +proto.cosmos.slashing.v1beta1.MissedBlock.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool missed = 2; + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.MissedBlock.prototype.getMissed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.slashing.v1beta1.MissedBlock} returns this + */ +proto.cosmos.slashing.v1beta1.MissedBlock.prototype.setMissed = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cosmos.slashing.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/slashing/v1beta1/query_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/slashing/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..1b156785 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/slashing/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,324 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.slashing.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_slashing_v1beta1_slashing_pb = require('../../../cosmos/slashing/v1beta1/slashing_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.slashing = {}; +proto.cosmos.slashing.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.slashing.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.slashing.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.slashing.v1beta1.QueryParamsRequest, + * !proto.cosmos.slashing.v1beta1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/cosmos.slashing.v1beta1.Query/Params', + grpc.web.MethodType.UNARY, + proto.cosmos.slashing.v1beta1.QueryParamsRequest, + proto.cosmos.slashing.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.slashing.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.slashing.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.slashing.v1beta1.QueryParamsRequest, + * !proto.cosmos.slashing.v1beta1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.slashing.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.slashing.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.slashing.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.slashing.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.slashing.v1beta1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.slashing.v1beta1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.slashing.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.cosmos.slashing.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.slashing.v1beta1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.slashing.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest, + * !proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse>} + */ +const methodDescriptor_Query_SigningInfo = new grpc.web.MethodDescriptor( + '/cosmos.slashing.v1beta1.Query/SigningInfo', + grpc.web.MethodType.UNARY, + proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest, + proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse, + /** + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest, + * !proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse>} + */ +const methodInfo_Query_SigningInfo = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse, + /** + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.slashing.v1beta1.QueryClient.prototype.signingInfo = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.slashing.v1beta1.Query/SigningInfo', + request, + metadata || {}, + methodDescriptor_Query_SigningInfo, + callback); +}; + + +/** + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.slashing.v1beta1.QueryPromiseClient.prototype.signingInfo = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.slashing.v1beta1.Query/SigningInfo', + request, + metadata || {}, + methodDescriptor_Query_SigningInfo); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest, + * !proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse>} + */ +const methodDescriptor_Query_SigningInfos = new grpc.web.MethodDescriptor( + '/cosmos.slashing.v1beta1.Query/SigningInfos', + grpc.web.MethodType.UNARY, + proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest, + proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse, + /** + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest, + * !proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse>} + */ +const methodInfo_Query_SigningInfos = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse, + /** + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.slashing.v1beta1.QueryClient.prototype.signingInfos = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.slashing.v1beta1.Query/SigningInfos', + request, + metadata || {}, + methodDescriptor_Query_SigningInfos, + callback); +}; + + +/** + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.slashing.v1beta1.QueryPromiseClient.prototype.signingInfos = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.slashing.v1beta1.Query/SigningInfos', + request, + metadata || {}, + methodDescriptor_Query_SigningInfos); +}; + + +module.exports = proto.cosmos.slashing.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/slashing/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/slashing/v1beta1/query_pb.js new file mode 100644 index 00000000..39a6b27b --- /dev/null +++ b/dist/src/types/proto-types/cosmos/slashing/v1beta1/query_pb.js @@ -0,0 +1,1050 @@ +// source: cosmos/slashing/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_slashing_v1beta1_slashing_pb = require('../../../cosmos/slashing/v1beta1/slashing_pb.js'); +goog.object.extend(proto, cosmos_slashing_v1beta1_slashing_pb); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse', 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.slashing.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.QueryParamsRequest.displayName = 'proto.cosmos.slashing.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.cosmos.slashing.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.QueryParamsResponse.displayName = 'proto.cosmos.slashing.v1beta1.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.cosmos.slashing.v1beta1.QuerySigningInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.displayName = 'proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.slashing.v1beta1.QuerySigningInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.displayName = 'proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.slashing.v1beta1.QuerySigningInfosRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.displayName = 'proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.slashing.v1beta1.QuerySigningInfosResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.displayName = 'proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.slashing.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.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.cosmos.slashing.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.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.cosmos.slashing.v1beta1.QueryParamsRequest} + */ +proto.cosmos.slashing.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.QueryParamsRequest; + return proto.cosmos.slashing.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.QueryParamsRequest} + */ +proto.cosmos.slashing.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.cosmos.slashing.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.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.cosmos.slashing.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.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.cosmos.slashing.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.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.cosmos.slashing.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_slashing_v1beta1_slashing_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.cosmos.slashing.v1beta1.QueryParamsResponse} + */ +proto.cosmos.slashing.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.QueryParamsResponse; + return proto.cosmos.slashing.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.QueryParamsResponse} + */ +proto.cosmos.slashing.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_slashing_v1beta1_slashing_pb.Params; + reader.readMessage(value,cosmos_slashing_v1beta1_slashing_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.cosmos.slashing.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.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.cosmos.slashing.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_slashing_v1beta1_slashing_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.slashing.v1beta1.Params} + */ +proto.cosmos.slashing.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.cosmos.slashing.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_slashing_v1beta1_slashing_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.slashing.v1beta1.Params|undefined} value + * @return {!proto.cosmos.slashing.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.slashing.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.slashing.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.slashing.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.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.cosmos.slashing.v1beta1.QuerySigningInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.QuerySigningInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + consAddress: 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.slashing.v1beta1.QuerySigningInfoRequest} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest; + return proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.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.setConsAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.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.slashing.v1beta1.QuerySigningInfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConsAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string cons_address = 1; + * @return {string} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.prototype.getConsAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest} returns this + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.prototype.setConsAddress = 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.slashing.v1beta1.QuerySigningInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.QuerySigningInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + valSigningInfo: (f = msg.getValSigningInfo()) && cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.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.slashing.v1beta1.QuerySigningInfoResponse} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse; + return proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo; + reader.readMessage(value,cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.deserializeBinaryFromReader); + msg.setValSigningInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.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.slashing.v1beta1.QuerySigningInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValSigningInfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ValidatorSigningInfo val_signing_info = 1; + * @return {?proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.prototype.getValSigningInfo = function() { + return /** @type{?proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} */ ( + jspb.Message.getWrapperField(this, cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo, 1)); +}; + + +/** + * @param {?proto.cosmos.slashing.v1beta1.ValidatorSigningInfo|undefined} value + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse} returns this +*/ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.prototype.setValSigningInfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse} returns this + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.prototype.clearValSigningInfo = function() { + return this.setValSigningInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.prototype.hasValSigningInfo = 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.slashing.v1beta1.QuerySigningInfosRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.QuerySigningInfosRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.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.slashing.v1beta1.QuerySigningInfosRequest} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest; + return proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.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.slashing.v1beta1.QuerySigningInfosRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.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.slashing.v1beta1.QuerySigningInfosRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.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.slashing.v1beta1.QuerySigningInfosRequest.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.slashing.v1beta1.QuerySigningInfosRequest} returns this +*/ +proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest} returns this + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.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.slashing.v1beta1.QuerySigningInfosResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.QuerySigningInfosResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.toObject = function(includeInstance, msg) { + var f, obj = { + infoList: jspb.Message.toObjectList(msg.getInfoList(), + cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.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.slashing.v1beta1.QuerySigningInfosResponse} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse; + return proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo; + reader.readMessage(value,cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.deserializeBinaryFromReader); + msg.addInfo(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.slashing.v1beta1.QuerySigningInfosResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.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.slashing.v1beta1.QuerySigningInfosResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInfoList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ValidatorSigningInfo info = 1; + * @return {!Array} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.prototype.getInfoList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse} returns this +*/ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.prototype.setInfoList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.prototype.addInfo = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.slashing.v1beta1.ValidatorSigningInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse} returns this + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.prototype.clearInfoList = function() { + return this.setInfoList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.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.slashing.v1beta1.QuerySigningInfosResponse} returns this +*/ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse} returns this + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.cosmos.slashing.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/slashing/v1beta1/slashing_pb.js b/dist/src/types/proto-types/cosmos/slashing/v1beta1/slashing_pb.js new file mode 100644 index 00000000..bf17e4f1 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/slashing/v1beta1/slashing_pb.js @@ -0,0 +1,709 @@ +// source: cosmos/slashing/v1beta1/slashing.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.Params', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.ValidatorSigningInfo', 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.slashing.v1beta1.ValidatorSigningInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.ValidatorSigningInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.displayName = 'proto.cosmos.slashing.v1beta1.ValidatorSigningInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.slashing.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.Params.displayName = 'proto.cosmos.slashing.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.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.ValidatorSigningInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + startHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + indexOffset: jspb.Message.getFieldWithDefault(msg, 3, 0), + jailedUntil: (f = msg.getJailedUntil()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + tombstoned: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + missedBlocksCounter: 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.cosmos.slashing.v1beta1.ValidatorSigningInfo} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.ValidatorSigningInfo; + return proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.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.setStartHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setIndexOffset(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setJailedUntil(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setTombstoned(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMissedBlocksCounter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.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.slashing.v1beta1.ValidatorSigningInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getStartHeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getIndexOffset(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getJailedUntil(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getTombstoned(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getMissedBlocksCounter(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} returns this + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 start_height = 2; + * @return {number} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.getStartHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} returns this + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.setStartHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 index_offset = 3; + * @return {number} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.getIndexOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} returns this + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.setIndexOffset = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp jailed_until = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.getJailedUntil = 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.cosmos.slashing.v1beta1.ValidatorSigningInfo} returns this +*/ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.setJailedUntil = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} returns this + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.clearJailedUntil = function() { + return this.setJailedUntil(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.hasJailedUntil = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bool tombstoned = 5; + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.getTombstoned = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} returns this + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.setTombstoned = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional int64 missed_blocks_counter = 6; + * @return {number} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.getMissedBlocksCounter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} returns this + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.setMissedBlocksCounter = 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.cosmos.slashing.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.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.cosmos.slashing.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + signedBlocksWindow: jspb.Message.getFieldWithDefault(msg, 1, 0), + minSignedPerWindow: msg.getMinSignedPerWindow_asB64(), + downtimeJailDuration: (f = msg.getDowntimeJailDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + slashFractionDoubleSign: msg.getSlashFractionDoubleSign_asB64(), + slashFractionDowntime: msg.getSlashFractionDowntime_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.slashing.v1beta1.Params} + */ +proto.cosmos.slashing.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.Params; + return proto.cosmos.slashing.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.Params} + */ +proto.cosmos.slashing.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.readInt64()); + msg.setSignedBlocksWindow(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMinSignedPerWindow(value); + break; + case 3: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setDowntimeJailDuration(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSlashFractionDoubleSign(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSlashFractionDowntime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.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.cosmos.slashing.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignedBlocksWindow(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMinSignedPerWindow_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getDowntimeJailDuration(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getSlashFractionDoubleSign_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getSlashFractionDowntime_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional int64 signed_blocks_window = 1; + * @return {number} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getSignedBlocksWindow = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.slashing.v1beta1.Params} returns this + */ +proto.cosmos.slashing.v1beta1.Params.prototype.setSignedBlocksWindow = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes min_signed_per_window = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getMinSignedPerWindow = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes min_signed_per_window = 2; + * This is a type-conversion wrapper around `getMinSignedPerWindow()` + * @return {string} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getMinSignedPerWindow_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMinSignedPerWindow())); +}; + + +/** + * optional bytes min_signed_per_window = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMinSignedPerWindow()` + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getMinSignedPerWindow_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMinSignedPerWindow())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.slashing.v1beta1.Params} returns this + */ +proto.cosmos.slashing.v1beta1.Params.prototype.setMinSignedPerWindow = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional google.protobuf.Duration downtime_jail_duration = 3; + * @return {?proto.google.protobuf.Duration} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getDowntimeJailDuration = 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.cosmos.slashing.v1beta1.Params} returns this +*/ +proto.cosmos.slashing.v1beta1.Params.prototype.setDowntimeJailDuration = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.slashing.v1beta1.Params} returns this + */ +proto.cosmos.slashing.v1beta1.Params.prototype.clearDowntimeJailDuration = function() { + return this.setDowntimeJailDuration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.hasDowntimeJailDuration = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes slash_fraction_double_sign = 4; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getSlashFractionDoubleSign = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes slash_fraction_double_sign = 4; + * This is a type-conversion wrapper around `getSlashFractionDoubleSign()` + * @return {string} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getSlashFractionDoubleSign_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSlashFractionDoubleSign())); +}; + + +/** + * optional bytes slash_fraction_double_sign = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSlashFractionDoubleSign()` + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getSlashFractionDoubleSign_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSlashFractionDoubleSign())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.slashing.v1beta1.Params} returns this + */ +proto.cosmos.slashing.v1beta1.Params.prototype.setSlashFractionDoubleSign = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bytes slash_fraction_downtime = 5; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getSlashFractionDowntime = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes slash_fraction_downtime = 5; + * This is a type-conversion wrapper around `getSlashFractionDowntime()` + * @return {string} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getSlashFractionDowntime_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSlashFractionDowntime())); +}; + + +/** + * optional bytes slash_fraction_downtime = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSlashFractionDowntime()` + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getSlashFractionDowntime_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSlashFractionDowntime())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.slashing.v1beta1.Params} returns this + */ +proto.cosmos.slashing.v1beta1.Params.prototype.setSlashFractionDowntime = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +goog.object.extend(exports, proto.cosmos.slashing.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/slashing/v1beta1/tx_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/slashing/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..82f9172c --- /dev/null +++ b/dist/src/types/proto-types/cosmos/slashing/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,158 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.slashing.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.slashing = {}; +proto.cosmos.slashing.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.slashing.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.slashing.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.slashing.v1beta1.MsgUnjail, + * !proto.cosmos.slashing.v1beta1.MsgUnjailResponse>} + */ +const methodDescriptor_Msg_Unjail = new grpc.web.MethodDescriptor( + '/cosmos.slashing.v1beta1.Msg/Unjail', + grpc.web.MethodType.UNARY, + proto.cosmos.slashing.v1beta1.MsgUnjail, + proto.cosmos.slashing.v1beta1.MsgUnjailResponse, + /** + * @param {!proto.cosmos.slashing.v1beta1.MsgUnjail} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.slashing.v1beta1.MsgUnjailResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.slashing.v1beta1.MsgUnjail, + * !proto.cosmos.slashing.v1beta1.MsgUnjailResponse>} + */ +const methodInfo_Msg_Unjail = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.slashing.v1beta1.MsgUnjailResponse, + /** + * @param {!proto.cosmos.slashing.v1beta1.MsgUnjail} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.slashing.v1beta1.MsgUnjailResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.slashing.v1beta1.MsgUnjail} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.slashing.v1beta1.MsgUnjailResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.slashing.v1beta1.MsgClient.prototype.unjail = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.slashing.v1beta1.Msg/Unjail', + request, + metadata || {}, + methodDescriptor_Msg_Unjail, + callback); +}; + + +/** + * @param {!proto.cosmos.slashing.v1beta1.MsgUnjail} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.slashing.v1beta1.MsgPromiseClient.prototype.unjail = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.slashing.v1beta1.Msg/Unjail', + request, + metadata || {}, + methodDescriptor_Msg_Unjail); +}; + + +module.exports = proto.cosmos.slashing.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/slashing/v1beta1/tx_pb.js b/dist/src/types/proto-types/cosmos/slashing/v1beta1/tx_pb.js new file mode 100644 index 00000000..d97b4dd7 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/slashing/v1beta1/tx_pb.js @@ -0,0 +1,292 @@ +// source: cosmos/slashing/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.MsgUnjail', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.MsgUnjailResponse', 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.slashing.v1beta1.MsgUnjail = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.MsgUnjail, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.MsgUnjail.displayName = 'proto.cosmos.slashing.v1beta1.MsgUnjail'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.slashing.v1beta1.MsgUnjailResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.MsgUnjailResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.MsgUnjailResponse.displayName = 'proto.cosmos.slashing.v1beta1.MsgUnjailResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.slashing.v1beta1.MsgUnjail.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.MsgUnjail.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.MsgUnjail} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.MsgUnjail.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddr: 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.slashing.v1beta1.MsgUnjail} + */ +proto.cosmos.slashing.v1beta1.MsgUnjail.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.MsgUnjail; + return proto.cosmos.slashing.v1beta1.MsgUnjail.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.MsgUnjail} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.MsgUnjail} + */ +proto.cosmos.slashing.v1beta1.MsgUnjail.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.setValidatorAddr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.MsgUnjail.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.MsgUnjail.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.slashing.v1beta1.MsgUnjail} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.MsgUnjail.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddr(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string validator_addr = 1; + * @return {string} + */ +proto.cosmos.slashing.v1beta1.MsgUnjail.prototype.getValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.slashing.v1beta1.MsgUnjail} returns this + */ +proto.cosmos.slashing.v1beta1.MsgUnjail.prototype.setValidatorAddr = 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.slashing.v1beta1.MsgUnjailResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.MsgUnjailResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.MsgUnjailResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.MsgUnjailResponse.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.slashing.v1beta1.MsgUnjailResponse} + */ +proto.cosmos.slashing.v1beta1.MsgUnjailResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.MsgUnjailResponse; + return proto.cosmos.slashing.v1beta1.MsgUnjailResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.MsgUnjailResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.MsgUnjailResponse} + */ +proto.cosmos.slashing.v1beta1.MsgUnjailResponse.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.slashing.v1beta1.MsgUnjailResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.MsgUnjailResponse.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.slashing.v1beta1.MsgUnjailResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.MsgUnjailResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cosmos.slashing.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/staking/v1beta1/genesis_pb.js b/dist/src/types/proto-types/cosmos/staking/v1beta1/genesis_pb.js new file mode 100644 index 00000000..94415ba8 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/staking/v1beta1/genesis_pb.js @@ -0,0 +1,730 @@ +// source: cosmos/staking/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_staking_v1beta1_staking_pb = require('../../../cosmos/staking/v1beta1/staking_pb.js'); +goog.object.extend(proto, cosmos_staking_v1beta1_staking_pb); +goog.exportSymbol('proto.cosmos.staking.v1beta1.GenesisState', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.LastValidatorPower', 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.staking.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.GenesisState.displayName = 'proto.cosmos.staking.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.cosmos.staking.v1beta1.LastValidatorPower = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.LastValidatorPower, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.LastValidatorPower.displayName = 'proto.cosmos.staking.v1beta1.LastValidatorPower'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.GenesisState.repeatedFields_ = [3,4,5,6,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.cosmos.staking.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.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.cosmos.staking.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_staking_v1beta1_staking_pb.Params.toObject(includeInstance, f), + lastTotalPower: msg.getLastTotalPower_asB64(), + lastValidatorPowersList: jspb.Message.toObjectList(msg.getLastValidatorPowersList(), + proto.cosmos.staking.v1beta1.LastValidatorPower.toObject, includeInstance), + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + cosmos_staking_v1beta1_staking_pb.Validator.toObject, includeInstance), + delegationsList: jspb.Message.toObjectList(msg.getDelegationsList(), + cosmos_staking_v1beta1_staking_pb.Delegation.toObject, includeInstance), + unbondingDelegationsList: jspb.Message.toObjectList(msg.getUnbondingDelegationsList(), + cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.toObject, includeInstance), + redelegationsList: jspb.Message.toObjectList(msg.getRedelegationsList(), + cosmos_staking_v1beta1_staking_pb.Redelegation.toObject, includeInstance), + exported: 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.cosmos.staking.v1beta1.GenesisState} + */ +proto.cosmos.staking.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.GenesisState; + return proto.cosmos.staking.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.GenesisState} + */ +proto.cosmos.staking.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Params; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastTotalPower(value); + break; + case 3: + var value = new proto.cosmos.staking.v1beta1.LastValidatorPower; + reader.readMessage(value,proto.cosmos.staking.v1beta1.LastValidatorPower.deserializeBinaryFromReader); + msg.addLastValidatorPowers(value); + break; + case 4: + var value = new cosmos_staking_v1beta1_staking_pb.Validator; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Validator.deserializeBinaryFromReader); + msg.addValidators(value); + break; + case 5: + var value = new cosmos_staking_v1beta1_staking_pb.Delegation; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Delegation.deserializeBinaryFromReader); + msg.addDelegations(value); + break; + case 6: + var value = new cosmos_staking_v1beta1_staking_pb.UnbondingDelegation; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.deserializeBinaryFromReader); + msg.addUnbondingDelegations(value); + break; + case 7: + var value = new cosmos_staking_v1beta1_staking_pb.Redelegation; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Redelegation.deserializeBinaryFromReader); + msg.addRedelegations(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setExported(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.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.cosmos.staking.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Params.serializeBinaryToWriter + ); + } + f = message.getLastTotalPower_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getLastValidatorPowersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.staking.v1beta1.LastValidatorPower.serializeBinaryToWriter + ); + } + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_staking_v1beta1_staking_pb.Validator.serializeBinaryToWriter + ); + } + f = message.getDelegationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + cosmos_staking_v1beta1_staking_pb.Delegation.serializeBinaryToWriter + ); + } + f = message.getUnbondingDelegationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.serializeBinaryToWriter + ); + } + f = message.getRedelegationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + cosmos_staking_v1beta1_staking_pb.Redelegation.serializeBinaryToWriter + ); + } + f = message.getExported(); + if (f) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.staking.v1beta1.Params} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Params|undefined} value + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this +*/ +proto.cosmos.staking.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes last_total_power = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getLastTotalPower = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes last_total_power = 2; + * This is a type-conversion wrapper around `getLastTotalPower()` + * @return {string} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getLastTotalPower_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastTotalPower())); +}; + + +/** + * optional bytes last_total_power = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastTotalPower()` + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getLastTotalPower_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastTotalPower())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.setLastTotalPower = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated LastValidatorPower last_validator_powers = 3; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getLastValidatorPowersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.staking.v1beta1.LastValidatorPower, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this +*/ +proto.cosmos.staking.v1beta1.GenesisState.prototype.setLastValidatorPowersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.LastValidatorPower=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.LastValidatorPower} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.addLastValidatorPowers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.staking.v1beta1.LastValidatorPower, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.clearLastValidatorPowersList = function() { + return this.setLastValidatorPowersList([]); +}; + + +/** + * repeated Validator validators = 4; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.Validator, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this +*/ +proto.cosmos.staking.v1beta1.GenesisState.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.Validator} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.staking.v1beta1.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * repeated Delegation delegations = 5; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getDelegationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.Delegation, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this +*/ +proto.cosmos.staking.v1beta1.GenesisState.prototype.setDelegationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.Delegation=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.Delegation} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.addDelegations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmos.staking.v1beta1.Delegation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.clearDelegationsList = function() { + return this.setDelegationsList([]); +}; + + +/** + * repeated UnbondingDelegation unbonding_delegations = 6; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getUnbondingDelegationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.UnbondingDelegation, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this +*/ +proto.cosmos.staking.v1beta1.GenesisState.prototype.setUnbondingDelegationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.UnbondingDelegation=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegation} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.addUnbondingDelegations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cosmos.staking.v1beta1.UnbondingDelegation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.clearUnbondingDelegationsList = function() { + return this.setUnbondingDelegationsList([]); +}; + + +/** + * repeated Redelegation redelegations = 7; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getRedelegationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.Redelegation, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this +*/ +proto.cosmos.staking.v1beta1.GenesisState.prototype.setRedelegationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.Redelegation=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.Redelegation} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.addRedelegations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.cosmos.staking.v1beta1.Redelegation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.clearRedelegationsList = function() { + return this.setRedelegationsList([]); +}; + + +/** + * optional bool exported = 8; + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getExported = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.setExported = 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.cosmos.staking.v1beta1.LastValidatorPower.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.LastValidatorPower.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.LastValidatorPower} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.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.cosmos.staking.v1beta1.LastValidatorPower} + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.LastValidatorPower; + return proto.cosmos.staking.v1beta1.LastValidatorPower.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.LastValidatorPower} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.LastValidatorPower} + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.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.setPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.LastValidatorPower.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.staking.v1beta1.LastValidatorPower} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.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.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.LastValidatorPower} returns this + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 power = 2; + * @return {number} + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.staking.v1beta1.LastValidatorPower} returns this + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.prototype.setPower = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cosmos.staking.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/staking/v1beta1/query_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/staking/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..3072a3f9 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/staking/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,1204 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.staking.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_staking_v1beta1_staking_pb = require('../../../cosmos/staking/v1beta1/staking_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.staking = {}; +proto.cosmos.staking.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.staking.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryValidatorsRequest, + * !proto.cosmos.staking.v1beta1.QueryValidatorsResponse>} + */ +const methodDescriptor_Query_Validators = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/Validators', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryValidatorsRequest, + proto.cosmos.staking.v1beta1.QueryValidatorsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryValidatorsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryValidatorsRequest, + * !proto.cosmos.staking.v1beta1.QueryValidatorsResponse>} + */ +const methodInfo_Query_Validators = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryValidatorsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryValidatorsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryValidatorsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.validators = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Validators', + request, + metadata || {}, + methodDescriptor_Query_Validators, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.validators = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Validators', + request, + metadata || {}, + methodDescriptor_Query_Validators); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryValidatorRequest, + * !proto.cosmos.staking.v1beta1.QueryValidatorResponse>} + */ +const methodDescriptor_Query_Validator = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/Validator', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryValidatorRequest, + proto.cosmos.staking.v1beta1.QueryValidatorResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryValidatorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryValidatorRequest, + * !proto.cosmos.staking.v1beta1.QueryValidatorResponse>} + */ +const methodInfo_Query_Validator = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryValidatorResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryValidatorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryValidatorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.validator = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Validator', + request, + metadata || {}, + methodDescriptor_Query_Validator, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.validator = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Validator', + request, + metadata || {}, + methodDescriptor_Query_Validator); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse>} + */ +const methodDescriptor_Query_ValidatorDelegations = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/ValidatorDelegations', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest, + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse>} + */ +const methodInfo_Query_ValidatorDelegations = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.validatorDelegations = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/ValidatorDelegations', + request, + metadata || {}, + methodDescriptor_Query_ValidatorDelegations, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.validatorDelegations = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/ValidatorDelegations', + request, + metadata || {}, + methodDescriptor_Query_ValidatorDelegations); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse>} + */ +const methodDescriptor_Query_ValidatorUnbondingDelegations = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest, + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse>} + */ +const methodInfo_Query_ValidatorUnbondingDelegations = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.validatorUnbondingDelegations = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations', + request, + metadata || {}, + methodDescriptor_Query_ValidatorUnbondingDelegations, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.validatorUnbondingDelegations = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations', + request, + metadata || {}, + methodDescriptor_Query_ValidatorUnbondingDelegations); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryDelegationRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegationResponse>} + */ +const methodDescriptor_Query_Delegation = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/Delegation', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryDelegationRequest, + proto.cosmos.staking.v1beta1.QueryDelegationResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegationResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryDelegationRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegationResponse>} + */ +const methodInfo_Query_Delegation = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryDelegationResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegationResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryDelegationResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.delegation = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Delegation', + request, + metadata || {}, + methodDescriptor_Query_Delegation, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.delegation = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Delegation', + request, + metadata || {}, + methodDescriptor_Query_Delegation); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest, + * !proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse>} + */ +const methodDescriptor_Query_UnbondingDelegation = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/UnbondingDelegation', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest, + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest, + * !proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse>} + */ +const methodInfo_Query_UnbondingDelegation = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.unbondingDelegation = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/UnbondingDelegation', + request, + metadata || {}, + methodDescriptor_Query_UnbondingDelegation, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.unbondingDelegation = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/UnbondingDelegation', + request, + metadata || {}, + methodDescriptor_Query_UnbondingDelegation); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse>} + */ +const methodDescriptor_Query_DelegatorDelegations = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/DelegatorDelegations', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest, + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse>} + */ +const methodInfo_Query_DelegatorDelegations = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.delegatorDelegations = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/DelegatorDelegations', + request, + metadata || {}, + methodDescriptor_Query_DelegatorDelegations, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.delegatorDelegations = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/DelegatorDelegations', + request, + metadata || {}, + methodDescriptor_Query_DelegatorDelegations); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse>} + */ +const methodDescriptor_Query_DelegatorUnbondingDelegations = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest, + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse>} + */ +const methodInfo_Query_DelegatorUnbondingDelegations = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.delegatorUnbondingDelegations = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations', + request, + metadata || {}, + methodDescriptor_Query_DelegatorUnbondingDelegations, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.delegatorUnbondingDelegations = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations', + request, + metadata || {}, + methodDescriptor_Query_DelegatorUnbondingDelegations); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryRedelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryRedelegationsResponse>} + */ +const methodDescriptor_Query_Redelegations = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/Redelegations', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryRedelegationsRequest, + proto.cosmos.staking.v1beta1.QueryRedelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryRedelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryRedelegationsResponse>} + */ +const methodInfo_Query_Redelegations = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryRedelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryRedelegationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.redelegations = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Redelegations', + request, + metadata || {}, + methodDescriptor_Query_Redelegations, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.redelegations = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Redelegations', + request, + metadata || {}, + methodDescriptor_Query_Redelegations); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse>} + */ +const methodDescriptor_Query_DelegatorValidators = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/DelegatorValidators', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest, + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse>} + */ +const methodInfo_Query_DelegatorValidators = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.delegatorValidators = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/DelegatorValidators', + request, + metadata || {}, + methodDescriptor_Query_DelegatorValidators, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.delegatorValidators = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/DelegatorValidators', + request, + metadata || {}, + methodDescriptor_Query_DelegatorValidators); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse>} + */ +const methodDescriptor_Query_DelegatorValidator = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/DelegatorValidator', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest, + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse>} + */ +const methodInfo_Query_DelegatorValidator = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.delegatorValidator = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/DelegatorValidator', + request, + metadata || {}, + methodDescriptor_Query_DelegatorValidator, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.delegatorValidator = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/DelegatorValidator', + request, + metadata || {}, + methodDescriptor_Query_DelegatorValidator); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest, + * !proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse>} + */ +const methodDescriptor_Query_HistoricalInfo = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/HistoricalInfo', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest, + proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest, + * !proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse>} + */ +const methodInfo_Query_HistoricalInfo = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.historicalInfo = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/HistoricalInfo', + request, + metadata || {}, + methodDescriptor_Query_HistoricalInfo, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.historicalInfo = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/HistoricalInfo', + request, + metadata || {}, + methodDescriptor_Query_HistoricalInfo); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryPoolRequest, + * !proto.cosmos.staking.v1beta1.QueryPoolResponse>} + */ +const methodDescriptor_Query_Pool = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/Pool', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryPoolRequest, + proto.cosmos.staking.v1beta1.QueryPoolResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryPoolRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryPoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryPoolRequest, + * !proto.cosmos.staking.v1beta1.QueryPoolResponse>} + */ +const methodInfo_Query_Pool = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryPoolResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryPoolRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryPoolResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryPoolRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryPoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.pool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Pool', + request, + metadata || {}, + methodDescriptor_Query_Pool, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryPoolRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.pool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Pool', + request, + metadata || {}, + methodDescriptor_Query_Pool); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryParamsRequest, + * !proto.cosmos.staking.v1beta1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/Params', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryParamsRequest, + proto.cosmos.staking.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryParamsRequest, + * !proto.cosmos.staking.v1beta1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +module.exports = proto.cosmos.staking.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/staking/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/staking/v1beta1/query_pb.js new file mode 100644 index 00000000..7946da69 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/staking/v1beta1/query_pb.js @@ -0,0 +1,5442 @@ +// source: cosmos/staking/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_staking_v1beta1_staking_pb = require('../../../cosmos/staking/v1beta1/staking_pb.js'); +goog.object.extend(proto, cosmos_staking_v1beta1_staking_pb); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegationRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegationResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryPoolRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryPoolResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryRedelegationsRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryRedelegationsResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryValidatorRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryValidatorResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryValidatorsRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryValidatorsResponse', 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.staking.v1beta1.QueryValidatorsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryValidatorsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryValidatorsRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryValidatorsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryValidatorsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.QueryValidatorsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryValidatorsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryValidatorsResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryValidatorsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryValidatorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryValidatorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryValidatorRequest.displayName = 'proto.cosmos.staking.v1beta1.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.cosmos.staking.v1beta1.QueryValidatorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryValidatorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryValidatorResponse.displayName = 'proto.cosmos.staking.v1beta1.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.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryValidatorDelegationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegationRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegationResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryUnbondingDelegationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryUnbondingDelegationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegatorDelegationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegatorDelegationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryRedelegationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryRedelegationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryRedelegationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryRedelegationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryRedelegationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryRedelegationsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegatorValidatorsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegatorValidatorsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegatorValidatorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegatorValidatorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryHistoricalInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryHistoricalInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryPoolRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryPoolRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryPoolRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryPoolRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryPoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryPoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryPoolResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryPoolResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryParamsRequest.displayName = 'proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryParamsResponse.displayName = 'proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryValidatorsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryValidatorsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryValidatorsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + status: 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.staking.v1beta1.QueryValidatorsRequest} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryValidatorsRequest; + return proto.cosmos.staking.v1beta1.QueryValidatorsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorsRequest} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.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.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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryValidatorsRequest.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.staking.v1beta1.QueryValidatorsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatus(); + 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 status = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.prototype.getStatus = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.prototype.setStatus = 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.staking.v1beta1.QueryValidatorsRequest.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.staking.v1beta1.QueryValidatorsRequest} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.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.staking.v1beta1.QueryValidatorsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryValidatorsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryValidatorsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + cosmos_staking_v1beta1_staking_pb.Validator.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.staking.v1beta1.QueryValidatorsResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryValidatorsResponse; + return proto.cosmos.staking.v1beta1.QueryValidatorsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorsResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Validator; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Validator.deserializeBinaryFromReader); + msg.addValidators(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.staking.v1beta1.QueryValidatorsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryValidatorsResponse.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.staking.v1beta1.QueryValidatorsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Validator.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Validator validators = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.Validator, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.Validator} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.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.staking.v1beta1.QueryValidatorsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.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.staking.v1beta1.QueryValidatorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.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.cosmos.staking.v1beta1.QueryValidatorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorRequest.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddr: 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.staking.v1beta1.QueryValidatorRequest} + */ +proto.cosmos.staking.v1beta1.QueryValidatorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryValidatorRequest; + return proto.cosmos.staking.v1beta1.QueryValidatorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorRequest} + */ +proto.cosmos.staking.v1beta1.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.setValidatorAddr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryValidatorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.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.cosmos.staking.v1beta1.QueryValidatorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddr(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string validator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryValidatorRequest.prototype.getValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorRequest.prototype.setValidatorAddr = 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.staking.v1beta1.QueryValidatorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.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.cosmos.staking.v1beta1.QueryValidatorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + validator: (f = msg.getValidator()) && cosmos_staking_v1beta1_staking_pb.Validator.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.staking.v1beta1.QueryValidatorResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryValidatorResponse; + return proto.cosmos.staking.v1beta1.QueryValidatorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Validator; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Validator.deserializeBinaryFromReader); + msg.setValidator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.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.cosmos.staking.v1beta1.QueryValidatorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Validator.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Validator validator = 1; + * @return {?proto.cosmos.staking.v1beta1.Validator} + */ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.prototype.getValidator = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Validator} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.Validator, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Validator|undefined} value + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.prototype.hasValidator = 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.staking.v1beta1.QueryValidatorDelegationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryValidatorDelegationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddr: 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.staking.v1beta1.QueryValidatorDelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest; + return proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.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.setValidatorAddr(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.staking.v1beta1.QueryValidatorDelegationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.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.staking.v1beta1.QueryValidatorDelegationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddr(); + 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 validator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.prototype.getValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.prototype.setValidatorAddr = 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.staking.v1beta1.QueryValidatorDelegationsRequest.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.staking.v1beta1.QueryValidatorDelegationsRequest} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.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.staking.v1beta1.QueryValidatorDelegationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryValidatorDelegationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + delegationResponsesList: jspb.Message.toObjectList(msg.getDelegationResponsesList(), + cosmos_staking_v1beta1_staking_pb.DelegationResponse.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.staking.v1beta1.QueryValidatorDelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse; + return proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.DelegationResponse; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.DelegationResponse.deserializeBinaryFromReader); + msg.addDelegationResponses(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.staking.v1beta1.QueryValidatorDelegationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.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.staking.v1beta1.QueryValidatorDelegationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegationResponsesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.DelegationResponse.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DelegationResponse delegation_responses = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.prototype.getDelegationResponsesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.DelegationResponse, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.prototype.setDelegationResponsesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.DelegationResponse=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.DelegationResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.prototype.addDelegationResponses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.DelegationResponse, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.prototype.clearDelegationResponsesList = function() { + return this.setDelegationResponsesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.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.staking.v1beta1.QueryValidatorDelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.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.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddr: 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.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest; + return proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.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.setValidatorAddr(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.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.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.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddr(); + 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 validator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.prototype.getValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.prototype.setValidatorAddr = 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.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.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.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.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.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + unbondingResponsesList: jspb.Message.toObjectList(msg.getUnbondingResponsesList(), + cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.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.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse; + return proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.UnbondingDelegation; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.deserializeBinaryFromReader); + msg.addUnbondingResponses(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.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.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.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUnbondingResponsesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated UnbondingDelegation unbonding_responses = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.prototype.getUnbondingResponsesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.UnbondingDelegation, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.prototype.setUnbondingResponsesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.UnbondingDelegation=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegation} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.prototype.addUnbondingResponses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.UnbondingDelegation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.prototype.clearUnbondingResponsesList = function() { + return this.setUnbondingResponsesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.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.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.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.staking.v1beta1.QueryDelegationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddr: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddr: 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.staking.v1beta1.QueryDelegationRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegationRequest; + return proto.cosmos.staking.v1beta1.QueryDelegationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegationRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.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.setDelegatorAddr(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegationRequest.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.staking.v1beta1.QueryDelegationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddr(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddr(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string delegator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.prototype.getDelegatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegationRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.prototype.setDelegatorAddr = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_addr = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.prototype.getValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegationRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.prototype.setValidatorAddr = 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.staking.v1beta1.QueryDelegationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + delegationResponse: (f = msg.getDelegationResponse()) && cosmos_staking_v1beta1_staking_pb.DelegationResponse.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.staking.v1beta1.QueryDelegationResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegationResponse; + return proto.cosmos.staking.v1beta1.QueryDelegationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegationResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.DelegationResponse; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.DelegationResponse.deserializeBinaryFromReader); + msg.setDelegationResponse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegationResponse.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.staking.v1beta1.QueryDelegationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegationResponse(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.DelegationResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DelegationResponse delegation_response = 1; + * @return {?proto.cosmos.staking.v1beta1.DelegationResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.prototype.getDelegationResponse = function() { + return /** @type{?proto.cosmos.staking.v1beta1.DelegationResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.DelegationResponse, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.DelegationResponse|undefined} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegationResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.prototype.setDelegationResponse = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegationResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.prototype.clearDelegationResponse = function() { + return this.setDelegationResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.prototype.hasDelegationResponse = 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.staking.v1beta1.QueryUnbondingDelegationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryUnbondingDelegationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddr: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddr: 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.staking.v1beta1.QueryUnbondingDelegationRequest} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest; + return proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.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.setDelegatorAddr(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.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.staking.v1beta1.QueryUnbondingDelegationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddr(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddr(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string delegator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.prototype.getDelegatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.prototype.setDelegatorAddr = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_addr = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.prototype.getValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.prototype.setValidatorAddr = 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.staking.v1beta1.QueryUnbondingDelegationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryUnbondingDelegationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + unbond: (f = msg.getUnbond()) && cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.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.staking.v1beta1.QueryUnbondingDelegationResponse} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse; + return proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.UnbondingDelegation; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.deserializeBinaryFromReader); + msg.setUnbond(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.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.staking.v1beta1.QueryUnbondingDelegationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUnbond(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.serializeBinaryToWriter + ); + } +}; + + +/** + * optional UnbondingDelegation unbond = 1; + * @return {?proto.cosmos.staking.v1beta1.UnbondingDelegation} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.prototype.getUnbond = function() { + return /** @type{?proto.cosmos.staking.v1beta1.UnbondingDelegation} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.UnbondingDelegation, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.UnbondingDelegation|undefined} value + * @return {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.prototype.setUnbond = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.prototype.clearUnbond = function() { + return this.setUnbond(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.prototype.hasUnbond = 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.staking.v1beta1.QueryDelegatorDelegationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegatorDelegationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddr: 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.staking.v1beta1.QueryDelegatorDelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest; + return proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.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.setDelegatorAddr(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.staking.v1beta1.QueryDelegatorDelegationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.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.staking.v1beta1.QueryDelegatorDelegationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddr(); + 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 delegator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.prototype.getDelegatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.prototype.setDelegatorAddr = 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.staking.v1beta1.QueryDelegatorDelegationsRequest.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.staking.v1beta1.QueryDelegatorDelegationsRequest} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.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.staking.v1beta1.QueryDelegatorDelegationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegatorDelegationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + delegationResponsesList: jspb.Message.toObjectList(msg.getDelegationResponsesList(), + cosmos_staking_v1beta1_staking_pb.DelegationResponse.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.staking.v1beta1.QueryDelegatorDelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse; + return proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.DelegationResponse; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.DelegationResponse.deserializeBinaryFromReader); + msg.addDelegationResponses(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.staking.v1beta1.QueryDelegatorDelegationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.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.staking.v1beta1.QueryDelegatorDelegationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegationResponsesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.DelegationResponse.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DelegationResponse delegation_responses = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.prototype.getDelegationResponsesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.DelegationResponse, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.prototype.setDelegationResponsesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.DelegationResponse=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.DelegationResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.prototype.addDelegationResponses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.DelegationResponse, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.prototype.clearDelegationResponsesList = function() { + return this.setDelegationResponsesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.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.staking.v1beta1.QueryDelegatorDelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.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.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddr: 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.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest; + return proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.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.setDelegatorAddr(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.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.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.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddr(); + 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 delegator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.prototype.getDelegatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.prototype.setDelegatorAddr = 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.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.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.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.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.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + unbondingResponsesList: jspb.Message.toObjectList(msg.getUnbondingResponsesList(), + cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.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.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse; + return proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.UnbondingDelegation; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.deserializeBinaryFromReader); + msg.addUnbondingResponses(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.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.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.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUnbondingResponsesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated UnbondingDelegation unbonding_responses = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.prototype.getUnbondingResponsesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.UnbondingDelegation, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.prototype.setUnbondingResponsesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.UnbondingDelegation=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegation} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.prototype.addUnbondingResponses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.UnbondingDelegation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.prototype.clearUnbondingResponsesList = function() { + return this.setUnbondingResponsesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.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.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.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.staking.v1beta1.QueryRedelegationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryRedelegationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddr: jspb.Message.getFieldWithDefault(msg, 1, ""), + srcValidatorAddr: jspb.Message.getFieldWithDefault(msg, 2, ""), + dstValidatorAddr: jspb.Message.getFieldWithDefault(msg, 3, ""), + 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.staking.v1beta1.QueryRedelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryRedelegationsRequest; + return proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.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.setDelegatorAddr(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSrcValidatorAddr(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDstValidatorAddr(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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.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.staking.v1beta1.QueryRedelegationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddr(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSrcValidatorAddr(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDstValidatorAddr(); + 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 delegator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.getDelegatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.setDelegatorAddr = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string src_validator_addr = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.getSrcValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.setSrcValidatorAddr = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string dst_validator_addr = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.getDstValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.setDstValidatorAddr = 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.cosmos.staking.v1beta1.QueryRedelegationsRequest.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.cosmos.staking.v1beta1.QueryRedelegationsRequest} returns this +*/ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.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.staking.v1beta1.QueryRedelegationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryRedelegationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + redelegationResponsesList: jspb.Message.toObjectList(msg.getRedelegationResponsesList(), + cosmos_staking_v1beta1_staking_pb.RedelegationResponse.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.staking.v1beta1.QueryRedelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryRedelegationsResponse; + return proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryRedelegationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.RedelegationResponse; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.RedelegationResponse.deserializeBinaryFromReader); + msg.addRedelegationResponses(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.staking.v1beta1.QueryRedelegationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.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.staking.v1beta1.QueryRedelegationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRedelegationResponsesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.RedelegationResponse.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated RedelegationResponse redelegation_responses = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.prototype.getRedelegationResponsesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.RedelegationResponse, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.prototype.setRedelegationResponsesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.RedelegationResponse=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.RedelegationResponse} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.prototype.addRedelegationResponses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.RedelegationResponse, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.prototype.clearRedelegationResponsesList = function() { + return this.setRedelegationResponsesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.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.staking.v1beta1.QueryRedelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.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.staking.v1beta1.QueryDelegatorValidatorsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegatorValidatorsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddr: 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.staking.v1beta1.QueryDelegatorValidatorsRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest; + return proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.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.setDelegatorAddr(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.staking.v1beta1.QueryDelegatorValidatorsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.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.staking.v1beta1.QueryDelegatorValidatorsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddr(); + 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 delegator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.prototype.getDelegatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.prototype.setDelegatorAddr = 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.staking.v1beta1.QueryDelegatorValidatorsRequest.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.staking.v1beta1.QueryDelegatorValidatorsRequest} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.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.staking.v1beta1.QueryDelegatorValidatorsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegatorValidatorsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + cosmos_staking_v1beta1_staking_pb.Validator.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.staking.v1beta1.QueryDelegatorValidatorsResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse; + return proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Validator; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Validator.deserializeBinaryFromReader); + msg.addValidators(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.staking.v1beta1.QueryDelegatorValidatorsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.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.staking.v1beta1.QueryDelegatorValidatorsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Validator.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Validator validators = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.Validator, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.Validator} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.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.staking.v1beta1.QueryDelegatorValidatorsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.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.staking.v1beta1.QueryDelegatorValidatorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegatorValidatorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddr: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddr: 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.staking.v1beta1.QueryDelegatorValidatorRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest; + return proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.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.setDelegatorAddr(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.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.staking.v1beta1.QueryDelegatorValidatorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddr(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddr(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string delegator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.prototype.getDelegatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.prototype.setDelegatorAddr = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_addr = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.prototype.getValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.prototype.setValidatorAddr = 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.staking.v1beta1.QueryDelegatorValidatorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegatorValidatorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + validator: (f = msg.getValidator()) && cosmos_staking_v1beta1_staking_pb.Validator.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.staking.v1beta1.QueryDelegatorValidatorResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse; + return proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Validator; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Validator.deserializeBinaryFromReader); + msg.setValidator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.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.staking.v1beta1.QueryDelegatorValidatorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Validator.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Validator validator = 1; + * @return {?proto.cosmos.staking.v1beta1.Validator} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.prototype.getValidator = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Validator} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.Validator, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Validator|undefined} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.prototype.hasValidator = 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.staking.v1beta1.QueryHistoricalInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryHistoricalInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + height: 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.cosmos.staking.v1beta1.QueryHistoricalInfoRequest} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest; + return proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.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.staking.v1beta1.QueryHistoricalInfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.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.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryHistoricalInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + hist: (f = msg.getHist()) && cosmos_staking_v1beta1_staking_pb.HistoricalInfo.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.staking.v1beta1.QueryHistoricalInfoResponse} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse; + return proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.HistoricalInfo; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.HistoricalInfo.deserializeBinaryFromReader); + msg.setHist(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.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.staking.v1beta1.QueryHistoricalInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHist(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.HistoricalInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional HistoricalInfo hist = 1; + * @return {?proto.cosmos.staking.v1beta1.HistoricalInfo} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.prototype.getHist = function() { + return /** @type{?proto.cosmos.staking.v1beta1.HistoricalInfo} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.HistoricalInfo, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.HistoricalInfo|undefined} value + * @return {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.prototype.setHist = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.prototype.clearHist = function() { + return this.setHist(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.prototype.hasHist = 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.staking.v1beta1.QueryPoolRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryPoolRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryPoolRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryPoolRequest.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.staking.v1beta1.QueryPoolRequest} + */ +proto.cosmos.staking.v1beta1.QueryPoolRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryPoolRequest; + return proto.cosmos.staking.v1beta1.QueryPoolRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryPoolRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryPoolRequest} + */ +proto.cosmos.staking.v1beta1.QueryPoolRequest.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.staking.v1beta1.QueryPoolRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryPoolRequest.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.staking.v1beta1.QueryPoolRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryPoolRequest.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.staking.v1beta1.QueryPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryPoolResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryPoolResponse.toObject = function(includeInstance, msg) { + var f, obj = { + pool: (f = msg.getPool()) && cosmos_staking_v1beta1_staking_pb.Pool.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.staking.v1beta1.QueryPoolResponse} + */ +proto.cosmos.staking.v1beta1.QueryPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryPoolResponse; + return proto.cosmos.staking.v1beta1.QueryPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryPoolResponse} + */ +proto.cosmos.staking.v1beta1.QueryPoolResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Pool; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Pool.deserializeBinaryFromReader); + msg.setPool(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryPoolResponse.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.staking.v1beta1.QueryPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryPoolResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPool(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Pool.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Pool pool = 1; + * @return {?proto.cosmos.staking.v1beta1.Pool} + */ +proto.cosmos.staking.v1beta1.QueryPoolResponse.prototype.getPool = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Pool} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.Pool, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Pool|undefined} value + * @return {!proto.cosmos.staking.v1beta1.QueryPoolResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryPoolResponse.prototype.setPool = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryPoolResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryPoolResponse.prototype.clearPool = function() { + return this.setPool(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryPoolResponse.prototype.hasPool = 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.staking.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryParamsRequest} + */ +proto.cosmos.staking.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryParamsRequest; + return proto.cosmos.staking.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryParamsRequest} + */ +proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_staking_v1beta1_staking_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.cosmos.staking.v1beta1.QueryParamsResponse} + */ +proto.cosmos.staking.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryParamsResponse; + return proto.cosmos.staking.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryParamsResponse} + */ +proto.cosmos.staking.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Params; + reader.readMessage(value,cosmos_staking_v1beta1_staking_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.cosmos.staking.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.staking.v1beta1.Params} + */ +proto.cosmos.staking.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Params|undefined} value + * @return {!proto.cosmos.staking.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.cosmos.staking.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/staking/v1beta1/staking_pb.js b/dist/src/types/proto-types/cosmos/staking/v1beta1/staking_pb.js new file mode 100644 index 00000000..4d99b2f7 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/staking/v1beta1/staking_pb.js @@ -0,0 +1,4840 @@ +// source: cosmos/staking/v1beta1/staking.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_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'); +goog.object.extend(proto, google_protobuf_timestamp_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 tendermint_types_types_pb = require('../../../tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_types_pb); +goog.exportSymbol('proto.cosmos.staking.v1beta1.BondStatus', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.Commission', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.CommissionRates', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.DVPair', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.DVPairs', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.DVVTriplet', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.DVVTriplets', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.Delegation', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.DelegationResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.Description', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.HistoricalInfo', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.Params', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.Pool', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.Redelegation', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.RedelegationEntry', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.RedelegationEntryResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.RedelegationResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.UnbondingDelegation', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.UnbondingDelegationEntry', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.ValAddresses', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.Validator', 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.staking.v1beta1.HistoricalInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.HistoricalInfo.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.HistoricalInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.HistoricalInfo.displayName = 'proto.cosmos.staking.v1beta1.HistoricalInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.CommissionRates = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.CommissionRates, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.CommissionRates.displayName = 'proto.cosmos.staking.v1beta1.CommissionRates'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.Commission = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.Commission, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.Commission.displayName = 'proto.cosmos.staking.v1beta1.Commission'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.Description = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.Description, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.Description.displayName = 'proto.cosmos.staking.v1beta1.Description'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.Validator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.Validator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.Validator.displayName = 'proto.cosmos.staking.v1beta1.Validator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.ValAddresses = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.ValAddresses.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.ValAddresses, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.ValAddresses.displayName = 'proto.cosmos.staking.v1beta1.ValAddresses'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.DVPair = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.DVPair, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.DVPair.displayName = 'proto.cosmos.staking.v1beta1.DVPair'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.DVPairs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.DVPairs.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.DVPairs, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.DVPairs.displayName = 'proto.cosmos.staking.v1beta1.DVPairs'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.DVVTriplet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.DVVTriplet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.DVVTriplet.displayName = 'proto.cosmos.staking.v1beta1.DVVTriplet'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.DVVTriplets = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.DVVTriplets.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.DVVTriplets, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.DVVTriplets.displayName = 'proto.cosmos.staking.v1beta1.DVVTriplets'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.Delegation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.Delegation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.Delegation.displayName = 'proto.cosmos.staking.v1beta1.Delegation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.UnbondingDelegation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.UnbondingDelegation.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.UnbondingDelegation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.UnbondingDelegation.displayName = 'proto.cosmos.staking.v1beta1.UnbondingDelegation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.UnbondingDelegationEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.UnbondingDelegationEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.displayName = 'proto.cosmos.staking.v1beta1.UnbondingDelegationEntry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.RedelegationEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.RedelegationEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.RedelegationEntry.displayName = 'proto.cosmos.staking.v1beta1.RedelegationEntry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.Redelegation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.Redelegation.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.Redelegation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.Redelegation.displayName = 'proto.cosmos.staking.v1beta1.Redelegation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.Params.displayName = 'proto.cosmos.staking.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.cosmos.staking.v1beta1.DelegationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.DelegationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.DelegationResponse.displayName = 'proto.cosmos.staking.v1beta1.DelegationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.RedelegationEntryResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.RedelegationEntryResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.RedelegationEntryResponse.displayName = 'proto.cosmos.staking.v1beta1.RedelegationEntryResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.RedelegationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.RedelegationResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.RedelegationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.RedelegationResponse.displayName = 'proto.cosmos.staking.v1beta1.RedelegationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.Pool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.Pool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.Pool.displayName = 'proto.cosmos.staking.v1beta1.Pool'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.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.staking.v1beta1.HistoricalInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.HistoricalInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.HistoricalInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.toObject = function(includeInstance, msg) { + var f, obj = { + header: (f = msg.getHeader()) && tendermint_types_types_pb.Header.toObject(includeInstance, f), + valsetList: jspb.Message.toObjectList(msg.getValsetList(), + proto.cosmos.staking.v1beta1.Validator.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.staking.v1beta1.HistoricalInfo} + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.HistoricalInfo; + return proto.cosmos.staking.v1beta1.HistoricalInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.HistoricalInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.HistoricalInfo} + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.Header; + reader.readMessage(value,tendermint_types_types_pb.Header.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 2: + var value = new proto.cosmos.staking.v1beta1.Validator; + reader.readMessage(value,proto.cosmos.staking.v1beta1.Validator.deserializeBinaryFromReader); + msg.addValset(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.HistoricalInfo.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.staking.v1beta1.HistoricalInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.Header.serializeBinaryToWriter + ); + } + f = message.getValsetList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.staking.v1beta1.Validator.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.types.Header header = 1; + * @return {?proto.tendermint.types.Header} + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.getHeader = function() { + return /** @type{?proto.tendermint.types.Header} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Header, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Header|undefined} value + * @return {!proto.cosmos.staking.v1beta1.HistoricalInfo} returns this +*/ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.HistoricalInfo} returns this + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.clearHeader = function() { + return this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.hasHeader = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Validator valset = 2; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.getValsetList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.staking.v1beta1.Validator, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.HistoricalInfo} returns this +*/ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.setValsetList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.Validator} + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.addValset = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.staking.v1beta1.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.HistoricalInfo} returns this + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.clearValsetList = function() { + return this.setValsetList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.staking.v1beta1.CommissionRates.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.CommissionRates.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.CommissionRates} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.CommissionRates.toObject = function(includeInstance, msg) { + var f, obj = { + rate: jspb.Message.getFieldWithDefault(msg, 1, ""), + maxRate: jspb.Message.getFieldWithDefault(msg, 2, ""), + maxChangeRate: 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.cosmos.staking.v1beta1.CommissionRates} + */ +proto.cosmos.staking.v1beta1.CommissionRates.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.CommissionRates; + return proto.cosmos.staking.v1beta1.CommissionRates.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.CommissionRates} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.CommissionRates} + */ +proto.cosmos.staking.v1beta1.CommissionRates.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.setRate(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMaxRate(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMaxChangeRate(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.CommissionRates.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.CommissionRates.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.staking.v1beta1.CommissionRates} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.CommissionRates.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRate(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMaxRate(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMaxChangeRate(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string rate = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.CommissionRates.prototype.getRate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.CommissionRates} returns this + */ +proto.cosmos.staking.v1beta1.CommissionRates.prototype.setRate = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string max_rate = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.CommissionRates.prototype.getMaxRate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.CommissionRates} returns this + */ +proto.cosmos.staking.v1beta1.CommissionRates.prototype.setMaxRate = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string max_change_rate = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.CommissionRates.prototype.getMaxChangeRate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.CommissionRates} returns this + */ +proto.cosmos.staking.v1beta1.CommissionRates.prototype.setMaxChangeRate = 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.cosmos.staking.v1beta1.Commission.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.Commission.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.Commission} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Commission.toObject = function(includeInstance, msg) { + var f, obj = { + commissionRates: (f = msg.getCommissionRates()) && proto.cosmos.staking.v1beta1.CommissionRates.toObject(includeInstance, f), + updateTime: (f = msg.getUpdateTime()) && 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.cosmos.staking.v1beta1.Commission} + */ +proto.cosmos.staking.v1beta1.Commission.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.Commission; + return proto.cosmos.staking.v1beta1.Commission.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.Commission} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.Commission} + */ +proto.cosmos.staking.v1beta1.Commission.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.staking.v1beta1.CommissionRates; + reader.readMessage(value,proto.cosmos.staking.v1beta1.CommissionRates.deserializeBinaryFromReader); + msg.setCommissionRates(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdateTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.Commission.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.Commission.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.staking.v1beta1.Commission} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Commission.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCommissionRates(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.staking.v1beta1.CommissionRates.serializeBinaryToWriter + ); + } + f = message.getUpdateTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional CommissionRates commission_rates = 1; + * @return {?proto.cosmos.staking.v1beta1.CommissionRates} + */ +proto.cosmos.staking.v1beta1.Commission.prototype.getCommissionRates = function() { + return /** @type{?proto.cosmos.staking.v1beta1.CommissionRates} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.staking.v1beta1.CommissionRates, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.CommissionRates|undefined} value + * @return {!proto.cosmos.staking.v1beta1.Commission} returns this +*/ +proto.cosmos.staking.v1beta1.Commission.prototype.setCommissionRates = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.Commission} returns this + */ +proto.cosmos.staking.v1beta1.Commission.prototype.clearCommissionRates = function() { + return this.setCommissionRates(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.Commission.prototype.hasCommissionRates = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Timestamp update_time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.staking.v1beta1.Commission.prototype.getUpdateTime = 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.staking.v1beta1.Commission} returns this +*/ +proto.cosmos.staking.v1beta1.Commission.prototype.setUpdateTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.Commission} returns this + */ +proto.cosmos.staking.v1beta1.Commission.prototype.clearUpdateTime = function() { + return this.setUpdateTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.Commission.prototype.hasUpdateTime = 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.staking.v1beta1.Description.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.Description.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.Description} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Description.toObject = function(includeInstance, msg) { + var f, obj = { + moniker: jspb.Message.getFieldWithDefault(msg, 1, ""), + identity: jspb.Message.getFieldWithDefault(msg, 2, ""), + website: jspb.Message.getFieldWithDefault(msg, 3, ""), + securityContact: jspb.Message.getFieldWithDefault(msg, 4, ""), + details: 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.cosmos.staking.v1beta1.Description} + */ +proto.cosmos.staking.v1beta1.Description.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.Description; + return proto.cosmos.staking.v1beta1.Description.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.Description} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.Description} + */ +proto.cosmos.staking.v1beta1.Description.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.setMoniker(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setIdentity(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setWebsite(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSecurityContact(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDetails(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.Description.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.Description.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.staking.v1beta1.Description} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Description.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMoniker(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIdentity(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getWebsite(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSecurityContact(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getDetails(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string moniker = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Description.prototype.getMoniker = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Description} returns this + */ +proto.cosmos.staking.v1beta1.Description.prototype.setMoniker = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string identity = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Description.prototype.getIdentity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Description} returns this + */ +proto.cosmos.staking.v1beta1.Description.prototype.setIdentity = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string website = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Description.prototype.getWebsite = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Description} returns this + */ +proto.cosmos.staking.v1beta1.Description.prototype.setWebsite = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string security_contact = 4; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Description.prototype.getSecurityContact = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Description} returns this + */ +proto.cosmos.staking.v1beta1.Description.prototype.setSecurityContact = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string details = 5; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Description.prototype.getDetails = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Description} returns this + */ +proto.cosmos.staking.v1beta1.Description.prototype.setDetails = 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.cosmos.staking.v1beta1.Validator.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.Validator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.Validator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Validator.toObject = function(includeInstance, msg) { + var f, obj = { + operatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + consensusPubkey: (f = msg.getConsensusPubkey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + jailed: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + status: jspb.Message.getFieldWithDefault(msg, 4, 0), + tokens: jspb.Message.getFieldWithDefault(msg, 5, ""), + delegatorShares: jspb.Message.getFieldWithDefault(msg, 6, ""), + description: (f = msg.getDescription()) && proto.cosmos.staking.v1beta1.Description.toObject(includeInstance, f), + unbondingHeight: jspb.Message.getFieldWithDefault(msg, 8, 0), + unbondingTime: (f = msg.getUnbondingTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + commission: (f = msg.getCommission()) && proto.cosmos.staking.v1beta1.Commission.toObject(includeInstance, f), + minSelfDelegation: jspb.Message.getFieldWithDefault(msg, 11, "") + }; + + 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.staking.v1beta1.Validator} + */ +proto.cosmos.staking.v1beta1.Validator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.Validator; + return proto.cosmos.staking.v1beta1.Validator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.Validator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.Validator} + */ +proto.cosmos.staking.v1beta1.Validator.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.setOperatorAddress(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setConsensusPubkey(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setJailed(value); + break; + case 4: + var value = /** @type {!proto.cosmos.staking.v1beta1.BondStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setTokens(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setDelegatorShares(value); + break; + case 7: + var value = new proto.cosmos.staking.v1beta1.Description; + reader.readMessage(value,proto.cosmos.staking.v1beta1.Description.deserializeBinaryFromReader); + msg.setDescription(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setUnbondingHeight(value); + break; + case 9: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUnbondingTime(value); + break; + case 10: + var value = new proto.cosmos.staking.v1beta1.Commission; + reader.readMessage(value,proto.cosmos.staking.v1beta1.Commission.deserializeBinaryFromReader); + msg.setCommission(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setMinSelfDelegation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.Validator.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.staking.v1beta1.Validator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Validator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOperatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConsensusPubkey(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getJailed(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getTokens(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getDelegatorShares(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getDescription(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.cosmos.staking.v1beta1.Description.serializeBinaryToWriter + ); + } + f = message.getUnbondingHeight(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getUnbondingTime(); + if (f != null) { + writer.writeMessage( + 9, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getCommission(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.cosmos.staking.v1beta1.Commission.serializeBinaryToWriter + ); + } + f = message.getMinSelfDelegation(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } +}; + + +/** + * optional string operator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getOperatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.setOperatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any consensus_pubkey = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getConsensusPubkey = 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.cosmos.staking.v1beta1.Validator} returns this +*/ +proto.cosmos.staking.v1beta1.Validator.prototype.setConsensusPubkey = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.clearConsensusPubkey = function() { + return this.setConsensusPubkey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.hasConsensusPubkey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool jailed = 3; + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getJailed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.setJailed = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional BondStatus status = 4; + * @return {!proto.cosmos.staking.v1beta1.BondStatus} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getStatus = function() { + return /** @type {!proto.cosmos.staking.v1beta1.BondStatus} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.BondStatus} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional string tokens = 5; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getTokens = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.setTokens = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string delegator_shares = 6; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getDelegatorShares = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.setDelegatorShares = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional Description description = 7; + * @return {?proto.cosmos.staking.v1beta1.Description} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getDescription = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Description} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.staking.v1beta1.Description, 7)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Description|undefined} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this +*/ +proto.cosmos.staking.v1beta1.Validator.prototype.setDescription = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.clearDescription = function() { + return this.setDescription(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.hasDescription = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional int64 unbonding_height = 8; + * @return {number} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getUnbondingHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.setUnbondingHeight = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional google.protobuf.Timestamp unbonding_time = 9; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getUnbondingTime = 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.cosmos.staking.v1beta1.Validator} returns this +*/ +proto.cosmos.staking.v1beta1.Validator.prototype.setUnbondingTime = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.clearUnbondingTime = function() { + return this.setUnbondingTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.hasUnbondingTime = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional Commission commission = 10; + * @return {?proto.cosmos.staking.v1beta1.Commission} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getCommission = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Commission} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.staking.v1beta1.Commission, 10)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Commission|undefined} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this +*/ +proto.cosmos.staking.v1beta1.Validator.prototype.setCommission = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.clearCommission = function() { + return this.setCommission(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.hasCommission = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional string min_self_delegation = 11; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getMinSelfDelegation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.setMinSelfDelegation = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.ValAddresses.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.staking.v1beta1.ValAddresses.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.ValAddresses.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.ValAddresses} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.ValAddresses.toObject = function(includeInstance, msg) { + var f, obj = { + addressesList: (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.staking.v1beta1.ValAddresses} + */ +proto.cosmos.staking.v1beta1.ValAddresses.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.ValAddresses; + return proto.cosmos.staking.v1beta1.ValAddresses.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.ValAddresses} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.ValAddresses} + */ +proto.cosmos.staking.v1beta1.ValAddresses.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.addAddresses(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.ValAddresses.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.ValAddresses.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.staking.v1beta1.ValAddresses} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.ValAddresses.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddressesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string addresses = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.ValAddresses.prototype.getAddressesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.ValAddresses} returns this + */ +proto.cosmos.staking.v1beta1.ValAddresses.prototype.setAddressesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.ValAddresses} returns this + */ +proto.cosmos.staking.v1beta1.ValAddresses.prototype.addAddresses = 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.staking.v1beta1.ValAddresses} returns this + */ +proto.cosmos.staking.v1beta1.ValAddresses.prototype.clearAddressesList = function() { + return this.setAddressesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.staking.v1beta1.DVPair.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.DVPair.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.DVPair} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DVPair.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: 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.staking.v1beta1.DVPair} + */ +proto.cosmos.staking.v1beta1.DVPair.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.DVPair; + return proto.cosmos.staking.v1beta1.DVPair.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.DVPair} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.DVPair} + */ +proto.cosmos.staking.v1beta1.DVPair.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.setDelegatorAddress(value); + break; + case 2: + 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.cosmos.staking.v1beta1.DVPair.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.DVPair.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.staking.v1beta1.DVPair} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DVPair.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.DVPair.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.DVPair} returns this + */ +proto.cosmos.staking.v1beta1.DVPair.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.DVPair.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.DVPair} returns this + */ +proto.cosmos.staking.v1beta1.DVPair.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.DVPairs.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.staking.v1beta1.DVPairs.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.DVPairs.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.DVPairs} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DVPairs.toObject = function(includeInstance, msg) { + var f, obj = { + pairsList: jspb.Message.toObjectList(msg.getPairsList(), + proto.cosmos.staking.v1beta1.DVPair.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.staking.v1beta1.DVPairs} + */ +proto.cosmos.staking.v1beta1.DVPairs.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.DVPairs; + return proto.cosmos.staking.v1beta1.DVPairs.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.DVPairs} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.DVPairs} + */ +proto.cosmos.staking.v1beta1.DVPairs.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.staking.v1beta1.DVPair; + reader.readMessage(value,proto.cosmos.staking.v1beta1.DVPair.deserializeBinaryFromReader); + msg.addPairs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.DVPairs.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.DVPairs.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.staking.v1beta1.DVPairs} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DVPairs.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPairsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.staking.v1beta1.DVPair.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DVPair pairs = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.DVPairs.prototype.getPairsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.staking.v1beta1.DVPair, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.DVPairs} returns this +*/ +proto.cosmos.staking.v1beta1.DVPairs.prototype.setPairsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.DVPair=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.DVPair} + */ +proto.cosmos.staking.v1beta1.DVPairs.prototype.addPairs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.DVPair, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.DVPairs} returns this + */ +proto.cosmos.staking.v1beta1.DVPairs.prototype.clearPairsList = function() { + return this.setPairsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.staking.v1beta1.DVVTriplet.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.DVVTriplet.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.DVVTriplet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DVVTriplet.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorSrcAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + validatorDstAddress: 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.cosmos.staking.v1beta1.DVVTriplet} + */ +proto.cosmos.staking.v1beta1.DVVTriplet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.DVVTriplet; + return proto.cosmos.staking.v1beta1.DVVTriplet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.DVVTriplet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.DVVTriplet} + */ +proto.cosmos.staking.v1beta1.DVVTriplet.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.setDelegatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorSrcAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorDstAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.DVVTriplet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.DVVTriplet.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.staking.v1beta1.DVVTriplet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DVVTriplet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorSrcAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getValidatorDstAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.DVVTriplet.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.DVVTriplet} returns this + */ +proto.cosmos.staking.v1beta1.DVVTriplet.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_src_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.DVVTriplet.prototype.getValidatorSrcAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.DVVTriplet} returns this + */ +proto.cosmos.staking.v1beta1.DVVTriplet.prototype.setValidatorSrcAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string validator_dst_address = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.DVVTriplet.prototype.getValidatorDstAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.DVVTriplet} returns this + */ +proto.cosmos.staking.v1beta1.DVVTriplet.prototype.setValidatorDstAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.DVVTriplets.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.staking.v1beta1.DVVTriplets.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.DVVTriplets.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.DVVTriplets} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DVVTriplets.toObject = function(includeInstance, msg) { + var f, obj = { + tripletsList: jspb.Message.toObjectList(msg.getTripletsList(), + proto.cosmos.staking.v1beta1.DVVTriplet.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.staking.v1beta1.DVVTriplets} + */ +proto.cosmos.staking.v1beta1.DVVTriplets.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.DVVTriplets; + return proto.cosmos.staking.v1beta1.DVVTriplets.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.DVVTriplets} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.DVVTriplets} + */ +proto.cosmos.staking.v1beta1.DVVTriplets.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.staking.v1beta1.DVVTriplet; + reader.readMessage(value,proto.cosmos.staking.v1beta1.DVVTriplet.deserializeBinaryFromReader); + msg.addTriplets(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.DVVTriplets.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.DVVTriplets.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.staking.v1beta1.DVVTriplets} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DVVTriplets.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTripletsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.staking.v1beta1.DVVTriplet.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DVVTriplet triplets = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.DVVTriplets.prototype.getTripletsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.staking.v1beta1.DVVTriplet, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.DVVTriplets} returns this +*/ +proto.cosmos.staking.v1beta1.DVVTriplets.prototype.setTripletsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.DVVTriplet=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.DVVTriplet} + */ +proto.cosmos.staking.v1beta1.DVVTriplets.prototype.addTriplets = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.DVVTriplet, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.DVVTriplets} returns this + */ +proto.cosmos.staking.v1beta1.DVVTriplets.prototype.clearTripletsList = function() { + return this.setTripletsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.staking.v1beta1.Delegation.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.Delegation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.Delegation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Delegation.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + shares: 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.cosmos.staking.v1beta1.Delegation} + */ +proto.cosmos.staking.v1beta1.Delegation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.Delegation; + return proto.cosmos.staking.v1beta1.Delegation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.Delegation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.Delegation} + */ +proto.cosmos.staking.v1beta1.Delegation.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.setDelegatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setShares(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.Delegation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.Delegation.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.staking.v1beta1.Delegation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Delegation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getShares(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Delegation.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Delegation} returns this + */ +proto.cosmos.staking.v1beta1.Delegation.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Delegation.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Delegation} returns this + */ +proto.cosmos.staking.v1beta1.Delegation.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string shares = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Delegation.prototype.getShares = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Delegation} returns this + */ +proto.cosmos.staking.v1beta1.Delegation.prototype.setShares = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.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.staking.v1beta1.UnbondingDelegation.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.UnbondingDelegation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.UnbondingDelegation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.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.staking.v1beta1.UnbondingDelegation} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.UnbondingDelegation; + return proto.cosmos.staking.v1beta1.UnbondingDelegation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.UnbondingDelegation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegation} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.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.setDelegatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + case 3: + var value = new proto.cosmos.staking.v1beta1.UnbondingDelegationEntry; + reader.readMessage(value,proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.UnbondingDelegation.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.staking.v1beta1.UnbondingDelegation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegation} returns this + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegation} returns this + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated UnbondingDelegationEntry entries = 3; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.staking.v1beta1.UnbondingDelegationEntry, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegation} returns this +*/ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.UnbondingDelegationEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegationEntry} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.staking.v1beta1.UnbondingDelegationEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegation} returns this + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.staking.v1beta1.UnbondingDelegationEntry.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.UnbondingDelegationEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.toObject = function(includeInstance, msg) { + var f, obj = { + creationHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + completionTime: (f = msg.getCompletionTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + initialBalance: jspb.Message.getFieldWithDefault(msg, 3, ""), + balance: 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.cosmos.staking.v1beta1.UnbondingDelegationEntry} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.UnbondingDelegationEntry; + return proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.UnbondingDelegationEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegationEntry} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.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.setCreationHeight(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCompletionTime(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setInitialBalance(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setBalance(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.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.staking.v1beta1.UnbondingDelegationEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCreationHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getCompletionTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getInitialBalance(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getBalance(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional int64 creation_height = 1; + * @return {number} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.getCreationHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegationEntry} returns this + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.setCreationHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp completion_time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.getCompletionTime = 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.staking.v1beta1.UnbondingDelegationEntry} returns this +*/ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.setCompletionTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegationEntry} returns this + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.clearCompletionTime = function() { + return this.setCompletionTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.hasCompletionTime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string initial_balance = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.getInitialBalance = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegationEntry} returns this + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.setInitialBalance = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string balance = 4; + * @return {string} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.getBalance = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegationEntry} returns this + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.setBalance = 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.cosmos.staking.v1beta1.RedelegationEntry.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.RedelegationEntry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.RedelegationEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.toObject = function(includeInstance, msg) { + var f, obj = { + creationHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + completionTime: (f = msg.getCompletionTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + initialBalance: jspb.Message.getFieldWithDefault(msg, 3, ""), + sharesDst: 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.cosmos.staking.v1beta1.RedelegationEntry} + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.RedelegationEntry; + return proto.cosmos.staking.v1beta1.RedelegationEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.RedelegationEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntry} + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.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.setCreationHeight(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCompletionTime(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setInitialBalance(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSharesDst(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.RedelegationEntry.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.staking.v1beta1.RedelegationEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCreationHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getCompletionTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getInitialBalance(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSharesDst(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional int64 creation_height = 1; + * @return {number} + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.getCreationHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntry} returns this + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.setCreationHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp completion_time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.getCompletionTime = 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.staking.v1beta1.RedelegationEntry} returns this +*/ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.setCompletionTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntry} returns this + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.clearCompletionTime = function() { + return this.setCompletionTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.hasCompletionTime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string initial_balance = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.getInitialBalance = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntry} returns this + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.setInitialBalance = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string shares_dst = 4; + * @return {string} + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.getSharesDst = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntry} returns this + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.setSharesDst = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.Redelegation.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.cosmos.staking.v1beta1.Redelegation.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.Redelegation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.Redelegation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Redelegation.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorSrcAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + validatorDstAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.cosmos.staking.v1beta1.RedelegationEntry.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.staking.v1beta1.Redelegation} + */ +proto.cosmos.staking.v1beta1.Redelegation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.Redelegation; + return proto.cosmos.staking.v1beta1.Redelegation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.Redelegation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.Redelegation} + */ +proto.cosmos.staking.v1beta1.Redelegation.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.setDelegatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorSrcAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorDstAddress(value); + break; + case 4: + var value = new proto.cosmos.staking.v1beta1.RedelegationEntry; + reader.readMessage(value,proto.cosmos.staking.v1beta1.RedelegationEntry.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.Redelegation.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.staking.v1beta1.Redelegation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Redelegation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorSrcAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getValidatorDstAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.cosmos.staking.v1beta1.RedelegationEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Redelegation} returns this + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_src_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.getValidatorSrcAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Redelegation} returns this + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.setValidatorSrcAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string validator_dst_address = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.getValidatorDstAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Redelegation} returns this + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.setValidatorDstAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated RedelegationEntry entries = 4; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.staking.v1beta1.RedelegationEntry, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.Redelegation} returns this +*/ +proto.cosmos.staking.v1beta1.Redelegation.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.RedelegationEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntry} + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.staking.v1beta1.RedelegationEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.Redelegation} returns this + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.staking.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.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.cosmos.staking.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + unbondingTime: (f = msg.getUnbondingTime()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + maxValidators: jspb.Message.getFieldWithDefault(msg, 2, 0), + maxEntries: jspb.Message.getFieldWithDefault(msg, 3, 0), + historicalEntries: jspb.Message.getFieldWithDefault(msg, 4, 0), + bondDenom: 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.cosmos.staking.v1beta1.Params} + */ +proto.cosmos.staking.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.Params; + return proto.cosmos.staking.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.Params} + */ +proto.cosmos.staking.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.setUnbondingTime(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxValidators(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxEntries(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setHistoricalEntries(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setBondDenom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.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.cosmos.staking.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUnbondingTime(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getMaxValidators(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getMaxEntries(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getHistoricalEntries(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getBondDenom(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional google.protobuf.Duration unbonding_time = 1; + * @return {?proto.google.protobuf.Duration} + */ +proto.cosmos.staking.v1beta1.Params.prototype.getUnbondingTime = 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.cosmos.staking.v1beta1.Params} returns this +*/ +proto.cosmos.staking.v1beta1.Params.prototype.setUnbondingTime = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.Params} returns this + */ +proto.cosmos.staking.v1beta1.Params.prototype.clearUnbondingTime = function() { + return this.setUnbondingTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.Params.prototype.hasUnbondingTime = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint32 max_validators = 2; + * @return {number} + */ +proto.cosmos.staking.v1beta1.Params.prototype.getMaxValidators = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.staking.v1beta1.Params} returns this + */ +proto.cosmos.staking.v1beta1.Params.prototype.setMaxValidators = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 max_entries = 3; + * @return {number} + */ +proto.cosmos.staking.v1beta1.Params.prototype.getMaxEntries = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.staking.v1beta1.Params} returns this + */ +proto.cosmos.staking.v1beta1.Params.prototype.setMaxEntries = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint32 historical_entries = 4; + * @return {number} + */ +proto.cosmos.staking.v1beta1.Params.prototype.getHistoricalEntries = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.staking.v1beta1.Params} returns this + */ +proto.cosmos.staking.v1beta1.Params.prototype.setHistoricalEntries = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string bond_denom = 5; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Params.prototype.getBondDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Params} returns this + */ +proto.cosmos.staking.v1beta1.Params.prototype.setBondDenom = 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.cosmos.staking.v1beta1.DelegationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.DelegationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.DelegationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DelegationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + delegation: (f = msg.getDelegation()) && proto.cosmos.staking.v1beta1.Delegation.toObject(includeInstance, f), + 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.staking.v1beta1.DelegationResponse} + */ +proto.cosmos.staking.v1beta1.DelegationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.DelegationResponse; + return proto.cosmos.staking.v1beta1.DelegationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.DelegationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.DelegationResponse} + */ +proto.cosmos.staking.v1beta1.DelegationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.staking.v1beta1.Delegation; + reader.readMessage(value,proto.cosmos.staking.v1beta1.Delegation.deserializeBinaryFromReader); + msg.setDelegation(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.staking.v1beta1.DelegationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.DelegationResponse.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.staking.v1beta1.DelegationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DelegationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegation(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.staking.v1beta1.Delegation.serializeBinaryToWriter + ); + } + f = message.getBalance(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Delegation delegation = 1; + * @return {?proto.cosmos.staking.v1beta1.Delegation} + */ +proto.cosmos.staking.v1beta1.DelegationResponse.prototype.getDelegation = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Delegation} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.staking.v1beta1.Delegation, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Delegation|undefined} value + * @return {!proto.cosmos.staking.v1beta1.DelegationResponse} returns this +*/ +proto.cosmos.staking.v1beta1.DelegationResponse.prototype.setDelegation = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.DelegationResponse} returns this + */ +proto.cosmos.staking.v1beta1.DelegationResponse.prototype.clearDelegation = function() { + return this.setDelegation(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.DelegationResponse.prototype.hasDelegation = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional cosmos.base.v1beta1.Coin balance = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.staking.v1beta1.DelegationResponse.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.staking.v1beta1.DelegationResponse} returns this +*/ +proto.cosmos.staking.v1beta1.DelegationResponse.prototype.setBalance = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.DelegationResponse} returns this + */ +proto.cosmos.staking.v1beta1.DelegationResponse.prototype.clearBalance = function() { + return this.setBalance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.DelegationResponse.prototype.hasBalance = 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.staking.v1beta1.RedelegationEntryResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.RedelegationEntryResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.RedelegationEntryResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.toObject = function(includeInstance, msg) { + var f, obj = { + redelegationEntry: (f = msg.getRedelegationEntry()) && proto.cosmos.staking.v1beta1.RedelegationEntry.toObject(includeInstance, f), + balance: 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.cosmos.staking.v1beta1.RedelegationEntryResponse} + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.RedelegationEntryResponse; + return proto.cosmos.staking.v1beta1.RedelegationEntryResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.RedelegationEntryResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntryResponse} + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.staking.v1beta1.RedelegationEntry; + reader.readMessage(value,proto.cosmos.staking.v1beta1.RedelegationEntry.deserializeBinaryFromReader); + msg.setRedelegationEntry(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setBalance(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.RedelegationEntryResponse.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.staking.v1beta1.RedelegationEntryResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRedelegationEntry(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.staking.v1beta1.RedelegationEntry.serializeBinaryToWriter + ); + } + f = message.getBalance(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional RedelegationEntry redelegation_entry = 1; + * @return {?proto.cosmos.staking.v1beta1.RedelegationEntry} + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.prototype.getRedelegationEntry = function() { + return /** @type{?proto.cosmos.staking.v1beta1.RedelegationEntry} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.staking.v1beta1.RedelegationEntry, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.RedelegationEntry|undefined} value + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntryResponse} returns this +*/ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.prototype.setRedelegationEntry = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntryResponse} returns this + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.prototype.clearRedelegationEntry = function() { + return this.setRedelegationEntry(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.prototype.hasRedelegationEntry = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string balance = 4; + * @return {string} + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.prototype.getBalance = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntryResponse} returns this + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.prototype.setBalance = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.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.staking.v1beta1.RedelegationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.RedelegationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.RedelegationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + redelegation: (f = msg.getRedelegation()) && proto.cosmos.staking.v1beta1.Redelegation.toObject(includeInstance, f), + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.cosmos.staking.v1beta1.RedelegationEntryResponse.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.staking.v1beta1.RedelegationResponse} + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.RedelegationResponse; + return proto.cosmos.staking.v1beta1.RedelegationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.RedelegationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.RedelegationResponse} + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.staking.v1beta1.Redelegation; + reader.readMessage(value,proto.cosmos.staking.v1beta1.Redelegation.deserializeBinaryFromReader); + msg.setRedelegation(value); + break; + case 2: + var value = new proto.cosmos.staking.v1beta1.RedelegationEntryResponse; + reader.readMessage(value,proto.cosmos.staking.v1beta1.RedelegationEntryResponse.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.RedelegationResponse.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.staking.v1beta1.RedelegationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRedelegation(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.staking.v1beta1.Redelegation.serializeBinaryToWriter + ); + } + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.staking.v1beta1.RedelegationEntryResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Redelegation redelegation = 1; + * @return {?proto.cosmos.staking.v1beta1.Redelegation} + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.getRedelegation = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Redelegation} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.staking.v1beta1.Redelegation, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Redelegation|undefined} value + * @return {!proto.cosmos.staking.v1beta1.RedelegationResponse} returns this +*/ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.setRedelegation = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.RedelegationResponse} returns this + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.clearRedelegation = function() { + return this.setRedelegation(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.hasRedelegation = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated RedelegationEntryResponse entries = 2; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.staking.v1beta1.RedelegationEntryResponse, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.RedelegationResponse} returns this +*/ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.RedelegationEntryResponse=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntryResponse} + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.staking.v1beta1.RedelegationEntryResponse, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.RedelegationResponse} returns this + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.staking.v1beta1.Pool.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.Pool.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.Pool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Pool.toObject = function(includeInstance, msg) { + var f, obj = { + notBondedTokens: jspb.Message.getFieldWithDefault(msg, 1, ""), + bondedTokens: 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.staking.v1beta1.Pool} + */ +proto.cosmos.staking.v1beta1.Pool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.Pool; + return proto.cosmos.staking.v1beta1.Pool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.Pool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.Pool} + */ +proto.cosmos.staking.v1beta1.Pool.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.setNotBondedTokens(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBondedTokens(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.Pool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.Pool.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.staking.v1beta1.Pool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Pool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNotBondedTokens(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBondedTokens(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string not_bonded_tokens = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Pool.prototype.getNotBondedTokens = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Pool} returns this + */ +proto.cosmos.staking.v1beta1.Pool.prototype.setNotBondedTokens = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bonded_tokens = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Pool.prototype.getBondedTokens = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Pool} returns this + */ +proto.cosmos.staking.v1beta1.Pool.prototype.setBondedTokens = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * @enum {number} + */ +proto.cosmos.staking.v1beta1.BondStatus = { + BOND_STATUS_UNSPECIFIED: 0, + BOND_STATUS_UNBONDED: 1, + BOND_STATUS_UNBONDING: 2, + BOND_STATUS_BONDED: 3 +}; + +goog.object.extend(exports, proto.cosmos.staking.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/staking/v1beta1/tx_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/staking/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..6ade61fe --- /dev/null +++ b/dist/src/types/proto-types/cosmos/staking/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,488 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.staking.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_staking_v1beta1_staking_pb = require('../../../cosmos/staking/v1beta1/staking_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.staking = {}; +proto.cosmos.staking.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.staking.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.staking.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.MsgCreateValidator, + * !proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse>} + */ +const methodDescriptor_Msg_CreateValidator = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Msg/CreateValidator', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.MsgCreateValidator, + proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgCreateValidator} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.MsgCreateValidator, + * !proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse>} + */ +const methodInfo_Msg_CreateValidator = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgCreateValidator} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgCreateValidator} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.MsgClient.prototype.createValidator = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/CreateValidator', + request, + metadata || {}, + methodDescriptor_Msg_CreateValidator, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgCreateValidator} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.MsgPromiseClient.prototype.createValidator = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/CreateValidator', + request, + metadata || {}, + methodDescriptor_Msg_CreateValidator); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.MsgEditValidator, + * !proto.cosmos.staking.v1beta1.MsgEditValidatorResponse>} + */ +const methodDescriptor_Msg_EditValidator = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Msg/EditValidator', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.MsgEditValidator, + proto.cosmos.staking.v1beta1.MsgEditValidatorResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgEditValidator} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.MsgEditValidator, + * !proto.cosmos.staking.v1beta1.MsgEditValidatorResponse>} + */ +const methodInfo_Msg_EditValidator = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.MsgEditValidatorResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgEditValidator} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgEditValidator} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.MsgEditValidatorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.MsgClient.prototype.editValidator = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/EditValidator', + request, + metadata || {}, + methodDescriptor_Msg_EditValidator, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgEditValidator} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.MsgPromiseClient.prototype.editValidator = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/EditValidator', + request, + metadata || {}, + methodDescriptor_Msg_EditValidator); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.MsgDelegate, + * !proto.cosmos.staking.v1beta1.MsgDelegateResponse>} + */ +const methodDescriptor_Msg_Delegate = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Msg/Delegate', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.MsgDelegate, + proto.cosmos.staking.v1beta1.MsgDelegateResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgDelegate} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgDelegateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.MsgDelegate, + * !proto.cosmos.staking.v1beta1.MsgDelegateResponse>} + */ +const methodInfo_Msg_Delegate = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.MsgDelegateResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgDelegate} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgDelegateResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgDelegate} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.MsgDelegateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.MsgClient.prototype.delegate = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/Delegate', + request, + metadata || {}, + methodDescriptor_Msg_Delegate, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgDelegate} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.MsgPromiseClient.prototype.delegate = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/Delegate', + request, + metadata || {}, + methodDescriptor_Msg_Delegate); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.MsgBeginRedelegate, + * !proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse>} + */ +const methodDescriptor_Msg_BeginRedelegate = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Msg/BeginRedelegate', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.MsgBeginRedelegate, + proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.MsgBeginRedelegate, + * !proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse>} + */ +const methodInfo_Msg_BeginRedelegate = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.MsgClient.prototype.beginRedelegate = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/BeginRedelegate', + request, + metadata || {}, + methodDescriptor_Msg_BeginRedelegate, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.MsgPromiseClient.prototype.beginRedelegate = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/BeginRedelegate', + request, + metadata || {}, + methodDescriptor_Msg_BeginRedelegate); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.MsgUndelegate, + * !proto.cosmos.staking.v1beta1.MsgUndelegateResponse>} + */ +const methodDescriptor_Msg_Undelegate = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Msg/Undelegate', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.MsgUndelegate, + proto.cosmos.staking.v1beta1.MsgUndelegateResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgUndelegate} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgUndelegateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.MsgUndelegate, + * !proto.cosmos.staking.v1beta1.MsgUndelegateResponse>} + */ +const methodInfo_Msg_Undelegate = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.MsgUndelegateResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgUndelegate} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgUndelegateResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgUndelegate} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.MsgUndelegateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.MsgClient.prototype.undelegate = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/Undelegate', + request, + metadata || {}, + methodDescriptor_Msg_Undelegate, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgUndelegate} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.MsgPromiseClient.prototype.undelegate = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/Undelegate', + request, + metadata || {}, + methodDescriptor_Msg_Undelegate); +}; + + +module.exports = proto.cosmos.staking.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/staking/v1beta1/tx_pb.js b/dist/src/types/proto-types/cosmos/staking/v1beta1/tx_pb.js new file mode 100644 index 00000000..65d0cb27 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/staking/v1beta1/tx_pb.js @@ -0,0 +1,2150 @@ +// source: cosmos/staking/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 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_staking_v1beta1_staking_pb = require('../../../cosmos/staking/v1beta1/staking_pb.js'); +goog.object.extend(proto, cosmos_staking_v1beta1_staking_pb); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgBeginRedelegate', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgCreateValidator', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgDelegate', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgDelegateResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgEditValidator', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgEditValidatorResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgUndelegate', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgUndelegateResponse', 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.staking.v1beta1.MsgCreateValidator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgCreateValidator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgCreateValidator.displayName = 'proto.cosmos.staking.v1beta1.MsgCreateValidator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgCreateValidatorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.displayName = 'proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgEditValidator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgEditValidator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgEditValidator.displayName = 'proto.cosmos.staking.v1beta1.MsgEditValidator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgEditValidatorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgEditValidatorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.displayName = 'proto.cosmos.staking.v1beta1.MsgEditValidatorResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgDelegate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgDelegate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgDelegate.displayName = 'proto.cosmos.staking.v1beta1.MsgDelegate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgDelegateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgDelegateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgDelegateResponse.displayName = 'proto.cosmos.staking.v1beta1.MsgDelegateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgBeginRedelegate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgBeginRedelegate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgBeginRedelegate.displayName = 'proto.cosmos.staking.v1beta1.MsgBeginRedelegate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgBeginRedelegateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.displayName = 'proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgUndelegate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgUndelegate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgUndelegate.displayName = 'proto.cosmos.staking.v1beta1.MsgUndelegate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgUndelegateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgUndelegateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgUndelegateResponse.displayName = 'proto.cosmos.staking.v1beta1.MsgUndelegateResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.staking.v1beta1.MsgCreateValidator.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgCreateValidator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgCreateValidator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.toObject = function(includeInstance, msg) { + var f, obj = { + description: (f = msg.getDescription()) && cosmos_staking_v1beta1_staking_pb.Description.toObject(includeInstance, f), + commission: (f = msg.getCommission()) && cosmos_staking_v1beta1_staking_pb.CommissionRates.toObject(includeInstance, f), + minSelfDelegation: jspb.Message.getFieldWithDefault(msg, 3, ""), + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 4, ""), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), + pubkey: (f = msg.getPubkey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + value: (f = msg.getValue()) && 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.staking.v1beta1.MsgCreateValidator} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgCreateValidator; + return proto.cosmos.staking.v1beta1.MsgCreateValidator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgCreateValidator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Description; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Description.deserializeBinaryFromReader); + msg.setDescription(value); + break; + case 2: + var value = new cosmos_staking_v1beta1_staking_pb.CommissionRates; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.CommissionRates.deserializeBinaryFromReader); + msg.setCommission(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMinSelfDelegation(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setDelegatorAddress(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + case 6: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setPubkey(value); + break; + case 7: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgCreateValidator.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.staking.v1beta1.MsgCreateValidator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDescription(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Description.serializeBinaryToWriter + ); + } + f = message.getCommission(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_staking_v1beta1_staking_pb.CommissionRates.serializeBinaryToWriter + ); + } + f = message.getMinSelfDelegation(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getPubkey(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getValue(); + if (f != null) { + writer.writeMessage( + 7, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Description description = 1; + * @return {?proto.cosmos.staking.v1beta1.Description} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.getDescription = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Description} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.Description, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Description|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this +*/ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.setDescription = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.clearDescription = function() { + return this.setDescription(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.hasDescription = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional CommissionRates commission = 2; + * @return {?proto.cosmos.staking.v1beta1.CommissionRates} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.getCommission = function() { + return /** @type{?proto.cosmos.staking.v1beta1.CommissionRates} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.CommissionRates, 2)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.CommissionRates|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this +*/ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.setCommission = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.clearCommission = function() { + return this.setCommission(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.hasCommission = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string min_self_delegation = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.getMinSelfDelegation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.setMinSelfDelegation = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string delegator_address = 4; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string validator_address = 5; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional google.protobuf.Any pubkey = 6; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.getPubkey = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this +*/ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.setPubkey = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.clearPubkey = function() { + return this.setPubkey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.hasPubkey = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional cosmos.base.v1beta1.Coin value = 7; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.getValue = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 7)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this +*/ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.setValue = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.clearValue = function() { + return this.setValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.hasValue = function() { + return jspb.Message.getField(this, 7) != 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.staking.v1beta1.MsgCreateValidatorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgCreateValidatorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.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.staking.v1beta1.MsgCreateValidatorResponse} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse; + return proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.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.staking.v1beta1.MsgCreateValidatorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.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.staking.v1beta1.MsgCreateValidatorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.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.staking.v1beta1.MsgEditValidator.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgEditValidator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgEditValidator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.toObject = function(includeInstance, msg) { + var f, obj = { + description: (f = msg.getDescription()) && cosmos_staking_v1beta1_staking_pb.Description.toObject(includeInstance, f), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + commissionRate: jspb.Message.getFieldWithDefault(msg, 3, ""), + minSelfDelegation: 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.cosmos.staking.v1beta1.MsgEditValidator} + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgEditValidator; + return proto.cosmos.staking.v1beta1.MsgEditValidator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgEditValidator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgEditValidator} + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Description; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Description.deserializeBinaryFromReader); + msg.setDescription(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setCommissionRate(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMinSelfDelegation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgEditValidator.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.staking.v1beta1.MsgEditValidator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDescription(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Description.serializeBinaryToWriter + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCommissionRate(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMinSelfDelegation(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional Description description = 1; + * @return {?proto.cosmos.staking.v1beta1.Description} + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.getDescription = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Description} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.Description, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Description|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgEditValidator} returns this +*/ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.setDescription = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgEditValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.clearDescription = function() { + return this.setDescription(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.hasDescription = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgEditValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string commission_rate = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.getCommissionRate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgEditValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.setCommissionRate = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string min_self_delegation = 4; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.getMinSelfDelegation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgEditValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.setMinSelfDelegation = 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.cosmos.staking.v1beta1.MsgEditValidatorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgEditValidatorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.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.staking.v1beta1.MsgEditValidatorResponse} + */ +proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgEditValidatorResponse; + return proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgEditValidatorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgEditValidatorResponse} + */ +proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.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.staking.v1beta1.MsgEditValidatorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.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.staking.v1beta1.MsgEditValidatorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.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.staking.v1beta1.MsgDelegate.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgDelegate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgDelegate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgDelegate.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + 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.cosmos.staking.v1beta1.MsgDelegate} + */ +proto.cosmos.staking.v1beta1.MsgDelegate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgDelegate; + return proto.cosmos.staking.v1beta1.MsgDelegate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgDelegate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgDelegate} + */ +proto.cosmos.staking.v1beta1.MsgDelegate.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.setDelegatorAddress(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.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgDelegate.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.staking.v1beta1.MsgDelegate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgDelegate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgDelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgDelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin amount = 3; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.getAmount = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgDelegate} returns this +*/ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.setAmount = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgDelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.hasAmount = 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.staking.v1beta1.MsgDelegateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgDelegateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgDelegateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgDelegateResponse.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.staking.v1beta1.MsgDelegateResponse} + */ +proto.cosmos.staking.v1beta1.MsgDelegateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgDelegateResponse; + return proto.cosmos.staking.v1beta1.MsgDelegateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgDelegateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgDelegateResponse} + */ +proto.cosmos.staking.v1beta1.MsgDelegateResponse.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.staking.v1beta1.MsgDelegateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgDelegateResponse.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.staking.v1beta1.MsgDelegateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgDelegateResponse.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.staking.v1beta1.MsgBeginRedelegate.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgBeginRedelegate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgBeginRedelegate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorSrcAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + validatorDstAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + 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.cosmos.staking.v1beta1.MsgBeginRedelegate} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgBeginRedelegate; + return proto.cosmos.staking.v1beta1.MsgBeginRedelegate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.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.setDelegatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorSrcAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorDstAddress(value); + break; + case 4: + 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.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgBeginRedelegate.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.staking.v1beta1.MsgBeginRedelegate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorSrcAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getValidatorDstAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAmount(); + if (f != null) { + writer.writeMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_src_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.getValidatorSrcAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.setValidatorSrcAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string validator_dst_address = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.getValidatorDstAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.setValidatorDstAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin amount = 4; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.getAmount = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} returns this +*/ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.setAmount = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.hasAmount = 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.staking.v1beta1.MsgBeginRedelegateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgBeginRedelegateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + completionTime: (f = msg.getCompletionTime()) && 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.cosmos.staking.v1beta1.MsgBeginRedelegateResponse} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse; + return proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCompletionTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.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.staking.v1beta1.MsgBeginRedelegateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCompletionTime(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Timestamp completion_time = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.prototype.getCompletionTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse} returns this +*/ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.prototype.setCompletionTime = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse} returns this + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.prototype.clearCompletionTime = function() { + return this.setCompletionTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.prototype.hasCompletionTime = 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.staking.v1beta1.MsgUndelegate.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgUndelegate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgUndelegate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + 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.cosmos.staking.v1beta1.MsgUndelegate} + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgUndelegate; + return proto.cosmos.staking.v1beta1.MsgUndelegate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgUndelegate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegate} + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.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.setDelegatorAddress(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.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgUndelegate.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.staking.v1beta1.MsgUndelegate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin amount = 3; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.getAmount = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegate} returns this +*/ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.setAmount = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.hasAmount = 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.staking.v1beta1.MsgUndelegateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgUndelegateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgUndelegateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + completionTime: (f = msg.getCompletionTime()) && 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.cosmos.staking.v1beta1.MsgUndelegateResponse} + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgUndelegateResponse; + return proto.cosmos.staking.v1beta1.MsgUndelegateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgUndelegateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegateResponse} + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCompletionTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgUndelegateResponse.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.staking.v1beta1.MsgUndelegateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCompletionTime(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Timestamp completion_time = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.prototype.getCompletionTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegateResponse} returns this +*/ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.prototype.setCompletionTime = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegateResponse} returns this + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.prototype.clearCompletionTime = function() { + return this.setCompletionTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.prototype.hasCompletionTime = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.cosmos.staking.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/tx/signing/v1beta1/signing_pb.js b/dist/src/types/proto-types/cosmos/tx/signing/v1beta1/signing_pb.js new file mode 100644 index 00000000..e0ddaaf8 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/tx/signing/v1beta1/signing_pb.js @@ -0,0 +1,1156 @@ +// source: cosmos/tx/signing/v1beta1/signing.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var cosmos_crypto_multisig_v1beta1_multisig_pb = require('../../../../cosmos/crypto/multisig/v1beta1/multisig_pb.js'); +goog.object.extend(proto, cosmos_crypto_multisig_v1beta1_multisig_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.tx.signing.v1beta1.SignMode', null, global); +goog.exportSymbol('proto.cosmos.tx.signing.v1beta1.SignatureDescriptor', null, global); +goog.exportSymbol('proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data', null, global); +goog.exportSymbol('proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi', null, global); +goog.exportSymbol('proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single', null, global); +goog.exportSymbol('proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.SumCase', null, global); +goog.exportSymbol('proto.cosmos.tx.signing.v1beta1.SignatureDescriptors', 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.tx.signing.v1beta1.SignatureDescriptors = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.signing.v1beta1.SignatureDescriptors, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.displayName = 'proto.cosmos.tx.signing.v1beta1.SignatureDescriptors'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.signing.v1beta1.SignatureDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.signing.v1beta1.SignatureDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.displayName = 'proto.cosmos.tx.signing.v1beta1.SignatureDescriptor'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.signing.v1beta1.SignatureDescriptor.Data = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.oneofGroups_); +}; +goog.inherits(proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.displayName = 'proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.signing.v1beta1.SignatureDescriptor.Data.Single = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.displayName = 'proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.signing.v1beta1.SignatureDescriptor.Data.Multi = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.displayName = 'proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.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.tx.signing.v1beta1.SignatureDescriptors.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.signing.v1beta1.SignatureDescriptors} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.toObject = function(includeInstance, msg) { + var f, obj = { + signaturesList: jspb.Message.toObjectList(msg.getSignaturesList(), + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.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.tx.signing.v1beta1.SignatureDescriptors} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptors; + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptors} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptors} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor; + reader.readMessage(value,proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.deserializeBinaryFromReader); + msg.addSignatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.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.tx.signing.v1beta1.SignatureDescriptors} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignaturesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated SignatureDescriptor signatures = 1; + * @return {!Array} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.prototype.getSignaturesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptors} returns this +*/ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.prototype.setSignaturesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.prototype.addSignatures = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptors} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.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.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.signing.v1beta1.SignatureDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + publicKey: (f = msg.getPublicKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + data: (f = msg.getData()) && proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.toObject(includeInstance, f), + sequence: 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.tx.signing.v1beta1.SignatureDescriptor} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor; + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.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 = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data; + reader.readMessage(value,proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.deserializeBinaryFromReader); + msg.setData(value); + break; + case 3: + 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.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.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.tx.signing.v1beta1.SignatureDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.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.getData(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.serializeBinaryToWriter + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + + +/** + * 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.tx.signing.v1beta1.SignatureDescriptor.Data.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.SumCase = { + SUM_NOT_SET: 0, + SINGLE: 1, + MULTI: 2 +}; + +/** + * @return {proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.SumCase} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.getSumCase = function() { + return /** @type {proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.SumCase} */(jspb.Message.computeOneofCase(this, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.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.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.signing.v1beta1.SignatureDescriptor.Data} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.toObject = function(includeInstance, msg) { + var f, obj = { + single: (f = msg.getSingle()) && proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.toObject(includeInstance, f), + multi: (f = msg.getMulti()) && proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.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.tx.signing.v1beta1.SignatureDescriptor.Data} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data; + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single; + reader.readMessage(value,proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.deserializeBinaryFromReader); + msg.setSingle(value); + break; + case 2: + var value = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi; + reader.readMessage(value,proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.deserializeBinaryFromReader); + msg.setMulti(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.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.tx.signing.v1beta1.SignatureDescriptor.Data} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSingle(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.serializeBinaryToWriter + ); + } + f = message.getMulti(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.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.tx.signing.v1beta1.SignatureDescriptor.Data.Single.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.signing.v1beta1.SignatureDescriptor.Data.Single} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.toObject = function(includeInstance, msg) { + var f, obj = { + mode: jspb.Message.getFieldWithDefault(msg, 1, 0), + 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.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single; + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cosmos.tx.signing.v1beta1.SignMode} */ (reader.readEnum()); + msg.setMode(value); + break; + case 2: + 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.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.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.tx.signing.v1beta1.SignatureDescriptor.Data.Single} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMode(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional SignMode mode = 1; + * @return {!proto.cosmos.tx.signing.v1beta1.SignMode} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.prototype.getMode = function() { + return /** @type {!proto.cosmos.tx.signing.v1beta1.SignMode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cosmos.tx.signing.v1beta1.SignMode} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.prototype.setMode = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional bytes signature = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.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.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.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.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.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.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.toObject = function(includeInstance, msg) { + var f, obj = { + bitarray: (f = msg.getBitarray()) && cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray.toObject(includeInstance, f), + signaturesList: jspb.Message.toObjectList(msg.getSignaturesList(), + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.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.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi; + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray; + reader.readMessage(value,cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray.deserializeBinaryFromReader); + msg.setBitarray(value); + break; + case 2: + var value = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data; + reader.readMessage(value,proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.deserializeBinaryFromReader); + msg.addSignatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.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.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBitarray(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray.serializeBinaryToWriter + ); + } + f = message.getSignaturesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; + * @return {?proto.cosmos.crypto.multisig.v1beta1.CompactBitArray} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.getBitarray = function() { + return /** @type{?proto.cosmos.crypto.multisig.v1beta1.CompactBitArray} */ ( + jspb.Message.getWrapperField(this, cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray, 1)); +}; + + +/** + * @param {?proto.cosmos.crypto.multisig.v1beta1.CompactBitArray|undefined} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} returns this +*/ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.setBitarray = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.clearBitarray = function() { + return this.setBitarray(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.hasBitarray = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Data signatures = 2; + * @return {!Array} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.getSignaturesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} returns this +*/ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.setSignaturesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.addSignatures = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.clearSignaturesList = function() { + return this.setSignaturesList([]); +}; + + +/** + * optional Single single = 1; + * @return {?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.getSingle = function() { + return /** @type{?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single, 1)); +}; + + +/** + * @param {?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single|undefined} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} returns this +*/ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.setSingle = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.clearSingle = function() { + return this.setSingle(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.hasSingle = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Multi multi = 2; + * @return {?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.getMulti = function() { + return /** @type{?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi, 2)); +}; + + +/** + * @param {?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi|undefined} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} returns this +*/ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.setMulti = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.clearMulti = function() { + return this.setMulti(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.hasMulti = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Any public_key = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.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.cosmos.tx.signing.v1beta1.SignatureDescriptor} returns this +*/ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.setPublicKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.clearPublicKey = function() { + return this.setPublicKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.hasPublicKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Data data = 2; + * @return {?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.getData = function() { + return /** @type{?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data, 2)); +}; + + +/** + * @param {?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data|undefined} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor} returns this +*/ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.setData = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.clearData = function() { + return this.setData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.hasData = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 sequence = 3; + * @return {number} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * @enum {number} + */ +proto.cosmos.tx.signing.v1beta1.SignMode = { + SIGN_MODE_UNSPECIFIED: 0, + SIGN_MODE_DIRECT: 1, + SIGN_MODE_TEXTUAL: 2, + SIGN_MODE_LEGACY_AMINO_JSON: 127 +}; + +goog.object.extend(exports, proto.cosmos.tx.signing.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/tx/v1beta1/service_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/tx/v1beta1/service_grpc_web_pb.js new file mode 100644 index 00000000..bbb4be3a --- /dev/null +++ b/dist/src/types/proto-types/cosmos/tx/v1beta1/service_grpc_web_pb.js @@ -0,0 +1,406 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.tx.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_base_abci_v1beta1_abci_pb = require('../../../cosmos/base/abci/v1beta1/abci_pb.js') + +var cosmos_tx_v1beta1_tx_pb = require('../../../cosmos/tx/v1beta1/tx_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.tx = {}; +proto.cosmos.tx.v1beta1 = require('./service_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.tx.v1beta1.ServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.tx.v1beta1.ServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.tx.v1beta1.SimulateRequest, + * !proto.cosmos.tx.v1beta1.SimulateResponse>} + */ +const methodDescriptor_Service_Simulate = new grpc.web.MethodDescriptor( + '/cosmos.tx.v1beta1.Service/Simulate', + grpc.web.MethodType.UNARY, + proto.cosmos.tx.v1beta1.SimulateRequest, + proto.cosmos.tx.v1beta1.SimulateResponse, + /** + * @param {!proto.cosmos.tx.v1beta1.SimulateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.tx.v1beta1.SimulateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.tx.v1beta1.SimulateRequest, + * !proto.cosmos.tx.v1beta1.SimulateResponse>} + */ +const methodInfo_Service_Simulate = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.tx.v1beta1.SimulateResponse, + /** + * @param {!proto.cosmos.tx.v1beta1.SimulateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.tx.v1beta1.SimulateResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.tx.v1beta1.SimulateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.tx.v1beta1.SimulateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.tx.v1beta1.ServiceClient.prototype.simulate = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.tx.v1beta1.Service/Simulate', + request, + metadata || {}, + methodDescriptor_Service_Simulate, + callback); +}; + + +/** + * @param {!proto.cosmos.tx.v1beta1.SimulateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.tx.v1beta1.ServicePromiseClient.prototype.simulate = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.tx.v1beta1.Service/Simulate', + request, + metadata || {}, + methodDescriptor_Service_Simulate); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.tx.v1beta1.GetTxRequest, + * !proto.cosmos.tx.v1beta1.GetTxResponse>} + */ +const methodDescriptor_Service_GetTx = new grpc.web.MethodDescriptor( + '/cosmos.tx.v1beta1.Service/GetTx', + grpc.web.MethodType.UNARY, + proto.cosmos.tx.v1beta1.GetTxRequest, + proto.cosmos.tx.v1beta1.GetTxResponse, + /** + * @param {!proto.cosmos.tx.v1beta1.GetTxRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.tx.v1beta1.GetTxResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.tx.v1beta1.GetTxRequest, + * !proto.cosmos.tx.v1beta1.GetTxResponse>} + */ +const methodInfo_Service_GetTx = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.tx.v1beta1.GetTxResponse, + /** + * @param {!proto.cosmos.tx.v1beta1.GetTxRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.tx.v1beta1.GetTxResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.tx.v1beta1.GetTxRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.tx.v1beta1.GetTxResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.tx.v1beta1.ServiceClient.prototype.getTx = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.tx.v1beta1.Service/GetTx', + request, + metadata || {}, + methodDescriptor_Service_GetTx, + callback); +}; + + +/** + * @param {!proto.cosmos.tx.v1beta1.GetTxRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.tx.v1beta1.ServicePromiseClient.prototype.getTx = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.tx.v1beta1.Service/GetTx', + request, + metadata || {}, + methodDescriptor_Service_GetTx); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.tx.v1beta1.BroadcastTxRequest, + * !proto.cosmos.tx.v1beta1.BroadcastTxResponse>} + */ +const methodDescriptor_Service_BroadcastTx = new grpc.web.MethodDescriptor( + '/cosmos.tx.v1beta1.Service/BroadcastTx', + grpc.web.MethodType.UNARY, + proto.cosmos.tx.v1beta1.BroadcastTxRequest, + proto.cosmos.tx.v1beta1.BroadcastTxResponse, + /** + * @param {!proto.cosmos.tx.v1beta1.BroadcastTxRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.tx.v1beta1.BroadcastTxResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.tx.v1beta1.BroadcastTxRequest, + * !proto.cosmos.tx.v1beta1.BroadcastTxResponse>} + */ +const methodInfo_Service_BroadcastTx = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.tx.v1beta1.BroadcastTxResponse, + /** + * @param {!proto.cosmos.tx.v1beta1.BroadcastTxRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.tx.v1beta1.BroadcastTxResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.tx.v1beta1.BroadcastTxRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.tx.v1beta1.BroadcastTxResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.tx.v1beta1.ServiceClient.prototype.broadcastTx = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.tx.v1beta1.Service/BroadcastTx', + request, + metadata || {}, + methodDescriptor_Service_BroadcastTx, + callback); +}; + + +/** + * @param {!proto.cosmos.tx.v1beta1.BroadcastTxRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.tx.v1beta1.ServicePromiseClient.prototype.broadcastTx = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.tx.v1beta1.Service/BroadcastTx', + request, + metadata || {}, + methodDescriptor_Service_BroadcastTx); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.tx.v1beta1.GetTxsEventRequest, + * !proto.cosmos.tx.v1beta1.GetTxsEventResponse>} + */ +const methodDescriptor_Service_GetTxsEvent = new grpc.web.MethodDescriptor( + '/cosmos.tx.v1beta1.Service/GetTxsEvent', + grpc.web.MethodType.UNARY, + proto.cosmos.tx.v1beta1.GetTxsEventRequest, + proto.cosmos.tx.v1beta1.GetTxsEventResponse, + /** + * @param {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.tx.v1beta1.GetTxsEventResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.tx.v1beta1.GetTxsEventRequest, + * !proto.cosmos.tx.v1beta1.GetTxsEventResponse>} + */ +const methodInfo_Service_GetTxsEvent = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.tx.v1beta1.GetTxsEventResponse, + /** + * @param {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.tx.v1beta1.GetTxsEventResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.tx.v1beta1.GetTxsEventResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.tx.v1beta1.ServiceClient.prototype.getTxsEvent = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.tx.v1beta1.Service/GetTxsEvent', + request, + metadata || {}, + methodDescriptor_Service_GetTxsEvent, + callback); +}; + + +/** + * @param {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.tx.v1beta1.ServicePromiseClient.prototype.getTxsEvent = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.tx.v1beta1.Service/GetTxsEvent', + request, + metadata || {}, + methodDescriptor_Service_GetTxsEvent); +}; + + +module.exports = proto.cosmos.tx.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/tx/v1beta1/service_pb.js b/dist/src/types/proto-types/cosmos/tx/v1beta1/service_pb.js new file mode 100644 index 00000000..5152870c --- /dev/null +++ b/dist/src/types/proto-types/cosmos/tx/v1beta1/service_pb.js @@ -0,0 +1,1703 @@ +// source: cosmos/tx/v1beta1/service.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_base_abci_v1beta1_abci_pb = require('../../../cosmos/base/abci/v1beta1/abci_pb.js'); +goog.object.extend(proto, cosmos_base_abci_v1beta1_abci_pb); +var cosmos_tx_v1beta1_tx_pb = require('../../../cosmos/tx/v1beta1/tx_pb.js'); +goog.object.extend(proto, cosmos_tx_v1beta1_tx_pb); +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); +goog.exportSymbol('proto.cosmos.tx.v1beta1.BroadcastMode', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.BroadcastTxRequest', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.BroadcastTxResponse', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.GetTxRequest', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.GetTxResponse', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.GetTxsEventRequest', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.GetTxsEventResponse', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.SimulateRequest', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.SimulateResponse', 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.tx.v1beta1.GetTxsEventRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.GetTxsEventRequest.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.GetTxsEventRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.GetTxsEventRequest.displayName = 'proto.cosmos.tx.v1beta1.GetTxsEventRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.GetTxsEventResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.GetTxsEventResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.GetTxsEventResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.GetTxsEventResponse.displayName = 'proto.cosmos.tx.v1beta1.GetTxsEventResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.BroadcastTxRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.BroadcastTxRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.BroadcastTxRequest.displayName = 'proto.cosmos.tx.v1beta1.BroadcastTxRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.BroadcastTxResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.BroadcastTxResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.BroadcastTxResponse.displayName = 'proto.cosmos.tx.v1beta1.BroadcastTxResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.SimulateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.SimulateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.SimulateRequest.displayName = 'proto.cosmos.tx.v1beta1.SimulateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.SimulateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.SimulateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.SimulateResponse.displayName = 'proto.cosmos.tx.v1beta1.SimulateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.GetTxRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.GetTxRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.GetTxRequest.displayName = 'proto.cosmos.tx.v1beta1.GetTxRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.GetTxResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.GetTxResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.GetTxResponse.displayName = 'proto.cosmos.tx.v1beta1.GetTxResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.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.tx.v1beta1.GetTxsEventRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.GetTxsEventRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.GetTxsEventRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.toObject = function(includeInstance, msg) { + var f, obj = { + eventsList: (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) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.GetTxsEventRequest; + return proto.cosmos.tx.v1beta1.GetTxsEventRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.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.addEvents(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.tx.v1beta1.GetTxsEventRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.GetTxsEventRequest.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.tx.v1beta1.GetTxsEventRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEventsList(); + 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 events = 1; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.getEventsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} returns this + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.setEventsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} returns this + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.addEvents = 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.tx.v1beta1.GetTxsEventRequest} returns this + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.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.tx.v1beta1.GetTxsEventRequest} returns this +*/ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} returns this + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.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.tx.v1beta1.GetTxsEventResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.GetTxsEventResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.GetTxsEventResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.toObject = function(includeInstance, msg) { + var f, obj = { + txsList: jspb.Message.toObjectList(msg.getTxsList(), + cosmos_tx_v1beta1_tx_pb.Tx.toObject, includeInstance), + txResponsesList: jspb.Message.toObjectList(msg.getTxResponsesList(), + cosmos_base_abci_v1beta1_abci_pb.TxResponse.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.tx.v1beta1.GetTxsEventResponse} + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.GetTxsEventResponse; + return proto.cosmos.tx.v1beta1.GetTxsEventResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.GetTxsEventResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventResponse} + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_tx_v1beta1_tx_pb.Tx; + reader.readMessage(value,cosmos_tx_v1beta1_tx_pb.Tx.deserializeBinaryFromReader); + msg.addTxs(value); + break; + case 2: + var value = new cosmos_base_abci_v1beta1_abci_pb.TxResponse; + reader.readMessage(value,cosmos_base_abci_v1beta1_abci_pb.TxResponse.deserializeBinaryFromReader); + msg.addTxResponses(value); + break; + case 3: + 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.tx.v1beta1.GetTxsEventResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.GetTxsEventResponse.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.tx.v1beta1.GetTxsEventResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_tx_v1beta1_tx_pb.Tx.serializeBinaryToWriter + ); + } + f = message.getTxResponsesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_abci_v1beta1_abci_pb.TxResponse.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Tx txs = 1; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.getTxsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_tx_v1beta1_tx_pb.Tx, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventResponse} returns this +*/ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.setTxsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.tx.v1beta1.Tx=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.tx.v1beta1.Tx} + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.addTxs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.tx.v1beta1.Tx, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventResponse} returns this + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.clearTxsList = function() { + return this.setTxsList([]); +}; + + +/** + * repeated cosmos.base.abci.v1beta1.TxResponse tx_responses = 2; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.getTxResponsesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_abci_v1beta1_abci_pb.TxResponse, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventResponse} returns this +*/ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.setTxResponsesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.abci.v1beta1.TxResponse=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.addTxResponses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.abci.v1beta1.TxResponse, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventResponse} returns this + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.clearTxResponsesList = function() { + return this.setTxResponsesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventResponse} returns this +*/ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventResponse} returns this + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.hasPagination = 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.tx.v1beta1.BroadcastTxRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.BroadcastTxRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.BroadcastTxRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.toObject = function(includeInstance, msg) { + var f, obj = { + txBytes: msg.getTxBytes_asB64(), + mode: 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.tx.v1beta1.BroadcastTxRequest} + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.BroadcastTxRequest; + return proto.cosmos.tx.v1beta1.BroadcastTxRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.BroadcastTxRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.BroadcastTxRequest} + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.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.setTxBytes(value); + break; + case 2: + var value = /** @type {!proto.cosmos.tx.v1beta1.BroadcastMode} */ (reader.readEnum()); + msg.setMode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.BroadcastTxRequest.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.tx.v1beta1.BroadcastTxRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getMode(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * optional bytes tx_bytes = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.prototype.getTxBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes tx_bytes = 1; + * This is a type-conversion wrapper around `getTxBytes()` + * @return {string} + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.prototype.getTxBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxBytes())); +}; + + +/** + * optional bytes tx_bytes = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxBytes()` + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.prototype.getTxBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.tx.v1beta1.BroadcastTxRequest} returns this + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.prototype.setTxBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional BroadcastMode mode = 2; + * @return {!proto.cosmos.tx.v1beta1.BroadcastMode} + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.prototype.getMode = function() { + return /** @type {!proto.cosmos.tx.v1beta1.BroadcastMode} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.cosmos.tx.v1beta1.BroadcastMode} value + * @return {!proto.cosmos.tx.v1beta1.BroadcastTxRequest} returns this + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.prototype.setMode = function(value) { + return jspb.Message.setProto3EnumField(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.tx.v1beta1.BroadcastTxResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.BroadcastTxResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.BroadcastTxResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.toObject = function(includeInstance, msg) { + var f, obj = { + txResponse: (f = msg.getTxResponse()) && cosmos_base_abci_v1beta1_abci_pb.TxResponse.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.tx.v1beta1.BroadcastTxResponse} + */ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.BroadcastTxResponse; + return proto.cosmos.tx.v1beta1.BroadcastTxResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.BroadcastTxResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.BroadcastTxResponse} + */ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_abci_v1beta1_abci_pb.TxResponse; + reader.readMessage(value,cosmos_base_abci_v1beta1_abci_pb.TxResponse.deserializeBinaryFromReader); + msg.setTxResponse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.BroadcastTxResponse.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.tx.v1beta1.BroadcastTxResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxResponse(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_abci_v1beta1_abci_pb.TxResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.abci.v1beta1.TxResponse tx_response = 1; + * @return {?proto.cosmos.base.abci.v1beta1.TxResponse} + */ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.prototype.getTxResponse = function() { + return /** @type{?proto.cosmos.base.abci.v1beta1.TxResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_abci_v1beta1_abci_pb.TxResponse, 1)); +}; + + +/** + * @param {?proto.cosmos.base.abci.v1beta1.TxResponse|undefined} value + * @return {!proto.cosmos.tx.v1beta1.BroadcastTxResponse} returns this +*/ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.prototype.setTxResponse = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.BroadcastTxResponse} returns this + */ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.prototype.clearTxResponse = function() { + return this.setTxResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.prototype.hasTxResponse = 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.tx.v1beta1.SimulateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.SimulateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.SimulateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.SimulateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + tx: (f = msg.getTx()) && cosmos_tx_v1beta1_tx_pb.Tx.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.tx.v1beta1.SimulateRequest} + */ +proto.cosmos.tx.v1beta1.SimulateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.SimulateRequest; + return proto.cosmos.tx.v1beta1.SimulateRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.SimulateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.SimulateRequest} + */ +proto.cosmos.tx.v1beta1.SimulateRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_tx_v1beta1_tx_pb.Tx; + reader.readMessage(value,cosmos_tx_v1beta1_tx_pb.Tx.deserializeBinaryFromReader); + msg.setTx(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.SimulateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.SimulateRequest.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.tx.v1beta1.SimulateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.SimulateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTx(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_tx_v1beta1_tx_pb.Tx.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Tx tx = 1; + * @return {?proto.cosmos.tx.v1beta1.Tx} + */ +proto.cosmos.tx.v1beta1.SimulateRequest.prototype.getTx = function() { + return /** @type{?proto.cosmos.tx.v1beta1.Tx} */ ( + jspb.Message.getWrapperField(this, cosmos_tx_v1beta1_tx_pb.Tx, 1)); +}; + + +/** + * @param {?proto.cosmos.tx.v1beta1.Tx|undefined} value + * @return {!proto.cosmos.tx.v1beta1.SimulateRequest} returns this +*/ +proto.cosmos.tx.v1beta1.SimulateRequest.prototype.setTx = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.SimulateRequest} returns this + */ +proto.cosmos.tx.v1beta1.SimulateRequest.prototype.clearTx = function() { + return this.setTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.SimulateRequest.prototype.hasTx = 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.tx.v1beta1.SimulateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.SimulateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.SimulateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.SimulateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + gasInfo: (f = msg.getGasInfo()) && cosmos_base_abci_v1beta1_abci_pb.GasInfo.toObject(includeInstance, f), + result: (f = msg.getResult()) && cosmos_base_abci_v1beta1_abci_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.cosmos.tx.v1beta1.SimulateResponse} + */ +proto.cosmos.tx.v1beta1.SimulateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.SimulateResponse; + return proto.cosmos.tx.v1beta1.SimulateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.SimulateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.SimulateResponse} + */ +proto.cosmos.tx.v1beta1.SimulateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_abci_v1beta1_abci_pb.GasInfo; + reader.readMessage(value,cosmos_base_abci_v1beta1_abci_pb.GasInfo.deserializeBinaryFromReader); + msg.setGasInfo(value); + break; + case 2: + var value = new cosmos_base_abci_v1beta1_abci_pb.Result; + reader.readMessage(value,cosmos_base_abci_v1beta1_abci_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.cosmos.tx.v1beta1.SimulateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.SimulateResponse.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.tx.v1beta1.SimulateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.SimulateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGasInfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_abci_v1beta1_abci_pb.GasInfo.serializeBinaryToWriter + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_abci_v1beta1_abci_pb.Result.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.abci.v1beta1.GasInfo gas_info = 1; + * @return {?proto.cosmos.base.abci.v1beta1.GasInfo} + */ +proto.cosmos.tx.v1beta1.SimulateResponse.prototype.getGasInfo = function() { + return /** @type{?proto.cosmos.base.abci.v1beta1.GasInfo} */ ( + jspb.Message.getWrapperField(this, cosmos_base_abci_v1beta1_abci_pb.GasInfo, 1)); +}; + + +/** + * @param {?proto.cosmos.base.abci.v1beta1.GasInfo|undefined} value + * @return {!proto.cosmos.tx.v1beta1.SimulateResponse} returns this +*/ +proto.cosmos.tx.v1beta1.SimulateResponse.prototype.setGasInfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.SimulateResponse} returns this + */ +proto.cosmos.tx.v1beta1.SimulateResponse.prototype.clearGasInfo = function() { + return this.setGasInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.SimulateResponse.prototype.hasGasInfo = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional cosmos.base.abci.v1beta1.Result result = 2; + * @return {?proto.cosmos.base.abci.v1beta1.Result} + */ +proto.cosmos.tx.v1beta1.SimulateResponse.prototype.getResult = function() { + return /** @type{?proto.cosmos.base.abci.v1beta1.Result} */ ( + jspb.Message.getWrapperField(this, cosmos_base_abci_v1beta1_abci_pb.Result, 2)); +}; + + +/** + * @param {?proto.cosmos.base.abci.v1beta1.Result|undefined} value + * @return {!proto.cosmos.tx.v1beta1.SimulateResponse} returns this +*/ +proto.cosmos.tx.v1beta1.SimulateResponse.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.SimulateResponse} returns this + */ +proto.cosmos.tx.v1beta1.SimulateResponse.prototype.clearResult = function() { + return this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.SimulateResponse.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.cosmos.tx.v1beta1.GetTxRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.GetTxRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.GetTxRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.GetTxRequest.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.cosmos.tx.v1beta1.GetTxRequest} + */ +proto.cosmos.tx.v1beta1.GetTxRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.GetTxRequest; + return proto.cosmos.tx.v1beta1.GetTxRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.GetTxRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.GetTxRequest} + */ +proto.cosmos.tx.v1beta1.GetTxRequest.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.cosmos.tx.v1beta1.GetTxRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.GetTxRequest.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.tx.v1beta1.GetTxRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.GetTxRequest.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.cosmos.tx.v1beta1.GetTxRequest.prototype.getHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.tx.v1beta1.GetTxRequest} returns this + */ +proto.cosmos.tx.v1beta1.GetTxRequest.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.cosmos.tx.v1beta1.GetTxResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.GetTxResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.GetTxResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.GetTxResponse.toObject = function(includeInstance, msg) { + var f, obj = { + tx: (f = msg.getTx()) && cosmos_tx_v1beta1_tx_pb.Tx.toObject(includeInstance, f), + txResponse: (f = msg.getTxResponse()) && cosmos_base_abci_v1beta1_abci_pb.TxResponse.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.tx.v1beta1.GetTxResponse} + */ +proto.cosmos.tx.v1beta1.GetTxResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.GetTxResponse; + return proto.cosmos.tx.v1beta1.GetTxResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.GetTxResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.GetTxResponse} + */ +proto.cosmos.tx.v1beta1.GetTxResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_tx_v1beta1_tx_pb.Tx; + reader.readMessage(value,cosmos_tx_v1beta1_tx_pb.Tx.deserializeBinaryFromReader); + msg.setTx(value); + break; + case 2: + var value = new cosmos_base_abci_v1beta1_abci_pb.TxResponse; + reader.readMessage(value,cosmos_base_abci_v1beta1_abci_pb.TxResponse.deserializeBinaryFromReader); + msg.setTxResponse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.GetTxResponse.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.tx.v1beta1.GetTxResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.GetTxResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTx(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_tx_v1beta1_tx_pb.Tx.serializeBinaryToWriter + ); + } + f = message.getTxResponse(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_abci_v1beta1_abci_pb.TxResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Tx tx = 1; + * @return {?proto.cosmos.tx.v1beta1.Tx} + */ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.getTx = function() { + return /** @type{?proto.cosmos.tx.v1beta1.Tx} */ ( + jspb.Message.getWrapperField(this, cosmos_tx_v1beta1_tx_pb.Tx, 1)); +}; + + +/** + * @param {?proto.cosmos.tx.v1beta1.Tx|undefined} value + * @return {!proto.cosmos.tx.v1beta1.GetTxResponse} returns this +*/ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.setTx = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.GetTxResponse} returns this + */ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.clearTx = function() { + return this.setTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.hasTx = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional cosmos.base.abci.v1beta1.TxResponse tx_response = 2; + * @return {?proto.cosmos.base.abci.v1beta1.TxResponse} + */ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.getTxResponse = function() { + return /** @type{?proto.cosmos.base.abci.v1beta1.TxResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_abci_v1beta1_abci_pb.TxResponse, 2)); +}; + + +/** + * @param {?proto.cosmos.base.abci.v1beta1.TxResponse|undefined} value + * @return {!proto.cosmos.tx.v1beta1.GetTxResponse} returns this +*/ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.setTxResponse = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.GetTxResponse} returns this + */ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.clearTxResponse = function() { + return this.setTxResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.hasTxResponse = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * @enum {number} + */ +proto.cosmos.tx.v1beta1.BroadcastMode = { + BROADCAST_MODE_UNSPECIFIED: 0, + BROADCAST_MODE_BLOCK: 1, + BROADCAST_MODE_SYNC: 2, + BROADCAST_MODE_ASYNC: 3 +}; + +goog.object.extend(exports, proto.cosmos.tx.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/tx/v1beta1/tx_pb.js b/dist/src/types/proto-types/cosmos/tx/v1beta1/tx_pb.js new file mode 100644 index 00000000..538dc51a --- /dev/null +++ b/dist/src/types/proto-types/cosmos/tx/v1beta1/tx_pb.js @@ -0,0 +1,2672 @@ +// source: cosmos/tx/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_crypto_multisig_v1beta1_multisig_pb = require('../../../cosmos/crypto/multisig/v1beta1/multisig_pb.js'); +goog.object.extend(proto, cosmos_crypto_multisig_v1beta1_multisig_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_tx_signing_v1beta1_signing_pb = require('../../../cosmos/tx/signing/v1beta1/signing_pb.js'); +goog.object.extend(proto, cosmos_tx_signing_v1beta1_signing_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.tx.v1beta1.AuthInfo', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.Fee', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.ModeInfo', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.ModeInfo.Multi', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.ModeInfo.Single', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.ModeInfo.SumCase', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.SignDoc', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.SignerInfo', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.Tx', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.TxBody', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.TxRaw', 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.tx.v1beta1.Tx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.Tx.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.Tx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.Tx.displayName = 'proto.cosmos.tx.v1beta1.Tx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.TxRaw = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.TxRaw.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.TxRaw, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.TxRaw.displayName = 'proto.cosmos.tx.v1beta1.TxRaw'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.SignDoc = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.SignDoc, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.SignDoc.displayName = 'proto.cosmos.tx.v1beta1.SignDoc'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.TxBody = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.cosmos.tx.v1beta1.TxBody.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.TxBody, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.TxBody.displayName = 'proto.cosmos.tx.v1beta1.TxBody'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.AuthInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.AuthInfo.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.AuthInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.AuthInfo.displayName = 'proto.cosmos.tx.v1beta1.AuthInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.SignerInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.SignerInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.SignerInfo.displayName = 'proto.cosmos.tx.v1beta1.SignerInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.ModeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cosmos.tx.v1beta1.ModeInfo.oneofGroups_); +}; +goog.inherits(proto.cosmos.tx.v1beta1.ModeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.ModeInfo.displayName = 'proto.cosmos.tx.v1beta1.ModeInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.ModeInfo.Single = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.ModeInfo.Single, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.ModeInfo.Single.displayName = 'proto.cosmos.tx.v1beta1.ModeInfo.Single'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.ModeInfo.Multi = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.ModeInfo.Multi.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.ModeInfo.Multi, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.ModeInfo.Multi.displayName = 'proto.cosmos.tx.v1beta1.ModeInfo.Multi'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.Fee = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.Fee.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.Fee, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.Fee.displayName = 'proto.cosmos.tx.v1beta1.Fee'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.v1beta1.Tx.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.tx.v1beta1.Tx.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.Tx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.Tx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.Tx.toObject = function(includeInstance, msg) { + var f, obj = { + body: (f = msg.getBody()) && proto.cosmos.tx.v1beta1.TxBody.toObject(includeInstance, f), + authInfo: (f = msg.getAuthInfo()) && proto.cosmos.tx.v1beta1.AuthInfo.toObject(includeInstance, f), + signaturesList: msg.getSignaturesList_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.tx.v1beta1.Tx} + */ +proto.cosmos.tx.v1beta1.Tx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.Tx; + return proto.cosmos.tx.v1beta1.Tx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.Tx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.Tx} + */ +proto.cosmos.tx.v1beta1.Tx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.tx.v1beta1.TxBody; + reader.readMessage(value,proto.cosmos.tx.v1beta1.TxBody.deserializeBinaryFromReader); + msg.setBody(value); + break; + case 2: + var value = new proto.cosmos.tx.v1beta1.AuthInfo; + reader.readMessage(value,proto.cosmos.tx.v1beta1.AuthInfo.deserializeBinaryFromReader); + msg.setAuthInfo(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addSignatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.Tx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.Tx.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.tx.v1beta1.Tx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.Tx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBody(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.tx.v1beta1.TxBody.serializeBinaryToWriter + ); + } + f = message.getAuthInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.tx.v1beta1.AuthInfo.serializeBinaryToWriter + ); + } + f = message.getSignaturesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 3, + f + ); + } +}; + + +/** + * optional TxBody body = 1; + * @return {?proto.cosmos.tx.v1beta1.TxBody} + */ +proto.cosmos.tx.v1beta1.Tx.prototype.getBody = function() { + return /** @type{?proto.cosmos.tx.v1beta1.TxBody} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.v1beta1.TxBody, 1)); +}; + + +/** + * @param {?proto.cosmos.tx.v1beta1.TxBody|undefined} value + * @return {!proto.cosmos.tx.v1beta1.Tx} returns this +*/ +proto.cosmos.tx.v1beta1.Tx.prototype.setBody = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.Tx} returns this + */ +proto.cosmos.tx.v1beta1.Tx.prototype.clearBody = function() { + return this.setBody(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.Tx.prototype.hasBody = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional AuthInfo auth_info = 2; + * @return {?proto.cosmos.tx.v1beta1.AuthInfo} + */ +proto.cosmos.tx.v1beta1.Tx.prototype.getAuthInfo = function() { + return /** @type{?proto.cosmos.tx.v1beta1.AuthInfo} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.v1beta1.AuthInfo, 2)); +}; + + +/** + * @param {?proto.cosmos.tx.v1beta1.AuthInfo|undefined} value + * @return {!proto.cosmos.tx.v1beta1.Tx} returns this +*/ +proto.cosmos.tx.v1beta1.Tx.prototype.setAuthInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.Tx} returns this + */ +proto.cosmos.tx.v1beta1.Tx.prototype.clearAuthInfo = function() { + return this.setAuthInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.Tx.prototype.hasAuthInfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated bytes signatures = 3; + * @return {!(Array|Array)} + */ +proto.cosmos.tx.v1beta1.Tx.prototype.getSignaturesList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * repeated bytes signatures = 3; + * This is a type-conversion wrapper around `getSignaturesList()` + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.Tx.prototype.getSignaturesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getSignaturesList())); +}; + + +/** + * repeated bytes signatures = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignaturesList()` + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.Tx.prototype.getSignaturesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getSignaturesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.cosmos.tx.v1beta1.Tx} returns this + */ +proto.cosmos.tx.v1beta1.Tx.prototype.setSignaturesList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.cosmos.tx.v1beta1.Tx} returns this + */ +proto.cosmos.tx.v1beta1.Tx.prototype.addSignatures = 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.tx.v1beta1.Tx} returns this + */ +proto.cosmos.tx.v1beta1.Tx.prototype.clearSignaturesList = function() { + return this.setSignaturesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.v1beta1.TxRaw.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.tx.v1beta1.TxRaw.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.TxRaw.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.TxRaw} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.TxRaw.toObject = function(includeInstance, msg) { + var f, obj = { + bodyBytes: msg.getBodyBytes_asB64(), + authInfoBytes: msg.getAuthInfoBytes_asB64(), + signaturesList: msg.getSignaturesList_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.tx.v1beta1.TxRaw} + */ +proto.cosmos.tx.v1beta1.TxRaw.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.TxRaw; + return proto.cosmos.tx.v1beta1.TxRaw.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.TxRaw} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.TxRaw} + */ +proto.cosmos.tx.v1beta1.TxRaw.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.setBodyBytes(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAuthInfoBytes(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addSignatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.TxRaw.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.tx.v1beta1.TxRaw} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.TxRaw.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBodyBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAuthInfoBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getSignaturesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 3, + f + ); + } +}; + + +/** + * optional bytes body_bytes = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getBodyBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes body_bytes = 1; + * This is a type-conversion wrapper around `getBodyBytes()` + * @return {string} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getBodyBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBodyBytes())); +}; + + +/** + * optional bytes body_bytes = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBodyBytes()` + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getBodyBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBodyBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.tx.v1beta1.TxRaw} returns this + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.setBodyBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes auth_info_bytes = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getAuthInfoBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes auth_info_bytes = 2; + * This is a type-conversion wrapper around `getAuthInfoBytes()` + * @return {string} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getAuthInfoBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAuthInfoBytes())); +}; + + +/** + * optional bytes auth_info_bytes = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAuthInfoBytes()` + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getAuthInfoBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAuthInfoBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.tx.v1beta1.TxRaw} returns this + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.setAuthInfoBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated bytes signatures = 3; + * @return {!(Array|Array)} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getSignaturesList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * repeated bytes signatures = 3; + * This is a type-conversion wrapper around `getSignaturesList()` + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getSignaturesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getSignaturesList())); +}; + + +/** + * repeated bytes signatures = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignaturesList()` + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getSignaturesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getSignaturesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.cosmos.tx.v1beta1.TxRaw} returns this + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.setSignaturesList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.cosmos.tx.v1beta1.TxRaw} returns this + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.addSignatures = 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.tx.v1beta1.TxRaw} returns this + */ +proto.cosmos.tx.v1beta1.TxRaw.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.cosmos.tx.v1beta1.SignDoc.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.SignDoc.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.SignDoc} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.SignDoc.toObject = function(includeInstance, msg) { + var f, obj = { + bodyBytes: msg.getBodyBytes_asB64(), + authInfoBytes: msg.getAuthInfoBytes_asB64(), + chainId: jspb.Message.getFieldWithDefault(msg, 3, ""), + accountNumber: 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.tx.v1beta1.SignDoc} + */ +proto.cosmos.tx.v1beta1.SignDoc.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.SignDoc; + return proto.cosmos.tx.v1beta1.SignDoc.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.SignDoc} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.SignDoc} + */ +proto.cosmos.tx.v1beta1.SignDoc.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.setBodyBytes(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAuthInfoBytes(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAccountNumber(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.SignDoc.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.tx.v1beta1.SignDoc} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.SignDoc.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBodyBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAuthInfoBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAccountNumber(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional bytes body_bytes = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.getBodyBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes body_bytes = 1; + * This is a type-conversion wrapper around `getBodyBytes()` + * @return {string} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.getBodyBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBodyBytes())); +}; + + +/** + * optional bytes body_bytes = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBodyBytes()` + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.getBodyBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBodyBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.tx.v1beta1.SignDoc} returns this + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.setBodyBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes auth_info_bytes = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.getAuthInfoBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes auth_info_bytes = 2; + * This is a type-conversion wrapper around `getAuthInfoBytes()` + * @return {string} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.getAuthInfoBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAuthInfoBytes())); +}; + + +/** + * optional bytes auth_info_bytes = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAuthInfoBytes()` + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.getAuthInfoBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAuthInfoBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.tx.v1beta1.SignDoc} returns this + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.setAuthInfoBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string chain_id = 3; + * @return {string} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.tx.v1beta1.SignDoc} returns this + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint64 account_number = 4; + * @return {number} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.getAccountNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.tx.v1beta1.SignDoc} returns this + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.setAccountNumber = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.v1beta1.TxBody.repeatedFields_ = [1,1023,2047]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.tx.v1beta1.TxBody.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.TxBody.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.TxBody} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.TxBody.toObject = function(includeInstance, msg) { + var f, obj = { + messagesList: jspb.Message.toObjectList(msg.getMessagesList(), + google_protobuf_any_pb.Any.toObject, includeInstance), + memo: jspb.Message.getFieldWithDefault(msg, 2, ""), + timeoutHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + extensionOptionsList: jspb.Message.toObjectList(msg.getExtensionOptionsList(), + google_protobuf_any_pb.Any.toObject, includeInstance), + nonCriticalExtensionOptionsList: jspb.Message.toObjectList(msg.getNonCriticalExtensionOptionsList(), + 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.cosmos.tx.v1beta1.TxBody} + */ +proto.cosmos.tx.v1beta1.TxBody.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.TxBody; + return proto.cosmos.tx.v1beta1.TxBody.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.TxBody} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.TxBody} + */ +proto.cosmos.tx.v1beta1.TxBody.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; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimeoutHeight(value); + break; + case 1023: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addExtensionOptions(value); + break; + case 2047: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addNonCriticalExtensionOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.TxBody.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.tx.v1beta1.TxBody} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.TxBody.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessagesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTimeoutHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getExtensionOptionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1023, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getNonCriticalExtensionOptionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2047, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated google.protobuf.Any messages = 1; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.getMessagesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.TxBody} returns this +*/ +proto.cosmos.tx.v1beta1.TxBody.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.cosmos.tx.v1beta1.TxBody.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.cosmos.tx.v1beta1.TxBody} returns this + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.clearMessagesList = function() { + return this.setMessagesList([]); +}; + + +/** + * optional string memo = 2; + * @return {string} + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.tx.v1beta1.TxBody} returns this + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 timeout_height = 3; + * @return {number} + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.getTimeoutHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.tx.v1beta1.TxBody} returns this + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.setTimeoutHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * repeated google.protobuf.Any extension_options = 1023; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.getExtensionOptionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1023)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.TxBody} returns this +*/ +proto.cosmos.tx.v1beta1.TxBody.prototype.setExtensionOptionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1023, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.addExtensionOptions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1023, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.tx.v1beta1.TxBody} returns this + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.clearExtensionOptionsList = function() { + return this.setExtensionOptionsList([]); +}; + + +/** + * repeated google.protobuf.Any non_critical_extension_options = 2047; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.getNonCriticalExtensionOptionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 2047)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.TxBody} returns this +*/ +proto.cosmos.tx.v1beta1.TxBody.prototype.setNonCriticalExtensionOptionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2047, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.addNonCriticalExtensionOptions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2047, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.tx.v1beta1.TxBody} returns this + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.clearNonCriticalExtensionOptionsList = function() { + return this.setNonCriticalExtensionOptionsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.v1beta1.AuthInfo.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.tx.v1beta1.AuthInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.AuthInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.AuthInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.AuthInfo.toObject = function(includeInstance, msg) { + var f, obj = { + signerInfosList: jspb.Message.toObjectList(msg.getSignerInfosList(), + proto.cosmos.tx.v1beta1.SignerInfo.toObject, includeInstance), + fee: (f = msg.getFee()) && proto.cosmos.tx.v1beta1.Fee.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.tx.v1beta1.AuthInfo} + */ +proto.cosmos.tx.v1beta1.AuthInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.AuthInfo; + return proto.cosmos.tx.v1beta1.AuthInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.AuthInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.AuthInfo} + */ +proto.cosmos.tx.v1beta1.AuthInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.tx.v1beta1.SignerInfo; + reader.readMessage(value,proto.cosmos.tx.v1beta1.SignerInfo.deserializeBinaryFromReader); + msg.addSignerInfos(value); + break; + case 2: + var value = new proto.cosmos.tx.v1beta1.Fee; + reader.readMessage(value,proto.cosmos.tx.v1beta1.Fee.deserializeBinaryFromReader); + msg.setFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.AuthInfo.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.tx.v1beta1.AuthInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.AuthInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignerInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.tx.v1beta1.SignerInfo.serializeBinaryToWriter + ); + } + f = message.getFee(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.tx.v1beta1.Fee.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated SignerInfo signer_infos = 1; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.getSignerInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.tx.v1beta1.SignerInfo, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.AuthInfo} returns this +*/ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.setSignerInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.tx.v1beta1.SignerInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.tx.v1beta1.SignerInfo} + */ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.addSignerInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.tx.v1beta1.SignerInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.tx.v1beta1.AuthInfo} returns this + */ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.clearSignerInfosList = function() { + return this.setSignerInfosList([]); +}; + + +/** + * optional Fee fee = 2; + * @return {?proto.cosmos.tx.v1beta1.Fee} + */ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.getFee = function() { + return /** @type{?proto.cosmos.tx.v1beta1.Fee} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.v1beta1.Fee, 2)); +}; + + +/** + * @param {?proto.cosmos.tx.v1beta1.Fee|undefined} value + * @return {!proto.cosmos.tx.v1beta1.AuthInfo} returns this +*/ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.setFee = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.AuthInfo} returns this + */ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.clearFee = function() { + return this.setFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.hasFee = 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.tx.v1beta1.SignerInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.SignerInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.SignerInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.SignerInfo.toObject = function(includeInstance, msg) { + var f, obj = { + publicKey: (f = msg.getPublicKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + modeInfo: (f = msg.getModeInfo()) && proto.cosmos.tx.v1beta1.ModeInfo.toObject(includeInstance, f), + sequence: 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.tx.v1beta1.SignerInfo} + */ +proto.cosmos.tx.v1beta1.SignerInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.SignerInfo; + return proto.cosmos.tx.v1beta1.SignerInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.SignerInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.SignerInfo} + */ +proto.cosmos.tx.v1beta1.SignerInfo.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 = new proto.cosmos.tx.v1beta1.ModeInfo; + reader.readMessage(value,proto.cosmos.tx.v1beta1.ModeInfo.deserializeBinaryFromReader); + msg.setModeInfo(value); + break; + case 3: + 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.cosmos.tx.v1beta1.SignerInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.SignerInfo.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.tx.v1beta1.SignerInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.SignerInfo.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.getModeInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.tx.v1beta1.ModeInfo.serializeBinaryToWriter + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional google.protobuf.Any public_key = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.tx.v1beta1.SignerInfo.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.cosmos.tx.v1beta1.SignerInfo} returns this +*/ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.setPublicKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.SignerInfo} returns this + */ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.clearPublicKey = function() { + return this.setPublicKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.hasPublicKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ModeInfo mode_info = 2; + * @return {?proto.cosmos.tx.v1beta1.ModeInfo} + */ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.getModeInfo = function() { + return /** @type{?proto.cosmos.tx.v1beta1.ModeInfo} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.v1beta1.ModeInfo, 2)); +}; + + +/** + * @param {?proto.cosmos.tx.v1beta1.ModeInfo|undefined} value + * @return {!proto.cosmos.tx.v1beta1.SignerInfo} returns this +*/ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.setModeInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.SignerInfo} returns this + */ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.clearModeInfo = function() { + return this.setModeInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.hasModeInfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 sequence = 3; + * @return {number} + */ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.tx.v1beta1.SignerInfo} returns this + */ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 3, 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.cosmos.tx.v1beta1.ModeInfo.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.cosmos.tx.v1beta1.ModeInfo.SumCase = { + SUM_NOT_SET: 0, + SINGLE: 1, + MULTI: 2 +}; + +/** + * @return {proto.cosmos.tx.v1beta1.ModeInfo.SumCase} + */ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.getSumCase = function() { + return /** @type {proto.cosmos.tx.v1beta1.ModeInfo.SumCase} */(jspb.Message.computeOneofCase(this, proto.cosmos.tx.v1beta1.ModeInfo.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.tx.v1beta1.ModeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.ModeInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.ModeInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.ModeInfo.toObject = function(includeInstance, msg) { + var f, obj = { + single: (f = msg.getSingle()) && proto.cosmos.tx.v1beta1.ModeInfo.Single.toObject(includeInstance, f), + multi: (f = msg.getMulti()) && proto.cosmos.tx.v1beta1.ModeInfo.Multi.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.tx.v1beta1.ModeInfo} + */ +proto.cosmos.tx.v1beta1.ModeInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.ModeInfo; + return proto.cosmos.tx.v1beta1.ModeInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.ModeInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.ModeInfo} + */ +proto.cosmos.tx.v1beta1.ModeInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.tx.v1beta1.ModeInfo.Single; + reader.readMessage(value,proto.cosmos.tx.v1beta1.ModeInfo.Single.deserializeBinaryFromReader); + msg.setSingle(value); + break; + case 2: + var value = new proto.cosmos.tx.v1beta1.ModeInfo.Multi; + reader.readMessage(value,proto.cosmos.tx.v1beta1.ModeInfo.Multi.deserializeBinaryFromReader); + msg.setMulti(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.ModeInfo.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.tx.v1beta1.ModeInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.ModeInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSingle(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.tx.v1beta1.ModeInfo.Single.serializeBinaryToWriter + ); + } + f = message.getMulti(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.tx.v1beta1.ModeInfo.Multi.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.tx.v1beta1.ModeInfo.Single.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.ModeInfo.Single.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.ModeInfo.Single} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.ModeInfo.Single.toObject = function(includeInstance, msg) { + var f, obj = { + mode: 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.cosmos.tx.v1beta1.ModeInfo.Single} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Single.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.ModeInfo.Single; + return proto.cosmos.tx.v1beta1.ModeInfo.Single.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.ModeInfo.Single} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.ModeInfo.Single} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Single.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cosmos.tx.signing.v1beta1.SignMode} */ (reader.readEnum()); + msg.setMode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Single.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.ModeInfo.Single.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.tx.v1beta1.ModeInfo.Single} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.ModeInfo.Single.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMode(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * optional cosmos.tx.signing.v1beta1.SignMode mode = 1; + * @return {!proto.cosmos.tx.signing.v1beta1.SignMode} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Single.prototype.getMode = function() { + return /** @type {!proto.cosmos.tx.signing.v1beta1.SignMode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cosmos.tx.signing.v1beta1.SignMode} value + * @return {!proto.cosmos.tx.v1beta1.ModeInfo.Single} returns this + */ +proto.cosmos.tx.v1beta1.ModeInfo.Single.prototype.setMode = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.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.tx.v1beta1.ModeInfo.Multi.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.ModeInfo.Multi.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.ModeInfo.Multi} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.toObject = function(includeInstance, msg) { + var f, obj = { + bitarray: (f = msg.getBitarray()) && cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray.toObject(includeInstance, f), + modeInfosList: jspb.Message.toObjectList(msg.getModeInfosList(), + proto.cosmos.tx.v1beta1.ModeInfo.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.tx.v1beta1.ModeInfo.Multi} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.ModeInfo.Multi; + return proto.cosmos.tx.v1beta1.ModeInfo.Multi.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.ModeInfo.Multi} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.ModeInfo.Multi} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray; + reader.readMessage(value,cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray.deserializeBinaryFromReader); + msg.setBitarray(value); + break; + case 2: + var value = new proto.cosmos.tx.v1beta1.ModeInfo; + reader.readMessage(value,proto.cosmos.tx.v1beta1.ModeInfo.deserializeBinaryFromReader); + msg.addModeInfos(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.ModeInfo.Multi.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.tx.v1beta1.ModeInfo.Multi} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBitarray(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray.serializeBinaryToWriter + ); + } + f = message.getModeInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.tx.v1beta1.ModeInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; + * @return {?proto.cosmos.crypto.multisig.v1beta1.CompactBitArray} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.getBitarray = function() { + return /** @type{?proto.cosmos.crypto.multisig.v1beta1.CompactBitArray} */ ( + jspb.Message.getWrapperField(this, cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray, 1)); +}; + + +/** + * @param {?proto.cosmos.crypto.multisig.v1beta1.CompactBitArray|undefined} value + * @return {!proto.cosmos.tx.v1beta1.ModeInfo.Multi} returns this +*/ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.setBitarray = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.ModeInfo.Multi} returns this + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.clearBitarray = function() { + return this.setBitarray(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.hasBitarray = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated ModeInfo mode_infos = 2; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.getModeInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.tx.v1beta1.ModeInfo, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.ModeInfo.Multi} returns this +*/ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.setModeInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.tx.v1beta1.ModeInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.tx.v1beta1.ModeInfo} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.addModeInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.tx.v1beta1.ModeInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.tx.v1beta1.ModeInfo.Multi} returns this + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.clearModeInfosList = function() { + return this.setModeInfosList([]); +}; + + +/** + * optional Single single = 1; + * @return {?proto.cosmos.tx.v1beta1.ModeInfo.Single} + */ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.getSingle = function() { + return /** @type{?proto.cosmos.tx.v1beta1.ModeInfo.Single} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.v1beta1.ModeInfo.Single, 1)); +}; + + +/** + * @param {?proto.cosmos.tx.v1beta1.ModeInfo.Single|undefined} value + * @return {!proto.cosmos.tx.v1beta1.ModeInfo} returns this +*/ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.setSingle = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.cosmos.tx.v1beta1.ModeInfo.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.ModeInfo} returns this + */ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.clearSingle = function() { + return this.setSingle(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.hasSingle = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Multi multi = 2; + * @return {?proto.cosmos.tx.v1beta1.ModeInfo.Multi} + */ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.getMulti = function() { + return /** @type{?proto.cosmos.tx.v1beta1.ModeInfo.Multi} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.v1beta1.ModeInfo.Multi, 2)); +}; + + +/** + * @param {?proto.cosmos.tx.v1beta1.ModeInfo.Multi|undefined} value + * @return {!proto.cosmos.tx.v1beta1.ModeInfo} returns this +*/ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.setMulti = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.cosmos.tx.v1beta1.ModeInfo.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.ModeInfo} returns this + */ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.clearMulti = function() { + return this.setMulti(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.hasMulti = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.v1beta1.Fee.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.tx.v1beta1.Fee.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.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.cosmos.tx.v1beta1.Fee} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.Fee.toObject = function(includeInstance, msg) { + var f, obj = { + amountList: jspb.Message.toObjectList(msg.getAmountList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + gasLimit: jspb.Message.getFieldWithDefault(msg, 2, 0), + payer: jspb.Message.getFieldWithDefault(msg, 3, ""), + granter: 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.cosmos.tx.v1beta1.Fee} + */ +proto.cosmos.tx.v1beta1.Fee.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.Fee; + return proto.cosmos.tx.v1beta1.Fee.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.Fee} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.Fee} + */ +proto.cosmos.tx.v1beta1.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.addAmount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGasLimit(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPayer(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setGranter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.Fee.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.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.cosmos.tx.v1beta1.Fee} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.Fee.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmountList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getGasLimit(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getPayer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getGranter(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 1; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.Fee.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.Fee} returns this +*/ +proto.cosmos.tx.v1beta1.Fee.prototype.setAmountList = 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.cosmos.tx.v1beta1.Fee.prototype.addAmount = 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.cosmos.tx.v1beta1.Fee} returns this + */ +proto.cosmos.tx.v1beta1.Fee.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + +/** + * optional uint64 gas_limit = 2; + * @return {number} + */ +proto.cosmos.tx.v1beta1.Fee.prototype.getGasLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.tx.v1beta1.Fee} returns this + */ +proto.cosmos.tx.v1beta1.Fee.prototype.setGasLimit = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string payer = 3; + * @return {string} + */ +proto.cosmos.tx.v1beta1.Fee.prototype.getPayer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.tx.v1beta1.Fee} returns this + */ +proto.cosmos.tx.v1beta1.Fee.prototype.setPayer = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string granter = 4; + * @return {string} + */ +proto.cosmos.tx.v1beta1.Fee.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.tx.v1beta1.Fee} returns this + */ +proto.cosmos.tx.v1beta1.Fee.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +goog.object.extend(exports, proto.cosmos.tx.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/upgrade/v1beta1/query_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/upgrade/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..c90f8c53 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/upgrade/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,322 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.upgrade.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_upgrade_v1beta1_upgrade_pb = require('../../../cosmos/upgrade/v1beta1/upgrade_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.upgrade = {}; +proto.cosmos.upgrade.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.upgrade.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.upgrade.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest, + * !proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse>} + */ +const methodDescriptor_Query_CurrentPlan = new grpc.web.MethodDescriptor( + '/cosmos.upgrade.v1beta1.Query/CurrentPlan', + grpc.web.MethodType.UNARY, + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest, + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse, + /** + * @param {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest, + * !proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse>} + */ +const methodInfo_Query_CurrentPlan = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse, + /** + * @param {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.upgrade.v1beta1.QueryClient.prototype.currentPlan = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.upgrade.v1beta1.Query/CurrentPlan', + request, + metadata || {}, + methodDescriptor_Query_CurrentPlan, + callback); +}; + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.upgrade.v1beta1.QueryPromiseClient.prototype.currentPlan = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.upgrade.v1beta1.Query/CurrentPlan', + request, + metadata || {}, + methodDescriptor_Query_CurrentPlan); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest, + * !proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse>} + */ +const methodDescriptor_Query_AppliedPlan = new grpc.web.MethodDescriptor( + '/cosmos.upgrade.v1beta1.Query/AppliedPlan', + grpc.web.MethodType.UNARY, + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest, + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse, + /** + * @param {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest, + * !proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse>} + */ +const methodInfo_Query_AppliedPlan = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse, + /** + * @param {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.upgrade.v1beta1.QueryClient.prototype.appliedPlan = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.upgrade.v1beta1.Query/AppliedPlan', + request, + metadata || {}, + methodDescriptor_Query_AppliedPlan, + callback); +}; + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.upgrade.v1beta1.QueryPromiseClient.prototype.appliedPlan = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.upgrade.v1beta1.Query/AppliedPlan', + request, + metadata || {}, + methodDescriptor_Query_AppliedPlan); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest, + * !proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse>} + */ +const methodDescriptor_Query_UpgradedConsensusState = new grpc.web.MethodDescriptor( + '/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState', + grpc.web.MethodType.UNARY, + proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest, + proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse, + /** + * @param {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest, + * !proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse>} + */ +const methodInfo_Query_UpgradedConsensusState = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse, + /** + * @param {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.upgrade.v1beta1.QueryClient.prototype.upgradedConsensusState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState', + request, + metadata || {}, + methodDescriptor_Query_UpgradedConsensusState, + callback); +}; + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.upgrade.v1beta1.QueryPromiseClient.prototype.upgradedConsensusState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState', + request, + metadata || {}, + methodDescriptor_Query_UpgradedConsensusState); +}; + + +module.exports = proto.cosmos.upgrade.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/upgrade/v1beta1/query_pb.js b/dist/src/types/proto-types/cosmos/upgrade/v1beta1/query_pb.js new file mode 100644 index 00000000..afaaba2b --- /dev/null +++ b/dist/src/types/proto-types/cosmos/upgrade/v1beta1/query_pb.js @@ -0,0 +1,946 @@ +// source: cosmos/upgrade/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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'); +goog.object.extend(proto, google_api_annotations_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.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse', 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.upgrade.v1beta1.QueryCurrentPlanRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.displayName = 'proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.upgrade.v1beta1.QueryCurrentPlanResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.displayName = 'proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.upgrade.v1beta1.QueryAppliedPlanRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.displayName = 'proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.upgrade.v1beta1.QueryAppliedPlanResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.displayName = 'proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.upgrade.v1beta1.QueryUpgradedConsensusStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.displayName = 'proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.upgrade.v1beta1.QueryUpgradedConsensusStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.displayName = 'proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.upgrade.v1beta1.QueryCurrentPlanRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.upgrade.v1beta1.QueryCurrentPlanRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.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.upgrade.v1beta1.QueryCurrentPlanRequest} + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest; + return proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.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.upgrade.v1beta1.QueryCurrentPlanRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.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.upgrade.v1beta1.QueryCurrentPlanRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.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.upgrade.v1beta1.QueryCurrentPlanResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.upgrade.v1beta1.QueryCurrentPlanResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.toObject = function(includeInstance, msg) { + var f, obj = { + plan: (f = msg.getPlan()) && cosmos_upgrade_v1beta1_upgrade_pb.Plan.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.upgrade.v1beta1.QueryCurrentPlanResponse} + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse; + return proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse} + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.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.upgrade.v1beta1.QueryCurrentPlanResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPlan(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_upgrade_v1beta1_upgrade_pb.Plan.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Plan plan = 1; + * @return {?proto.cosmos.upgrade.v1beta1.Plan} + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.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.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse} returns this +*/ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.prototype.setPlan = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse} returns this + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.prototype.clearPlan = function() { + return this.setPlan(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.prototype.hasPlan = 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.upgrade.v1beta1.QueryAppliedPlanRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.upgrade.v1beta1.QueryAppliedPlanRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.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.upgrade.v1beta1.QueryAppliedPlanRequest} + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest; + return proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.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.upgrade.v1beta1.QueryAppliedPlanRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.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.upgrade.v1beta1.QueryAppliedPlanRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.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.upgrade.v1beta1.QueryAppliedPlanRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} returns this + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.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.upgrade.v1beta1.QueryAppliedPlanResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.upgrade.v1beta1.QueryAppliedPlanResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.toObject = function(includeInstance, msg) { + var f, obj = { + height: 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.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse} + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse; + return proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse} + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.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.upgrade.v1beta1.QueryAppliedPlanResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse} returns this + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.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.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.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.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + lastHeight: 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.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest; + return proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.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.setLastHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.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.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLastHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 last_height = 1; + * @return {number} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.prototype.getLastHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} returns this + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.prototype.setLastHeight = 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.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.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.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + upgradedConsensusState: (f = msg.getUpgradedConsensusState()) && 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.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse; + return proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.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.setUpgradedConsensusState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.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.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUpgradedConsensusState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Any upgraded_consensus_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.getUpgradedConsensusState = 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.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} returns this +*/ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.setUpgradedConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} returns this + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.clearUpgradedConsensusState = function() { + return this.setUpgradedConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.hasUpgradedConsensusState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.cosmos.upgrade.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/upgrade/v1beta1/upgrade_pb.js b/dist/src/types/proto-types/cosmos/upgrade/v1beta1/upgrade_pb.js new file mode 100644 index 00000000..316cd7e3 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/upgrade/v1beta1/upgrade_pb.js @@ -0,0 +1,750 @@ +// source: cosmos/upgrade/v1beta1/upgrade.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.Plan', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal', 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.upgrade.v1beta1.Plan = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.Plan, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.Plan.displayName = 'proto.cosmos.upgrade.v1beta1.Plan'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.upgrade.v1beta1.SoftwareUpgradeProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.displayName = 'proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.upgrade.v1beta1.CancelSoftwareUpgradeProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.displayName = 'proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.upgrade.v1beta1.Plan.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.Plan.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.upgrade.v1beta1.Plan} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.Plan.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + info: jspb.Message.getFieldWithDefault(msg, 4, ""), + 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.cosmos.upgrade.v1beta1.Plan} + */ +proto.cosmos.upgrade.v1beta1.Plan.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.Plan; + return proto.cosmos.upgrade.v1beta1.Plan.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.Plan} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.Plan} + */ +proto.cosmos.upgrade.v1beta1.Plan.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 = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + case 5: + 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.cosmos.upgrade.v1beta1.Plan.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.Plan.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.upgrade.v1beta1.Plan} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.Plan.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getUpgradedClientState(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.Plan} returns this + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.getTime = 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.upgrade.v1beta1.Plan} returns this +*/ +proto.cosmos.upgrade.v1beta1.Plan.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.upgrade.v1beta1.Plan} returns this + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.hasTime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 height = 3; + * @return {number} + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.upgrade.v1beta1.Plan} returns this + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.Plan} returns this + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.setInfo = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional google.protobuf.Any upgraded_client_state = 5; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.getUpgradedClientState = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.cosmos.upgrade.v1beta1.Plan} returns this +*/ +proto.cosmos.upgrade.v1beta1.Plan.prototype.setUpgradedClientState = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.upgrade.v1beta1.Plan} returns this + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.clearUpgradedClientState = function() { + return this.setUpgradedClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.hasUpgradedClientState = function() { + return jspb.Message.getField(this, 5) != 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.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.upgrade.v1beta1.SoftwareUpgradeProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + plan: (f = msg.getPlan()) && proto.cosmos.upgrade.v1beta1.Plan.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.upgrade.v1beta1.SoftwareUpgradeProposal} + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal; + return proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.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.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = new proto.cosmos.upgrade.v1beta1.Plan; + reader.readMessage(value,proto.cosmos.upgrade.v1beta1.Plan.deserializeBinaryFromReader); + msg.setPlan(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.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.upgrade.v1beta1.SoftwareUpgradeProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + 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, + proto.cosmos.upgrade.v1beta1.Plan.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} returns this + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} returns this + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Plan plan = 3; + * @return {?proto.cosmos.upgrade.v1beta1.Plan} + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.getPlan = function() { + return /** @type{?proto.cosmos.upgrade.v1beta1.Plan} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.upgrade.v1beta1.Plan, 3)); +}; + + +/** + * @param {?proto.cosmos.upgrade.v1beta1.Plan|undefined} value + * @return {!proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} returns this +*/ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.setPlan = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} returns this + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.clearPlan = function() { + return this.setPlan(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.hasPlan = 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.upgrade.v1beta1.CancelSoftwareUpgradeProposal.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.upgrade.v1beta1.CancelSoftwareUpgradeProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} + */ +proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal; + return proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} + */ +proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.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.setTitle(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.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} returns this + */ +proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} returns this + */ +proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cosmos.upgrade.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/vesting/v1beta1/tx_grpc_web_pb.js b/dist/src/types/proto-types/cosmos/vesting/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..d09c57df --- /dev/null +++ b/dist/src/types/proto-types/cosmos/vesting/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,160 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.vesting.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.vesting = {}; +proto.cosmos.vesting.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.vesting.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.vesting.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount, + * !proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse>} + */ +const methodDescriptor_Msg_CreateVestingAccount = new grpc.web.MethodDescriptor( + '/cosmos.vesting.v1beta1.Msg/CreateVestingAccount', + grpc.web.MethodType.UNARY, + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount, + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse, + /** + * @param {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount, + * !proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse>} + */ +const methodInfo_Msg_CreateVestingAccount = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse, + /** + * @param {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.vesting.v1beta1.MsgClient.prototype.createVestingAccount = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.vesting.v1beta1.Msg/CreateVestingAccount', + request, + metadata || {}, + methodDescriptor_Msg_CreateVestingAccount, + callback); +}; + + +/** + * @param {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.vesting.v1beta1.MsgPromiseClient.prototype.createVestingAccount = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.vesting.v1beta1.Msg/CreateVestingAccount', + request, + metadata || {}, + methodDescriptor_Msg_CreateVestingAccount); +}; + + +module.exports = proto.cosmos.vesting.v1beta1; + diff --git a/dist/src/types/proto-types/cosmos/vesting/v1beta1/tx_pb.js b/dist/src/types/proto-types/cosmos/vesting/v1beta1/tx_pb.js new file mode 100644 index 00000000..ce1cd8b4 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/vesting/v1beta1/tx_pb.js @@ -0,0 +1,444 @@ +// source: cosmos/vesting/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount', null, global); +goog.exportSymbol('proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse', 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.vesting.v1beta1.MsgCreateVestingAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.displayName = 'proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.vesting.v1beta1.MsgCreateVestingAccountResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.displayName = 'proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.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.vesting.v1beta1.MsgCreateVestingAccount.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.vesting.v1beta1.MsgCreateVestingAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.toObject = function(includeInstance, msg) { + var f, obj = { + fromAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + toAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + amountList: jspb.Message.toObjectList(msg.getAmountList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + endTime: jspb.Message.getFieldWithDefault(msg, 4, 0), + delayed: jspb.Message.getBooleanFieldWithDefault(msg, 5, 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.vesting.v1beta1.MsgCreateVestingAccount} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount; + return proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.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.setFromAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setToAddress(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; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEndTime(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDelayed(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.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.vesting.v1beta1.MsgCreateVestingAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFromAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getToAddress(); + 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 + ); + } + f = message.getEndTime(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getDelayed(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional string from_address = 1; + * @return {string} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.getFromAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.setFromAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string to_address = 2; + * @return {string} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.getToAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.setToAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 3; + * @return {!Array} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.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.vesting.v1beta1.MsgCreateVestingAccount.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.vesting.v1beta1.MsgCreateVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + +/** + * optional int64 end_time = 4; + * @return {number} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.getEndTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.setEndTime = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bool delayed = 5; + * @return {boolean} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.getDelayed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.setDelayed = function(value) { + return jspb.Message.setProto3BooleanField(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.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.vesting.v1beta1.MsgCreateVestingAccountResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.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.vesting.v1beta1.MsgCreateVestingAccountResponse} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse; + return proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.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.vesting.v1beta1.MsgCreateVestingAccountResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.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.vesting.v1beta1.MsgCreateVestingAccountResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cosmos.vesting.v1beta1); diff --git a/dist/src/types/proto-types/cosmos/vesting/v1beta1/vesting_pb.js b/dist/src/types/proto-types/cosmos/vesting/v1beta1/vesting_pb.js new file mode 100644 index 00000000..a4eb5b46 --- /dev/null +++ b/dist/src/types/proto-types/cosmos/vesting/v1beta1/vesting_pb.js @@ -0,0 +1,1241 @@ +// source: cosmos/vesting/v1beta1/vesting.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_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.cosmos.vesting.v1beta1.BaseVestingAccount', null, global); +goog.exportSymbol('proto.cosmos.vesting.v1beta1.ContinuousVestingAccount', null, global); +goog.exportSymbol('proto.cosmos.vesting.v1beta1.DelayedVestingAccount', null, global); +goog.exportSymbol('proto.cosmos.vesting.v1beta1.Period', null, global); +goog.exportSymbol('proto.cosmos.vesting.v1beta1.PeriodicVestingAccount', 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.vesting.v1beta1.BaseVestingAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.vesting.v1beta1.BaseVestingAccount.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.vesting.v1beta1.BaseVestingAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.vesting.v1beta1.BaseVestingAccount.displayName = 'proto.cosmos.vesting.v1beta1.BaseVestingAccount'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.vesting.v1beta1.ContinuousVestingAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.vesting.v1beta1.ContinuousVestingAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.displayName = 'proto.cosmos.vesting.v1beta1.ContinuousVestingAccount'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.vesting.v1beta1.DelayedVestingAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.vesting.v1beta1.DelayedVestingAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.vesting.v1beta1.DelayedVestingAccount.displayName = 'proto.cosmos.vesting.v1beta1.DelayedVestingAccount'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.vesting.v1beta1.Period = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.vesting.v1beta1.Period.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.vesting.v1beta1.Period, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.vesting.v1beta1.Period.displayName = 'proto.cosmos.vesting.v1beta1.Period'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.vesting.v1beta1.PeriodicVestingAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.vesting.v1beta1.PeriodicVestingAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.displayName = 'proto.cosmos.vesting.v1beta1.PeriodicVestingAccount'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.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.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.vesting.v1beta1.BaseVestingAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.vesting.v1beta1.BaseVestingAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.toObject = function(includeInstance, msg) { + var f, obj = { + baseAccount: (f = msg.getBaseAccount()) && cosmos_auth_v1beta1_auth_pb.BaseAccount.toObject(includeInstance, f), + originalVestingList: jspb.Message.toObjectList(msg.getOriginalVestingList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + delegatedFreeList: jspb.Message.toObjectList(msg.getDelegatedFreeList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + delegatedVestingList: jspb.Message.toObjectList(msg.getDelegatedVestingList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + endTime: 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.cosmos.vesting.v1beta1.BaseVestingAccount} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.vesting.v1beta1.BaseVestingAccount; + return proto.cosmos.vesting.v1beta1.BaseVestingAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.vesting.v1beta1.BaseVestingAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.vesting.v1beta1.BaseVestingAccount} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.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 = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addOriginalVesting(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addDelegatedFree(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addDelegatedVesting(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEndTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.vesting.v1beta1.BaseVestingAccount.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.vesting.v1beta1.BaseVestingAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.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.getOriginalVestingList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getDelegatedFreeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getDelegatedVestingList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getEndTime(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional cosmos.auth.v1beta1.BaseAccount base_account = 1; + * @return {?proto.cosmos.auth.v1beta1.BaseAccount} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.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.cosmos.vesting.v1beta1.BaseVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.setBaseAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.vesting.v1beta1.BaseVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.clearBaseAccount = function() { + return this.setBaseAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.hasBaseAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin original_vesting = 2; + * @return {!Array} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.getOriginalVestingList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.vesting.v1beta1.BaseVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.setOriginalVestingList = 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.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.addOriginalVesting = 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.cosmos.vesting.v1beta1.BaseVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.clearOriginalVestingList = function() { + return this.setOriginalVestingList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin delegated_free = 3; + * @return {!Array} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.getDelegatedFreeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.vesting.v1beta1.BaseVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.setDelegatedFreeList = 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.vesting.v1beta1.BaseVestingAccount.prototype.addDelegatedFree = 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.vesting.v1beta1.BaseVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.clearDelegatedFreeList = function() { + return this.setDelegatedFreeList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin delegated_vesting = 4; + * @return {!Array} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.getDelegatedVestingList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.vesting.v1beta1.BaseVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.setDelegatedVestingList = 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.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.addDelegatedVesting = 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.cosmos.vesting.v1beta1.BaseVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.clearDelegatedVestingList = function() { + return this.setDelegatedVestingList([]); +}; + + +/** + * optional int64 end_time = 5; + * @return {number} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.getEndTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.vesting.v1beta1.BaseVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.setEndTime = 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.cosmos.vesting.v1beta1.ContinuousVestingAccount.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.vesting.v1beta1.ContinuousVestingAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.toObject = function(includeInstance, msg) { + var f, obj = { + baseVestingAccount: (f = msg.getBaseVestingAccount()) && proto.cosmos.vesting.v1beta1.BaseVestingAccount.toObject(includeInstance, f), + startTime: 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.vesting.v1beta1.ContinuousVestingAccount} + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.vesting.v1beta1.ContinuousVestingAccount; + return proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.vesting.v1beta1.ContinuousVestingAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.vesting.v1beta1.ContinuousVestingAccount} + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.vesting.v1beta1.BaseVestingAccount; + reader.readMessage(value,proto.cosmos.vesting.v1beta1.BaseVestingAccount.deserializeBinaryFromReader); + msg.setBaseVestingAccount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStartTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.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.vesting.v1beta1.ContinuousVestingAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBaseVestingAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.vesting.v1beta1.BaseVestingAccount.serializeBinaryToWriter + ); + } + f = message.getStartTime(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional BaseVestingAccount base_vesting_account = 1; + * @return {?proto.cosmos.vesting.v1beta1.BaseVestingAccount} + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.prototype.getBaseVestingAccount = function() { + return /** @type{?proto.cosmos.vesting.v1beta1.BaseVestingAccount} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.vesting.v1beta1.BaseVestingAccount, 1)); +}; + + +/** + * @param {?proto.cosmos.vesting.v1beta1.BaseVestingAccount|undefined} value + * @return {!proto.cosmos.vesting.v1beta1.ContinuousVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.prototype.setBaseVestingAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.vesting.v1beta1.ContinuousVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.prototype.clearBaseVestingAccount = function() { + return this.setBaseVestingAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.prototype.hasBaseVestingAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 start_time = 2; + * @return {number} + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.prototype.getStartTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.vesting.v1beta1.ContinuousVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.prototype.setStartTime = 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.vesting.v1beta1.DelayedVestingAccount.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.vesting.v1beta1.DelayedVestingAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.vesting.v1beta1.DelayedVestingAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.toObject = function(includeInstance, msg) { + var f, obj = { + baseVestingAccount: (f = msg.getBaseVestingAccount()) && proto.cosmos.vesting.v1beta1.BaseVestingAccount.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.vesting.v1beta1.DelayedVestingAccount} + */ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.vesting.v1beta1.DelayedVestingAccount; + return proto.cosmos.vesting.v1beta1.DelayedVestingAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.vesting.v1beta1.DelayedVestingAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.vesting.v1beta1.DelayedVestingAccount} + */ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.vesting.v1beta1.BaseVestingAccount; + reader.readMessage(value,proto.cosmos.vesting.v1beta1.BaseVestingAccount.deserializeBinaryFromReader); + msg.setBaseVestingAccount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.vesting.v1beta1.DelayedVestingAccount.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.vesting.v1beta1.DelayedVestingAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBaseVestingAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.vesting.v1beta1.BaseVestingAccount.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BaseVestingAccount base_vesting_account = 1; + * @return {?proto.cosmos.vesting.v1beta1.BaseVestingAccount} + */ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.prototype.getBaseVestingAccount = function() { + return /** @type{?proto.cosmos.vesting.v1beta1.BaseVestingAccount} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.vesting.v1beta1.BaseVestingAccount, 1)); +}; + + +/** + * @param {?proto.cosmos.vesting.v1beta1.BaseVestingAccount|undefined} value + * @return {!proto.cosmos.vesting.v1beta1.DelayedVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.prototype.setBaseVestingAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.vesting.v1beta1.DelayedVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.prototype.clearBaseVestingAccount = function() { + return this.setBaseVestingAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.prototype.hasBaseVestingAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.vesting.v1beta1.Period.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.vesting.v1beta1.Period.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.vesting.v1beta1.Period.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.vesting.v1beta1.Period} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.Period.toObject = function(includeInstance, msg) { + var f, obj = { + length: jspb.Message.getFieldWithDefault(msg, 1, 0), + 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.vesting.v1beta1.Period} + */ +proto.cosmos.vesting.v1beta1.Period.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.vesting.v1beta1.Period; + return proto.cosmos.vesting.v1beta1.Period.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.vesting.v1beta1.Period} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.vesting.v1beta1.Period} + */ +proto.cosmos.vesting.v1beta1.Period.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.setLength(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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.vesting.v1beta1.Period.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.vesting.v1beta1.Period.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.vesting.v1beta1.Period} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.Period.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLength(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getAmountList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 length = 1; + * @return {number} + */ +proto.cosmos.vesting.v1beta1.Period.prototype.getLength = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.vesting.v1beta1.Period} returns this + */ +proto.cosmos.vesting.v1beta1.Period.prototype.setLength = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 2; + * @return {!Array} + */ +proto.cosmos.vesting.v1beta1.Period.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.vesting.v1beta1.Period} returns this +*/ +proto.cosmos.vesting.v1beta1.Period.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.cosmos.vesting.v1beta1.Period.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.cosmos.vesting.v1beta1.Period} returns this + */ +proto.cosmos.vesting.v1beta1.Period.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.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.vesting.v1beta1.PeriodicVestingAccount.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.vesting.v1beta1.PeriodicVestingAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.toObject = function(includeInstance, msg) { + var f, obj = { + baseVestingAccount: (f = msg.getBaseVestingAccount()) && proto.cosmos.vesting.v1beta1.BaseVestingAccount.toObject(includeInstance, f), + startTime: jspb.Message.getFieldWithDefault(msg, 2, 0), + vestingPeriodsList: jspb.Message.toObjectList(msg.getVestingPeriodsList(), + proto.cosmos.vesting.v1beta1.Period.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.vesting.v1beta1.PeriodicVestingAccount} + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.vesting.v1beta1.PeriodicVestingAccount; + return proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.vesting.v1beta1.PeriodicVestingAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.vesting.v1beta1.PeriodicVestingAccount} + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.vesting.v1beta1.BaseVestingAccount; + reader.readMessage(value,proto.cosmos.vesting.v1beta1.BaseVestingAccount.deserializeBinaryFromReader); + msg.setBaseVestingAccount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStartTime(value); + break; + case 3: + var value = new proto.cosmos.vesting.v1beta1.Period; + reader.readMessage(value,proto.cosmos.vesting.v1beta1.Period.deserializeBinaryFromReader); + msg.addVestingPeriods(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.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.vesting.v1beta1.PeriodicVestingAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBaseVestingAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.vesting.v1beta1.BaseVestingAccount.serializeBinaryToWriter + ); + } + f = message.getStartTime(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getVestingPeriodsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.vesting.v1beta1.Period.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BaseVestingAccount base_vesting_account = 1; + * @return {?proto.cosmos.vesting.v1beta1.BaseVestingAccount} + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.getBaseVestingAccount = function() { + return /** @type{?proto.cosmos.vesting.v1beta1.BaseVestingAccount} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.vesting.v1beta1.BaseVestingAccount, 1)); +}; + + +/** + * @param {?proto.cosmos.vesting.v1beta1.BaseVestingAccount|undefined} value + * @return {!proto.cosmos.vesting.v1beta1.PeriodicVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.setBaseVestingAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.vesting.v1beta1.PeriodicVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.clearBaseVestingAccount = function() { + return this.setBaseVestingAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.hasBaseVestingAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 start_time = 2; + * @return {number} + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.getStartTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.vesting.v1beta1.PeriodicVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.setStartTime = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated Period vesting_periods = 3; + * @return {!Array} + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.getVestingPeriodsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.vesting.v1beta1.Period, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.vesting.v1beta1.PeriodicVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.setVestingPeriodsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.vesting.v1beta1.Period=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.vesting.v1beta1.Period} + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.addVestingPeriods = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.vesting.v1beta1.Period, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.vesting.v1beta1.PeriodicVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.clearVestingPeriodsList = function() { + return this.setVestingPeriodsList([]); +}; + + +goog.object.extend(exports, proto.cosmos.vesting.v1beta1); diff --git a/dist/src/types/proto-types/cosmos_proto/cosmos_pb.js b/dist/src/types/proto-types/cosmos_proto/cosmos_pb.js new file mode 100644 index 00000000..05a713cf --- /dev/null +++ b/dist/src/types/proto-types/cosmos_proto/cosmos_pb.js @@ -0,0 +1,95 @@ +// source: cosmos_proto/cosmos.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_proto.acceptsInterface', null, global); +goog.exportSymbol('proto.cosmos_proto.implementsInterface', null, global); +goog.exportSymbol('proto.cosmos_proto.interfaceType', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `interfaceType`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.cosmos_proto.interfaceType = new jspb.ExtensionFieldInfo( + 93001, + {interfaceType: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[93001] = new jspb.ExtensionFieldBinaryInfo( + proto.cosmos_proto.interfaceType, + 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[93001] = proto.cosmos_proto.interfaceType; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `implementsInterface`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.cosmos_proto.implementsInterface = new jspb.ExtensionFieldInfo( + 93002, + {implementsInterface: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[93002] = new jspb.ExtensionFieldBinaryInfo( + proto.cosmos_proto.implementsInterface, + 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.implementsInterface; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `acceptsInterface`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.cosmos_proto.acceptsInterface = new jspb.ExtensionFieldInfo( + 93001, + {acceptsInterface: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[93001] = new jspb.ExtensionFieldBinaryInfo( + proto.cosmos_proto.acceptsInterface, + 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[93001] = proto.cosmos_proto.acceptsInterface; + +goog.object.extend(exports, proto.cosmos_proto); diff --git a/dist/src/types/proto-types/gogoproto/gogo_pb.js b/dist/src/types/proto-types/gogoproto/gogo_pb.js new file mode 100644 index 00000000..52865d8a --- /dev/null +++ b/dist/src/types/proto-types/gogoproto/gogo_pb.js @@ -0,0 +1,2019 @@ +// source: gogoproto/gogo.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.gogoproto.benchgen', null, global); +goog.exportSymbol('proto.gogoproto.benchgenAll', null, global); +goog.exportSymbol('proto.gogoproto.castkey', null, global); +goog.exportSymbol('proto.gogoproto.castrepeated', null, global); +goog.exportSymbol('proto.gogoproto.casttype', null, global); +goog.exportSymbol('proto.gogoproto.castvalue', null, global); +goog.exportSymbol('proto.gogoproto.compare', null, global); +goog.exportSymbol('proto.gogoproto.compareAll', null, global); +goog.exportSymbol('proto.gogoproto.customname', null, global); +goog.exportSymbol('proto.gogoproto.customtype', null, global); +goog.exportSymbol('proto.gogoproto.description', null, global); +goog.exportSymbol('proto.gogoproto.descriptionAll', null, global); +goog.exportSymbol('proto.gogoproto.embed', null, global); +goog.exportSymbol('proto.gogoproto.enumCustomname', null, global); +goog.exportSymbol('proto.gogoproto.enumStringer', null, global); +goog.exportSymbol('proto.gogoproto.enumStringerAll', null, global); +goog.exportSymbol('proto.gogoproto.enumdecl', null, global); +goog.exportSymbol('proto.gogoproto.enumdeclAll', null, global); +goog.exportSymbol('proto.gogoproto.enumvalueCustomname', null, global); +goog.exportSymbol('proto.gogoproto.equal', null, global); +goog.exportSymbol('proto.gogoproto.equalAll', null, global); +goog.exportSymbol('proto.gogoproto.face', null, global); +goog.exportSymbol('proto.gogoproto.faceAll', null, global); +goog.exportSymbol('proto.gogoproto.gogoprotoImport', null, global); +goog.exportSymbol('proto.gogoproto.goprotoEnumPrefix', null, global); +goog.exportSymbol('proto.gogoproto.goprotoEnumPrefixAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoEnumStringer', null, global); +goog.exportSymbol('proto.gogoproto.goprotoEnumStringerAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoExtensionsMap', null, global); +goog.exportSymbol('proto.gogoproto.goprotoExtensionsMapAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoGetters', null, global); +goog.exportSymbol('proto.gogoproto.goprotoGettersAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoRegistration', null, global); +goog.exportSymbol('proto.gogoproto.goprotoSizecache', null, global); +goog.exportSymbol('proto.gogoproto.goprotoSizecacheAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoStringer', null, global); +goog.exportSymbol('proto.gogoproto.goprotoStringerAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoUnkeyed', null, global); +goog.exportSymbol('proto.gogoproto.goprotoUnkeyedAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoUnrecognized', null, global); +goog.exportSymbol('proto.gogoproto.goprotoUnrecognizedAll', null, global); +goog.exportSymbol('proto.gogoproto.gostring', null, global); +goog.exportSymbol('proto.gogoproto.gostringAll', null, global); +goog.exportSymbol('proto.gogoproto.jsontag', null, global); +goog.exportSymbol('proto.gogoproto.marshaler', null, global); +goog.exportSymbol('proto.gogoproto.marshalerAll', null, global); +goog.exportSymbol('proto.gogoproto.messagename', null, global); +goog.exportSymbol('proto.gogoproto.messagenameAll', null, global); +goog.exportSymbol('proto.gogoproto.moretags', null, global); +goog.exportSymbol('proto.gogoproto.nullable', null, global); +goog.exportSymbol('proto.gogoproto.onlyone', null, global); +goog.exportSymbol('proto.gogoproto.onlyoneAll', null, global); +goog.exportSymbol('proto.gogoproto.populate', null, global); +goog.exportSymbol('proto.gogoproto.populateAll', null, global); +goog.exportSymbol('proto.gogoproto.protosizer', null, global); +goog.exportSymbol('proto.gogoproto.protosizerAll', null, global); +goog.exportSymbol('proto.gogoproto.sizer', null, global); +goog.exportSymbol('proto.gogoproto.sizerAll', null, global); +goog.exportSymbol('proto.gogoproto.stableMarshaler', null, global); +goog.exportSymbol('proto.gogoproto.stableMarshalerAll', null, global); +goog.exportSymbol('proto.gogoproto.stdduration', null, global); +goog.exportSymbol('proto.gogoproto.stdtime', null, global); +goog.exportSymbol('proto.gogoproto.stringer', null, global); +goog.exportSymbol('proto.gogoproto.stringerAll', null, global); +goog.exportSymbol('proto.gogoproto.testgen', null, global); +goog.exportSymbol('proto.gogoproto.testgenAll', null, global); +goog.exportSymbol('proto.gogoproto.typedecl', null, global); +goog.exportSymbol('proto.gogoproto.typedeclAll', null, global); +goog.exportSymbol('proto.gogoproto.unmarshaler', null, global); +goog.exportSymbol('proto.gogoproto.unmarshalerAll', null, global); +goog.exportSymbol('proto.gogoproto.unsafeMarshaler', null, global); +goog.exportSymbol('proto.gogoproto.unsafeMarshalerAll', null, global); +goog.exportSymbol('proto.gogoproto.unsafeUnmarshaler', null, global); +goog.exportSymbol('proto.gogoproto.unsafeUnmarshalerAll', null, global); +goog.exportSymbol('proto.gogoproto.verboseEqual', null, global); +goog.exportSymbol('proto.gogoproto.verboseEqualAll', null, global); +goog.exportSymbol('proto.gogoproto.wktpointer', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoEnumPrefix`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoEnumPrefix = new jspb.ExtensionFieldInfo( + 62001, + {goprotoEnumPrefix: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[62001] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoEnumPrefix, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[62001] = proto.gogoproto.goprotoEnumPrefix; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoEnumStringer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoEnumStringer = new jspb.ExtensionFieldInfo( + 62021, + {goprotoEnumStringer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[62021] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoEnumStringer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[62021] = proto.gogoproto.goprotoEnumStringer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumStringer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumStringer = new jspb.ExtensionFieldInfo( + 62022, + {enumStringer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[62022] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumStringer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[62022] = proto.gogoproto.enumStringer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumCustomname`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumCustomname = new jspb.ExtensionFieldInfo( + 62023, + {enumCustomname: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[62023] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumCustomname, + 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.EnumOptions.extensions[62023] = proto.gogoproto.enumCustomname; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumdecl`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumdecl = new jspb.ExtensionFieldInfo( + 62024, + {enumdecl: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[62024] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumdecl, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[62024] = proto.gogoproto.enumdecl; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumvalueCustomname`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumvalueCustomname = new jspb.ExtensionFieldInfo( + 66001, + {enumvalueCustomname: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumValueOptions.extensionsBinary[66001] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumvalueCustomname, + 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.EnumValueOptions.extensions[66001] = proto.gogoproto.enumvalueCustomname; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoGettersAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoGettersAll = new jspb.ExtensionFieldInfo( + 63001, + {goprotoGettersAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63001] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoGettersAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63001] = proto.gogoproto.goprotoGettersAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoEnumPrefixAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoEnumPrefixAll = new jspb.ExtensionFieldInfo( + 63002, + {goprotoEnumPrefixAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63002] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoEnumPrefixAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63002] = proto.gogoproto.goprotoEnumPrefixAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoStringerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoStringerAll = new jspb.ExtensionFieldInfo( + 63003, + {goprotoStringerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63003] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoStringerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63003] = proto.gogoproto.goprotoStringerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `verboseEqualAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.verboseEqualAll = new jspb.ExtensionFieldInfo( + 63004, + {verboseEqualAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63004] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.verboseEqualAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63004] = proto.gogoproto.verboseEqualAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `faceAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.faceAll = new jspb.ExtensionFieldInfo( + 63005, + {faceAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63005] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.faceAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63005] = proto.gogoproto.faceAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `gostringAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.gostringAll = new jspb.ExtensionFieldInfo( + 63006, + {gostringAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63006] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.gostringAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63006] = proto.gogoproto.gostringAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `populateAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.populateAll = new jspb.ExtensionFieldInfo( + 63007, + {populateAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63007] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.populateAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63007] = proto.gogoproto.populateAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stringerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stringerAll = new jspb.ExtensionFieldInfo( + 63008, + {stringerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63008] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stringerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63008] = proto.gogoproto.stringerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `onlyoneAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.onlyoneAll = new jspb.ExtensionFieldInfo( + 63009, + {onlyoneAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63009] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.onlyoneAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63009] = proto.gogoproto.onlyoneAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `equalAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.equalAll = new jspb.ExtensionFieldInfo( + 63013, + {equalAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63013] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.equalAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63013] = proto.gogoproto.equalAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `descriptionAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.descriptionAll = new jspb.ExtensionFieldInfo( + 63014, + {descriptionAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63014] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.descriptionAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63014] = proto.gogoproto.descriptionAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `testgenAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.testgenAll = new jspb.ExtensionFieldInfo( + 63015, + {testgenAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63015] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.testgenAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63015] = proto.gogoproto.testgenAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `benchgenAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.benchgenAll = new jspb.ExtensionFieldInfo( + 63016, + {benchgenAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63016] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.benchgenAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63016] = proto.gogoproto.benchgenAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `marshalerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.marshalerAll = new jspb.ExtensionFieldInfo( + 63017, + {marshalerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63017] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.marshalerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63017] = proto.gogoproto.marshalerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unmarshalerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unmarshalerAll = new jspb.ExtensionFieldInfo( + 63018, + {unmarshalerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63018] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unmarshalerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63018] = proto.gogoproto.unmarshalerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stableMarshalerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stableMarshalerAll = new jspb.ExtensionFieldInfo( + 63019, + {stableMarshalerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63019] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stableMarshalerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63019] = proto.gogoproto.stableMarshalerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `sizerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.sizerAll = new jspb.ExtensionFieldInfo( + 63020, + {sizerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63020] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.sizerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63020] = proto.gogoproto.sizerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoEnumStringerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoEnumStringerAll = new jspb.ExtensionFieldInfo( + 63021, + {goprotoEnumStringerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63021] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoEnumStringerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63021] = proto.gogoproto.goprotoEnumStringerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumStringerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumStringerAll = new jspb.ExtensionFieldInfo( + 63022, + {enumStringerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63022] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumStringerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63022] = proto.gogoproto.enumStringerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unsafeMarshalerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unsafeMarshalerAll = new jspb.ExtensionFieldInfo( + 63023, + {unsafeMarshalerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63023] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unsafeMarshalerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63023] = proto.gogoproto.unsafeMarshalerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unsafeUnmarshalerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unsafeUnmarshalerAll = new jspb.ExtensionFieldInfo( + 63024, + {unsafeUnmarshalerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63024] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unsafeUnmarshalerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63024] = proto.gogoproto.unsafeUnmarshalerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoExtensionsMapAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoExtensionsMapAll = new jspb.ExtensionFieldInfo( + 63025, + {goprotoExtensionsMapAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63025] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoExtensionsMapAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63025] = proto.gogoproto.goprotoExtensionsMapAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoUnrecognizedAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoUnrecognizedAll = new jspb.ExtensionFieldInfo( + 63026, + {goprotoUnrecognizedAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63026] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoUnrecognizedAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63026] = proto.gogoproto.goprotoUnrecognizedAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `gogoprotoImport`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.gogoprotoImport = new jspb.ExtensionFieldInfo( + 63027, + {gogoprotoImport: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63027] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.gogoprotoImport, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63027] = proto.gogoproto.gogoprotoImport; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `protosizerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.protosizerAll = new jspb.ExtensionFieldInfo( + 63028, + {protosizerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63028] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.protosizerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63028] = proto.gogoproto.protosizerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `compareAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.compareAll = new jspb.ExtensionFieldInfo( + 63029, + {compareAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63029] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.compareAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63029] = proto.gogoproto.compareAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `typedeclAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.typedeclAll = new jspb.ExtensionFieldInfo( + 63030, + {typedeclAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63030] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.typedeclAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63030] = proto.gogoproto.typedeclAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumdeclAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumdeclAll = new jspb.ExtensionFieldInfo( + 63031, + {enumdeclAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63031] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumdeclAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63031] = proto.gogoproto.enumdeclAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoRegistration`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoRegistration = new jspb.ExtensionFieldInfo( + 63032, + {goprotoRegistration: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63032] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoRegistration, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63032] = proto.gogoproto.goprotoRegistration; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `messagenameAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.messagenameAll = new jspb.ExtensionFieldInfo( + 63033, + {messagenameAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63033] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.messagenameAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63033] = proto.gogoproto.messagenameAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoSizecacheAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoSizecacheAll = new jspb.ExtensionFieldInfo( + 63034, + {goprotoSizecacheAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63034] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoSizecacheAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63034] = proto.gogoproto.goprotoSizecacheAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoUnkeyedAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoUnkeyedAll = new jspb.ExtensionFieldInfo( + 63035, + {goprotoUnkeyedAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63035] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoUnkeyedAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63035] = proto.gogoproto.goprotoUnkeyedAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoGetters`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoGetters = new jspb.ExtensionFieldInfo( + 64001, + {goprotoGetters: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64001] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoGetters, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64001] = proto.gogoproto.goprotoGetters; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoStringer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoStringer = new jspb.ExtensionFieldInfo( + 64003, + {goprotoStringer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64003] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoStringer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64003] = proto.gogoproto.goprotoStringer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `verboseEqual`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.verboseEqual = new jspb.ExtensionFieldInfo( + 64004, + {verboseEqual: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64004] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.verboseEqual, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64004] = proto.gogoproto.verboseEqual; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `face`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.face = new jspb.ExtensionFieldInfo( + 64005, + {face: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64005] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.face, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64005] = proto.gogoproto.face; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `gostring`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.gostring = new jspb.ExtensionFieldInfo( + 64006, + {gostring: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64006] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.gostring, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64006] = proto.gogoproto.gostring; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `populate`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.populate = new jspb.ExtensionFieldInfo( + 64007, + {populate: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64007] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.populate, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64007] = proto.gogoproto.populate; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stringer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stringer = new jspb.ExtensionFieldInfo( + 67008, + {stringer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[67008] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stringer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[67008] = proto.gogoproto.stringer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `onlyone`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.onlyone = new jspb.ExtensionFieldInfo( + 64009, + {onlyone: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64009] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.onlyone, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64009] = proto.gogoproto.onlyone; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `equal`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.equal = new jspb.ExtensionFieldInfo( + 64013, + {equal: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64013] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.equal, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64013] = proto.gogoproto.equal; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `description`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.description = new jspb.ExtensionFieldInfo( + 64014, + {description: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64014] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.description, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64014] = proto.gogoproto.description; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `testgen`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.testgen = new jspb.ExtensionFieldInfo( + 64015, + {testgen: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64015] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.testgen, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64015] = proto.gogoproto.testgen; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `benchgen`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.benchgen = new jspb.ExtensionFieldInfo( + 64016, + {benchgen: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64016] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.benchgen, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64016] = proto.gogoproto.benchgen; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `marshaler`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.marshaler = new jspb.ExtensionFieldInfo( + 64017, + {marshaler: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64017] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.marshaler, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64017] = proto.gogoproto.marshaler; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unmarshaler`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unmarshaler = new jspb.ExtensionFieldInfo( + 64018, + {unmarshaler: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64018] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unmarshaler, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64018] = proto.gogoproto.unmarshaler; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stableMarshaler`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stableMarshaler = new jspb.ExtensionFieldInfo( + 64019, + {stableMarshaler: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64019] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stableMarshaler, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64019] = proto.gogoproto.stableMarshaler; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `sizer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.sizer = new jspb.ExtensionFieldInfo( + 64020, + {sizer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64020] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.sizer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64020] = proto.gogoproto.sizer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unsafeMarshaler`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unsafeMarshaler = new jspb.ExtensionFieldInfo( + 64023, + {unsafeMarshaler: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64023] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unsafeMarshaler, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64023] = proto.gogoproto.unsafeMarshaler; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unsafeUnmarshaler`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unsafeUnmarshaler = new jspb.ExtensionFieldInfo( + 64024, + {unsafeUnmarshaler: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64024] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unsafeUnmarshaler, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64024] = proto.gogoproto.unsafeUnmarshaler; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoExtensionsMap`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoExtensionsMap = new jspb.ExtensionFieldInfo( + 64025, + {goprotoExtensionsMap: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64025] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoExtensionsMap, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64025] = proto.gogoproto.goprotoExtensionsMap; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoUnrecognized`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoUnrecognized = new jspb.ExtensionFieldInfo( + 64026, + {goprotoUnrecognized: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64026] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoUnrecognized, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64026] = proto.gogoproto.goprotoUnrecognized; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `protosizer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.protosizer = new jspb.ExtensionFieldInfo( + 64028, + {protosizer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64028] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.protosizer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64028] = proto.gogoproto.protosizer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `compare`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.compare = new jspb.ExtensionFieldInfo( + 64029, + {compare: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64029] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.compare, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64029] = proto.gogoproto.compare; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `typedecl`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.typedecl = new jspb.ExtensionFieldInfo( + 64030, + {typedecl: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64030] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.typedecl, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64030] = proto.gogoproto.typedecl; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `messagename`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.messagename = new jspb.ExtensionFieldInfo( + 64033, + {messagename: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64033] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.messagename, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64033] = proto.gogoproto.messagename; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoSizecache`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoSizecache = new jspb.ExtensionFieldInfo( + 64034, + {goprotoSizecache: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64034] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoSizecache, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64034] = proto.gogoproto.goprotoSizecache; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoUnkeyed`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoUnkeyed = new jspb.ExtensionFieldInfo( + 64035, + {goprotoUnkeyed: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64035] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoUnkeyed, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64035] = proto.gogoproto.goprotoUnkeyed; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `nullable`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.nullable = new jspb.ExtensionFieldInfo( + 65001, + {nullable: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65001] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.nullable, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65001] = proto.gogoproto.nullable; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `embed`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.embed = new jspb.ExtensionFieldInfo( + 65002, + {embed: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65002] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.embed, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65002] = proto.gogoproto.embed; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `customtype`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.customtype = new jspb.ExtensionFieldInfo( + 65003, + {customtype: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65003] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.customtype, + 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[65003] = proto.gogoproto.customtype; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `customname`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.customname = new jspb.ExtensionFieldInfo( + 65004, + {customname: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65004] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.customname, + 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[65004] = proto.gogoproto.customname; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `jsontag`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.jsontag = new jspb.ExtensionFieldInfo( + 65005, + {jsontag: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65005] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.jsontag, + 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[65005] = proto.gogoproto.jsontag; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `moretags`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.moretags = new jspb.ExtensionFieldInfo( + 65006, + {moretags: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65006] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.moretags, + 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[65006] = proto.gogoproto.moretags; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `casttype`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.casttype = new jspb.ExtensionFieldInfo( + 65007, + {casttype: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65007] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.casttype, + 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[65007] = proto.gogoproto.casttype; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `castkey`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.castkey = new jspb.ExtensionFieldInfo( + 65008, + {castkey: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65008] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.castkey, + 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[65008] = proto.gogoproto.castkey; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `castvalue`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.castvalue = new jspb.ExtensionFieldInfo( + 65009, + {castvalue: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65009] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.castvalue, + 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[65009] = proto.gogoproto.castvalue; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stdtime`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stdtime = new jspb.ExtensionFieldInfo( + 65010, + {stdtime: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65010] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stdtime, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65010] = proto.gogoproto.stdtime; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stdduration`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stdduration = new jspb.ExtensionFieldInfo( + 65011, + {stdduration: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65011] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stdduration, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65011] = proto.gogoproto.stdduration; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `wktpointer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.wktpointer = new jspb.ExtensionFieldInfo( + 65012, + {wktpointer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65012] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.wktpointer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65012] = proto.gogoproto.wktpointer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `castrepeated`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.castrepeated = new jspb.ExtensionFieldInfo( + 65013, + {castrepeated: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65013] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.castrepeated, + 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[65013] = proto.gogoproto.castrepeated; + +goog.object.extend(exports, proto.gogoproto); diff --git a/dist/src/types/proto-types/google/api/annotations_pb.js b/dist/src/types/proto-types/google/api/annotations_pb.js new file mode 100644 index 00000000..2341dbed --- /dev/null +++ b/dist/src/types/proto-types/google/api/annotations_pb.js @@ -0,0 +1,45 @@ +// source: google/api/annotations.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_api_http_pb = require('../../google/api/http_pb.js'); +goog.object.extend(proto, google_api_http_pb); +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.google.api.http', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `http`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.http = new jspb.ExtensionFieldInfo( + 72295728, + {http: 0}, + google_api_http_pb.HttpRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + google_api_http_pb.HttpRule.toObject), + 0); + +google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[72295728] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.http, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + google_api_http_pb.HttpRule.serializeBinaryToWriter, + google_api_http_pb.HttpRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MethodOptions.extensions[72295728] = proto.google.api.http; + +goog.object.extend(exports, proto.google.api); diff --git a/dist/src/types/proto-types/google/api/http_pb.js b/dist/src/types/proto-types/google/api/http_pb.js new file mode 100644 index 00000000..b59093d9 --- /dev/null +++ b/dist/src/types/proto-types/google/api/http_pb.js @@ -0,0 +1,1003 @@ +// source: google/api/http.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.google.api.CustomHttpPattern', null, global); +goog.exportSymbol('proto.google.api.Http', null, global); +goog.exportSymbol('proto.google.api.HttpRule', null, global); +goog.exportSymbol('proto.google.api.HttpRule.PatternCase', 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.google.api.Http = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Http.repeatedFields_, null); +}; +goog.inherits(proto.google.api.Http, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.Http.displayName = 'proto.google.api.Http'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.HttpRule = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.HttpRule.repeatedFields_, proto.google.api.HttpRule.oneofGroups_); +}; +goog.inherits(proto.google.api.HttpRule, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.HttpRule.displayName = 'proto.google.api.HttpRule'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.CustomHttpPattern = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.CustomHttpPattern, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.CustomHttpPattern.displayName = 'proto.google.api.CustomHttpPattern'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.Http.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.google.api.Http.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.Http.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.Http} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Http.toObject = function(includeInstance, msg) { + var f, obj = { + rulesList: jspb.Message.toObjectList(msg.getRulesList(), + proto.google.api.HttpRule.toObject, includeInstance), + fullyDecodeReservedExpansion: 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.google.api.Http} + */ +proto.google.api.Http.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.Http; + return proto.google.api.Http.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.Http} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.Http} + */ +proto.google.api.Http.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.HttpRule; + reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); + msg.addRules(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFullyDecodeReservedExpansion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.Http.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.Http.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.Http} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Http.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRulesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.HttpRule.serializeBinaryToWriter + ); + } + f = message.getFullyDecodeReservedExpansion(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * repeated HttpRule rules = 1; + * @return {!Array} + */ +proto.google.api.Http.prototype.getRulesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.Http} returns this +*/ +proto.google.api.Http.prototype.setRulesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.HttpRule=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.Http.prototype.addRules = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.HttpRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.Http} returns this + */ +proto.google.api.Http.prototype.clearRulesList = function() { + return this.setRulesList([]); +}; + + +/** + * optional bool fully_decode_reserved_expansion = 2; + * @return {boolean} + */ +proto.google.api.Http.prototype.getFullyDecodeReservedExpansion = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.api.Http} returns this + */ +proto.google.api.Http.prototype.setFullyDecodeReservedExpansion = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.HttpRule.repeatedFields_ = [11]; + +/** + * 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.google.api.HttpRule.oneofGroups_ = [[2,3,4,5,6,8]]; + +/** + * @enum {number} + */ +proto.google.api.HttpRule.PatternCase = { + PATTERN_NOT_SET: 0, + GET: 2, + PUT: 3, + POST: 4, + DELETE: 5, + PATCH: 6, + CUSTOM: 8 +}; + +/** + * @return {proto.google.api.HttpRule.PatternCase} + */ +proto.google.api.HttpRule.prototype.getPatternCase = function() { + return /** @type {proto.google.api.HttpRule.PatternCase} */(jspb.Message.computeOneofCase(this, proto.google.api.HttpRule.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.google.api.HttpRule.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.HttpRule.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.HttpRule} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpRule.toObject = function(includeInstance, msg) { + var f, obj = { + selector: jspb.Message.getFieldWithDefault(msg, 1, ""), + get: jspb.Message.getFieldWithDefault(msg, 2, ""), + put: jspb.Message.getFieldWithDefault(msg, 3, ""), + post: jspb.Message.getFieldWithDefault(msg, 4, ""), + pb_delete: jspb.Message.getFieldWithDefault(msg, 5, ""), + patch: jspb.Message.getFieldWithDefault(msg, 6, ""), + custom: (f = msg.getCustom()) && proto.google.api.CustomHttpPattern.toObject(includeInstance, f), + body: jspb.Message.getFieldWithDefault(msg, 7, ""), + responseBody: jspb.Message.getFieldWithDefault(msg, 12, ""), + additionalBindingsList: jspb.Message.toObjectList(msg.getAdditionalBindingsList(), + proto.google.api.HttpRule.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.google.api.HttpRule} + */ +proto.google.api.HttpRule.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.HttpRule; + return proto.google.api.HttpRule.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.HttpRule} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.HttpRule.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.setSelector(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setGet(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPut(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPost(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDelete(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setPatch(value); + break; + case 8: + var value = new proto.google.api.CustomHttpPattern; + reader.readMessage(value,proto.google.api.CustomHttpPattern.deserializeBinaryFromReader); + msg.setCustom(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setBody(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setResponseBody(value); + break; + case 11: + var value = new proto.google.api.HttpRule; + reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); + msg.addAdditionalBindings(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.HttpRule.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.HttpRule.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.HttpRule} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpRule.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSelector(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = message.getCustom(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.google.api.CustomHttpPattern.serializeBinaryToWriter + ); + } + f = message.getBody(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getResponseBody(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getAdditionalBindingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + proto.google.api.HttpRule.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string selector = 1; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getSelector = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setSelector = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string get = 2; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getGet = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setGet = function(value) { + return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearGet = function() { + return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasGet = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string put = 3; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPut = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPut = function(value) { + return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPut = function() { + return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPut = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string post = 4; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPost = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPost = function(value) { + return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPost = function() { + return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPost = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string delete = 5; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getDelete = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setDelete = function(value) { + return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearDelete = function() { + return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasDelete = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string patch = 6; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPatch = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPatch = function(value) { + return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPatch = function() { + return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPatch = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional CustomHttpPattern custom = 8; + * @return {?proto.google.api.CustomHttpPattern} + */ +proto.google.api.HttpRule.prototype.getCustom = function() { + return /** @type{?proto.google.api.CustomHttpPattern} */ ( + jspb.Message.getWrapperField(this, proto.google.api.CustomHttpPattern, 8)); +}; + + +/** + * @param {?proto.google.api.CustomHttpPattern|undefined} value + * @return {!proto.google.api.HttpRule} returns this +*/ +proto.google.api.HttpRule.prototype.setCustom = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearCustom = function() { + return this.setCustom(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasCustom = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string body = 7; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getBody = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setBody = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string response_body = 12; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getResponseBody = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setResponseBody = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * repeated HttpRule additional_bindings = 11; + * @return {!Array} + */ +proto.google.api.HttpRule.prototype.getAdditionalBindingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.HttpRule} returns this +*/ +proto.google.api.HttpRule.prototype.setAdditionalBindingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); +}; + + +/** + * @param {!proto.google.api.HttpRule=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.HttpRule.prototype.addAdditionalBindings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.google.api.HttpRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearAdditionalBindingsList = function() { + return this.setAdditionalBindingsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.CustomHttpPattern.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.CustomHttpPattern.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.CustomHttpPattern} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.CustomHttpPattern.toObject = function(includeInstance, msg) { + var f, obj = { + kind: jspb.Message.getFieldWithDefault(msg, 1, ""), + path: 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.google.api.CustomHttpPattern} + */ +proto.google.api.CustomHttpPattern.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.CustomHttpPattern; + return proto.google.api.CustomHttpPattern.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.CustomHttpPattern} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.CustomHttpPattern} + */ +proto.google.api.CustomHttpPattern.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.setKind(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPath(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.CustomHttpPattern.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.CustomHttpPattern.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.CustomHttpPattern} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.CustomHttpPattern.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKind(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string kind = 1; + * @return {string} + */ +proto.google.api.CustomHttpPattern.prototype.getKind = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.CustomHttpPattern} returns this + */ +proto.google.api.CustomHttpPattern.prototype.setKind = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string path = 2; + * @return {string} + */ +proto.google.api.CustomHttpPattern.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.CustomHttpPattern} returns this + */ +proto.google.api.CustomHttpPattern.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.api); diff --git a/dist/src/types/proto-types/google/api/httpbody_pb.js b/dist/src/types/proto-types/google/api/httpbody_pb.js new file mode 100644 index 00000000..af6eaf27 --- /dev/null +++ b/dist/src/types/proto-types/google/api/httpbody_pb.js @@ -0,0 +1,283 @@ +// source: google/api/httpbody.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +goog.exportSymbol('proto.google.api.HttpBody', 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.google.api.HttpBody = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.HttpBody.repeatedFields_, null); +}; +goog.inherits(proto.google.api.HttpBody, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.HttpBody.displayName = 'proto.google.api.HttpBody'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.HttpBody.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.google.api.HttpBody.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.HttpBody.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.HttpBody} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpBody.toObject = function(includeInstance, msg) { + var f, obj = { + contentType: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: msg.getData_asB64(), + extensionsList: jspb.Message.toObjectList(msg.getExtensionsList(), + 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.google.api.HttpBody} + */ +proto.google.api.HttpBody.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.HttpBody; + return proto.google.api.HttpBody.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.HttpBody} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.HttpBody} + */ +proto.google.api.HttpBody.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.setContentType(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addExtensions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.HttpBody.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.HttpBody.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.HttpBody} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpBody.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContentType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getExtensionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string content_type = 1; + * @return {string} + */ +proto.google.api.HttpBody.prototype.getContentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpBody} returns this + */ +proto.google.api.HttpBody.prototype.setContentType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.google.api.HttpBody.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.google.api.HttpBody.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.google.api.HttpBody.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.api.HttpBody} returns this + */ +proto.google.api.HttpBody.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated google.protobuf.Any extensions = 3; + * @return {!Array} + */ +proto.google.api.HttpBody.prototype.getExtensionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.HttpBody} returns this +*/ +proto.google.api.HttpBody.prototype.setExtensionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.google.api.HttpBody.prototype.addExtensions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.HttpBody} returns this + */ +proto.google.api.HttpBody.prototype.clearExtensionsList = function() { + return this.setExtensionsList([]); +}; + + +goog.object.extend(exports, proto.google.api); diff --git a/dist/src/types/proto-types/google/protobuf/any_pb.js b/dist/src/types/proto-types/google/protobuf/any_pb.js new file mode 100644 index 00000000..b8055533 --- /dev/null +++ b/dist/src/types/proto-types/google/protobuf/any_pb.js @@ -0,0 +1,274 @@ +// source: google/protobuf/any.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.google.protobuf.Any', 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.google.protobuf.Any = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.Any, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.Any.displayName = 'proto.google.protobuf.Any'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.Any.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.Any.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.Any} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Any.toObject = function(includeInstance, msg) { + var f, obj = { + typeUrl: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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.google.protobuf.Any} + */ +proto.google.protobuf.Any.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.Any; + return proto.google.protobuf.Any.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.Any} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.Any} + */ +proto.google.protobuf.Any.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.setTypeUrl(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.google.protobuf.Any.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.Any.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.Any} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Any.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTypeUrl(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string type_url = 1; + * @return {string} + */ +proto.google.protobuf.Any.prototype.getTypeUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.Any} returns this + */ +proto.google.protobuf.Any.prototype.setTypeUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes value = 2; + * @return {!(string|Uint8Array)} + */ +proto.google.protobuf.Any.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.google.protobuf.Any.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.google.protobuf.Any.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.protobuf.Any} returns this + */ +proto.google.protobuf.Any.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.protobuf); +/* This code will be inserted into generated code for + * google/protobuf/any.proto. */ + +/** + * Returns the type name contained in this instance, if any. + * @return {string|undefined} + */ +proto.google.protobuf.Any.prototype.getTypeName = function() { + return this.getTypeUrl().split('/').pop(); +}; + + +/** + * Packs the given message instance into this Any. + * For binary format usage only. + * @param {!Uint8Array} serialized The serialized data to pack. + * @param {string} name The type name of this message object. + * @param {string=} opt_typeUrlPrefix the type URL prefix. + */ +proto.google.protobuf.Any.prototype.pack = function(serialized, name, + opt_typeUrlPrefix) { + if (!opt_typeUrlPrefix) { + opt_typeUrlPrefix = 'type.googleapis.com/'; + } + + if (opt_typeUrlPrefix.substr(-1) != '/') { + this.setTypeUrl(opt_typeUrlPrefix + '/' + name); + } else { + this.setTypeUrl(opt_typeUrlPrefix + name); + } + + this.setValue(serialized); +}; + + +/** + * @template T + * Unpacks this Any into the given message object. + * @param {function(Uint8Array):T} deserialize Function that will deserialize + * the binary data properly. + * @param {string} name The expected type name of this message object. + * @return {?T} If the name matched the expected name, returns the deserialized + * object, otherwise returns null. + */ +proto.google.protobuf.Any.prototype.unpack = function(deserialize, name) { + if (this.getTypeName() == name) { + return deserialize(this.getValue_asU8()); + } else { + return null; + } +}; diff --git a/dist/src/types/proto-types/ibc/applications/transfer/v1/genesis_pb.js b/dist/src/types/proto-types/ibc/applications/transfer/v1/genesis_pb.js new file mode 100644 index 00000000..aa9bc75d --- /dev/null +++ b/dist/src/types/proto-types/ibc/applications/transfer/v1/genesis_pb.js @@ -0,0 +1,282 @@ +// source: ibc/applications/transfer/v1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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_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.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.applications.transfer.v1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.transfer.v1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.GenesisState.displayName = 'proto.ibc.applications.transfer.v1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.transfer.v1.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.ibc.applications.transfer.v1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.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.transfer.v1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + 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) + }; + + 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.GenesisState} + */ +proto.ibc.applications.transfer.v1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.GenesisState; + return proto.ibc.applications.transfer.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.transfer.v1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.GenesisState} + */ +proto.ibc.applications.transfer.v1.GenesisState.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_applications_transfer_v1_transfer_pb.DenomTrace; + reader.readMessage(value,ibc_applications_transfer_v1_transfer_pb.DenomTrace.deserializeBinaryFromReader); + msg.addDenomTraces(value); + break; + case 3: + 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.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.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.transfer.v1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomTracesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + ibc_applications_transfer_v1_transfer_pb.DenomTrace.serializeBinaryToWriter + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_applications_transfer_v1_transfer_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.GenesisState} returns this + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated DenomTrace denom_traces = 2; + * @return {!Array} + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.getDenomTracesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_applications_transfer_v1_transfer_pb.DenomTrace, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.transfer.v1.GenesisState} returns this +*/ +proto.ibc.applications.transfer.v1.GenesisState.prototype.setDenomTracesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.applications.transfer.v1.DenomTrace=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.transfer.v1.DenomTrace} + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.addDenomTraces = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.applications.transfer.v1.DenomTrace, 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.clearDenomTracesList = function() { + return this.setDenomTracesList([]); +}; + + +/** + * optional Params params = 3; + * @return {?proto.ibc.applications.transfer.v1.Params} + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.ibc.applications.transfer.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_applications_transfer_v1_transfer_pb.Params, 3)); +}; + + +/** + * @param {?proto.ibc.applications.transfer.v1.Params|undefined} value + * @return {!proto.ibc.applications.transfer.v1.GenesisState} returns this +*/ +proto.ibc.applications.transfer.v1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.transfer.v1.GenesisState} returns this + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +goog.object.extend(exports, proto.ibc.applications.transfer.v1); diff --git a/dist/src/types/proto-types/ibc/applications/transfer/v1/query_grpc_web_pb.js b/dist/src/types/proto-types/ibc/applications/transfer/v1/query_grpc_web_pb.js new file mode 100644 index 00000000..7ad5a167 --- /dev/null +++ b/dist/src/types/proto-types/ibc/applications/transfer/v1/query_grpc_web_pb.js @@ -0,0 +1,325 @@ +/** + * @fileoverview gRPC-Web generated client stub for ibc.applications.transfer.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var ibc_applications_transfer_v1_transfer_pb = require('../../../../ibc/applications/transfer/v1/transfer_pb.js') + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js') +const proto = {}; +proto.ibc = {}; +proto.ibc.applications = {}; +proto.ibc.applications.transfer = {}; +proto.ibc.applications.transfer.v1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.applications.transfer.v1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.applications.transfer.v1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.applications.transfer.v1.QueryDenomTraceRequest, + * !proto.ibc.applications.transfer.v1.QueryDenomTraceResponse>} + */ +const methodDescriptor_Query_DenomTrace = new grpc.web.MethodDescriptor( + '/ibc.applications.transfer.v1.Query/DenomTrace', + grpc.web.MethodType.UNARY, + proto.ibc.applications.transfer.v1.QueryDenomTraceRequest, + proto.ibc.applications.transfer.v1.QueryDenomTraceResponse, + /** + * @param {!proto.ibc.applications.transfer.v1.QueryDenomTraceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.applications.transfer.v1.QueryDenomTraceRequest, + * !proto.ibc.applications.transfer.v1.QueryDenomTraceResponse>} + */ +const methodInfo_Query_DenomTrace = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.applications.transfer.v1.QueryDenomTraceResponse, + /** + * @param {!proto.ibc.applications.transfer.v1.QueryDenomTraceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.applications.transfer.v1.QueryDenomTraceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.applications.transfer.v1.QueryDenomTraceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.applications.transfer.v1.QueryClient.prototype.denomTrace = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.applications.transfer.v1.Query/DenomTrace', + request, + metadata || {}, + methodDescriptor_Query_DenomTrace, + callback); +}; + + +/** + * @param {!proto.ibc.applications.transfer.v1.QueryDenomTraceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.applications.transfer.v1.QueryPromiseClient.prototype.denomTrace = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.applications.transfer.v1.Query/DenomTrace', + request, + metadata || {}, + methodDescriptor_Query_DenomTrace); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.applications.transfer.v1.QueryDenomTracesRequest, + * !proto.ibc.applications.transfer.v1.QueryDenomTracesResponse>} + */ +const methodDescriptor_Query_DenomTraces = new grpc.web.MethodDescriptor( + '/ibc.applications.transfer.v1.Query/DenomTraces', + grpc.web.MethodType.UNARY, + proto.ibc.applications.transfer.v1.QueryDenomTracesRequest, + proto.ibc.applications.transfer.v1.QueryDenomTracesResponse, + /** + * @param {!proto.ibc.applications.transfer.v1.QueryDenomTracesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.applications.transfer.v1.QueryDenomTracesRequest, + * !proto.ibc.applications.transfer.v1.QueryDenomTracesResponse>} + */ +const methodInfo_Query_DenomTraces = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.applications.transfer.v1.QueryDenomTracesResponse, + /** + * @param {!proto.ibc.applications.transfer.v1.QueryDenomTracesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.applications.transfer.v1.QueryDenomTracesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.applications.transfer.v1.QueryDenomTracesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.applications.transfer.v1.QueryClient.prototype.denomTraces = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.applications.transfer.v1.Query/DenomTraces', + request, + metadata || {}, + methodDescriptor_Query_DenomTraces, + callback); +}; + + +/** + * @param {!proto.ibc.applications.transfer.v1.QueryDenomTracesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.applications.transfer.v1.QueryPromiseClient.prototype.denomTraces = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.applications.transfer.v1.Query/DenomTraces', + request, + metadata || {}, + methodDescriptor_Query_DenomTraces); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.applications.transfer.v1.QueryParamsRequest, + * !proto.ibc.applications.transfer.v1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/ibc.applications.transfer.v1.Query/Params', + grpc.web.MethodType.UNARY, + proto.ibc.applications.transfer.v1.QueryParamsRequest, + proto.ibc.applications.transfer.v1.QueryParamsResponse, + /** + * @param {!proto.ibc.applications.transfer.v1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.applications.transfer.v1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.applications.transfer.v1.QueryParamsRequest, + * !proto.ibc.applications.transfer.v1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.applications.transfer.v1.QueryParamsResponse, + /** + * @param {!proto.ibc.applications.transfer.v1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.applications.transfer.v1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.applications.transfer.v1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.applications.transfer.v1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.applications.transfer.v1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.applications.transfer.v1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.ibc.applications.transfer.v1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.applications.transfer.v1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.applications.transfer.v1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +module.exports = proto.ibc.applications.transfer.v1; + diff --git a/dist/src/types/proto-types/ibc/applications/transfer/v1/query_pb.js b/dist/src/types/proto-types/ibc/applications/transfer/v1/query_pb.js new file mode 100644 index 00000000..74f2fd7c --- /dev/null +++ b/dist/src/types/proto-types/ibc/applications/transfer/v1/query_pb.js @@ -0,0 +1,1050 @@ +// source: ibc/applications/transfer/v1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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.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.QueryParamsRequest', null, global); +goog.exportSymbol('proto.ibc.applications.transfer.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.transfer.v1.QueryDenomTraceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryDenomTraceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.displayName = 'proto.ibc.applications.transfer.v1.QueryDenomTraceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDenomTraceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryDenomTraceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.displayName = 'proto.ibc.applications.transfer.v1.QueryDenomTraceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDenomTracesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryDenomTracesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.displayName = 'proto.ibc.applications.transfer.v1.QueryDenomTracesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDenomTracesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryDenomTracesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.displayName = 'proto.ibc.applications.transfer.v1.QueryDenomTracesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryParamsRequest.displayName = 'proto.ibc.applications.transfer.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.transfer.v1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryParamsResponse.displayName = 'proto.ibc.applications.transfer.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.transfer.v1.QueryDenomTraceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDenomTraceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.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.QueryDenomTraceRequest} + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryDenomTraceRequest; + return proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.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.QueryDenomTraceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTraceRequest} + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.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.QueryDenomTraceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.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.QueryDenomTraceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.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.QueryDenomTraceRequest.prototype.getHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTraceRequest} returns this + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.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.QueryDenomTraceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDenomTraceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + denomTrace: (f = msg.getDenomTrace()) && ibc_applications_transfer_v1_transfer_pb.DenomTrace.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.QueryDenomTraceResponse} + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryDenomTraceResponse; + return proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.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.QueryDenomTraceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTraceResponse} + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_applications_transfer_v1_transfer_pb.DenomTrace; + reader.readMessage(value,ibc_applications_transfer_v1_transfer_pb.DenomTrace.deserializeBinaryFromReader); + msg.setDenomTrace(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.QueryDenomTraceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.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.QueryDenomTraceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomTrace(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_applications_transfer_v1_transfer_pb.DenomTrace.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DenomTrace denom_trace = 1; + * @return {?proto.ibc.applications.transfer.v1.DenomTrace} + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.prototype.getDenomTrace = function() { + return /** @type{?proto.ibc.applications.transfer.v1.DenomTrace} */ ( + jspb.Message.getWrapperField(this, ibc_applications_transfer_v1_transfer_pb.DenomTrace, 1)); +}; + + +/** + * @param {?proto.ibc.applications.transfer.v1.DenomTrace|undefined} value + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTraceResponse} returns this +*/ +proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.prototype.setDenomTrace = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTraceResponse} returns this + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.prototype.clearDenomTrace = function() { + return this.setDenomTrace(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.prototype.hasDenomTrace = 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.transfer.v1.QueryDenomTracesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDenomTracesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.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.applications.transfer.v1.QueryDenomTracesRequest} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryDenomTracesRequest; + return proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.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.QueryDenomTracesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTracesRequest} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.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.applications.transfer.v1.QueryDenomTracesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.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.QueryDenomTracesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.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.applications.transfer.v1.QueryDenomTracesRequest.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.transfer.v1.QueryDenomTracesRequest} returns this +*/ +proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTracesRequest} returns this + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.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.QueryDenomTracesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDenomTracesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + denomTracesList: jspb.Message.toObjectList(msg.getDenomTracesList(), + ibc_applications_transfer_v1_transfer_pb.DenomTrace.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.transfer.v1.QueryDenomTracesResponse} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryDenomTracesResponse; + return proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.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.QueryDenomTracesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTracesResponse} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_applications_transfer_v1_transfer_pb.DenomTrace; + reader.readMessage(value,ibc_applications_transfer_v1_transfer_pb.DenomTrace.deserializeBinaryFromReader); + msg.addDenomTraces(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.transfer.v1.QueryDenomTracesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.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.QueryDenomTracesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomTracesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_applications_transfer_v1_transfer_pb.DenomTrace.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DenomTrace denom_traces = 1; + * @return {!Array} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.prototype.getDenomTracesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_applications_transfer_v1_transfer_pb.DenomTrace, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTracesResponse} returns this +*/ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.prototype.setDenomTracesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.applications.transfer.v1.DenomTrace=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.transfer.v1.DenomTrace} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.prototype.addDenomTraces = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.applications.transfer.v1.DenomTrace, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTracesResponse} returns this + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.prototype.clearDenomTracesList = function() { + return this.setDenomTracesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.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.transfer.v1.QueryDenomTracesResponse} returns this +*/ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTracesResponse} returns this + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.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.transfer.v1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.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.transfer.v1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.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.transfer.v1.QueryParamsRequest} + */ +proto.ibc.applications.transfer.v1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryParamsRequest; + return proto.ibc.applications.transfer.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.transfer.v1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryParamsRequest} + */ +proto.ibc.applications.transfer.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.transfer.v1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.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.transfer.v1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.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.transfer.v1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.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.transfer.v1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + 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.QueryParamsResponse} + */ +proto.ibc.applications.transfer.v1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryParamsResponse; + return proto.ibc.applications.transfer.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.transfer.v1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryParamsResponse} + */ +proto.ibc.applications.transfer.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_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.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.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.transfer.v1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_applications_transfer_v1_transfer_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.ibc.applications.transfer.v1.Params} + */ +proto.ibc.applications.transfer.v1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.ibc.applications.transfer.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_applications_transfer_v1_transfer_pb.Params, 1)); +}; + + +/** + * @param {?proto.ibc.applications.transfer.v1.Params|undefined} value + * @return {!proto.ibc.applications.transfer.v1.QueryParamsResponse} returns this +*/ +proto.ibc.applications.transfer.v1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.transfer.v1.QueryParamsResponse} returns this + */ +proto.ibc.applications.transfer.v1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.ibc.applications.transfer.v1); diff --git a/dist/src/types/proto-types/ibc/applications/transfer/v1/transfer_pb.js b/dist/src/types/proto-types/ibc/applications/transfer/v1/transfer_pb.js new file mode 100644 index 00000000..f9936af6 --- /dev/null +++ b/dist/src/types/proto-types/ibc/applications/transfer/v1/transfer_pb.js @@ -0,0 +1,623 @@ +// source: ibc/applications/transfer/v1/transfer.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +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 + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.DenomTrace = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.DenomTrace, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.DenomTrace.displayName = 'proto.ibc.applications.transfer.v1.DenomTrace'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.Params.displayName = 'proto.ibc.applications.transfer.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.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. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.DenomTrace.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.DenomTrace.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.DenomTrace} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.DenomTrace.toObject = function(includeInstance, msg) { + var f, obj = { + path: jspb.Message.getFieldWithDefault(msg, 1, ""), + baseDenom: 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.DenomTrace} + */ +proto.ibc.applications.transfer.v1.DenomTrace.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.DenomTrace; + return proto.ibc.applications.transfer.v1.DenomTrace.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.DenomTrace} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.DenomTrace} + */ +proto.ibc.applications.transfer.v1.DenomTrace.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 {string} */ (reader.readString()); + msg.setBaseDenom(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.DenomTrace.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.DenomTrace.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.DenomTrace} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.DenomTrace.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBaseDenom(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string path = 1; + * @return {string} + */ +proto.ibc.applications.transfer.v1.DenomTrace.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.DenomTrace} returns this + */ +proto.ibc.applications.transfer.v1.DenomTrace.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string base_denom = 2; + * @return {string} + */ +proto.ibc.applications.transfer.v1.DenomTrace.prototype.getBaseDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.DenomTrace} returns this + */ +proto.ibc.applications.transfer.v1.DenomTrace.prototype.setBaseDenom = 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.Params.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.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.transfer.v1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + sendEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + receiveEnabled: 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.ibc.applications.transfer.v1.Params} + */ +proto.ibc.applications.transfer.v1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.Params; + return proto.ibc.applications.transfer.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.transfer.v1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.Params} + */ +proto.ibc.applications.transfer.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.setSendEnabled(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReceiveEnabled(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.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.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.transfer.v1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSendEnabled(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getReceiveEnabled(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional bool send_enabled = 1; + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.Params.prototype.getSendEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.applications.transfer.v1.Params} returns this + */ +proto.ibc.applications.transfer.v1.Params.prototype.setSendEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional bool receive_enabled = 2; + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.Params.prototype.getReceiveEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.applications.transfer.v1.Params} returns this + */ +proto.ibc.applications.transfer.v1.Params.prototype.setReceiveEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +goog.object.extend(exports, proto.ibc.applications.transfer.v1); diff --git a/dist/src/types/proto-types/ibc/applications/transfer/v1/tx_grpc_web_pb.js b/dist/src/types/proto-types/ibc/applications/transfer/v1/tx_grpc_web_pb.js new file mode 100644 index 00000000..f7206cb9 --- /dev/null +++ b/dist/src/types/proto-types/ibc/applications/transfer/v1/tx_grpc_web_pb.js @@ -0,0 +1,163 @@ +/** + * @fileoverview gRPC-Web generated client stub for ibc.applications.transfer.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../../../cosmos/base/v1beta1/coin_pb.js') + +var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js') +const proto = {}; +proto.ibc = {}; +proto.ibc.applications = {}; +proto.ibc.applications.transfer = {}; +proto.ibc.applications.transfer.v1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.applications.transfer.v1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.applications.transfer.v1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.applications.transfer.v1.MsgTransfer, + * !proto.ibc.applications.transfer.v1.MsgTransferResponse>} + */ +const methodDescriptor_Msg_Transfer = new grpc.web.MethodDescriptor( + '/ibc.applications.transfer.v1.Msg/Transfer', + grpc.web.MethodType.UNARY, + proto.ibc.applications.transfer.v1.MsgTransfer, + proto.ibc.applications.transfer.v1.MsgTransferResponse, + /** + * @param {!proto.ibc.applications.transfer.v1.MsgTransfer} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.applications.transfer.v1.MsgTransferResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.applications.transfer.v1.MsgTransfer, + * !proto.ibc.applications.transfer.v1.MsgTransferResponse>} + */ +const methodInfo_Msg_Transfer = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.applications.transfer.v1.MsgTransferResponse, + /** + * @param {!proto.ibc.applications.transfer.v1.MsgTransfer} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.applications.transfer.v1.MsgTransferResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.applications.transfer.v1.MsgTransfer} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.applications.transfer.v1.MsgTransferResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.applications.transfer.v1.MsgClient.prototype.transfer = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.applications.transfer.v1.Msg/Transfer', + request, + metadata || {}, + methodDescriptor_Msg_Transfer, + callback); +}; + + +/** + * @param {!proto.ibc.applications.transfer.v1.MsgTransfer} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.applications.transfer.v1.MsgPromiseClient.prototype.transfer = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.applications.transfer.v1.Msg/Transfer', + request, + metadata || {}, + methodDescriptor_Msg_Transfer); +}; + + +module.exports = proto.ibc.applications.transfer.v1; + diff --git a/dist/src/types/proto-types/ibc/applications/transfer/v1/tx_pb.js b/dist/src/types/proto-types/ibc/applications/transfer/v1/tx_pb.js new file mode 100644 index 00000000..a12ab2c4 --- /dev/null +++ b/dist/src/types/proto-types/ibc/applications/transfer/v1/tx_pb.js @@ -0,0 +1,518 @@ +// source: ibc/applications/transfer/v1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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); +goog.exportSymbol('proto.ibc.applications.transfer.v1.MsgTransfer', null, global); +goog.exportSymbol('proto.ibc.applications.transfer.v1.MsgTransferResponse', 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.MsgTransfer = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.MsgTransfer, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.MsgTransfer.displayName = 'proto.ibc.applications.transfer.v1.MsgTransfer'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgTransferResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.MsgTransferResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.MsgTransferResponse.displayName = 'proto.ibc.applications.transfer.v1.MsgTransferResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.MsgTransfer.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.MsgTransfer.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgTransfer} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.MsgTransfer.toObject = function(includeInstance, msg) { + var f, obj = { + sourcePort: jspb.Message.getFieldWithDefault(msg, 1, ""), + sourceChannel: jspb.Message.getFieldWithDefault(msg, 2, ""), + token: (f = msg.getToken()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + 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) + }; + + 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.MsgTransfer} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.MsgTransfer; + return proto.ibc.applications.transfer.v1.MsgTransfer.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.MsgTransfer} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.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.setToken(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setReceiver(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.setTimeoutHeight(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimeoutTimestamp(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.MsgTransfer.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.MsgTransfer.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.MsgTransfer} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.MsgTransfer.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.getToken(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getReceiver(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getTimeoutHeight(); + if (f != null) { + writer.writeMessage( + 6, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getTimeoutTimestamp(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } +}; + + +/** + * optional string source_port = 1; + * @return {string} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.getSourcePort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.setSourcePort = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string source_channel = 2; + * @return {string} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.getSourceChannel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.setSourceChannel = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin token = 3; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.getToken = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this +*/ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.setToken = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.clearToken = function() { + return this.setToken(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.hasToken = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string sender = 4; + * @return {string} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string receiver = 5; + * @return {string} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.getReceiver = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.setReceiver = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional ibc.core.client.v1.Height timeout_height = 6; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.getTimeoutHeight = 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.applications.transfer.v1.MsgTransfer} returns this +*/ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.setTimeoutHeight = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.clearTimeoutHeight = function() { + return this.setTimeoutHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.hasTimeoutHeight = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional uint64 timeout_timestamp = 7; + * @return {number} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.getTimeoutTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.setTimeoutTimestamp = 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.applications.transfer.v1.MsgTransferResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.MsgTransferResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgTransferResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.MsgTransferResponse.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.MsgTransferResponse} + */ +proto.ibc.applications.transfer.v1.MsgTransferResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.MsgTransferResponse; + return proto.ibc.applications.transfer.v1.MsgTransferResponse.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.MsgTransferResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.MsgTransferResponse} + */ +proto.ibc.applications.transfer.v1.MsgTransferResponse.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.MsgTransferResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.MsgTransferResponse.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.MsgTransferResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.MsgTransferResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.ibc.applications.transfer.v1); diff --git a/dist/src/types/proto-types/ibc/core/channel/v1/channel_pb.js b/dist/src/types/proto-types/ibc/core/channel/v1/channel_pb.js new file mode 100644 index 00000000..be3aaa32 --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/channel/v1/channel_pb.js @@ -0,0 +1,1863 @@ +// source: ibc/core/channel/v1/channel.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.ibc.core.channel.v1.Acknowledgement', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.Acknowledgement.ResponseCase', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.Channel', null, global); +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.PacketState', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.State', 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.Channel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.Channel.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.Channel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.Channel.displayName = 'proto.ibc.core.channel.v1.Channel'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.IdentifiedChannel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.IdentifiedChannel.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.IdentifiedChannel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.IdentifiedChannel.displayName = 'proto.ibc.core.channel.v1.IdentifiedChannel'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Counterparty = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.Counterparty, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.Counterparty.displayName = 'proto.ibc.core.channel.v1.Counterparty'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Packet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.Packet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.Packet.displayName = 'proto.ibc.core.channel.v1.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.ibc.core.channel.v1.PacketState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.PacketState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + 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.Acknowledgement = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ibc.core.channel.v1.Acknowledgement.oneofGroups_); +}; +goog.inherits(proto.ibc.core.channel.v1.Acknowledgement, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.Acknowledgement.displayName = 'proto.ibc.core.channel.v1.Acknowledgement'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.Channel.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.ibc.core.channel.v1.Channel.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.Channel.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Channel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Channel.toObject = function(includeInstance, msg) { + var f, obj = { + state: jspb.Message.getFieldWithDefault(msg, 1, 0), + 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, "") + }; + + 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.Channel} + */ +proto.ibc.core.channel.v1.Channel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.Channel; + return proto.ibc.core.channel.v1.Channel.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.Channel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.Channel} + */ +proto.ibc.core.channel.v1.Channel.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.State} */ (reader.readEnum()); + msg.setState(value); + break; + case 2: + var value = /** @type {!proto.ibc.core.channel.v1.Order} */ (reader.readEnum()); + msg.setOrdering(value); + break; + case 3: + var value = new proto.ibc.core.channel.v1.Counterparty; + reader.readMessage(value,proto.ibc.core.channel.v1.Counterparty.deserializeBinaryFromReader); + msg.setCounterparty(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.addConnectionHops(value); + break; + case 5: + 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.Channel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.Channel.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.Channel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Channel.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getOrdering(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getCounterparty(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.ibc.core.channel.v1.Counterparty.serializeBinaryToWriter + ); + } + f = message.getConnectionHopsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 4, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional State state = 1; + * @return {!proto.ibc.core.channel.v1.State} + */ +proto.ibc.core.channel.v1.Channel.prototype.getState = function() { + return /** @type {!proto.ibc.core.channel.v1.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.State} value + * @return {!proto.ibc.core.channel.v1.Channel} returns this + */ +proto.ibc.core.channel.v1.Channel.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional Order ordering = 2; + * @return {!proto.ibc.core.channel.v1.Order} + */ +proto.ibc.core.channel.v1.Channel.prototype.getOrdering = function() { + return /** @type {!proto.ibc.core.channel.v1.Order} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.Order} value + * @return {!proto.ibc.core.channel.v1.Channel} returns this + */ +proto.ibc.core.channel.v1.Channel.prototype.setOrdering = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional Counterparty counterparty = 3; + * @return {?proto.ibc.core.channel.v1.Counterparty} + */ +proto.ibc.core.channel.v1.Channel.prototype.getCounterparty = function() { + return /** @type{?proto.ibc.core.channel.v1.Counterparty} */ ( + jspb.Message.getWrapperField(this, proto.ibc.core.channel.v1.Counterparty, 3)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Counterparty|undefined} value + * @return {!proto.ibc.core.channel.v1.Channel} returns this +*/ +proto.ibc.core.channel.v1.Channel.prototype.setCounterparty = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.Channel} returns this + */ +proto.ibc.core.channel.v1.Channel.prototype.clearCounterparty = function() { + return this.setCounterparty(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.Channel.prototype.hasCounterparty = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated string connection_hops = 4; + * @return {!Array} + */ +proto.ibc.core.channel.v1.Channel.prototype.getConnectionHopsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.Channel} returns this + */ +proto.ibc.core.channel.v1.Channel.prototype.setConnectionHopsList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.Channel} returns this + */ +proto.ibc.core.channel.v1.Channel.prototype.addConnectionHops = 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.Channel} returns this + */ +proto.ibc.core.channel.v1.Channel.prototype.clearConnectionHopsList = function() { + return this.setConnectionHopsList([]); +}; + + +/** + * optional string version = 5; + * @return {string} + */ +proto.ibc.core.channel.v1.Channel.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.Channel} returns this + */ +proto.ibc.core.channel.v1.Channel.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.IdentifiedChannel.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.ibc.core.channel.v1.IdentifiedChannel.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.IdentifiedChannel.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.IdentifiedChannel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.IdentifiedChannel.toObject = function(includeInstance, msg) { + var f, obj = { + state: jspb.Message.getFieldWithDefault(msg, 1, 0), + 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, ""), + portId: jspb.Message.getFieldWithDefault(msg, 6, ""), + channelId: 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.IdentifiedChannel} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.IdentifiedChannel; + return proto.ibc.core.channel.v1.IdentifiedChannel.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.IdentifiedChannel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.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.State} */ (reader.readEnum()); + msg.setState(value); + break; + case 2: + var value = /** @type {!proto.ibc.core.channel.v1.Order} */ (reader.readEnum()); + msg.setOrdering(value); + break; + case 3: + var value = new proto.ibc.core.channel.v1.Counterparty; + reader.readMessage(value,proto.ibc.core.channel.v1.Counterparty.deserializeBinaryFromReader); + msg.setCounterparty(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.addConnectionHops(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 7: + 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.IdentifiedChannel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.IdentifiedChannel.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.IdentifiedChannel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.IdentifiedChannel.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getOrdering(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getCounterparty(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.ibc.core.channel.v1.Counterparty.serializeBinaryToWriter + ); + } + f = message.getConnectionHopsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 4, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional State state = 1; + * @return {!proto.ibc.core.channel.v1.State} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getState = function() { + return /** @type {!proto.ibc.core.channel.v1.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.State} value + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional Order ordering = 2; + * @return {!proto.ibc.core.channel.v1.Order} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getOrdering = function() { + return /** @type {!proto.ibc.core.channel.v1.Order} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.Order} value + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setOrdering = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional Counterparty counterparty = 3; + * @return {?proto.ibc.core.channel.v1.Counterparty} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getCounterparty = function() { + return /** @type{?proto.ibc.core.channel.v1.Counterparty} */ ( + jspb.Message.getWrapperField(this, proto.ibc.core.channel.v1.Counterparty, 3)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Counterparty|undefined} value + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this +*/ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setCounterparty = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.clearCounterparty = function() { + return this.setCounterparty(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.hasCounterparty = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated string connection_hops = 4; + * @return {!Array} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getConnectionHopsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setConnectionHopsList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.addConnectionHops = 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.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.clearConnectionHopsList = function() { + return this.setConnectionHopsList([]); +}; + + +/** + * optional string version = 5; + * @return {string} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string port_id = 6; + * @return {string} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string channel_id = 7; + * @return {string} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setChannelId = 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.Counterparty.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.Counterparty.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Counterparty} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Counterparty.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.Counterparty} + */ +proto.ibc.core.channel.v1.Counterparty.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.Counterparty; + return proto.ibc.core.channel.v1.Counterparty.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.Counterparty} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.Counterparty} + */ +proto.ibc.core.channel.v1.Counterparty.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.Counterparty.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.Counterparty.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.Counterparty} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Counterparty.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.Counterparty.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.Counterparty} returns this + */ +proto.ibc.core.channel.v1.Counterparty.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.Counterparty.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.Counterparty} returns this + */ +proto.ibc.core.channel.v1.Counterparty.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.Packet.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.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.ibc.core.channel.v1.Packet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Packet.toObject = function(includeInstance, msg) { + var f, obj = { + sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), + sourcePort: jspb.Message.getFieldWithDefault(msg, 2, ""), + sourceChannel: jspb.Message.getFieldWithDefault(msg, 3, ""), + destinationPort: jspb.Message.getFieldWithDefault(msg, 4, ""), + destinationChannel: jspb.Message.getFieldWithDefault(msg, 5, ""), + data: msg.getData_asB64(), + timeoutHeight: (f = msg.getTimeoutHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + timeoutTimestamp: 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.ibc.core.channel.v1.Packet} + */ +proto.ibc.core.channel.v1.Packet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.Packet; + return proto.ibc.core.channel.v1.Packet.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.Packet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.Packet} + */ +proto.ibc.core.channel.v1.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.setSequence(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSourcePort(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSourceChannel(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setDestinationPort(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDestinationChannel(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(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.setTimeoutHeight(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimeoutTimestamp(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.Packet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.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.ibc.core.channel.v1.Packet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Packet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSourcePort(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSourceChannel(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDestinationPort(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getDestinationChannel(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getTimeoutHeight(); + if (f != null) { + writer.writeMessage( + 7, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getTimeoutTimestamp(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } +}; + + +/** + * optional uint64 sequence = 1; + * @return {number} + */ +proto.ibc.core.channel.v1.Packet.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.Packet} returns this + */ +proto.ibc.core.channel.v1.Packet.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string source_port = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.Packet.prototype.getSourcePort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.Packet} returns this + */ +proto.ibc.core.channel.v1.Packet.prototype.setSourcePort = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string source_channel = 3; + * @return {string} + */ +proto.ibc.core.channel.v1.Packet.prototype.getSourceChannel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.Packet} returns this + */ +proto.ibc.core.channel.v1.Packet.prototype.setSourceChannel = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string destination_port = 4; + * @return {string} + */ +proto.ibc.core.channel.v1.Packet.prototype.getDestinationPort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.Packet} returns this + */ +proto.ibc.core.channel.v1.Packet.prototype.setDestinationPort = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string destination_channel = 5; + * @return {string} + */ +proto.ibc.core.channel.v1.Packet.prototype.getDestinationChannel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.Packet} returns this + */ +proto.ibc.core.channel.v1.Packet.prototype.setDestinationChannel = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional bytes data = 6; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.Packet.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes data = 6; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.ibc.core.channel.v1.Packet.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 6; + * 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.core.channel.v1.Packet.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.Packet} returns this + */ +proto.ibc.core.channel.v1.Packet.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional ibc.core.client.v1.Height timeout_height = 7; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.Packet.prototype.getTimeoutHeight = 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.Packet} returns this +*/ +proto.ibc.core.channel.v1.Packet.prototype.setTimeoutHeight = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.Packet} returns this + */ +proto.ibc.core.channel.v1.Packet.prototype.clearTimeoutHeight = function() { + return this.setTimeoutHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.Packet.prototype.hasTimeoutHeight = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional uint64 timeout_timestamp = 8; + * @return {number} + */ +proto.ibc.core.channel.v1.Packet.prototype.getTimeoutTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.Packet} returns this + */ +proto.ibc.core.channel.v1.Packet.prototype.setTimeoutTimestamp = 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.ibc.core.channel.v1.PacketState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.PacketState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.PacketState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.PacketState.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + sequence: jspb.Message.getFieldWithDefault(msg, 3, 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.core.channel.v1.PacketState} + */ +proto.ibc.core.channel.v1.PacketState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.PacketState; + return proto.ibc.core.channel.v1.PacketState.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.PacketState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.PacketState} + */ +proto.ibc.core.channel.v1.PacketState.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.setSequence(value); + break; + case 4: + 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.core.channel.v1.PacketState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.PacketState.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.PacketState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.PacketState.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.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.PacketState.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.PacketState} returns this + */ +proto.ibc.core.channel.v1.PacketState.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.PacketState.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.PacketState} returns this + */ +proto.ibc.core.channel.v1.PacketState.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 sequence = 3; + * @return {number} + */ +proto.ibc.core.channel.v1.PacketState.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.PacketState} returns this + */ +proto.ibc.core.channel.v1.PacketState.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes data = 4; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.PacketState.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes data = 4; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.ibc.core.channel.v1.PacketState.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 4; + * 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.core.channel.v1.PacketState.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.PacketState} returns this + */ +proto.ibc.core.channel.v1.PacketState.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 4, 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) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.ibc.core.channel.v1.Acknowledgement} returns this + */ +proto.ibc.core.channel.v1.Acknowledgement.prototype.clearError = function() { + return jspb.Message.setOneofField(this, 22, proto.ibc.core.channel.v1.Acknowledgement.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.Acknowledgement.prototype.hasError = function() { + return jspb.Message.getField(this, 22) != null; +}; + + +/** + * @enum {number} + */ +proto.ibc.core.channel.v1.State = { + STATE_UNINITIALIZED_UNSPECIFIED: 0, + STATE_INIT: 1, + STATE_TRYOPEN: 2, + STATE_OPEN: 3, + STATE_CLOSED: 4 +}; + +/** + * @enum {number} + */ +proto.ibc.core.channel.v1.Order = { + ORDER_NONE_UNSPECIFIED: 0, + ORDER_UNORDERED: 1, + ORDER_ORDERED: 2 +}; + +goog.object.extend(exports, proto.ibc.core.channel.v1); diff --git a/dist/src/types/proto-types/ibc/core/channel/v1/genesis_pb.js b/dist/src/types/proto-types/ibc/core/channel/v1/genesis_pb.js new file mode 100644 index 00000000..2f8be893 --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/channel/v1/genesis_pb.js @@ -0,0 +1,761 @@ +// source: ibc/core/channel/v1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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_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.GenesisState', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.PacketSequence', 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.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.GenesisState.displayName = 'proto.ibc.core.channel.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.core.channel.v1.PacketSequence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.PacketSequence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.PacketSequence.displayName = 'proto.ibc.core.channel.v1.PacketSequence'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.GenesisState.repeatedFields_ = [1,2,3,4,5,6,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.ibc.core.channel.v1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.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.core.channel.v1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + ibc_core_channel_v1_channel_pb.IdentifiedChannel.toObject, includeInstance), + acknowledgementsList: jspb.Message.toObjectList(msg.getAcknowledgementsList(), + ibc_core_channel_v1_channel_pb.PacketState.toObject, includeInstance), + commitmentsList: jspb.Message.toObjectList(msg.getCommitmentsList(), + ibc_core_channel_v1_channel_pb.PacketState.toObject, includeInstance), + receiptsList: jspb.Message.toObjectList(msg.getReceiptsList(), + ibc_core_channel_v1_channel_pb.PacketState.toObject, includeInstance), + sendSequencesList: jspb.Message.toObjectList(msg.getSendSequencesList(), + proto.ibc.core.channel.v1.PacketSequence.toObject, includeInstance), + recvSequencesList: jspb.Message.toObjectList(msg.getRecvSequencesList(), + 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) + }; + + 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.GenesisState} + */ +proto.ibc.core.channel.v1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.GenesisState; + return proto.ibc.core.channel.v1.GenesisState.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.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.GenesisState} + */ +proto.ibc.core.channel.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_core_channel_v1_channel_pb.IdentifiedChannel; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.IdentifiedChannel.deserializeBinaryFromReader); + msg.addChannels(value); + break; + case 2: + var value = new ibc_core_channel_v1_channel_pb.PacketState; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketState.deserializeBinaryFromReader); + msg.addAcknowledgements(value); + break; + case 3: + var value = new ibc_core_channel_v1_channel_pb.PacketState; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketState.deserializeBinaryFromReader); + msg.addCommitments(value); + break; + case 4: + var value = new ibc_core_channel_v1_channel_pb.PacketState; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketState.deserializeBinaryFromReader); + msg.addReceipts(value); + break; + case 5: + var value = new proto.ibc.core.channel.v1.PacketSequence; + reader.readMessage(value,proto.ibc.core.channel.v1.PacketSequence.deserializeBinaryFromReader); + msg.addSendSequences(value); + break; + case 6: + var value = new proto.ibc.core.channel.v1.PacketSequence; + reader.readMessage(value,proto.ibc.core.channel.v1.PacketSequence.deserializeBinaryFromReader); + msg.addRecvSequences(value); + break; + case 7: + var value = new proto.ibc.core.channel.v1.PacketSequence; + reader.readMessage(value,proto.ibc.core.channel.v1.PacketSequence.deserializeBinaryFromReader); + msg.addAckSequences(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNextChannelSequence(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.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.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.core.channel.v1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.IdentifiedChannel.serializeBinaryToWriter + ); + } + f = message.getAcknowledgementsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + ibc_core_channel_v1_channel_pb.PacketState.serializeBinaryToWriter + ); + } + f = message.getCommitmentsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + ibc_core_channel_v1_channel_pb.PacketState.serializeBinaryToWriter + ); + } + f = message.getReceiptsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + ibc_core_channel_v1_channel_pb.PacketState.serializeBinaryToWriter + ); + } + f = message.getSendSequencesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.ibc.core.channel.v1.PacketSequence.serializeBinaryToWriter + ); + } + f = message.getRecvSequencesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.ibc.core.channel.v1.PacketSequence.serializeBinaryToWriter + ); + } + f = message.getAckSequencesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.ibc.core.channel.v1.PacketSequence.serializeBinaryToWriter + ); + } + f = message.getNextChannelSequence(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } +}; + + +/** + * repeated IdentifiedChannel channels = 1; + * @return {!Array} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_channel_v1_channel_pb.IdentifiedChannel, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this +*/ +proto.ibc.core.channel.v1.GenesisState.prototype.setChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.IdentifiedChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.channel.v1.IdentifiedChannel, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.clearChannelsList = function() { + return this.setChannelsList([]); +}; + + +/** + * repeated PacketState acknowledgements = 2; + * @return {!Array} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getAcknowledgementsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_channel_v1_channel_pb.PacketState, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this +*/ +proto.ibc.core.channel.v1.GenesisState.prototype.setAcknowledgementsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.PacketState=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.PacketState} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.addAcknowledgements = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.core.channel.v1.PacketState, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.clearAcknowledgementsList = function() { + return this.setAcknowledgementsList([]); +}; + + +/** + * repeated PacketState commitments = 3; + * @return {!Array} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getCommitmentsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_channel_v1_channel_pb.PacketState, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this +*/ +proto.ibc.core.channel.v1.GenesisState.prototype.setCommitmentsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.PacketState=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.PacketState} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.addCommitments = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.ibc.core.channel.v1.PacketState, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.clearCommitmentsList = function() { + return this.setCommitmentsList([]); +}; + + +/** + * repeated PacketState receipts = 4; + * @return {!Array} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getReceiptsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_channel_v1_channel_pb.PacketState, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this +*/ +proto.ibc.core.channel.v1.GenesisState.prototype.setReceiptsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.PacketState=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.PacketState} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.addReceipts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.ibc.core.channel.v1.PacketState, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.clearReceiptsList = function() { + return this.setReceiptsList([]); +}; + + +/** + * repeated PacketSequence send_sequences = 5; + * @return {!Array} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getSendSequencesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.core.channel.v1.PacketSequence, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this +*/ +proto.ibc.core.channel.v1.GenesisState.prototype.setSendSequencesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.PacketSequence=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.PacketSequence} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.addSendSequences = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.ibc.core.channel.v1.PacketSequence, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.clearSendSequencesList = function() { + return this.setSendSequencesList([]); +}; + + +/** + * repeated PacketSequence recv_sequences = 6; + * @return {!Array} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getRecvSequencesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.core.channel.v1.PacketSequence, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this +*/ +proto.ibc.core.channel.v1.GenesisState.prototype.setRecvSequencesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.PacketSequence=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.PacketSequence} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.addRecvSequences = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.ibc.core.channel.v1.PacketSequence, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.clearRecvSequencesList = function() { + return this.setRecvSequencesList([]); +}; + + +/** + * repeated PacketSequence ack_sequences = 7; + * @return {!Array} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getAckSequencesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.core.channel.v1.PacketSequence, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this +*/ +proto.ibc.core.channel.v1.GenesisState.prototype.setAckSequencesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.PacketSequence=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.PacketSequence} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.addAckSequences = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.ibc.core.channel.v1.PacketSequence, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.clearAckSequencesList = function() { + return this.setAckSequencesList([]); +}; + + +/** + * optional uint64 next_channel_sequence = 8; + * @return {number} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getNextChannelSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.setNextChannelSequence = 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.ibc.core.channel.v1.PacketSequence.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.PacketSequence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.PacketSequence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.PacketSequence.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + sequence: 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.PacketSequence} + */ +proto.ibc.core.channel.v1.PacketSequence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.PacketSequence; + return proto.ibc.core.channel.v1.PacketSequence.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.PacketSequence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.PacketSequence} + */ +proto.ibc.core.channel.v1.PacketSequence.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.setSequence(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.PacketSequence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.PacketSequence.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.PacketSequence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.PacketSequence.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.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.PacketSequence.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.PacketSequence} returns this + */ +proto.ibc.core.channel.v1.PacketSequence.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.PacketSequence.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.PacketSequence} returns this + */ +proto.ibc.core.channel.v1.PacketSequence.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 sequence = 3; + * @return {number} + */ +proto.ibc.core.channel.v1.PacketSequence.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.PacketSequence} returns this + */ +proto.ibc.core.channel.v1.PacketSequence.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +goog.object.extend(exports, proto.ibc.core.channel.v1); diff --git a/dist/src/types/proto-types/ibc/core/channel/v1/query_grpc_web_pb.js b/dist/src/types/proto-types/ibc/core/channel/v1/query_grpc_web_pb.js new file mode 100644 index 00000000..5e6fbded --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/channel/v1/query_grpc_web_pb.js @@ -0,0 +1,1129 @@ +/** + * @fileoverview gRPC-Web generated client stub for ibc.core.channel.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var ibc_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js') + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') +const proto = {}; +proto.ibc = {}; +proto.ibc.core = {}; +proto.ibc.core.channel = {}; +proto.ibc.core.channel.v1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.channel.v1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.channel.v1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryChannelRequest, + * !proto.ibc.core.channel.v1.QueryChannelResponse>} + */ +const methodDescriptor_Query_Channel = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/Channel', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryChannelRequest, + proto.ibc.core.channel.v1.QueryChannelResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryChannelRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryChannelResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryChannelRequest, + * !proto.ibc.core.channel.v1.QueryChannelResponse>} + */ +const methodInfo_Query_Channel = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryChannelResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryChannelRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryChannelResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryChannelRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryChannelResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.channel = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/Channel', + request, + metadata || {}, + methodDescriptor_Query_Channel, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryChannelRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.channel = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/Channel', + request, + metadata || {}, + methodDescriptor_Query_Channel); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryChannelsRequest, + * !proto.ibc.core.channel.v1.QueryChannelsResponse>} + */ +const methodDescriptor_Query_Channels = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/Channels', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryChannelsRequest, + proto.ibc.core.channel.v1.QueryChannelsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryChannelsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryChannelsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryChannelsRequest, + * !proto.ibc.core.channel.v1.QueryChannelsResponse>} + */ +const methodInfo_Query_Channels = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryChannelsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryChannelsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryChannelsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryChannelsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryChannelsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.channels = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/Channels', + request, + metadata || {}, + methodDescriptor_Query_Channels, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryChannelsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.channels = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/Channels', + request, + metadata || {}, + methodDescriptor_Query_Channels); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryConnectionChannelsRequest, + * !proto.ibc.core.channel.v1.QueryConnectionChannelsResponse>} + */ +const methodDescriptor_Query_ConnectionChannels = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/ConnectionChannels', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryConnectionChannelsRequest, + proto.ibc.core.channel.v1.QueryConnectionChannelsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryConnectionChannelsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryConnectionChannelsRequest, + * !proto.ibc.core.channel.v1.QueryConnectionChannelsResponse>} + */ +const methodInfo_Query_ConnectionChannels = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryConnectionChannelsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryConnectionChannelsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryConnectionChannelsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryConnectionChannelsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.connectionChannels = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/ConnectionChannels', + request, + metadata || {}, + methodDescriptor_Query_ConnectionChannels, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryConnectionChannelsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.connectionChannels = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/ConnectionChannels', + request, + metadata || {}, + methodDescriptor_Query_ConnectionChannels); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryChannelClientStateRequest, + * !proto.ibc.core.channel.v1.QueryChannelClientStateResponse>} + */ +const methodDescriptor_Query_ChannelClientState = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/ChannelClientState', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryChannelClientStateRequest, + proto.ibc.core.channel.v1.QueryChannelClientStateResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryChannelClientStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryChannelClientStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryChannelClientStateRequest, + * !proto.ibc.core.channel.v1.QueryChannelClientStateResponse>} + */ +const methodInfo_Query_ChannelClientState = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryChannelClientStateResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryChannelClientStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryChannelClientStateResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryChannelClientStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryChannelClientStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.channelClientState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/ChannelClientState', + request, + metadata || {}, + methodDescriptor_Query_ChannelClientState, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryChannelClientStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.channelClientState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/ChannelClientState', + request, + metadata || {}, + methodDescriptor_Query_ChannelClientState); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest, + * !proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse>} + */ +const methodDescriptor_Query_ChannelConsensusState = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/ChannelConsensusState', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest, + proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest, + * !proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse>} + */ +const methodInfo_Query_ChannelConsensusState = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.channelConsensusState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/ChannelConsensusState', + request, + metadata || {}, + methodDescriptor_Query_ChannelConsensusState, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.channelConsensusState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/ChannelConsensusState', + request, + metadata || {}, + methodDescriptor_Query_ChannelConsensusState); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryPacketCommitmentRequest, + * !proto.ibc.core.channel.v1.QueryPacketCommitmentResponse>} + */ +const methodDescriptor_Query_PacketCommitment = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/PacketCommitment', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryPacketCommitmentRequest, + proto.ibc.core.channel.v1.QueryPacketCommitmentResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketCommitmentRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryPacketCommitmentRequest, + * !proto.ibc.core.channel.v1.QueryPacketCommitmentResponse>} + */ +const methodInfo_Query_PacketCommitment = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryPacketCommitmentResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketCommitmentRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketCommitmentRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryPacketCommitmentResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.packetCommitment = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketCommitment', + request, + metadata || {}, + methodDescriptor_Query_PacketCommitment, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketCommitmentRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.packetCommitment = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketCommitment', + request, + metadata || {}, + methodDescriptor_Query_PacketCommitment); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest, + * !proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse>} + */ +const methodDescriptor_Query_PacketCommitments = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/PacketCommitments', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest, + proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest, + * !proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse>} + */ +const methodInfo_Query_PacketCommitments = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.packetCommitments = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketCommitments', + request, + metadata || {}, + methodDescriptor_Query_PacketCommitments, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.packetCommitments = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketCommitments', + request, + metadata || {}, + methodDescriptor_Query_PacketCommitments); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryPacketReceiptRequest, + * !proto.ibc.core.channel.v1.QueryPacketReceiptResponse>} + */ +const methodDescriptor_Query_PacketReceipt = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/PacketReceipt', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryPacketReceiptRequest, + proto.ibc.core.channel.v1.QueryPacketReceiptResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketReceiptRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketReceiptResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryPacketReceiptRequest, + * !proto.ibc.core.channel.v1.QueryPacketReceiptResponse>} + */ +const methodInfo_Query_PacketReceipt = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryPacketReceiptResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketReceiptRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketReceiptResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketReceiptRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryPacketReceiptResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.packetReceipt = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketReceipt', + request, + metadata || {}, + methodDescriptor_Query_PacketReceipt, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketReceiptRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.packetReceipt = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketReceipt', + request, + metadata || {}, + methodDescriptor_Query_PacketReceipt); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest, + * !proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse>} + */ +const methodDescriptor_Query_PacketAcknowledgement = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/PacketAcknowledgement', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest, + proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest, + * !proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse>} + */ +const methodInfo_Query_PacketAcknowledgement = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.packetAcknowledgement = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketAcknowledgement', + request, + metadata || {}, + methodDescriptor_Query_PacketAcknowledgement, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.packetAcknowledgement = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketAcknowledgement', + request, + metadata || {}, + methodDescriptor_Query_PacketAcknowledgement); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest, + * !proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse>} + */ +const methodDescriptor_Query_PacketAcknowledgements = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/PacketAcknowledgements', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest, + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest, + * !proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse>} + */ +const methodInfo_Query_PacketAcknowledgements = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.packetAcknowledgements = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketAcknowledgements', + request, + metadata || {}, + methodDescriptor_Query_PacketAcknowledgements, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.packetAcknowledgements = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketAcknowledgements', + request, + metadata || {}, + methodDescriptor_Query_PacketAcknowledgements); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest, + * !proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse>} + */ +const methodDescriptor_Query_UnreceivedPackets = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/UnreceivedPackets', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest, + proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest, + * !proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse>} + */ +const methodInfo_Query_UnreceivedPackets = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.unreceivedPackets = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/UnreceivedPackets', + request, + metadata || {}, + methodDescriptor_Query_UnreceivedPackets, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.unreceivedPackets = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/UnreceivedPackets', + request, + metadata || {}, + methodDescriptor_Query_UnreceivedPackets); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest, + * !proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse>} + */ +const methodDescriptor_Query_UnreceivedAcks = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/UnreceivedAcks', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest, + proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest, + * !proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse>} + */ +const methodInfo_Query_UnreceivedAcks = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.unreceivedAcks = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/UnreceivedAcks', + request, + metadata || {}, + methodDescriptor_Query_UnreceivedAcks, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.unreceivedAcks = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/UnreceivedAcks', + request, + metadata || {}, + methodDescriptor_Query_UnreceivedAcks); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest, + * !proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse>} + */ +const methodDescriptor_Query_NextSequenceReceive = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/NextSequenceReceive', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest, + proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest, + * !proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse>} + */ +const methodInfo_Query_NextSequenceReceive = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.nextSequenceReceive = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/NextSequenceReceive', + request, + metadata || {}, + methodDescriptor_Query_NextSequenceReceive, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.nextSequenceReceive = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/NextSequenceReceive', + request, + metadata || {}, + methodDescriptor_Query_NextSequenceReceive); +}; + + +module.exports = proto.ibc.core.channel.v1; + diff --git a/dist/src/types/proto-types/ibc/core/channel/v1/query_pb.js b/dist/src/types/proto-types/ibc/core/channel/v1/query_pb.js new file mode 100644 index 00000000..8b3566cc --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/channel/v1/query_pb.js @@ -0,0 +1,6303 @@ +// source: ibc/core/channel/v1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 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_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js'); +goog.object.extend(proto, ibc_core_channel_v1_channel_pb); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +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.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.QueryChannelRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryChannelResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryChannelsRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryChannelsResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryConnectionChannelsRequest', null, global); +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.QueryPacketAcknowledgementRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketCommitmentRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketCommitmentResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketReceiptRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketReceiptResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest', null, global); +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); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryChannelRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelRequest.displayName = 'proto.ibc.core.channel.v1.QueryChannelRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryChannelResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelResponse.displayName = 'proto.ibc.core.channel.v1.QueryChannelResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryChannelsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelsRequest.displayName = 'proto.ibc.core.channel.v1.QueryChannelsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryChannelsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryChannelsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelsResponse.displayName = 'proto.ibc.core.channel.v1.QueryChannelsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionChannelsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryConnectionChannelsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.displayName = 'proto.ibc.core.channel.v1.QueryConnectionChannelsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionChannelsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryConnectionChannelsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.displayName = 'proto.ibc.core.channel.v1.QueryConnectionChannelsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryChannelClientStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelClientStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelClientStateRequest.displayName = 'proto.ibc.core.channel.v1.QueryChannelClientStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryChannelClientStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelClientStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelClientStateResponse.displayName = 'proto.ibc.core.channel.v1.QueryChannelClientStateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryChannelConsensusStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.displayName = 'proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryChannelConsensusStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.displayName = 'proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketCommitmentRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketCommitmentRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.displayName = 'proto.ibc.core.channel.v1.QueryPacketCommitmentRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketCommitmentResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketCommitmentResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.displayName = 'proto.ibc.core.channel.v1.QueryPacketCommitmentResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketCommitmentsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.displayName = 'proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketCommitmentsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.displayName = 'proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketReceiptRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketReceiptRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketReceiptRequest.displayName = 'proto.ibc.core.channel.v1.QueryPacketReceiptRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketReceiptResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketReceiptResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketReceiptResponse.displayName = 'proto.ibc.core.channel.v1.QueryPacketReceiptResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketAcknowledgementRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.displayName = 'proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketAcknowledgementResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.displayName = 'proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketAcknowledgementsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.displayName = 'proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketAcknowledgementsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.displayName = 'proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryUnreceivedPacketsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.displayName = 'proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryUnreceivedPacketsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.displayName = 'proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryUnreceivedAcksRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.displayName = 'proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryUnreceivedAcksResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.displayName = 'proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryNextSequenceReceiveRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.displayName = 'proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryNextSequenceReceiveResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.displayName = 'proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.QueryChannelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryChannelRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelRequest.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.QueryChannelRequest} + */ +proto.ibc.core.channel.v1.QueryChannelRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelRequest; + return proto.ibc.core.channel.v1.QueryChannelRequest.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.QueryChannelRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelRequest} + */ +proto.ibc.core.channel.v1.QueryChannelRequest.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.QueryChannelRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelRequest.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.QueryChannelRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelRequest.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.QueryChannelRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryChannelRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryChannelRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryChannelRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelRequest.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.QueryChannelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryChannelResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelResponse.toObject = function(includeInstance, msg) { + var f, obj = { + channel: (f = msg.getChannel()) && ibc_core_channel_v1_channel_pb.Channel.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.QueryChannelResponse} + */ +proto.ibc.core.channel.v1.QueryChannelResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelResponse; + return proto.ibc.core.channel.v1.QueryChannelResponse.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.QueryChannelResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelResponse} + */ +proto.ibc.core.channel.v1.QueryChannelResponse.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.Channel; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.Channel.deserializeBinaryFromReader); + msg.setChannel(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.QueryChannelResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelResponse.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.QueryChannelResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannel(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.Channel.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 Channel channel = 1; + * @return {?proto.ibc.core.channel.v1.Channel} + */ +proto.ibc.core.channel.v1.QueryChannelResponse.prototype.getChannel = function() { + return /** @type{?proto.ibc.core.channel.v1.Channel} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Channel, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Channel|undefined} value + * @return {!proto.ibc.core.channel.v1.QueryChannelResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelResponse.prototype.setChannel = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelResponse.prototype.clearChannel = function() { + return this.setChannel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelResponse.prototype.hasChannel = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryChannelResponse.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.QueryChannelResponse.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.QueryChannelResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryChannelResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelResponse.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.QueryChannelResponse.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.QueryChannelResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelResponse.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.QueryChannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryChannelsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelsRequest.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.core.channel.v1.QueryChannelsRequest} + */ +proto.ibc.core.channel.v1.QueryChannelsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelsRequest; + return proto.ibc.core.channel.v1.QueryChannelsRequest.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.QueryChannelsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelsRequest} + */ +proto.ibc.core.channel.v1.QueryChannelsRequest.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.core.channel.v1.QueryChannelsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelsRequest.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.QueryChannelsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelsRequest.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.core.channel.v1.QueryChannelsRequest.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.core.channel.v1.QueryChannelsRequest} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.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.core.channel.v1.QueryChannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryChannelsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + ibc_core_channel_v1_channel_pb.IdentifiedChannel.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f), + height: (f = msg.getHeight()) && 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.QueryChannelsResponse} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelsResponse; + return proto.ibc.core.channel.v1.QueryChannelsResponse.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.QueryChannelsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelsResponse} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.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.IdentifiedChannel; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.IdentifiedChannel.deserializeBinaryFromReader); + msg.addChannels(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; + case 3: + 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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelsResponse.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.QueryChannelsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.IdentifiedChannel.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated IdentifiedChannel channels = 1; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_channel_v1_channel_pb.IdentifiedChannel, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryChannelsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.setChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.IdentifiedChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.channel.v1.IdentifiedChannel, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.QueryChannelsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.clearChannelsList = function() { + return this.setChannelsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.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.channel.v1.QueryChannelsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ibc.core.client.v1.Height height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.getHeight = 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.QueryChannelsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.hasHeight = 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.QueryConnectionChannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionChannelsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + connection: 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.ibc.core.channel.v1.QueryConnectionChannelsRequest} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryConnectionChannelsRequest; + return proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.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.QueryConnectionChannelsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryConnectionChannelsRequest} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.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.setConnection(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.ibc.core.channel.v1.QueryConnectionChannelsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.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.QueryConnectionChannelsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnection(); + 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 connection = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.prototype.getConnection = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryConnectionChannelsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.prototype.setConnection = 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.channel.v1.QueryConnectionChannelsRequest.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.channel.v1.QueryConnectionChannelsRequest} returns this +*/ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryConnectionChannelsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.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.core.channel.v1.QueryConnectionChannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionChannelsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + ibc_core_channel_v1_channel_pb.IdentifiedChannel.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f), + height: (f = msg.getHeight()) && 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.QueryConnectionChannelsResponse} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryConnectionChannelsResponse; + return proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.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.QueryConnectionChannelsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryConnectionChannelsResponse} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.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.IdentifiedChannel; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.IdentifiedChannel.deserializeBinaryFromReader); + msg.addChannels(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; + case 3: + 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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.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.QueryConnectionChannelsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.IdentifiedChannel.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated IdentifiedChannel channels = 1; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_channel_v1_channel_pb.IdentifiedChannel, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryConnectionChannelsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.setChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.IdentifiedChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.channel.v1.IdentifiedChannel, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.QueryConnectionChannelsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.clearChannelsList = function() { + return this.setChannelsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.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.channel.v1.QueryConnectionChannelsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryConnectionChannelsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ibc.core.client.v1.Height height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.getHeight = 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.QueryConnectionChannelsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryConnectionChannelsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.hasHeight = 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.QueryChannelClientStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelClientStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryChannelClientStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelClientStateRequest.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.QueryChannelClientStateRequest} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelClientStateRequest; + return proto.ibc.core.channel.v1.QueryChannelClientStateRequest.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.QueryChannelClientStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelClientStateRequest} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateRequest.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.QueryChannelClientStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelClientStateRequest.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.QueryChannelClientStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelClientStateRequest.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.QueryChannelClientStateRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryChannelClientStateRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelClientStateRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryChannelClientStateRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelClientStateRequest.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.QueryChannelClientStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelClientStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryChannelClientStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + identifiedClientState: (f = msg.getIdentifiedClientState()) && ibc_core_client_v1_client_pb.IdentifiedClientState.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.QueryChannelClientStateResponse} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelClientStateResponse; + return proto.ibc.core.channel.v1.QueryChannelClientStateResponse.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.QueryChannelClientStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelClientStateResponse} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.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.IdentifiedClientState; + reader.readMessage(value,ibc_core_client_v1_client_pb.IdentifiedClientState.deserializeBinaryFromReader); + msg.setIdentifiedClientState(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.QueryChannelClientStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelClientStateResponse.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.QueryChannelClientStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentifiedClientState(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_client_v1_client_pb.IdentifiedClientState.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 ibc.core.client.v1.IdentifiedClientState identified_client_state = 1; + * @return {?proto.ibc.core.client.v1.IdentifiedClientState} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.prototype.getIdentifiedClientState = function() { + return /** @type{?proto.ibc.core.client.v1.IdentifiedClientState} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.IdentifiedClientState, 1)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.IdentifiedClientState|undefined} value + * @return {!proto.ibc.core.channel.v1.QueryChannelClientStateResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.prototype.setIdentifiedClientState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelClientStateResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.prototype.clearIdentifiedClientState = function() { + return this.setIdentifiedClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.prototype.hasIdentifiedClientState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.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.QueryChannelClientStateResponse.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.QueryChannelClientStateResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryChannelClientStateResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.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.QueryChannelClientStateResponse.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.QueryChannelClientStateResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelClientStateResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.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.QueryChannelConsensusStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryChannelConsensusStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + revisionNumber: jspb.Message.getFieldWithDefault(msg, 3, 0), + revisionHeight: 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.core.channel.v1.QueryChannelConsensusStateRequest} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest; + return proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.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.QueryChannelConsensusStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.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.setRevisionNumber(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRevisionHeight(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.QueryChannelConsensusStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.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.QueryChannelConsensusStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.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.getRevisionNumber(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getRevisionHeight(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 revision_number = 3; + * @return {number} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.prototype.getRevisionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.prototype.setRevisionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 revision_height = 4; + * @return {number} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.prototype.getRevisionHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.prototype.setRevisionHeight = 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.core.channel.v1.QueryChannelConsensusStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryChannelConsensusStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + consensusState: (f = msg.getConsensusState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + clientId: jspb.Message.getFieldWithDefault(msg, 2, ""), + 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.QueryChannelConsensusStateResponse} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse; + return proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.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.QueryChannelConsensusStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.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.setConsensusState(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setClientId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProof(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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.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.QueryChannelConsensusStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConsensusState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getProof_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 + ); + } +}; + + +/** + * optional google.protobuf.Any consensus_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.getConsensusState = 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.channel.v1.QueryChannelConsensusStateResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.hasConsensusState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string client_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes proof = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.getProof = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes proof = 3; + * This is a type-conversion wrapper around `getProof()` + * @return {string} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.getProof_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProof())); +}; + + +/** + * optional bytes proof = 3; + * 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.QueryChannelConsensusStateResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.setProof = 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.QueryChannelConsensusStateResponse.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.QueryChannelConsensusStateResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.hasProofHeight = 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.core.channel.v1.QueryPacketCommitmentRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketCommitmentRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + sequence: 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.QueryPacketCommitmentRequest} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketCommitmentRequest; + return proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.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.QueryPacketCommitmentRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentRequest} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.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.setSequence(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.QueryPacketCommitmentRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.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.QueryPacketCommitmentRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.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.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 sequence = 3; + * @return {number} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.prototype.setSequence = 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.core.channel.v1.QueryPacketCommitmentResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketCommitmentResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.toObject = function(includeInstance, msg) { + var f, obj = { + commitment: msg.getCommitment_asB64(), + 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.QueryPacketCommitmentResponse} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketCommitmentResponse; + return proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.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.QueryPacketCommitmentResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentResponse} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.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.setCommitment(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.QueryPacketCommitmentResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.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.QueryPacketCommitmentResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCommitment_asU8(); + if (f.length > 0) { + writer.writeBytes( + 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 bytes commitment = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.prototype.getCommitment = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes commitment = 1; + * This is a type-conversion wrapper around `getCommitment()` + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.prototype.getCommitment_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCommitment())); +}; + + +/** + * optional bytes commitment = 1; + * 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.core.channel.v1.QueryPacketCommitmentResponse.prototype.getCommitment_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCommitment())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.prototype.setCommitment = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.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.QueryPacketCommitmentResponse.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.QueryPacketCommitmentResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.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.QueryPacketCommitmentResponse.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.QueryPacketCommitmentResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.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.QueryPacketCommitmentsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketCommitmentsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.toObject = function(includeInstance, msg) { + 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) + }; + + 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.QueryPacketCommitmentsRequest} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest; + return proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.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.QueryPacketCommitmentsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.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 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.core.channel.v1.QueryPacketCommitmentsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.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.QueryPacketCommitmentsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.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.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.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.ibc.core.channel.v1.QueryPacketCommitmentsRequest} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.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.core.channel.v1.QueryPacketCommitmentsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketCommitmentsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + commitmentsList: jspb.Message.toObjectList(msg.getCommitmentsList(), + ibc_core_channel_v1_channel_pb.PacketState.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f), + height: (f = msg.getHeight()) && 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.QueryPacketCommitmentsResponse} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse; + return proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.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.QueryPacketCommitmentsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.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.PacketState; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketState.deserializeBinaryFromReader); + msg.addCommitments(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; + case 3: + 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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.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.QueryPacketCommitmentsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCommitmentsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.PacketState.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated PacketState commitments = 1; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.getCommitmentsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_channel_v1_channel_pb.PacketState, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.setCommitmentsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.PacketState=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.PacketState} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.addCommitments = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.channel.v1.PacketState, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.clearCommitmentsList = function() { + return this.setCommitmentsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.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.channel.v1.QueryPacketCommitmentsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ibc.core.client.v1.Height height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.getHeight = 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.QueryPacketCommitmentsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.hasHeight = 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.QueryPacketReceiptRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketReceiptRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketReceiptRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + sequence: 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.QueryPacketReceiptRequest} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketReceiptRequest; + return proto.ibc.core.channel.v1.QueryPacketReceiptRequest.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.QueryPacketReceiptRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketReceiptRequest} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.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.setSequence(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.QueryPacketReceiptRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketReceiptRequest.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.QueryPacketReceiptRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.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.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketReceiptRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketReceiptRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 sequence = 3; + * @return {number} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.QueryPacketReceiptRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.prototype.setSequence = 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.core.channel.v1.QueryPacketReceiptResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketReceiptResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketReceiptResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.toObject = function(includeInstance, msg) { + var f, obj = { + received: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + 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.QueryPacketReceiptResponse} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketReceiptResponse; + return proto.ibc.core.channel.v1.QueryPacketReceiptResponse.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.QueryPacketReceiptResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketReceiptResponse} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReceived(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProof(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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketReceiptResponse.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.QueryPacketReceiptResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReceived(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getProof_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 + ); + } +}; + + +/** + * optional bool received = 2; + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.getReceived = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.core.channel.v1.QueryPacketReceiptResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.setReceived = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bytes proof = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.getProof = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes proof = 3; + * This is a type-conversion wrapper around `getProof()` + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.getProof_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProof())); +}; + + +/** + * optional bytes proof = 3; + * 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.QueryPacketReceiptResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryPacketReceiptResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.setProof = 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.QueryPacketReceiptResponse.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.QueryPacketReceiptResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketReceiptResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.hasProofHeight = 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.core.channel.v1.QueryPacketAcknowledgementRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketAcknowledgementRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + sequence: 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.QueryPacketAcknowledgementRequest} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest; + return proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.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.QueryPacketAcknowledgementRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.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.setSequence(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.QueryPacketAcknowledgementRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.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.QueryPacketAcknowledgementRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.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.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 sequence = 3; + * @return {number} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.prototype.setSequence = 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.core.channel.v1.QueryPacketAcknowledgementResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketAcknowledgementResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.toObject = function(includeInstance, msg) { + var f, obj = { + acknowledgement: msg.getAcknowledgement_asB64(), + 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.QueryPacketAcknowledgementResponse} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse; + return proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.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.QueryPacketAcknowledgementResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.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.setAcknowledgement(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.QueryPacketAcknowledgementResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.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.QueryPacketAcknowledgementResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAcknowledgement_asU8(); + if (f.length > 0) { + writer.writeBytes( + 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 bytes acknowledgement = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.prototype.getAcknowledgement = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes acknowledgement = 1; + * This is a type-conversion wrapper around `getAcknowledgement()` + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.prototype.getAcknowledgement_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAcknowledgement())); +}; + + +/** + * optional bytes acknowledgement = 1; + * 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.QueryPacketAcknowledgementResponse.prototype.getAcknowledgement_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAcknowledgement())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.prototype.setAcknowledgement = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.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.QueryPacketAcknowledgementResponse.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.QueryPacketAcknowledgementResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.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.QueryPacketAcknowledgementResponse.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.QueryPacketAcknowledgementResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.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.QueryPacketAcknowledgementsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketAcknowledgementsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.toObject = function(includeInstance, msg) { + 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) + }; + + 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.QueryPacketAcknowledgementsRequest} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest; + return proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.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.QueryPacketAcknowledgementsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.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 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.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.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.QueryPacketAcknowledgementsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.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.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.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.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.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.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketAcknowledgementsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + acknowledgementsList: jspb.Message.toObjectList(msg.getAcknowledgementsList(), + ibc_core_channel_v1_channel_pb.PacketState.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f), + height: (f = msg.getHeight()) && 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.QueryPacketAcknowledgementsResponse} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse; + return proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.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.QueryPacketAcknowledgementsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.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.PacketState; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketState.deserializeBinaryFromReader); + msg.addAcknowledgements(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; + case 3: + 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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.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.QueryPacketAcknowledgementsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAcknowledgementsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.PacketState.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated PacketState acknowledgements = 1; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.getAcknowledgementsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_channel_v1_channel_pb.PacketState, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.setAcknowledgementsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.PacketState=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.PacketState} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.addAcknowledgements = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.channel.v1.PacketState, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.clearAcknowledgementsList = function() { + return this.setAcknowledgementsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.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.channel.v1.QueryPacketAcknowledgementsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ibc.core.client.v1.Height height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.getHeight = 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.QueryPacketAcknowledgementsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.hasHeight = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.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.QueryUnreceivedPacketsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryUnreceivedPacketsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + packetCommitmentSequencesList: (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.core.channel.v1.QueryUnreceivedPacketsRequest} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest; + return proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.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.QueryUnreceivedPacketsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.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 {!Array} */ (reader.readPackedUint64()); + msg.setPacketCommitmentSequencesList(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.QueryUnreceivedPacketsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.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.QueryUnreceivedPacketsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.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.getPacketCommitmentSequencesList(); + if (f.length > 0) { + writer.writePackedUint64( + 3, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated uint64 packet_commitment_sequences = 3; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.prototype.getPacketCommitmentSequencesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.prototype.setPacketCommitmentSequencesList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.prototype.addPacketCommitmentSequences = 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.QueryUnreceivedPacketsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.prototype.clearPacketCommitmentSequencesList = function() { + return this.setPacketCommitmentSequencesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.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.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryUnreceivedPacketsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + sequencesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + height: (f = msg.getHeight()) && 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.QueryUnreceivedPacketsResponse} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse; + return proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.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.QueryUnreceivedPacketsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Array} */ (reader.readPackedUint64()); + msg.setSequencesList(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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.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.QueryUnreceivedPacketsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequencesList(); + if (f.length > 0) { + writer.writePackedUint64( + 1, + f + ); + } + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated uint64 sequences = 1; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.getSequencesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.setSequencesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.addSequences = 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.core.channel.v1.QueryUnreceivedPacketsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.clearSequencesList = function() { + return this.setSequencesList([]); +}; + + +/** + * optional ibc.core.client.v1.Height height = 2; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.getHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 2)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.hasHeight = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.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.QueryUnreceivedAcksRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryUnreceivedAcksRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + packetAckSequencesList: (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.core.channel.v1.QueryUnreceivedAcksRequest} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest; + return proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.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.QueryUnreceivedAcksRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.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 {!Array} */ (reader.readPackedUint64()); + msg.setPacketAckSequencesList(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.QueryUnreceivedAcksRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.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.QueryUnreceivedAcksRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.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.getPacketAckSequencesList(); + if (f.length > 0) { + writer.writePackedUint64( + 3, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated uint64 packet_ack_sequences = 3; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.prototype.getPacketAckSequencesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.prototype.setPacketAckSequencesList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.prototype.addPacketAckSequences = 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.QueryUnreceivedAcksRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.prototype.clearPacketAckSequencesList = function() { + return this.setPacketAckSequencesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.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.core.channel.v1.QueryUnreceivedAcksResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryUnreceivedAcksResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.toObject = function(includeInstance, msg) { + var f, obj = { + sequencesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + height: (f = msg.getHeight()) && 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.QueryUnreceivedAcksResponse} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse; + return proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.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.QueryUnreceivedAcksResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Array} */ (reader.readPackedUint64()); + msg.setSequencesList(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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.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.QueryUnreceivedAcksResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequencesList(); + if (f.length > 0) { + writer.writePackedUint64( + 1, + f + ); + } + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated uint64 sequences = 1; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.getSequencesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.setSequencesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.addSequences = 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.core.channel.v1.QueryUnreceivedAcksResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.clearSequencesList = function() { + return this.setSequencesList([]); +}; + + +/** + * optional ibc.core.client.v1.Height height = 2; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.getHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 2)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.hasHeight = 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.QueryNextSequenceReceiveRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryNextSequenceReceiveRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.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.QueryNextSequenceReceiveRequest} + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest; + return proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.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.QueryNextSequenceReceiveRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest} + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.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.QueryNextSequenceReceiveRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.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.QueryNextSequenceReceiveRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.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.QueryNextSequenceReceiveRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest} returns this + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest} returns this + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.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.QueryNextSequenceReceiveResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryNextSequenceReceiveResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.toObject = function(includeInstance, msg) { + var f, obj = { + nextSequenceReceive: 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.QueryNextSequenceReceiveResponse} + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse; + return proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.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.QueryNextSequenceReceiveResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse} + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.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.setNextSequenceReceive(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.QueryNextSequenceReceiveResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.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.QueryNextSequenceReceiveResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNextSequenceReceive(); + 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_receive = 1; + * @return {number} + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.prototype.getNextSequenceReceive = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse} returns this + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.prototype.setNextSequenceReceive = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.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.QueryNextSequenceReceiveResponse.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.QueryNextSequenceReceiveResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse} returns this + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.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.QueryNextSequenceReceiveResponse.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.QueryNextSequenceReceiveResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse} returns this + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +goog.object.extend(exports, proto.ibc.core.channel.v1); diff --git a/dist/src/types/proto-types/ibc/core/channel/v1/tx_grpc_web_pb.js b/dist/src/types/proto-types/ibc/core/channel/v1/tx_grpc_web_pb.js new file mode 100644 index 00000000..5cbd8237 --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/channel/v1/tx_grpc_web_pb.js @@ -0,0 +1,883 @@ +/** + * @fileoverview gRPC-Web generated client stub for ibc.core.channel.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') + +var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js') + +var ibc_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js') +const proto = {}; +proto.ibc = {}; +proto.ibc.core = {}; +proto.ibc.core.channel = {}; +proto.ibc.core.channel.v1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.channel.v1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.channel.v1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgChannelOpenInit, + * !proto.ibc.core.channel.v1.MsgChannelOpenInitResponse>} + */ +const methodDescriptor_Msg_ChannelOpenInit = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/ChannelOpenInit', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgChannelOpenInit, + proto.ibc.core.channel.v1.MsgChannelOpenInitResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgChannelOpenInit, + * !proto.ibc.core.channel.v1.MsgChannelOpenInitResponse>} + */ +const methodInfo_Msg_ChannelOpenInit = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgChannelOpenInitResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgChannelOpenInitResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.channelOpenInit = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelOpenInit', + request, + metadata || {}, + methodDescriptor_Msg_ChannelOpenInit, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.channelOpenInit = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelOpenInit', + request, + metadata || {}, + methodDescriptor_Msg_ChannelOpenInit); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgChannelOpenTry, + * !proto.ibc.core.channel.v1.MsgChannelOpenTryResponse>} + */ +const methodDescriptor_Msg_ChannelOpenTry = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/ChannelOpenTry', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgChannelOpenTry, + proto.ibc.core.channel.v1.MsgChannelOpenTryResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTry} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgChannelOpenTry, + * !proto.ibc.core.channel.v1.MsgChannelOpenTryResponse>} + */ +const methodInfo_Msg_ChannelOpenTry = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgChannelOpenTryResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTry} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTry} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgChannelOpenTryResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.channelOpenTry = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelOpenTry', + request, + metadata || {}, + methodDescriptor_Msg_ChannelOpenTry, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTry} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.channelOpenTry = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelOpenTry', + request, + metadata || {}, + methodDescriptor_Msg_ChannelOpenTry); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgChannelOpenAck, + * !proto.ibc.core.channel.v1.MsgChannelOpenAckResponse>} + */ +const methodDescriptor_Msg_ChannelOpenAck = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/ChannelOpenAck', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgChannelOpenAck, + proto.ibc.core.channel.v1.MsgChannelOpenAckResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAck} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgChannelOpenAck, + * !proto.ibc.core.channel.v1.MsgChannelOpenAckResponse>} + */ +const methodInfo_Msg_ChannelOpenAck = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgChannelOpenAckResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAck} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAck} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgChannelOpenAckResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.channelOpenAck = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelOpenAck', + request, + metadata || {}, + methodDescriptor_Msg_ChannelOpenAck, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAck} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.channelOpenAck = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelOpenAck', + request, + metadata || {}, + methodDescriptor_Msg_ChannelOpenAck); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgChannelOpenConfirm, + * !proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse>} + */ +const methodDescriptor_Msg_ChannelOpenConfirm = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/ChannelOpenConfirm', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgChannelOpenConfirm, + proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgChannelOpenConfirm, + * !proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse>} + */ +const methodInfo_Msg_ChannelOpenConfirm = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.channelOpenConfirm = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelOpenConfirm', + request, + metadata || {}, + methodDescriptor_Msg_ChannelOpenConfirm, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.channelOpenConfirm = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelOpenConfirm', + request, + metadata || {}, + methodDescriptor_Msg_ChannelOpenConfirm); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgChannelCloseInit, + * !proto.ibc.core.channel.v1.MsgChannelCloseInitResponse>} + */ +const methodDescriptor_Msg_ChannelCloseInit = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/ChannelCloseInit', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgChannelCloseInit, + proto.ibc.core.channel.v1.MsgChannelCloseInitResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgChannelCloseInit, + * !proto.ibc.core.channel.v1.MsgChannelCloseInitResponse>} + */ +const methodInfo_Msg_ChannelCloseInit = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgChannelCloseInitResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgChannelCloseInitResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.channelCloseInit = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelCloseInit', + request, + metadata || {}, + methodDescriptor_Msg_ChannelCloseInit, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.channelCloseInit = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelCloseInit', + request, + metadata || {}, + methodDescriptor_Msg_ChannelCloseInit); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgChannelCloseConfirm, + * !proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse>} + */ +const methodDescriptor_Msg_ChannelCloseConfirm = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/ChannelCloseConfirm', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgChannelCloseConfirm, + proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgChannelCloseConfirm, + * !proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse>} + */ +const methodInfo_Msg_ChannelCloseConfirm = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.channelCloseConfirm = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelCloseConfirm', + request, + metadata || {}, + methodDescriptor_Msg_ChannelCloseConfirm, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.channelCloseConfirm = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelCloseConfirm', + request, + metadata || {}, + methodDescriptor_Msg_ChannelCloseConfirm); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgRecvPacket, + * !proto.ibc.core.channel.v1.MsgRecvPacketResponse>} + */ +const methodDescriptor_Msg_RecvPacket = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/RecvPacket', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgRecvPacket, + proto.ibc.core.channel.v1.MsgRecvPacketResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgRecvPacket} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgRecvPacketResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgRecvPacket, + * !proto.ibc.core.channel.v1.MsgRecvPacketResponse>} + */ +const methodInfo_Msg_RecvPacket = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgRecvPacketResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgRecvPacket} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgRecvPacketResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgRecvPacket} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgRecvPacketResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.recvPacket = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/RecvPacket', + request, + metadata || {}, + methodDescriptor_Msg_RecvPacket, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgRecvPacket} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.recvPacket = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/RecvPacket', + request, + metadata || {}, + methodDescriptor_Msg_RecvPacket); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgTimeout, + * !proto.ibc.core.channel.v1.MsgTimeoutResponse>} + */ +const methodDescriptor_Msg_Timeout = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/Timeout', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgTimeout, + proto.ibc.core.channel.v1.MsgTimeoutResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgTimeout} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgTimeoutResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgTimeout, + * !proto.ibc.core.channel.v1.MsgTimeoutResponse>} + */ +const methodInfo_Msg_Timeout = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgTimeoutResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgTimeout} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgTimeoutResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgTimeout} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgTimeoutResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.timeout = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/Timeout', + request, + metadata || {}, + methodDescriptor_Msg_Timeout, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgTimeout} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.timeout = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/Timeout', + request, + metadata || {}, + methodDescriptor_Msg_Timeout); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgTimeoutOnClose, + * !proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse>} + */ +const methodDescriptor_Msg_TimeoutOnClose = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/TimeoutOnClose', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgTimeoutOnClose, + proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgTimeoutOnClose, + * !proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse>} + */ +const methodInfo_Msg_TimeoutOnClose = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.timeoutOnClose = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/TimeoutOnClose', + request, + metadata || {}, + methodDescriptor_Msg_TimeoutOnClose, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.timeoutOnClose = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/TimeoutOnClose', + request, + metadata || {}, + methodDescriptor_Msg_TimeoutOnClose); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgAcknowledgement, + * !proto.ibc.core.channel.v1.MsgAcknowledgementResponse>} + */ +const methodDescriptor_Msg_Acknowledgement = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/Acknowledgement', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgAcknowledgement, + proto.ibc.core.channel.v1.MsgAcknowledgementResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgAcknowledgement} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgAcknowledgementResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgAcknowledgement, + * !proto.ibc.core.channel.v1.MsgAcknowledgementResponse>} + */ +const methodInfo_Msg_Acknowledgement = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgAcknowledgementResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgAcknowledgement} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgAcknowledgementResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgAcknowledgement} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgAcknowledgementResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.acknowledgement = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/Acknowledgement', + request, + metadata || {}, + methodDescriptor_Msg_Acknowledgement, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgAcknowledgement} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.acknowledgement = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/Acknowledgement', + request, + metadata || {}, + methodDescriptor_Msg_Acknowledgement); +}; + + +module.exports = proto.ibc.core.channel.v1; + diff --git a/dist/src/types/proto-types/ibc/core/channel/v1/tx_pb.js b/dist/src/types/proto-types/ibc/core/channel/v1/tx_pb.js new file mode 100644 index 00000000..e2bb9432 --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/channel/v1/tx_pb.js @@ -0,0 +1,4505 @@ +// source: ibc/core/channel/v1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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/dist/src/types/proto-types/ibc/core/client/v1/client_pb.js b/dist/src/types/proto-types/ibc/core/client/v1/client_pb.js new file mode 100644 index 00000000..cd0a29a6 --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/client/v1/client_pb.js @@ -0,0 +1,1281 @@ +// source: ibc/core/client/v1/client.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_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); +goog.exportSymbol('proto.ibc.core.client.v1.Height', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.IdentifiedClientState', null, global); +goog.exportSymbol('proto.ibc.core.client.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.core.client.v1.IdentifiedClientState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.IdentifiedClientState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.IdentifiedClientState.displayName = 'proto.ibc.core.client.v1.IdentifiedClientState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ConsensusStateWithHeight = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.ConsensusStateWithHeight, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.ConsensusStateWithHeight.displayName = 'proto.ibc.core.client.v1.ConsensusStateWithHeight'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ClientConsensusStates = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.client.v1.ClientConsensusStates.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.client.v1.ClientConsensusStates, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.ClientConsensusStates.displayName = 'proto.ibc.core.client.v1.ClientConsensusStates'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ClientUpdateProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.ClientUpdateProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.ClientUpdateProposal.displayName = 'proto.ibc.core.client.v1.ClientUpdateProposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Height = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.Height, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.Height.displayName = 'proto.ibc.core.client.v1.Height'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.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.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.Params.displayName = 'proto.ibc.core.client.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.core.client.v1.IdentifiedClientState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.IdentifiedClientState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.IdentifiedClientState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.IdentifiedClientState.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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.core.client.v1.IdentifiedClientState} + */ +proto.ibc.core.client.v1.IdentifiedClientState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.IdentifiedClientState; + return proto.ibc.core.client.v1.IdentifiedClientState.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.IdentifiedClientState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.IdentifiedClientState} + */ +proto.ibc.core.client.v1.IdentifiedClientState.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 = 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.core.client.v1.IdentifiedClientState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.IdentifiedClientState.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.IdentifiedClientState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.IdentifiedClientState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getClientState(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.IdentifiedClientState.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.IdentifiedClientState} returns this + */ +proto.ibc.core.client.v1.IdentifiedClientState.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any client_state = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.IdentifiedClientState.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.core.client.v1.IdentifiedClientState} returns this +*/ +proto.ibc.core.client.v1.IdentifiedClientState.prototype.setClientState = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.IdentifiedClientState} returns this + */ +proto.ibc.core.client.v1.IdentifiedClientState.prototype.clearClientState = function() { + return this.setClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.IdentifiedClientState.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.core.client.v1.ConsensusStateWithHeight.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.ConsensusStateWithHeight.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ConsensusStateWithHeight} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.toObject = function(includeInstance, msg) { + var f, obj = { + height: (f = msg.getHeight()) && proto.ibc.core.client.v1.Height.toObject(includeInstance, f), + 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.core.client.v1.ConsensusStateWithHeight} + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.ConsensusStateWithHeight; + return proto.ibc.core.client.v1.ConsensusStateWithHeight.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.ConsensusStateWithHeight} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.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.client.v1.Height; + reader.readMessage(value,proto.ibc.core.client.v1.Height.deserializeBinaryFromReader); + msg.setHeight(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.core.client.v1.ConsensusStateWithHeight.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.ConsensusStateWithHeight.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.ConsensusStateWithHeight} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.ibc.core.client.v1.Height.serializeBinaryToWriter + ); + } + f = message.getConsensusState(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Height height = 1; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.getHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, proto.ibc.core.client.v1.Height, 1)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} returns this +*/ +proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} returns this + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.hasHeight = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Any consensus_state = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.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.core.client.v1.ConsensusStateWithHeight} returns this +*/ +proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} returns this + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.hasConsensusState = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.client.v1.ClientConsensusStates.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.client.v1.ClientConsensusStates.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.ClientConsensusStates.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ClientConsensusStates} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.ClientConsensusStates.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + consensusStatesList: jspb.Message.toObjectList(msg.getConsensusStatesList(), + proto.ibc.core.client.v1.ConsensusStateWithHeight.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.core.client.v1.ClientConsensusStates} + */ +proto.ibc.core.client.v1.ClientConsensusStates.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.ClientConsensusStates; + return proto.ibc.core.client.v1.ClientConsensusStates.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.ClientConsensusStates} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.ClientConsensusStates} + */ +proto.ibc.core.client.v1.ClientConsensusStates.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 = new proto.ibc.core.client.v1.ConsensusStateWithHeight; + reader.readMessage(value,proto.ibc.core.client.v1.ConsensusStateWithHeight.deserializeBinaryFromReader); + msg.addConsensusStates(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.ClientConsensusStates.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.ClientConsensusStates.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.ClientConsensusStates} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.ClientConsensusStates.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConsensusStatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.ibc.core.client.v1.ConsensusStateWithHeight.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.ClientConsensusStates.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.ClientConsensusStates} returns this + */ +proto.ibc.core.client.v1.ClientConsensusStates.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated ConsensusStateWithHeight consensus_states = 2; + * @return {!Array} + */ +proto.ibc.core.client.v1.ClientConsensusStates.prototype.getConsensusStatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.core.client.v1.ConsensusStateWithHeight, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.ClientConsensusStates} returns this +*/ +proto.ibc.core.client.v1.ClientConsensusStates.prototype.setConsensusStatesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.core.client.v1.ConsensusStateWithHeight=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} + */ +proto.ibc.core.client.v1.ClientConsensusStates.prototype.addConsensusStates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.core.client.v1.ConsensusStateWithHeight, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.client.v1.ClientConsensusStates} returns this + */ +proto.ibc.core.client.v1.ClientConsensusStates.prototype.clearConsensusStatesList = function() { + return this.setConsensusStatesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.ClientUpdateProposal.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.ClientUpdateProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ClientUpdateProposal} 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) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + clientId: jspb.Message.getFieldWithDefault(msg, 3, ""), + header: (f = msg.getHeader()) && 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.ClientUpdateProposal} + */ +proto.ibc.core.client.v1.ClientUpdateProposal.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} + */ +proto.ibc.core.client.v1.ClientUpdateProposal.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.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setClientId(value); + break; + case 4: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setHeader(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.ClientUpdateProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.ClientUpdateProposal.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.ClientUpdateProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.ClientUpdateProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * 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} + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string client_id = 3; + * @return {string} + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getClientId = 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.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional google.protobuf.Any header = 4; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getHeader = 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.ClientUpdateProposal} returns this +*/ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.clearHeader = function() { + return this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.hasHeader = 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.core.client.v1.Height.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.Height.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Height} 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) { + var f, obj = { + revisionNumber: jspb.Message.getFieldWithDefault(msg, 1, 0), + revisionHeight: 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.client.v1.Height} + */ +proto.ibc.core.client.v1.Height.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.client.v1.Height.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.setRevisionNumber(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRevisionHeight(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.Height.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.Height.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.Height} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.Height.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRevisionNumber(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getRevisionHeight(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 revision_number = 1; + * @return {number} + */ +proto.ibc.core.client.v1.Height.prototype.getRevisionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.client.v1.Height} returns this + */ +proto.ibc.core.client.v1.Height.prototype.setRevisionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 revision_height = 2; + * @return {number} + */ +proto.ibc.core.client.v1.Height.prototype.getRevisionHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.client.v1.Height} returns this + */ +proto.ibc.core.client.v1.Height.prototype.setRevisionHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.client.v1.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.ibc.core.client.v1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.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.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.Params.toObject = function(includeInstance, msg) { + var f, obj = { + allowedClientsList: (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.ibc.core.client.v1.Params} + */ +proto.ibc.core.client.v1.Params.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.Params} + */ +proto.ibc.core.client.v1.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.addAllowedClients(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.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.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.client.v1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAllowedClientsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string allowed_clients = 1; + * @return {!Array} + */ +proto.ibc.core.client.v1.Params.prototype.getAllowedClientsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.Params} returns this + */ +proto.ibc.core.client.v1.Params.prototype.setAllowedClientsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.Params} returns this + */ +proto.ibc.core.client.v1.Params.prototype.addAllowedClients = 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.core.client.v1.Params} returns this + */ +proto.ibc.core.client.v1.Params.prototype.clearAllowedClientsList = function() { + return this.setAllowedClientsList([]); +}; + + +goog.object.extend(exports, proto.ibc.core.client.v1); diff --git a/dist/src/types/proto-types/ibc/core/client/v1/genesis_pb.js b/dist/src/types/proto-types/ibc/core/client/v1/genesis_pb.js new file mode 100644 index 00000000..b94703ba --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/client/v1/genesis_pb.js @@ -0,0 +1,860 @@ +// source: ibc/core/client/v1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.ibc.core.client.v1.GenesisMetadata', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.GenesisState', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.IdentifiedGenesisMetadata', 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.client.v1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.client.v1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.client.v1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.GenesisState.displayName = 'proto.ibc.core.client.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.core.client.v1.GenesisMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.GenesisMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.GenesisMetadata.displayName = 'proto.ibc.core.client.v1.GenesisMetadata'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.IdentifiedGenesisMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.client.v1.IdentifiedGenesisMetadata.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.client.v1.IdentifiedGenesisMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.IdentifiedGenesisMetadata.displayName = 'proto.ibc.core.client.v1.IdentifiedGenesisMetadata'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.client.v1.GenesisState.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.core.client.v1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.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.core.client.v1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + clientsList: jspb.Message.toObjectList(msg.getClientsList(), + ibc_core_client_v1_client_pb.IdentifiedClientState.toObject, includeInstance), + clientsConsensusList: jspb.Message.toObjectList(msg.getClientsConsensusList(), + ibc_core_client_v1_client_pb.ClientConsensusStates.toObject, includeInstance), + clientsMetadataList: jspb.Message.toObjectList(msg.getClientsMetadataList(), + proto.ibc.core.client.v1.IdentifiedGenesisMetadata.toObject, includeInstance), + params: (f = msg.getParams()) && ibc_core_client_v1_client_pb.Params.toObject(includeInstance, f), + createLocalhost: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + nextClientSequence: 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.client.v1.GenesisState} + */ +proto.ibc.core.client.v1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.GenesisState; + return proto.ibc.core.client.v1.GenesisState.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.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.GenesisState} + */ +proto.ibc.core.client.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_core_client_v1_client_pb.IdentifiedClientState; + reader.readMessage(value,ibc_core_client_v1_client_pb.IdentifiedClientState.deserializeBinaryFromReader); + msg.addClients(value); + break; + case 2: + var value = new ibc_core_client_v1_client_pb.ClientConsensusStates; + reader.readMessage(value,ibc_core_client_v1_client_pb.ClientConsensusStates.deserializeBinaryFromReader); + msg.addClientsConsensus(value); + break; + case 3: + var value = new proto.ibc.core.client.v1.IdentifiedGenesisMetadata; + reader.readMessage(value,proto.ibc.core.client.v1.IdentifiedGenesisMetadata.deserializeBinaryFromReader); + msg.addClientsMetadata(value); + break; + case 4: + 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; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCreateLocalhost(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNextClientSequence(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.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.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.core.client.v1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_client_v1_client_pb.IdentifiedClientState.serializeBinaryToWriter + ); + } + f = message.getClientsConsensusList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + ibc_core_client_v1_client_pb.ClientConsensusStates.serializeBinaryToWriter + ); + } + f = message.getClientsMetadataList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.ibc.core.client.v1.IdentifiedGenesisMetadata.serializeBinaryToWriter + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 4, + f, + ibc_core_client_v1_client_pb.Params.serializeBinaryToWriter + ); + } + f = message.getCreateLocalhost(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getNextClientSequence(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } +}; + + +/** + * repeated IdentifiedClientState clients = 1; + * @return {!Array} + */ +proto.ibc.core.client.v1.GenesisState.prototype.getClientsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_client_v1_client_pb.IdentifiedClientState, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.GenesisState} returns this +*/ +proto.ibc.core.client.v1.GenesisState.prototype.setClientsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.client.v1.IdentifiedClientState=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.IdentifiedClientState} + */ +proto.ibc.core.client.v1.GenesisState.prototype.addClients = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.client.v1.IdentifiedClientState, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.client.v1.GenesisState} returns this + */ +proto.ibc.core.client.v1.GenesisState.prototype.clearClientsList = function() { + return this.setClientsList([]); +}; + + +/** + * repeated ClientConsensusStates clients_consensus = 2; + * @return {!Array} + */ +proto.ibc.core.client.v1.GenesisState.prototype.getClientsConsensusList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_client_v1_client_pb.ClientConsensusStates, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.GenesisState} returns this +*/ +proto.ibc.core.client.v1.GenesisState.prototype.setClientsConsensusList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.core.client.v1.ClientConsensusStates=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.ClientConsensusStates} + */ +proto.ibc.core.client.v1.GenesisState.prototype.addClientsConsensus = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.core.client.v1.ClientConsensusStates, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.client.v1.GenesisState} returns this + */ +proto.ibc.core.client.v1.GenesisState.prototype.clearClientsConsensusList = function() { + return this.setClientsConsensusList([]); +}; + + +/** + * repeated IdentifiedGenesisMetadata clients_metadata = 3; + * @return {!Array} + */ +proto.ibc.core.client.v1.GenesisState.prototype.getClientsMetadataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.core.client.v1.IdentifiedGenesisMetadata, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.GenesisState} returns this +*/ +proto.ibc.core.client.v1.GenesisState.prototype.setClientsMetadataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.ibc.core.client.v1.IdentifiedGenesisMetadata=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.IdentifiedGenesisMetadata} + */ +proto.ibc.core.client.v1.GenesisState.prototype.addClientsMetadata = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.ibc.core.client.v1.IdentifiedGenesisMetadata, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.client.v1.GenesisState} returns this + */ +proto.ibc.core.client.v1.GenesisState.prototype.clearClientsMetadataList = function() { + return this.setClientsMetadataList([]); +}; + + +/** + * optional Params params = 4; + * @return {?proto.ibc.core.client.v1.Params} + */ +proto.ibc.core.client.v1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.ibc.core.client.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Params, 4)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Params|undefined} value + * @return {!proto.ibc.core.client.v1.GenesisState} returns this +*/ +proto.ibc.core.client.v1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.GenesisState} returns this + */ +proto.ibc.core.client.v1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bool create_localhost = 5; + * @return {boolean} + */ +proto.ibc.core.client.v1.GenesisState.prototype.getCreateLocalhost = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.core.client.v1.GenesisState} returns this + */ +proto.ibc.core.client.v1.GenesisState.prototype.setCreateLocalhost = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional uint64 next_client_sequence = 6; + * @return {number} + */ +proto.ibc.core.client.v1.GenesisState.prototype.getNextClientSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.client.v1.GenesisState} returns this + */ +proto.ibc.core.client.v1.GenesisState.prototype.setNextClientSequence = 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.client.v1.GenesisMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.GenesisMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.GenesisMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.GenesisMetadata.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.ibc.core.client.v1.GenesisMetadata} + */ +proto.ibc.core.client.v1.GenesisMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.GenesisMetadata; + return proto.ibc.core.client.v1.GenesisMetadata.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.GenesisMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.GenesisMetadata} + */ +proto.ibc.core.client.v1.GenesisMetadata.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.ibc.core.client.v1.GenesisMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.GenesisMetadata.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.GenesisMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.GenesisMetadata.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.ibc.core.client.v1.GenesisMetadata.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.ibc.core.client.v1.GenesisMetadata.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.ibc.core.client.v1.GenesisMetadata.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.client.v1.GenesisMetadata} returns this + */ +proto.ibc.core.client.v1.GenesisMetadata.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes value = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.client.v1.GenesisMetadata.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.ibc.core.client.v1.GenesisMetadata.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.ibc.core.client.v1.GenesisMetadata.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.client.v1.GenesisMetadata} returns this + */ +proto.ibc.core.client.v1.GenesisMetadata.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.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.client.v1.IdentifiedGenesisMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.IdentifiedGenesisMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.IdentifiedGenesisMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + clientMetadataList: jspb.Message.toObjectList(msg.getClientMetadataList(), + proto.ibc.core.client.v1.GenesisMetadata.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.core.client.v1.IdentifiedGenesisMetadata} + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.IdentifiedGenesisMetadata; + return proto.ibc.core.client.v1.IdentifiedGenesisMetadata.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.IdentifiedGenesisMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.IdentifiedGenesisMetadata} + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.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 = new proto.ibc.core.client.v1.GenesisMetadata; + reader.readMessage(value,proto.ibc.core.client.v1.GenesisMetadata.deserializeBinaryFromReader); + msg.addClientMetadata(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.IdentifiedGenesisMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.IdentifiedGenesisMetadata.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.IdentifiedGenesisMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getClientMetadataList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.ibc.core.client.v1.GenesisMetadata.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.IdentifiedGenesisMetadata} returns this + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated GenesisMetadata client_metadata = 2; + * @return {!Array} + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.prototype.getClientMetadataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.core.client.v1.GenesisMetadata, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.IdentifiedGenesisMetadata} returns this +*/ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.prototype.setClientMetadataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.core.client.v1.GenesisMetadata=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.GenesisMetadata} + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.prototype.addClientMetadata = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.core.client.v1.GenesisMetadata, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.client.v1.IdentifiedGenesisMetadata} returns this + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.prototype.clearClientMetadataList = function() { + return this.setClientMetadataList([]); +}; + + +goog.object.extend(exports, proto.ibc.core.client.v1); diff --git a/dist/src/types/proto-types/ibc/core/client/v1/query_grpc_web_pb.js b/dist/src/types/proto-types/ibc/core/client/v1/query_grpc_web_pb.js new file mode 100644 index 00000000..ba2b29b5 --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/client/v1/query_grpc_web_pb.js @@ -0,0 +1,487 @@ +/** + * @fileoverview gRPC-Web generated client stub for ibc.core.client.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js') + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') +const proto = {}; +proto.ibc = {}; +proto.ibc.core = {}; +proto.ibc.core.client = {}; +proto.ibc.core.client.v1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.client.v1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.client.v1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.QueryClientStateRequest, + * !proto.ibc.core.client.v1.QueryClientStateResponse>} + */ +const methodDescriptor_Query_ClientState = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Query/ClientState', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.QueryClientStateRequest, + proto.ibc.core.client.v1.QueryClientStateResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryClientStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryClientStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.QueryClientStateRequest, + * !proto.ibc.core.client.v1.QueryClientStateResponse>} + */ +const methodInfo_Query_ClientState = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.QueryClientStateResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryClientStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryClientStateResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.QueryClientStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.QueryClientStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.QueryClient.prototype.clientState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Query/ClientState', + request, + metadata || {}, + methodDescriptor_Query_ClientState, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.QueryClientStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.QueryPromiseClient.prototype.clientState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Query/ClientState', + request, + metadata || {}, + methodDescriptor_Query_ClientState); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.QueryClientStatesRequest, + * !proto.ibc.core.client.v1.QueryClientStatesResponse>} + */ +const methodDescriptor_Query_ClientStates = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Query/ClientStates', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.QueryClientStatesRequest, + proto.ibc.core.client.v1.QueryClientStatesResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryClientStatesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryClientStatesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.QueryClientStatesRequest, + * !proto.ibc.core.client.v1.QueryClientStatesResponse>} + */ +const methodInfo_Query_ClientStates = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.QueryClientStatesResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryClientStatesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryClientStatesResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.QueryClientStatesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.QueryClientStatesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.QueryClient.prototype.clientStates = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Query/ClientStates', + request, + metadata || {}, + methodDescriptor_Query_ClientStates, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.QueryClientStatesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.QueryPromiseClient.prototype.clientStates = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Query/ClientStates', + request, + metadata || {}, + methodDescriptor_Query_ClientStates); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.QueryConsensusStateRequest, + * !proto.ibc.core.client.v1.QueryConsensusStateResponse>} + */ +const methodDescriptor_Query_ConsensusState = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Query/ConsensusState', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.QueryConsensusStateRequest, + proto.ibc.core.client.v1.QueryConsensusStateResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryConsensusStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.QueryConsensusStateRequest, + * !proto.ibc.core.client.v1.QueryConsensusStateResponse>} + */ +const methodInfo_Query_ConsensusState = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.QueryConsensusStateResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryConsensusStateResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.QueryConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.QueryConsensusStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.QueryClient.prototype.consensusState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Query/ConsensusState', + request, + metadata || {}, + methodDescriptor_Query_ConsensusState, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.QueryConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.QueryPromiseClient.prototype.consensusState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Query/ConsensusState', + request, + metadata || {}, + methodDescriptor_Query_ConsensusState); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.QueryConsensusStatesRequest, + * !proto.ibc.core.client.v1.QueryConsensusStatesResponse>} + */ +const methodDescriptor_Query_ConsensusStates = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Query/ConsensusStates', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.QueryConsensusStatesRequest, + proto.ibc.core.client.v1.QueryConsensusStatesResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryConsensusStatesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryConsensusStatesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.QueryConsensusStatesRequest, + * !proto.ibc.core.client.v1.QueryConsensusStatesResponse>} + */ +const methodInfo_Query_ConsensusStates = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.QueryConsensusStatesResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryConsensusStatesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryConsensusStatesResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.QueryConsensusStatesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.QueryConsensusStatesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.QueryClient.prototype.consensusStates = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Query/ConsensusStates', + request, + metadata || {}, + methodDescriptor_Query_ConsensusStates, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.QueryConsensusStatesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.QueryPromiseClient.prototype.consensusStates = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Query/ConsensusStates', + request, + metadata || {}, + methodDescriptor_Query_ConsensusStates); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.QueryClientParamsRequest, + * !proto.ibc.core.client.v1.QueryClientParamsResponse>} + */ +const methodDescriptor_Query_ClientParams = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Query/ClientParams', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.QueryClientParamsRequest, + proto.ibc.core.client.v1.QueryClientParamsResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.QueryClientParamsRequest, + * !proto.ibc.core.client.v1.QueryClientParamsResponse>} + */ +const methodInfo_Query_ClientParams = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.QueryClientParamsResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.QueryClientParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.QueryClient.prototype.clientParams = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Query/ClientParams', + request, + metadata || {}, + methodDescriptor_Query_ClientParams, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.QueryPromiseClient.prototype.clientParams = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Query/ClientParams', + request, + metadata || {}, + methodDescriptor_Query_ClientParams); +}; + + +module.exports = proto.ibc.core.client.v1; + diff --git a/dist/src/types/proto-types/ibc/core/client/v1/query_pb.js b/dist/src/types/proto-types/ibc/core/client/v1/query_pb.js new file mode 100644 index 00000000..73796fba --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/client/v1/query_pb.js @@ -0,0 +1,2113 @@ +// source: ibc/core/client/v1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js'); +goog.object.extend(proto, ibc_core_client_v1_client_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'); +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.ibc.core.client.v1.QueryClientParamsRequest', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryClientParamsResponse', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStateRequest', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStateResponse', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStatesRequest', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStatesResponse', 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); +goog.exportSymbol('proto.ibc.core.client.v1.QueryConsensusStatesResponse', 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.client.v1.QueryClientStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryClientStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryClientStateRequest.displayName = 'proto.ibc.core.client.v1.QueryClientStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryClientStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryClientStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryClientStateResponse.displayName = 'proto.ibc.core.client.v1.QueryClientStateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryClientStatesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryClientStatesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryClientStatesRequest.displayName = 'proto.ibc.core.client.v1.QueryClientStatesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryClientStatesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.client.v1.QueryClientStatesResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryClientStatesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryClientStatesResponse.displayName = 'proto.ibc.core.client.v1.QueryClientStatesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConsensusStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryConsensusStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryConsensusStateRequest.displayName = 'proto.ibc.core.client.v1.QueryConsensusStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConsensusStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryConsensusStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryConsensusStateResponse.displayName = 'proto.ibc.core.client.v1.QueryConsensusStateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConsensusStatesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryConsensusStatesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryConsensusStatesRequest.displayName = 'proto.ibc.core.client.v1.QueryConsensusStatesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConsensusStatesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.client.v1.QueryConsensusStatesResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryConsensusStatesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + 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.QueryClientParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryClientParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryClientParamsRequest.displayName = 'proto.ibc.core.client.v1.QueryClientParamsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryClientParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryClientParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryClientParamsResponse.displayName = 'proto.ibc.core.client.v1.QueryClientParamsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.QueryClientStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryClientStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: 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.core.client.v1.QueryClientStateRequest} + */ +proto.ibc.core.client.v1.QueryClientStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryClientStateRequest; + return proto.ibc.core.client.v1.QueryClientStateRequest.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.QueryClientStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryClientStateRequest} + */ +proto.ibc.core.client.v1.QueryClientStateRequest.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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.QueryClientStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryClientStateRequest.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.QueryClientStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientStateRequest.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.QueryClientStateRequest.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.QueryClientStateRequest} returns this + */ +proto.ibc.core.client.v1.QueryClientStateRequest.prototype.setClientId = 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.core.client.v1.QueryClientStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryClientStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + clientState: (f = msg.getClientState()) && google_protobuf_any_pb.Any.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.client.v1.QueryClientStateResponse} + */ +proto.ibc.core.client.v1.QueryClientStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryClientStateResponse; + return proto.ibc.core.client.v1.QueryClientStateResponse.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.QueryClientStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryClientStateResponse} + */ +proto.ibc.core.client.v1.QueryClientStateResponse.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.setClientState(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.client.v1.QueryClientStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryClientStateResponse.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.QueryClientStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.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 google.protobuf.Any client_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.QueryClientStateResponse.prototype.getClientState = 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.QueryClientStateResponse} returns this +*/ +proto.ibc.core.client.v1.QueryClientStateResponse.prototype.setClientState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryClientStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryClientStateResponse.prototype.clearClientState = function() { + return this.setClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryClientStateResponse.prototype.hasClientState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.client.v1.QueryClientStateResponse.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.QueryClientStateResponse.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.QueryClientStateResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.client.v1.QueryClientStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryClientStateResponse.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.QueryClientStateResponse.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.QueryClientStateResponse} returns this +*/ +proto.ibc.core.client.v1.QueryClientStateResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryClientStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryClientStateResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryClientStateResponse.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.client.v1.QueryClientStatesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientStatesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryClientStatesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientStatesRequest.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.core.client.v1.QueryClientStatesRequest} + */ +proto.ibc.core.client.v1.QueryClientStatesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryClientStatesRequest; + return proto.ibc.core.client.v1.QueryClientStatesRequest.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.QueryClientStatesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryClientStatesRequest} + */ +proto.ibc.core.client.v1.QueryClientStatesRequest.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.core.client.v1.QueryClientStatesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryClientStatesRequest.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.QueryClientStatesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientStatesRequest.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.core.client.v1.QueryClientStatesRequest.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.core.client.v1.QueryClientStatesRequest} returns this +*/ +proto.ibc.core.client.v1.QueryClientStatesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryClientStatesRequest} returns this + */ +proto.ibc.core.client.v1.QueryClientStatesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryClientStatesRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.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.core.client.v1.QueryClientStatesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientStatesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryClientStatesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + clientStatesList: jspb.Message.toObjectList(msg.getClientStatesList(), + ibc_core_client_v1_client_pb.IdentifiedClientState.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.core.client.v1.QueryClientStatesResponse} + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryClientStatesResponse; + return proto.ibc.core.client.v1.QueryClientStatesResponse.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.QueryClientStatesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryClientStatesResponse} + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.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.IdentifiedClientState; + reader.readMessage(value,ibc_core_client_v1_client_pb.IdentifiedClientState.deserializeBinaryFromReader); + msg.addClientStates(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.core.client.v1.QueryClientStatesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryClientStatesResponse.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.QueryClientStatesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientStatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_client_v1_client_pb.IdentifiedClientState.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated IdentifiedClientState client_states = 1; + * @return {!Array} + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.prototype.getClientStatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_client_v1_client_pb.IdentifiedClientState, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.QueryClientStatesResponse} returns this +*/ +proto.ibc.core.client.v1.QueryClientStatesResponse.prototype.setClientStatesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.client.v1.IdentifiedClientState=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.IdentifiedClientState} + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.prototype.addClientStates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.client.v1.IdentifiedClientState, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.client.v1.QueryClientStatesResponse} returns this + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.prototype.clearClientStatesList = function() { + return this.setClientStatesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.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.QueryClientStatesResponse} returns this +*/ +proto.ibc.core.client.v1.QueryClientStatesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryClientStatesResponse} returns this + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.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.core.client.v1.QueryConsensusStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryConsensusStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConsensusStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + revisionNumber: jspb.Message.getFieldWithDefault(msg, 2, 0), + revisionHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + latestHeight: 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.core.client.v1.QueryConsensusStateRequest} + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryConsensusStateRequest; + return proto.ibc.core.client.v1.QueryConsensusStateRequest.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.QueryConsensusStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryConsensusStateRequest} + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.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.setRevisionNumber(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRevisionHeight(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLatestHeight(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.QueryConsensusStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryConsensusStateRequest.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.QueryConsensusStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRevisionNumber(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getRevisionHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getLatestHeight(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStateRequest} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 revision_number = 2; + * @return {number} + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.prototype.getRevisionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStateRequest} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.prototype.setRevisionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 revision_height = 3; + * @return {number} + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.prototype.getRevisionHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStateRequest} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.prototype.setRevisionHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bool latest_height = 4; + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.prototype.getLatestHeight = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStateRequest} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.prototype.setLatestHeight = 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.core.client.v1.QueryConsensusStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryConsensusStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConsensusStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + consensusState: (f = msg.getConsensusState()) && google_protobuf_any_pb.Any.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.client.v1.QueryConsensusStateResponse} + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryConsensusStateResponse; + return proto.ibc.core.client.v1.QueryConsensusStateResponse.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.QueryConsensusStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryConsensusStateResponse} + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.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.setConsensusState(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.client.v1.QueryConsensusStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryConsensusStateResponse.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.QueryConsensusStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConsensusState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.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 google.protobuf.Any consensus_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.prototype.getConsensusState = 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.QueryConsensusStateResponse} returns this +*/ +proto.ibc.core.client.v1.QueryConsensusStateResponse.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryConsensusStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.prototype.hasConsensusState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.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.QueryConsensusStateResponse.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.QueryConsensusStateResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.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.QueryConsensusStateResponse.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.QueryConsensusStateResponse} returns this +*/ +proto.ibc.core.client.v1.QueryConsensusStateResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryConsensusStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.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.client.v1.QueryConsensusStatesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryConsensusStatesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConsensusStatesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: 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.ibc.core.client.v1.QueryConsensusStatesRequest} + */ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryConsensusStatesRequest; + return proto.ibc.core.client.v1.QueryConsensusStatesRequest.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.QueryConsensusStatesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryConsensusStatesRequest} + */ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.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 = 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.core.client.v1.QueryConsensusStatesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryConsensusStatesRequest.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.QueryConsensusStatesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + 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 client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStatesRequest} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.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.QueryConsensusStatesRequest.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.QueryConsensusStatesRequest} returns this +*/ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryConsensusStatesRequest} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.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.QueryConsensusStatesResponse.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.core.client.v1.QueryConsensusStatesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryConsensusStatesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConsensusStatesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + consensusStatesList: jspb.Message.toObjectList(msg.getConsensusStatesList(), + ibc_core_client_v1_client_pb.ConsensusStateWithHeight.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.core.client.v1.QueryConsensusStatesResponse} + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryConsensusStatesResponse; + return proto.ibc.core.client.v1.QueryConsensusStatesResponse.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.QueryConsensusStatesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryConsensusStatesResponse} + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.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.ConsensusStateWithHeight; + reader.readMessage(value,ibc_core_client_v1_client_pb.ConsensusStateWithHeight.deserializeBinaryFromReader); + msg.addConsensusStates(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.core.client.v1.QueryConsensusStatesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryConsensusStatesResponse.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.QueryConsensusStatesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConsensusStatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_client_v1_client_pb.ConsensusStateWithHeight.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ConsensusStateWithHeight consensus_states = 1; + * @return {!Array} + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.prototype.getConsensusStatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_client_v1_client_pb.ConsensusStateWithHeight, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStatesResponse} returns this +*/ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.prototype.setConsensusStatesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.client.v1.ConsensusStateWithHeight=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.prototype.addConsensusStates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.client.v1.ConsensusStateWithHeight, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.client.v1.QueryConsensusStatesResponse} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.prototype.clearConsensusStatesList = function() { + return this.setConsensusStatesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.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.QueryConsensusStatesResponse} returns this +*/ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryConsensusStatesResponse} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.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.core.client.v1.QueryClientParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientParamsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryClientParamsRequest} 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) { + 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.QueryClientParamsRequest} + */ +proto.ibc.core.client.v1.QueryClientParamsRequest.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryClientParamsRequest} + */ +proto.ibc.core.client.v1.QueryClientParamsRequest.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.QueryClientParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryClientParamsRequest.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.QueryClientParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientParamsRequest.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.QueryClientParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryClientParamsResponse} 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) { + var f, obj = { + 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.QueryClientParamsResponse} + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.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.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.QueryClientParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryClientParamsResponse.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.QueryClientParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_client_v1_client_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * 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 + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.ibc.core.client.v1); diff --git a/dist/src/types/proto-types/ibc/core/client/v1/tx_grpc_web_pb.js b/dist/src/types/proto-types/ibc/core/client/v1/tx_grpc_web_pb.js new file mode 100644 index 00000000..aadf7bbb --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/client/v1/tx_grpc_web_pb.js @@ -0,0 +1,403 @@ +/** + * @fileoverview gRPC-Web generated client stub for ibc.core.client.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js') +const proto = {}; +proto.ibc = {}; +proto.ibc.core = {}; +proto.ibc.core.client = {}; +proto.ibc.core.client.v1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.client.v1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.client.v1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.MsgCreateClient, + * !proto.ibc.core.client.v1.MsgCreateClientResponse>} + */ +const methodDescriptor_Msg_CreateClient = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Msg/CreateClient', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.MsgCreateClient, + proto.ibc.core.client.v1.MsgCreateClientResponse, + /** + * @param {!proto.ibc.core.client.v1.MsgCreateClient} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.MsgCreateClientResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.MsgCreateClient, + * !proto.ibc.core.client.v1.MsgCreateClientResponse>} + */ +const methodInfo_Msg_CreateClient = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.MsgCreateClientResponse, + /** + * @param {!proto.ibc.core.client.v1.MsgCreateClient} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.MsgCreateClientResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.MsgCreateClient} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.MsgCreateClientResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.MsgClient.prototype.createClient = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Msg/CreateClient', + request, + metadata || {}, + methodDescriptor_Msg_CreateClient, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.MsgCreateClient} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.MsgPromiseClient.prototype.createClient = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Msg/CreateClient', + request, + metadata || {}, + methodDescriptor_Msg_CreateClient); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.MsgUpdateClient, + * !proto.ibc.core.client.v1.MsgUpdateClientResponse>} + */ +const methodDescriptor_Msg_UpdateClient = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Msg/UpdateClient', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.MsgUpdateClient, + proto.ibc.core.client.v1.MsgUpdateClientResponse, + /** + * @param {!proto.ibc.core.client.v1.MsgUpdateClient} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.MsgUpdateClientResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.MsgUpdateClient, + * !proto.ibc.core.client.v1.MsgUpdateClientResponse>} + */ +const methodInfo_Msg_UpdateClient = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.MsgUpdateClientResponse, + /** + * @param {!proto.ibc.core.client.v1.MsgUpdateClient} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.MsgUpdateClientResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.MsgUpdateClient} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.MsgUpdateClientResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.MsgClient.prototype.updateClient = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Msg/UpdateClient', + request, + metadata || {}, + methodDescriptor_Msg_UpdateClient, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.MsgUpdateClient} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.MsgPromiseClient.prototype.updateClient = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Msg/UpdateClient', + request, + metadata || {}, + methodDescriptor_Msg_UpdateClient); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.MsgUpgradeClient, + * !proto.ibc.core.client.v1.MsgUpgradeClientResponse>} + */ +const methodDescriptor_Msg_UpgradeClient = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Msg/UpgradeClient', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.MsgUpgradeClient, + proto.ibc.core.client.v1.MsgUpgradeClientResponse, + /** + * @param {!proto.ibc.core.client.v1.MsgUpgradeClient} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.MsgUpgradeClientResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.MsgUpgradeClient, + * !proto.ibc.core.client.v1.MsgUpgradeClientResponse>} + */ +const methodInfo_Msg_UpgradeClient = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.MsgUpgradeClientResponse, + /** + * @param {!proto.ibc.core.client.v1.MsgUpgradeClient} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.MsgUpgradeClientResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.MsgUpgradeClient} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.MsgUpgradeClientResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.MsgClient.prototype.upgradeClient = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Msg/UpgradeClient', + request, + metadata || {}, + methodDescriptor_Msg_UpgradeClient, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.MsgUpgradeClient} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.MsgPromiseClient.prototype.upgradeClient = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Msg/UpgradeClient', + request, + metadata || {}, + methodDescriptor_Msg_UpgradeClient); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.MsgSubmitMisbehaviour, + * !proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse>} + */ +const methodDescriptor_Msg_SubmitMisbehaviour = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Msg/SubmitMisbehaviour', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.MsgSubmitMisbehaviour, + proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse, + /** + * @param {!proto.ibc.core.client.v1.MsgSubmitMisbehaviour} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.MsgSubmitMisbehaviour, + * !proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse>} + */ +const methodInfo_Msg_SubmitMisbehaviour = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse, + /** + * @param {!proto.ibc.core.client.v1.MsgSubmitMisbehaviour} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.MsgSubmitMisbehaviour} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.MsgClient.prototype.submitMisbehaviour = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Msg/SubmitMisbehaviour', + request, + metadata || {}, + methodDescriptor_Msg_SubmitMisbehaviour, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.MsgSubmitMisbehaviour} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.MsgPromiseClient.prototype.submitMisbehaviour = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Msg/SubmitMisbehaviour', + request, + metadata || {}, + methodDescriptor_Msg_SubmitMisbehaviour); +}; + + +module.exports = proto.ibc.core.client.v1; + diff --git a/dist/src/types/proto-types/ibc/core/client/v1/tx_pb.js b/dist/src/types/proto-types/ibc/core/client/v1/tx_pb.js new file mode 100644 index 00000000..396b7462 --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/client/v1/tx_pb.js @@ -0,0 +1,1625 @@ +// source: ibc/core/client/v1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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'); +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.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.MsgUpgradeClient', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.MsgUpgradeClientResponse', 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.client.v1.MsgCreateClient = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgCreateClient, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgCreateClient.displayName = 'proto.ibc.core.client.v1.MsgCreateClient'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgCreateClientResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgCreateClientResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgCreateClientResponse.displayName = 'proto.ibc.core.client.v1.MsgCreateClientResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgUpdateClient = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgUpdateClient, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgUpdateClient.displayName = 'proto.ibc.core.client.v1.MsgUpdateClient'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgUpdateClientResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgUpdateClientResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgUpdateClientResponse.displayName = 'proto.ibc.core.client.v1.MsgUpdateClientResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgUpgradeClient = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgUpgradeClient, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgUpgradeClient.displayName = 'proto.ibc.core.client.v1.MsgUpgradeClient'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgUpgradeClientResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgUpgradeClientResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgUpgradeClientResponse.displayName = 'proto.ibc.core.client.v1.MsgUpgradeClientResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgSubmitMisbehaviour = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgSubmitMisbehaviour, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgSubmitMisbehaviour.displayName = 'proto.ibc.core.client.v1.MsgSubmitMisbehaviour'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgSubmitMisbehaviourResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.displayName = 'proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.MsgCreateClient.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgCreateClient.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgCreateClient} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgCreateClient.toObject = function(includeInstance, msg) { + var f, obj = { + clientState: (f = msg.getClientState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + consensusState: (f = msg.getConsensusState()) && 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.MsgCreateClient} + */ +proto.ibc.core.client.v1.MsgCreateClient.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgCreateClient; + return proto.ibc.core.client.v1.MsgCreateClient.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.MsgCreateClient} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgCreateClient} + */ +proto.ibc.core.client.v1.MsgCreateClient.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.setClientState(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; + 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.MsgCreateClient.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgCreateClient.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.MsgCreateClient} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgCreateClient.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getConsensusState(); + 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 google.protobuf.Any client_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.MsgCreateClient.prototype.getClientState = 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.MsgCreateClient} returns this +*/ +proto.ibc.core.client.v1.MsgCreateClient.prototype.setClientState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.MsgCreateClient} returns this + */ +proto.ibc.core.client.v1.MsgCreateClient.prototype.clearClientState = function() { + return this.setClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.MsgCreateClient.prototype.hasClientState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Any consensus_state = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.MsgCreateClient.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.core.client.v1.MsgCreateClient} returns this +*/ +proto.ibc.core.client.v1.MsgCreateClient.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.MsgCreateClient} returns this + */ +proto.ibc.core.client.v1.MsgCreateClient.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.MsgCreateClient.prototype.hasConsensusState = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string signer = 3; + * @return {string} + */ +proto.ibc.core.client.v1.MsgCreateClient.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgCreateClient} returns this + */ +proto.ibc.core.client.v1.MsgCreateClient.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.MsgCreateClientResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgCreateClientResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgCreateClientResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgCreateClientResponse.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.MsgCreateClientResponse} + */ +proto.ibc.core.client.v1.MsgCreateClientResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgCreateClientResponse; + return proto.ibc.core.client.v1.MsgCreateClientResponse.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.MsgCreateClientResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgCreateClientResponse} + */ +proto.ibc.core.client.v1.MsgCreateClientResponse.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.MsgCreateClientResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgCreateClientResponse.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.MsgCreateClientResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgCreateClientResponse.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.MsgUpdateClient.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgUpdateClient.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgUpdateClient} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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), + 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.MsgUpdateClient} + */ +proto.ibc.core.client.v1.MsgUpdateClient.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgUpdateClient; + return proto.ibc.core.client.v1.MsgUpdateClient.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.MsgUpdateClient} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgUpdateClient} + */ +proto.ibc.core.client.v1.MsgUpdateClient.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 = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setHeader(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.MsgUpdateClient.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgUpdateClient.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.MsgUpdateClient} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpdateClient.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHeader(); + 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 string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.MsgUpdateClient.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgUpdateClient} returns this + */ +proto.ibc.core.client.v1.MsgUpdateClient.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any header = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.MsgUpdateClient.prototype.getHeader = 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.MsgUpdateClient} returns this +*/ +proto.ibc.core.client.v1.MsgUpdateClient.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 2, 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.MsgUpdateClient.prototype.hasHeader = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string signer = 3; + * @return {string} + */ +proto.ibc.core.client.v1.MsgUpdateClient.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgUpdateClient} returns this + */ +proto.ibc.core.client.v1.MsgUpdateClient.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.MsgUpdateClientResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgUpdateClientResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgUpdateClientResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpdateClientResponse.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.MsgUpdateClientResponse} + */ +proto.ibc.core.client.v1.MsgUpdateClientResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgUpdateClientResponse; + return proto.ibc.core.client.v1.MsgUpdateClientResponse.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.MsgUpdateClientResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgUpdateClientResponse} + */ +proto.ibc.core.client.v1.MsgUpdateClientResponse.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.MsgUpdateClientResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgUpdateClientResponse.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.MsgUpdateClientResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpdateClientResponse.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.MsgUpgradeClient.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgUpgradeClient.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgUpgradeClient} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpgradeClient.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + clientState: (f = msg.getClientState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + consensusState: (f = msg.getConsensusState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + proofUpgradeClient: msg.getProofUpgradeClient_asB64(), + proofUpgradeConsensusState: msg.getProofUpgradeConsensusState_asB64(), + 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.client.v1.MsgUpgradeClient} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgUpgradeClient; + return proto.ibc.core.client.v1.MsgUpgradeClient.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.MsgUpgradeClient} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgUpgradeClient} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.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 = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setClientState(value); + break; + case 3: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setConsensusState(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofUpgradeClient(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofUpgradeConsensusState(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.client.v1.MsgUpgradeClient.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgUpgradeClient.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.MsgUpgradeClient} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpgradeClient.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getClientState(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getConsensusState(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getProofUpgradeClient_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getProofUpgradeConsensusState_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgUpgradeClient} returns this + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any client_state = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.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.core.client.v1.MsgUpgradeClient} returns this +*/ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.setClientState = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.MsgUpgradeClient} returns this + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.clearClientState = function() { + return this.setClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.hasClientState = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Any consensus_state = 3; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getConsensusState = 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.core.client.v1.MsgUpgradeClient} returns this +*/ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.MsgUpgradeClient} returns this + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.hasConsensusState = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes proof_upgrade_client = 4; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getProofUpgradeClient = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes proof_upgrade_client = 4; + * This is a type-conversion wrapper around `getProofUpgradeClient()` + * @return {string} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getProofUpgradeClient_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofUpgradeClient())); +}; + + +/** + * optional bytes proof_upgrade_client = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofUpgradeClient()` + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getProofUpgradeClient_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofUpgradeClient())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.client.v1.MsgUpgradeClient} returns this + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.setProofUpgradeClient = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bytes proof_upgrade_consensus_state = 5; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getProofUpgradeConsensusState = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes proof_upgrade_consensus_state = 5; + * This is a type-conversion wrapper around `getProofUpgradeConsensusState()` + * @return {string} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getProofUpgradeConsensusState_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofUpgradeConsensusState())); +}; + + +/** + * optional bytes proof_upgrade_consensus_state = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofUpgradeConsensusState()` + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getProofUpgradeConsensusState_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofUpgradeConsensusState())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.client.v1.MsgUpgradeClient} returns this + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.setProofUpgradeConsensusState = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional string signer = 6; + * @return {string} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgUpgradeClient} returns this + */ +proto.ibc.core.client.v1.MsgUpgradeClient.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.client.v1.MsgUpgradeClientResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgUpgradeClientResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgUpgradeClientResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpgradeClientResponse.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.MsgUpgradeClientResponse} + */ +proto.ibc.core.client.v1.MsgUpgradeClientResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgUpgradeClientResponse; + return proto.ibc.core.client.v1.MsgUpgradeClientResponse.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.MsgUpgradeClientResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgUpgradeClientResponse} + */ +proto.ibc.core.client.v1.MsgUpgradeClientResponse.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.MsgUpgradeClientResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgUpgradeClientResponse.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.MsgUpgradeClientResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpgradeClientResponse.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.MsgSubmitMisbehaviour.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgSubmitMisbehaviour.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgSubmitMisbehaviour} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + misbehaviour: (f = msg.getMisbehaviour()) && 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.MsgSubmitMisbehaviour} + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgSubmitMisbehaviour; + return proto.ibc.core.client.v1.MsgSubmitMisbehaviour.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.MsgSubmitMisbehaviour} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgSubmitMisbehaviour} + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.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 = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setMisbehaviour(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.MsgSubmitMisbehaviour.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgSubmitMisbehaviour.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.MsgSubmitMisbehaviour} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMisbehaviour(); + 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 string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgSubmitMisbehaviour} returns this + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any misbehaviour = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.prototype.getMisbehaviour = 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.MsgSubmitMisbehaviour} returns this +*/ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.prototype.setMisbehaviour = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.MsgSubmitMisbehaviour} returns this + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.prototype.clearMisbehaviour = function() { + return this.setMisbehaviour(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.prototype.hasMisbehaviour = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string signer = 3; + * @return {string} + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgSubmitMisbehaviour} returns this + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.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.MsgSubmitMisbehaviourResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgSubmitMisbehaviourResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.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.MsgSubmitMisbehaviourResponse} + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse; + return proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.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.MsgSubmitMisbehaviourResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse} + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.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.MsgSubmitMisbehaviourResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.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.MsgSubmitMisbehaviourResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.ibc.core.client.v1); diff --git a/dist/src/types/proto-types/ibc/core/commitment/v1/commitment_pb.js b/dist/src/types/proto-types/ibc/core/commitment/v1/commitment_pb.js new file mode 100644 index 00000000..e7eaa7c5 --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/commitment/v1/commitment_pb.js @@ -0,0 +1,731 @@ +// source: ibc/core/commitment/v1/commitment.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 confio_proofs_pb = require('../../../../confio/proofs_pb.js'); +goog.object.extend(proto, confio_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); +goog.exportSymbol('proto.ibc.core.commitment.v1.MerkleRoot', 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.commitment.v1.MerkleRoot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.commitment.v1.MerkleRoot, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.commitment.v1.MerkleRoot.displayName = 'proto.ibc.core.commitment.v1.MerkleRoot'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.commitment.v1.MerklePrefix = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.commitment.v1.MerklePrefix, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.commitment.v1.MerklePrefix.displayName = 'proto.ibc.core.commitment.v1.MerklePrefix'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.commitment.v1.MerklePath = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.commitment.v1.MerklePath.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.commitment.v1.MerklePath, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.commitment.v1.MerklePath.displayName = 'proto.ibc.core.commitment.v1.MerklePath'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.commitment.v1.MerkleProof = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.commitment.v1.MerkleProof.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.commitment.v1.MerkleProof, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.commitment.v1.MerkleProof.displayName = 'proto.ibc.core.commitment.v1.MerkleProof'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.commitment.v1.MerkleRoot.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.commitment.v1.MerkleRoot.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.commitment.v1.MerkleRoot} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.commitment.v1.MerkleRoot.toObject = function(includeInstance, msg) { + var f, obj = { + hash: msg.getHash_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.core.commitment.v1.MerkleRoot} + */ +proto.ibc.core.commitment.v1.MerkleRoot.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.commitment.v1.MerkleRoot; + return proto.ibc.core.commitment.v1.MerkleRoot.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.commitment.v1.MerkleRoot} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.commitment.v1.MerkleRoot} + */ +proto.ibc.core.commitment.v1.MerkleRoot.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.setHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.commitment.v1.MerkleRoot.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.commitment.v1.MerkleRoot.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.commitment.v1.MerkleRoot} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.commitment.v1.MerkleRoot.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.commitment.v1.MerkleRoot.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.ibc.core.commitment.v1.MerkleRoot.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.ibc.core.commitment.v1.MerkleRoot.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.commitment.v1.MerkleRoot} returns this + */ +proto.ibc.core.commitment.v1.MerkleRoot.prototype.setHash = 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.core.commitment.v1.MerklePrefix.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.commitment.v1.MerklePrefix.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.commitment.v1.MerklePrefix} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.commitment.v1.MerklePrefix.toObject = function(includeInstance, msg) { + var f, obj = { + keyPrefix: msg.getKeyPrefix_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.core.commitment.v1.MerklePrefix} + */ +proto.ibc.core.commitment.v1.MerklePrefix.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.commitment.v1.MerklePrefix; + return proto.ibc.core.commitment.v1.MerklePrefix.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.commitment.v1.MerklePrefix} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.commitment.v1.MerklePrefix} + */ +proto.ibc.core.commitment.v1.MerklePrefix.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.setKeyPrefix(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.commitment.v1.MerklePrefix.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.commitment.v1.MerklePrefix.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.commitment.v1.MerklePrefix} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.commitment.v1.MerklePrefix.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyPrefix_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes key_prefix = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.commitment.v1.MerklePrefix.prototype.getKeyPrefix = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes key_prefix = 1; + * This is a type-conversion wrapper around `getKeyPrefix()` + * @return {string} + */ +proto.ibc.core.commitment.v1.MerklePrefix.prototype.getKeyPrefix_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKeyPrefix())); +}; + + +/** + * optional bytes key_prefix = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKeyPrefix()` + * @return {!Uint8Array} + */ +proto.ibc.core.commitment.v1.MerklePrefix.prototype.getKeyPrefix_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKeyPrefix())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.commitment.v1.MerklePrefix} returns this + */ +proto.ibc.core.commitment.v1.MerklePrefix.prototype.setKeyPrefix = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.commitment.v1.MerklePath.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.core.commitment.v1.MerklePath.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.commitment.v1.MerklePath.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.commitment.v1.MerklePath} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.commitment.v1.MerklePath.toObject = function(includeInstance, msg) { + var f, obj = { + keyPathList: (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.ibc.core.commitment.v1.MerklePath} + */ +proto.ibc.core.commitment.v1.MerklePath.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.commitment.v1.MerklePath; + return proto.ibc.core.commitment.v1.MerklePath.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.commitment.v1.MerklePath} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.commitment.v1.MerklePath} + */ +proto.ibc.core.commitment.v1.MerklePath.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.addKeyPath(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.commitment.v1.MerklePath.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.commitment.v1.MerklePath.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.commitment.v1.MerklePath} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.commitment.v1.MerklePath.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyPathList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string key_path = 1; + * @return {!Array} + */ +proto.ibc.core.commitment.v1.MerklePath.prototype.getKeyPathList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.commitment.v1.MerklePath} returns this + */ +proto.ibc.core.commitment.v1.MerklePath.prototype.setKeyPathList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.commitment.v1.MerklePath} returns this + */ +proto.ibc.core.commitment.v1.MerklePath.prototype.addKeyPath = 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.core.commitment.v1.MerklePath} returns this + */ +proto.ibc.core.commitment.v1.MerklePath.prototype.clearKeyPathList = function() { + return this.setKeyPathList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.commitment.v1.MerkleProof.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.core.commitment.v1.MerkleProof.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.commitment.v1.MerkleProof.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.commitment.v1.MerkleProof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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) + }; + + 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.commitment.v1.MerkleProof} + */ +proto.ibc.core.commitment.v1.MerkleProof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.commitment.v1.MerkleProof; + return proto.ibc.core.commitment.v1.MerkleProof.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.commitment.v1.MerkleProof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.commitment.v1.MerkleProof} + */ +proto.ibc.core.commitment.v1.MerkleProof.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new confio_proofs_pb.CommitmentProof; + reader.readMessage(value,confio_proofs_pb.CommitmentProof.deserializeBinaryFromReader); + msg.addProofs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.commitment.v1.MerkleProof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.commitment.v1.MerkleProof.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.commitment.v1.MerkleProof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.commitment.v1.MerkleProof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProofsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + confio_proofs_pb.CommitmentProof.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ics23.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)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.commitment.v1.MerkleProof} returns this +*/ +proto.ibc.core.commitment.v1.MerkleProof.prototype.setProofsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ics23.CommitmentProof=} opt_value + * @param {number=} opt_index + * @return {!proto.ics23.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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.commitment.v1.MerkleProof} returns this + */ +proto.ibc.core.commitment.v1.MerkleProof.prototype.clearProofsList = function() { + return this.setProofsList([]); +}; + + +goog.object.extend(exports, proto.ibc.core.commitment.v1); diff --git a/dist/src/types/proto-types/ibc/core/connection/v1/connection_pb.js b/dist/src/types/proto-types/ibc/core/connection/v1/connection_pb.js new file mode 100644 index 00000000..ed54cebd --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/connection/v1/connection_pb.js @@ -0,0 +1,1533 @@ +// source: ibc/core/connection/v1/connection.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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_commitment_v1_commitment_pb = require('../../../../ibc/core/commitment/v1/commitment_pb.js'); +goog.object.extend(proto, ibc_core_commitment_v1_commitment_pb); +goog.exportSymbol('proto.ibc.core.connection.v1.ClientPaths', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.ConnectionEnd', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.ConnectionPaths', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.Counterparty', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.IdentifiedConnection', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.State', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.Version', 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.connection.v1.ConnectionEnd = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.ConnectionEnd.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.ConnectionEnd, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.ConnectionEnd.displayName = 'proto.ibc.core.connection.v1.ConnectionEnd'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.IdentifiedConnection = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.IdentifiedConnection.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.IdentifiedConnection, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.IdentifiedConnection.displayName = 'proto.ibc.core.connection.v1.IdentifiedConnection'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Counterparty = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.Counterparty, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.Counterparty.displayName = 'proto.ibc.core.connection.v1.Counterparty'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ClientPaths = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.ClientPaths.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.ClientPaths, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.ClientPaths.displayName = 'proto.ibc.core.connection.v1.ClientPaths'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ConnectionPaths = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.ConnectionPaths.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.ConnectionPaths, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.ConnectionPaths.displayName = 'proto.ibc.core.connection.v1.ConnectionPaths'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Version = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.Version.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.Version, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.Version.displayName = 'proto.ibc.core.connection.v1.Version'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.v1.ConnectionEnd.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.connection.v1.ConnectionEnd.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.ConnectionEnd.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ConnectionEnd} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.ConnectionEnd.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + versionsList: jspb.Message.toObjectList(msg.getVersionsList(), + proto.ibc.core.connection.v1.Version.toObject, includeInstance), + state: jspb.Message.getFieldWithDefault(msg, 3, 0), + counterparty: (f = msg.getCounterparty()) && proto.ibc.core.connection.v1.Counterparty.toObject(includeInstance, f), + delayPeriod: 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.ibc.core.connection.v1.ConnectionEnd} + */ +proto.ibc.core.connection.v1.ConnectionEnd.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.ConnectionEnd; + return proto.ibc.core.connection.v1.ConnectionEnd.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.ConnectionEnd} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.ConnectionEnd} + */ +proto.ibc.core.connection.v1.ConnectionEnd.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 = new proto.ibc.core.connection.v1.Version; + reader.readMessage(value,proto.ibc.core.connection.v1.Version.deserializeBinaryFromReader); + msg.addVersions(value); + break; + case 3: + var value = /** @type {!proto.ibc.core.connection.v1.State} */ (reader.readEnum()); + msg.setState(value); + break; + case 4: + var value = new proto.ibc.core.connection.v1.Counterparty; + reader.readMessage(value,proto.ibc.core.connection.v1.Counterparty.deserializeBinaryFromReader); + msg.setCounterparty(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDelayPeriod(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.ConnectionEnd.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.ConnectionEnd.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.ConnectionEnd} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.ConnectionEnd.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.ibc.core.connection.v1.Version.serializeBinaryToWriter + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getCounterparty(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.ibc.core.connection.v1.Counterparty.serializeBinaryToWriter + ); + } + f = message.getDelayPeriod(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.ConnectionEnd} returns this + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated Version versions = 2; + * @return {!Array} + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.getVersionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.core.connection.v1.Version, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.ConnectionEnd} returns this +*/ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.setVersionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.Version=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.Version} + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.addVersions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.core.connection.v1.Version, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.connection.v1.ConnectionEnd} returns this + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.clearVersionsList = function() { + return this.setVersionsList([]); +}; + + +/** + * optional State state = 3; + * @return {!proto.ibc.core.connection.v1.State} + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.getState = function() { + return /** @type {!proto.ibc.core.connection.v1.State} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.State} value + * @return {!proto.ibc.core.connection.v1.ConnectionEnd} returns this + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional Counterparty counterparty = 4; + * @return {?proto.ibc.core.connection.v1.Counterparty} + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.getCounterparty = function() { + return /** @type{?proto.ibc.core.connection.v1.Counterparty} */ ( + jspb.Message.getWrapperField(this, proto.ibc.core.connection.v1.Counterparty, 4)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.Counterparty|undefined} value + * @return {!proto.ibc.core.connection.v1.ConnectionEnd} returns this +*/ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.setCounterparty = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.ConnectionEnd} returns this + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.clearCounterparty = function() { + return this.setCounterparty(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.hasCounterparty = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint64 delay_period = 5; + * @return {number} + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.getDelayPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.connection.v1.ConnectionEnd} returns this + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.setDelayPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.v1.IdentifiedConnection.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.connection.v1.IdentifiedConnection.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.IdentifiedConnection.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.IdentifiedConnection} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.IdentifiedConnection.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + clientId: jspb.Message.getFieldWithDefault(msg, 2, ""), + versionsList: jspb.Message.toObjectList(msg.getVersionsList(), + proto.ibc.core.connection.v1.Version.toObject, includeInstance), + state: jspb.Message.getFieldWithDefault(msg, 4, 0), + counterparty: (f = msg.getCounterparty()) && proto.ibc.core.connection.v1.Counterparty.toObject(includeInstance, f), + delayPeriod: 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.connection.v1.IdentifiedConnection} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.IdentifiedConnection; + return proto.ibc.core.connection.v1.IdentifiedConnection.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.IdentifiedConnection} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setClientId(value); + break; + case 3: + var value = new proto.ibc.core.connection.v1.Version; + reader.readMessage(value,proto.ibc.core.connection.v1.Version.deserializeBinaryFromReader); + msg.addVersions(value); + break; + case 4: + var value = /** @type {!proto.ibc.core.connection.v1.State} */ (reader.readEnum()); + msg.setState(value); + break; + case 5: + var value = new proto.ibc.core.connection.v1.Counterparty; + reader.readMessage(value,proto.ibc.core.connection.v1.Counterparty.deserializeBinaryFromReader); + msg.setCounterparty(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDelayPeriod(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.IdentifiedConnection.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.IdentifiedConnection.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.IdentifiedConnection} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.IdentifiedConnection.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.ibc.core.connection.v1.Version.serializeBinaryToWriter + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getCounterparty(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.ibc.core.connection.v1.Counterparty.serializeBinaryToWriter + ); + } + f = message.getDelayPeriod(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} returns this + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string client_id = 2; + * @return {string} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} returns this + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated Version versions = 3; + * @return {!Array} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.getVersionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.core.connection.v1.Version, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} returns this +*/ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.setVersionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.Version=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.Version} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.addVersions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.ibc.core.connection.v1.Version, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} returns this + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.clearVersionsList = function() { + return this.setVersionsList([]); +}; + + +/** + * optional State state = 4; + * @return {!proto.ibc.core.connection.v1.State} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.getState = function() { + return /** @type {!proto.ibc.core.connection.v1.State} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.State} value + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} returns this + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional Counterparty counterparty = 5; + * @return {?proto.ibc.core.connection.v1.Counterparty} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.getCounterparty = function() { + return /** @type{?proto.ibc.core.connection.v1.Counterparty} */ ( + jspb.Message.getWrapperField(this, proto.ibc.core.connection.v1.Counterparty, 5)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.Counterparty|undefined} value + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} returns this +*/ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.setCounterparty = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} returns this + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.clearCounterparty = function() { + return this.setCounterparty(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.hasCounterparty = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional uint64 delay_period = 6; + * @return {number} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.getDelayPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} returns this + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.setDelayPeriod = 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.connection.v1.Counterparty.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.Counterparty.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Counterparty} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.Counterparty.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + connectionId: jspb.Message.getFieldWithDefault(msg, 2, ""), + prefix: (f = msg.getPrefix()) && ibc_core_commitment_v1_commitment_pb.MerklePrefix.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.Counterparty} + */ +proto.ibc.core.connection.v1.Counterparty.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.Counterparty; + return proto.ibc.core.connection.v1.Counterparty.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.Counterparty} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.Counterparty} + */ +proto.ibc.core.connection.v1.Counterparty.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 {string} */ (reader.readString()); + msg.setConnectionId(value); + break; + case 3: + var value = new ibc_core_commitment_v1_commitment_pb.MerklePrefix; + reader.readMessage(value,ibc_core_commitment_v1_commitment_pb.MerklePrefix.deserializeBinaryFromReader); + msg.setPrefix(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.Counterparty.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.Counterparty.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.Counterparty} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.Counterparty.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPrefix(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_commitment_v1_commitment_pb.MerklePrefix.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.Counterparty.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.Counterparty} returns this + */ +proto.ibc.core.connection.v1.Counterparty.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string connection_id = 2; + * @return {string} + */ +proto.ibc.core.connection.v1.Counterparty.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.Counterparty} returns this + */ +proto.ibc.core.connection.v1.Counterparty.prototype.setConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional ibc.core.commitment.v1.MerklePrefix prefix = 3; + * @return {?proto.ibc.core.commitment.v1.MerklePrefix} + */ +proto.ibc.core.connection.v1.Counterparty.prototype.getPrefix = function() { + return /** @type{?proto.ibc.core.commitment.v1.MerklePrefix} */ ( + jspb.Message.getWrapperField(this, ibc_core_commitment_v1_commitment_pb.MerklePrefix, 3)); +}; + + +/** + * @param {?proto.ibc.core.commitment.v1.MerklePrefix|undefined} value + * @return {!proto.ibc.core.connection.v1.Counterparty} returns this +*/ +proto.ibc.core.connection.v1.Counterparty.prototype.setPrefix = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.Counterparty} returns this + */ +proto.ibc.core.connection.v1.Counterparty.prototype.clearPrefix = function() { + return this.setPrefix(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.Counterparty.prototype.hasPrefix = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.v1.ClientPaths.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.core.connection.v1.ClientPaths.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.ClientPaths.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ClientPaths} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.ClientPaths.toObject = function(includeInstance, msg) { + var f, obj = { + pathsList: (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.ibc.core.connection.v1.ClientPaths} + */ +proto.ibc.core.connection.v1.ClientPaths.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.ClientPaths; + return proto.ibc.core.connection.v1.ClientPaths.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.ClientPaths} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.ClientPaths} + */ +proto.ibc.core.connection.v1.ClientPaths.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.addPaths(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.ClientPaths.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.ClientPaths.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.ClientPaths} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.ClientPaths.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPathsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string paths = 1; + * @return {!Array} + */ +proto.ibc.core.connection.v1.ClientPaths.prototype.getPathsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.ClientPaths} returns this + */ +proto.ibc.core.connection.v1.ClientPaths.prototype.setPathsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.ClientPaths} returns this + */ +proto.ibc.core.connection.v1.ClientPaths.prototype.addPaths = 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.core.connection.v1.ClientPaths} returns this + */ +proto.ibc.core.connection.v1.ClientPaths.prototype.clearPathsList = function() { + return this.setPathsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.v1.ConnectionPaths.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.connection.v1.ConnectionPaths.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.ConnectionPaths.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ConnectionPaths} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.ConnectionPaths.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + pathsList: (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.core.connection.v1.ConnectionPaths} + */ +proto.ibc.core.connection.v1.ConnectionPaths.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.ConnectionPaths; + return proto.ibc.core.connection.v1.ConnectionPaths.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.ConnectionPaths} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.ConnectionPaths} + */ +proto.ibc.core.connection.v1.ConnectionPaths.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 {string} */ (reader.readString()); + msg.addPaths(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.ConnectionPaths.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.ConnectionPaths.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.ConnectionPaths} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.ConnectionPaths.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPathsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.ConnectionPaths.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.ConnectionPaths} returns this + */ +proto.ibc.core.connection.v1.ConnectionPaths.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string paths = 2; + * @return {!Array} + */ +proto.ibc.core.connection.v1.ConnectionPaths.prototype.getPathsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.ConnectionPaths} returns this + */ +proto.ibc.core.connection.v1.ConnectionPaths.prototype.setPathsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.ConnectionPaths} returns this + */ +proto.ibc.core.connection.v1.ConnectionPaths.prototype.addPaths = 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.connection.v1.ConnectionPaths} returns this + */ +proto.ibc.core.connection.v1.ConnectionPaths.prototype.clearPathsList = function() { + return this.setPathsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.v1.Version.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.connection.v1.Version.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.Version.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Version} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.Version.toObject = function(includeInstance, msg) { + var f, obj = { + identifier: jspb.Message.getFieldWithDefault(msg, 1, ""), + featuresList: (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.core.connection.v1.Version} + */ +proto.ibc.core.connection.v1.Version.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.Version; + return proto.ibc.core.connection.v1.Version.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.Version} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.Version} + */ +proto.ibc.core.connection.v1.Version.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.setIdentifier(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addFeatures(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.Version.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.Version.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.Version} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.Version.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentifier(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFeaturesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional string identifier = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.Version.prototype.getIdentifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.Version} returns this + */ +proto.ibc.core.connection.v1.Version.prototype.setIdentifier = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string features = 2; + * @return {!Array} + */ +proto.ibc.core.connection.v1.Version.prototype.getFeaturesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.Version} returns this + */ +proto.ibc.core.connection.v1.Version.prototype.setFeaturesList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.Version} returns this + */ +proto.ibc.core.connection.v1.Version.prototype.addFeatures = 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.connection.v1.Version} returns this + */ +proto.ibc.core.connection.v1.Version.prototype.clearFeaturesList = function() { + return this.setFeaturesList([]); +}; + + +/** + * @enum {number} + */ +proto.ibc.core.connection.v1.State = { + STATE_UNINITIALIZED_UNSPECIFIED: 0, + STATE_INIT: 1, + STATE_TRYOPEN: 2, + STATE_OPEN: 3 +}; + +goog.object.extend(exports, proto.ibc.core.connection.v1); diff --git a/dist/src/types/proto-types/ibc/core/connection/v1/genesis_pb.js b/dist/src/types/proto-types/ibc/core/connection/v1/genesis_pb.js new file mode 100644 index 00000000..64ca51f1 --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/connection/v1/genesis_pb.js @@ -0,0 +1,284 @@ +// source: ibc/core/connection/v1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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_connection_v1_connection_pb = require('../../../../ibc/core/connection/v1/connection_pb.js'); +goog.object.extend(proto, ibc_core_connection_v1_connection_pb); +goog.exportSymbol('proto.ibc.core.connection.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.core.connection.v1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.GenesisState.displayName = 'proto.ibc.core.connection.v1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.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.ibc.core.connection.v1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.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.core.connection.v1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + connectionsList: jspb.Message.toObjectList(msg.getConnectionsList(), + ibc_core_connection_v1_connection_pb.IdentifiedConnection.toObject, includeInstance), + clientConnectionPathsList: jspb.Message.toObjectList(msg.getClientConnectionPathsList(), + ibc_core_connection_v1_connection_pb.ConnectionPaths.toObject, includeInstance), + nextConnectionSequence: 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.connection.v1.GenesisState} + */ +proto.ibc.core.connection.v1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.GenesisState; + return proto.ibc.core.connection.v1.GenesisState.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.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.GenesisState} + */ +proto.ibc.core.connection.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_core_connection_v1_connection_pb.IdentifiedConnection; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.IdentifiedConnection.deserializeBinaryFromReader); + msg.addConnections(value); + break; + case 2: + var value = new ibc_core_connection_v1_connection_pb.ConnectionPaths; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.ConnectionPaths.deserializeBinaryFromReader); + msg.addClientConnectionPaths(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNextConnectionSequence(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.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.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.core.connection.v1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_connection_v1_connection_pb.IdentifiedConnection.serializeBinaryToWriter + ); + } + f = message.getClientConnectionPathsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + ibc_core_connection_v1_connection_pb.ConnectionPaths.serializeBinaryToWriter + ); + } + f = message.getNextConnectionSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * repeated IdentifiedConnection connections = 1; + * @return {!Array} + */ +proto.ibc.core.connection.v1.GenesisState.prototype.getConnectionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_connection_v1_connection_pb.IdentifiedConnection, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.GenesisState} returns this +*/ +proto.ibc.core.connection.v1.GenesisState.prototype.setConnectionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.IdentifiedConnection=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} + */ +proto.ibc.core.connection.v1.GenesisState.prototype.addConnections = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.connection.v1.IdentifiedConnection, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.connection.v1.GenesisState} returns this + */ +proto.ibc.core.connection.v1.GenesisState.prototype.clearConnectionsList = function() { + return this.setConnectionsList([]); +}; + + +/** + * repeated ConnectionPaths client_connection_paths = 2; + * @return {!Array} + */ +proto.ibc.core.connection.v1.GenesisState.prototype.getClientConnectionPathsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_connection_v1_connection_pb.ConnectionPaths, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.GenesisState} returns this +*/ +proto.ibc.core.connection.v1.GenesisState.prototype.setClientConnectionPathsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.ConnectionPaths=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.ConnectionPaths} + */ +proto.ibc.core.connection.v1.GenesisState.prototype.addClientConnectionPaths = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.core.connection.v1.ConnectionPaths, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.connection.v1.GenesisState} returns this + */ +proto.ibc.core.connection.v1.GenesisState.prototype.clearClientConnectionPathsList = function() { + return this.setClientConnectionPathsList([]); +}; + + +/** + * optional uint64 next_connection_sequence = 3; + * @return {number} + */ +proto.ibc.core.connection.v1.GenesisState.prototype.getNextConnectionSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.connection.v1.GenesisState} returns this + */ +proto.ibc.core.connection.v1.GenesisState.prototype.setNextConnectionSequence = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +goog.object.extend(exports, proto.ibc.core.connection.v1); diff --git a/dist/src/types/proto-types/ibc/core/connection/v1/query_grpc_web_pb.js b/dist/src/types/proto-types/ibc/core/connection/v1/query_grpc_web_pb.js new file mode 100644 index 00000000..3e42472d --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/connection/v1/query_grpc_web_pb.js @@ -0,0 +1,489 @@ +/** + * @fileoverview gRPC-Web generated client stub for ibc.core.connection.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js') + +var ibc_core_connection_v1_connection_pb = require('../../../../ibc/core/connection/v1/connection_pb.js') + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') +const proto = {}; +proto.ibc = {}; +proto.ibc.core = {}; +proto.ibc.core.connection = {}; +proto.ibc.core.connection.v1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.connection.v1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.connection.v1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.QueryConnectionRequest, + * !proto.ibc.core.connection.v1.QueryConnectionResponse>} + */ +const methodDescriptor_Query_Connection = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Query/Connection', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.QueryConnectionRequest, + proto.ibc.core.connection.v1.QueryConnectionResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryConnectionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryConnectionResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.QueryConnectionRequest, + * !proto.ibc.core.connection.v1.QueryConnectionResponse>} + */ +const methodInfo_Query_Connection = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.QueryConnectionResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryConnectionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryConnectionResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.QueryConnectionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.QueryConnectionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.QueryClient.prototype.connection = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Query/Connection', + request, + metadata || {}, + methodDescriptor_Query_Connection, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.QueryConnectionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.QueryPromiseClient.prototype.connection = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Query/Connection', + request, + metadata || {}, + methodDescriptor_Query_Connection); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.QueryConnectionsRequest, + * !proto.ibc.core.connection.v1.QueryConnectionsResponse>} + */ +const methodDescriptor_Query_Connections = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Query/Connections', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.QueryConnectionsRequest, + proto.ibc.core.connection.v1.QueryConnectionsResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryConnectionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryConnectionsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.QueryConnectionsRequest, + * !proto.ibc.core.connection.v1.QueryConnectionsResponse>} + */ +const methodInfo_Query_Connections = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.QueryConnectionsResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryConnectionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryConnectionsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.QueryConnectionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.QueryConnectionsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.QueryClient.prototype.connections = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Query/Connections', + request, + metadata || {}, + methodDescriptor_Query_Connections, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.QueryConnectionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.QueryPromiseClient.prototype.connections = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Query/Connections', + request, + metadata || {}, + methodDescriptor_Query_Connections); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.QueryClientConnectionsRequest, + * !proto.ibc.core.connection.v1.QueryClientConnectionsResponse>} + */ +const methodDescriptor_Query_ClientConnections = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Query/ClientConnections', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.QueryClientConnectionsRequest, + proto.ibc.core.connection.v1.QueryClientConnectionsResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryClientConnectionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryClientConnectionsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.QueryClientConnectionsRequest, + * !proto.ibc.core.connection.v1.QueryClientConnectionsResponse>} + */ +const methodInfo_Query_ClientConnections = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.QueryClientConnectionsResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryClientConnectionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryClientConnectionsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.QueryClientConnectionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.QueryClientConnectionsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.QueryClient.prototype.clientConnections = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Query/ClientConnections', + request, + metadata || {}, + methodDescriptor_Query_ClientConnections, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.QueryClientConnectionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.QueryPromiseClient.prototype.clientConnections = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Query/ClientConnections', + request, + metadata || {}, + methodDescriptor_Query_ClientConnections); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.QueryConnectionClientStateRequest, + * !proto.ibc.core.connection.v1.QueryConnectionClientStateResponse>} + */ +const methodDescriptor_Query_ConnectionClientState = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Query/ConnectionClientState', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.QueryConnectionClientStateRequest, + proto.ibc.core.connection.v1.QueryConnectionClientStateResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryConnectionClientStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.QueryConnectionClientStateRequest, + * !proto.ibc.core.connection.v1.QueryConnectionClientStateResponse>} + */ +const methodInfo_Query_ConnectionClientState = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.QueryConnectionClientStateResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryConnectionClientStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.QueryConnectionClientStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.QueryConnectionClientStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.QueryClient.prototype.connectionClientState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Query/ConnectionClientState', + request, + metadata || {}, + methodDescriptor_Query_ConnectionClientState, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.QueryConnectionClientStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.QueryPromiseClient.prototype.connectionClientState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Query/ConnectionClientState', + request, + metadata || {}, + methodDescriptor_Query_ConnectionClientState); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest, + * !proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse>} + */ +const methodDescriptor_Query_ConnectionConsensusState = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Query/ConnectionConsensusState', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest, + proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest, + * !proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse>} + */ +const methodInfo_Query_ConnectionConsensusState = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.QueryClient.prototype.connectionConsensusState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Query/ConnectionConsensusState', + request, + metadata || {}, + methodDescriptor_Query_ConnectionConsensusState, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.QueryPromiseClient.prototype.connectionConsensusState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Query/ConnectionConsensusState', + request, + metadata || {}, + methodDescriptor_Query_ConnectionConsensusState); +}; + + +module.exports = proto.ibc.core.connection.v1; + diff --git a/dist/src/types/proto-types/ibc/core/connection/v1/query_pb.js b/dist/src/types/proto-types/ibc/core/connection/v1/query_pb.js new file mode 100644 index 00000000..7f16656f --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/connection/v1/query_pb.js @@ -0,0 +1,2299 @@ +// source: ibc/core/connection/v1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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_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_connection_v1_connection_pb = require('../../../../ibc/core/connection/v1/connection_pb.js'); +goog.object.extend(proto, ibc_core_connection_v1_connection_pb); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_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.core.connection.v1.QueryClientConnectionsRequest', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.QueryClientConnectionsResponse', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionClientStateRequest', null, global); +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.QueryConnectionRequest', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionResponse', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionsRequest', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionsResponse', 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.connection.v1.QueryConnectionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionRequest.displayName = 'proto.ibc.core.connection.v1.QueryConnectionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionResponse.displayName = 'proto.ibc.core.connection.v1.QueryConnectionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionsRequest.displayName = 'proto.ibc.core.connection.v1.QueryConnectionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.QueryConnectionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionsResponse.displayName = 'proto.ibc.core.connection.v1.QueryConnectionsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryClientConnectionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryClientConnectionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryClientConnectionsRequest.displayName = 'proto.ibc.core.connection.v1.QueryClientConnectionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryClientConnectionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.QueryClientConnectionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryClientConnectionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryClientConnectionsResponse.displayName = 'proto.ibc.core.connection.v1.QueryClientConnectionsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionClientStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionClientStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.displayName = 'proto.ibc.core.connection.v1.QueryConnectionClientStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionClientStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionClientStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.displayName = 'proto.ibc.core.connection.v1.QueryConnectionClientStateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionConsensusStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.displayName = 'proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionConsensusStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.displayName = 'proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.QueryConnectionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + connectionId: 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.core.connection.v1.QueryConnectionRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionRequest; + return proto.ibc.core.connection.v1.QueryConnectionRequest.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.QueryConnectionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.QueryConnectionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionRequest.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.QueryConnectionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string connection_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.QueryConnectionRequest.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionRequest} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionRequest.prototype.setConnectionId = 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.core.connection.v1.QueryConnectionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + connection: (f = msg.getConnection()) && ibc_core_connection_v1_connection_pb.ConnectionEnd.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.connection.v1.QueryConnectionResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionResponse; + return proto.ibc.core.connection.v1.QueryConnectionResponse.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.QueryConnectionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.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.ConnectionEnd; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.ConnectionEnd.deserializeBinaryFromReader); + msg.setConnection(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.connection.v1.QueryConnectionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionResponse.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.QueryConnectionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnection(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_connection_v1_connection_pb.ConnectionEnd.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 ConnectionEnd connection = 1; + * @return {?proto.ibc.core.connection.v1.ConnectionEnd} + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.prototype.getConnection = function() { + return /** @type{?proto.ibc.core.connection.v1.ConnectionEnd} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.ConnectionEnd, 1)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.ConnectionEnd|undefined} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionResponse.prototype.setConnection = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.prototype.clearConnection = function() { + return this.setConnection(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.prototype.hasConnection = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.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.connection.v1.QueryConnectionResponse.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.connection.v1.QueryConnectionResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.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.connection.v1.QueryConnectionResponse.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.connection.v1.QueryConnectionResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.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.connection.v1.QueryConnectionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionsRequest.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.core.connection.v1.QueryConnectionsRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionsRequest; + return proto.ibc.core.connection.v1.QueryConnectionsRequest.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.QueryConnectionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionsRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionsRequest.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.core.connection.v1.QueryConnectionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionsRequest.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.QueryConnectionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionsRequest.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.core.connection.v1.QueryConnectionsRequest.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.core.connection.v1.QueryConnectionsRequest} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionsRequest} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.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.core.connection.v1.QueryConnectionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + connectionsList: jspb.Message.toObjectList(msg.getConnectionsList(), + ibc_core_connection_v1_connection_pb.IdentifiedConnection.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f), + height: (f = msg.getHeight()) && 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.connection.v1.QueryConnectionsResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionsResponse; + return proto.ibc.core.connection.v1.QueryConnectionsResponse.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.QueryConnectionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionsResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.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.IdentifiedConnection; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.IdentifiedConnection.deserializeBinaryFromReader); + msg.addConnections(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; + case 3: + 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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionsResponse.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.QueryConnectionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_connection_v1_connection_pb.IdentifiedConnection.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated IdentifiedConnection connections = 1; + * @return {!Array} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.getConnectionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_connection_v1_connection_pb.IdentifiedConnection, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionsResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.setConnectionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.IdentifiedConnection=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.addConnections = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.connection.v1.IdentifiedConnection, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.connection.v1.QueryConnectionsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.clearConnectionsList = function() { + return this.setConnectionsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.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.connection.v1.QueryConnectionsResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ibc.core.client.v1.Height height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.getHeight = 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.connection.v1.QueryConnectionsResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.hasHeight = 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.connection.v1.QueryClientConnectionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryClientConnectionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryClientConnectionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryClientConnectionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: 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.core.connection.v1.QueryClientConnectionsRequest} + */ +proto.ibc.core.connection.v1.QueryClientConnectionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryClientConnectionsRequest; + return proto.ibc.core.connection.v1.QueryClientConnectionsRequest.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.QueryClientConnectionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryClientConnectionsRequest} + */ +proto.ibc.core.connection.v1.QueryClientConnectionsRequest.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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.QueryClientConnectionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryClientConnectionsRequest.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.QueryClientConnectionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryClientConnectionsRequest.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.connection.v1.QueryClientConnectionsRequest.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.QueryClientConnectionsRequest} returns this + */ +proto.ibc.core.connection.v1.QueryClientConnectionsRequest.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.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.core.connection.v1.QueryClientConnectionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryClientConnectionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryClientConnectionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + connectionPathsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.connection.v1.QueryClientConnectionsResponse} + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryClientConnectionsResponse; + return proto.ibc.core.connection.v1.QueryClientConnectionsResponse.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.QueryClientConnectionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryClientConnectionsResponse} + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.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.addConnectionPaths(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.connection.v1.QueryClientConnectionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryClientConnectionsResponse.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.QueryClientConnectionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionPathsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 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 + ); + } +}; + + +/** + * repeated string connection_paths = 1; + * @return {!Array} + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.prototype.getConnectionPathsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.QueryClientConnectionsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.prototype.setConnectionPathsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.QueryClientConnectionsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.prototype.addConnectionPaths = 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.core.connection.v1.QueryClientConnectionsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.prototype.clearConnectionPathsList = function() { + return this.setConnectionPathsList([]); +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.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.connection.v1.QueryClientConnectionsResponse.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.connection.v1.QueryClientConnectionsResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.QueryClientConnectionsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.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.connection.v1.QueryClientConnectionsResponse.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.connection.v1.QueryClientConnectionsResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryClientConnectionsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.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.connection.v1.QueryConnectionClientStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionClientStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + connectionId: 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.core.connection.v1.QueryConnectionClientStateRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionClientStateRequest; + return proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.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.QueryConnectionClientStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionClientStateRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.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.QueryConnectionClientStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string connection_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionClientStateRequest} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.prototype.setConnectionId = 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.core.connection.v1.QueryConnectionClientStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionClientStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + identifiedClientState: (f = msg.getIdentifiedClientState()) && ibc_core_client_v1_client_pb.IdentifiedClientState.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.connection.v1.QueryConnectionClientStateResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionClientStateResponse; + return proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.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.QueryConnectionClientStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionClientStateResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.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.IdentifiedClientState; + reader.readMessage(value,ibc_core_client_v1_client_pb.IdentifiedClientState.deserializeBinaryFromReader); + msg.setIdentifiedClientState(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.connection.v1.QueryConnectionClientStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.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.QueryConnectionClientStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentifiedClientState(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_client_v1_client_pb.IdentifiedClientState.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 ibc.core.client.v1.IdentifiedClientState identified_client_state = 1; + * @return {?proto.ibc.core.client.v1.IdentifiedClientState} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.prototype.getIdentifiedClientState = function() { + return /** @type{?proto.ibc.core.client.v1.IdentifiedClientState} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.IdentifiedClientState, 1)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.IdentifiedClientState|undefined} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionClientStateResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.prototype.setIdentifiedClientState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionClientStateResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.prototype.clearIdentifiedClientState = function() { + return this.setIdentifiedClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.prototype.hasIdentifiedClientState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.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.connection.v1.QueryConnectionClientStateResponse.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.connection.v1.QueryConnectionClientStateResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionClientStateResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.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.connection.v1.QueryConnectionClientStateResponse.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.connection.v1.QueryConnectionClientStateResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionClientStateResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.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.connection.v1.QueryConnectionConsensusStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionConsensusStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + connectionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + revisionNumber: jspb.Message.getFieldWithDefault(msg, 2, 0), + revisionHeight: 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.connection.v1.QueryConnectionConsensusStateRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest; + return proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.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.QueryConnectionConsensusStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.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 {number} */ (reader.readUint64()); + msg.setRevisionNumber(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRevisionHeight(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.QueryConnectionConsensusStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.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.QueryConnectionConsensusStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRevisionNumber(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getRevisionHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional string connection_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.prototype.setConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 revision_number = 2; + * @return {number} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.prototype.getRevisionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.prototype.setRevisionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 revision_height = 3; + * @return {number} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.prototype.getRevisionHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.prototype.setRevisionHeight = 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.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionConsensusStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + consensusState: (f = msg.getConsensusState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + clientId: jspb.Message.getFieldWithDefault(msg, 2, ""), + 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.connection.v1.QueryConnectionConsensusStateResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse; + return proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.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.QueryConnectionConsensusStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.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.setConsensusState(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setClientId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProof(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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.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.QueryConnectionConsensusStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConsensusState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getProof_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 + ); + } +}; + + +/** + * optional google.protobuf.Any consensus_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.getConsensusState = 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.connection.v1.QueryConnectionConsensusStateResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.hasConsensusState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string client_id = 2; + * @return {string} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes proof = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.getProof = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes proof = 3; + * This is a type-conversion wrapper around `getProof()` + * @return {string} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.getProof_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProof())); +}; + + +/** + * optional bytes proof = 3; + * 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.connection.v1.QueryConnectionConsensusStateResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.setProof = 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.connection.v1.QueryConnectionConsensusStateResponse.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.connection.v1.QueryConnectionConsensusStateResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +goog.object.extend(exports, proto.ibc.core.connection.v1); diff --git a/dist/src/types/proto-types/ibc/core/connection/v1/tx_grpc_web_pb.js b/dist/src/types/proto-types/ibc/core/connection/v1/tx_grpc_web_pb.js new file mode 100644 index 00000000..1b0dcafa --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/connection/v1/tx_grpc_web_pb.js @@ -0,0 +1,405 @@ +/** + * @fileoverview gRPC-Web generated client stub for ibc.core.connection.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js') + +var ibc_core_connection_v1_connection_pb = require('../../../../ibc/core/connection/v1/connection_pb.js') +const proto = {}; +proto.ibc = {}; +proto.ibc.core = {}; +proto.ibc.core.connection = {}; +proto.ibc.core.connection.v1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.connection.v1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.connection.v1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.MsgConnectionOpenInit, + * !proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse>} + */ +const methodDescriptor_Msg_ConnectionOpenInit = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Msg/ConnectionOpenInit', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.MsgConnectionOpenInit, + proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse, + /** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.MsgConnectionOpenInit, + * !proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse>} + */ +const methodInfo_Msg_ConnectionOpenInit = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse, + /** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.MsgClient.prototype.connectionOpenInit = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Msg/ConnectionOpenInit', + request, + metadata || {}, + methodDescriptor_Msg_ConnectionOpenInit, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.MsgPromiseClient.prototype.connectionOpenInit = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Msg/ConnectionOpenInit', + request, + metadata || {}, + methodDescriptor_Msg_ConnectionOpenInit); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.MsgConnectionOpenTry, + * !proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse>} + */ +const methodDescriptor_Msg_ConnectionOpenTry = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Msg/ConnectionOpenTry', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.MsgConnectionOpenTry, + proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse, + /** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.MsgConnectionOpenTry, + * !proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse>} + */ +const methodInfo_Msg_ConnectionOpenTry = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse, + /** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.MsgClient.prototype.connectionOpenTry = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Msg/ConnectionOpenTry', + request, + metadata || {}, + methodDescriptor_Msg_ConnectionOpenTry, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.MsgPromiseClient.prototype.connectionOpenTry = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Msg/ConnectionOpenTry', + request, + metadata || {}, + methodDescriptor_Msg_ConnectionOpenTry); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.MsgConnectionOpenAck, + * !proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse>} + */ +const methodDescriptor_Msg_ConnectionOpenAck = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Msg/ConnectionOpenAck', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.MsgConnectionOpenAck, + proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse, + /** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.MsgConnectionOpenAck, + * !proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse>} + */ +const methodInfo_Msg_ConnectionOpenAck = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse, + /** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.MsgClient.prototype.connectionOpenAck = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Msg/ConnectionOpenAck', + request, + metadata || {}, + methodDescriptor_Msg_ConnectionOpenAck, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.MsgPromiseClient.prototype.connectionOpenAck = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Msg/ConnectionOpenAck', + request, + metadata || {}, + methodDescriptor_Msg_ConnectionOpenAck); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.MsgConnectionOpenConfirm, + * !proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse>} + */ +const methodDescriptor_Msg_ConnectionOpenConfirm = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Msg/ConnectionOpenConfirm', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.MsgConnectionOpenConfirm, + proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse, + /** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.MsgConnectionOpenConfirm, + * !proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse>} + */ +const methodInfo_Msg_ConnectionOpenConfirm = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse, + /** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.MsgClient.prototype.connectionOpenConfirm = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Msg/ConnectionOpenConfirm', + request, + metadata || {}, + methodDescriptor_Msg_ConnectionOpenConfirm, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.MsgPromiseClient.prototype.connectionOpenConfirm = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Msg/ConnectionOpenConfirm', + request, + metadata || {}, + methodDescriptor_Msg_ConnectionOpenConfirm); +}; + + +module.exports = proto.ibc.core.connection.v1; + diff --git a/dist/src/types/proto-types/ibc/core/connection/v1/tx_pb.js b/dist/src/types/proto-types/ibc/core/connection/v1/tx_pb.js new file mode 100644 index 00000000..9c3604ed --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/connection/v1/tx_pb.js @@ -0,0 +1,2362 @@ +// source: ibc/core/connection/v1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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'); +goog.object.extend(proto, ibc_core_client_v1_client_pb); +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); +goog.exportSymbol('proto.ibc.core.connection.v1.MsgConnectionOpenAck', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.MsgConnectionOpenConfirm', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.MsgConnectionOpenInit', null, global); +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); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgConnectionOpenInit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgConnectionOpenInit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgConnectionOpenInit.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenInit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgConnectionOpenInitResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgConnectionOpenTry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.MsgConnectionOpenTry.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgConnectionOpenTry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgConnectionOpenTry.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenTry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgConnectionOpenTryResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgConnectionOpenAck = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgConnectionOpenAck, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgConnectionOpenAck.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenAck'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgConnectionOpenAckResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgConnectionOpenConfirm = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgConnectionOpenConfirm, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenConfirm'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgConnectionOpenConfirmResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.MsgConnectionOpenInit.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgConnectionOpenInit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgConnectionOpenInit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + counterparty: (f = msg.getCounterparty()) && ibc_core_connection_v1_connection_pb.Counterparty.toObject(includeInstance, f), + version: (f = msg.getVersion()) && ibc_core_connection_v1_connection_pb.Version.toObject(includeInstance, f), + delayPeriod: 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.connection.v1.MsgConnectionOpenInit} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgConnectionOpenInit; + return proto.ibc.core.connection.v1.MsgConnectionOpenInit.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.MsgConnectionOpenInit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.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 = new ibc_core_connection_v1_connection_pb.Counterparty; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.Counterparty.deserializeBinaryFromReader); + msg.setCounterparty(value); + break; + case 3: + var value = new ibc_core_connection_v1_connection_pb.Version; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.Version.deserializeBinaryFromReader); + msg.setVersion(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDelayPeriod(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.connection.v1.MsgConnectionOpenInit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgConnectionOpenInit.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.MsgConnectionOpenInit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCounterparty(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_connection_v1_connection_pb.Counterparty.serializeBinaryToWriter + ); + } + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_connection_v1_connection_pb.Version.serializeBinaryToWriter + ); + } + f = message.getDelayPeriod(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Counterparty counterparty = 2; + * @return {?proto.ibc.core.connection.v1.Counterparty} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.getCounterparty = function() { + return /** @type{?proto.ibc.core.connection.v1.Counterparty} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.Counterparty, 2)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.Counterparty|undefined} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.setCounterparty = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.clearCounterparty = function() { + return this.setCounterparty(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.hasCounterparty = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Version version = 3; + * @return {?proto.ibc.core.connection.v1.Version} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.getVersion = function() { + return /** @type{?proto.ibc.core.connection.v1.Version} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.Version, 3)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.Version|undefined} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.clearVersion = function() { + return this.setVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.hasVersion = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 delay_period = 4; + * @return {number} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.getDelayPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.setDelayPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string signer = 5; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.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.connection.v1.MsgConnectionOpenInitResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgConnectionOpenInitResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.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.MsgConnectionOpenInitResponse} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse; + return proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.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.MsgConnectionOpenInitResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.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.MsgConnectionOpenInitResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.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.MsgConnectionOpenInitResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.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.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgConnectionOpenTry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgConnectionOpenTry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + previousConnectionId: jspb.Message.getFieldWithDefault(msg, 2, ""), + clientState: (f = msg.getClientState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + counterparty: (f = msg.getCounterparty()) && ibc_core_connection_v1_connection_pb.Counterparty.toObject(includeInstance, f), + delayPeriod: jspb.Message.getFieldWithDefault(msg, 5, 0), + counterpartyVersionsList: jspb.Message.toObjectList(msg.getCounterpartyVersionsList(), + ibc_core_connection_v1_connection_pb.Version.toObject, includeInstance), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + proofInit: msg.getProofInit_asB64(), + 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, "") + }; + + 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.MsgConnectionOpenTry} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgConnectionOpenTry; + return proto.ibc.core.connection.v1.MsgConnectionOpenTry.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.MsgConnectionOpenTry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.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 {string} */ (reader.readString()); + msg.setPreviousConnectionId(value); + break; + case 3: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setClientState(value); + break; + case 4: + var value = new ibc_core_connection_v1_connection_pb.Counterparty; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.Counterparty.deserializeBinaryFromReader); + msg.setCounterparty(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDelayPeriod(value); + break; + case 6: + var value = new ibc_core_connection_v1_connection_pb.Version; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.Version.deserializeBinaryFromReader); + msg.addCounterpartyVersions(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 {!Uint8Array} */ (reader.readBytes()); + msg.setProofInit(value); + break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofClient(value); + break; + case 10: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofConsensus(value); + break; + case 11: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setConsensusHeight(value); + break; + case 12: + 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.connection.v1.MsgConnectionOpenTry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgConnectionOpenTry.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.MsgConnectionOpenTry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPreviousConnectionId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getClientState(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getCounterparty(); + if (f != null) { + writer.writeMessage( + 4, + f, + ibc_core_connection_v1_connection_pb.Counterparty.serializeBinaryToWriter + ); + } + f = message.getDelayPeriod(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getCounterpartyVersionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + ibc_core_connection_v1_connection_pb.Version.serializeBinaryToWriter + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 7, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getProofInit_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } + f = message.getProofClient_asU8(); + if (f.length > 0) { + writer.writeBytes( + 9, + f + ); + } + f = message.getProofConsensus_asU8(); + if (f.length > 0) { + writer.writeBytes( + 10, + f + ); + } + f = message.getConsensusHeight(); + if (f != null) { + writer.writeMessage( + 11, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string previous_connection_id = 2; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getPreviousConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setPreviousConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Any client_state = 3; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getClientState = 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.core.connection.v1.MsgConnectionOpenTry} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setClientState = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.clearClientState = function() { + return this.setClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.hasClientState = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Counterparty counterparty = 4; + * @return {?proto.ibc.core.connection.v1.Counterparty} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getCounterparty = function() { + return /** @type{?proto.ibc.core.connection.v1.Counterparty} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.Counterparty, 4)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.Counterparty|undefined} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setCounterparty = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.clearCounterparty = function() { + return this.setCounterparty(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.hasCounterparty = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint64 delay_period = 5; + * @return {number} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getDelayPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setDelayPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * repeated Version counterparty_versions = 6; + * @return {!Array} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getCounterpartyVersionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_connection_v1_connection_pb.Version, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setCounterpartyVersionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.Version=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.Version} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.addCounterpartyVersions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.ibc.core.connection.v1.Version, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.clearCounterpartyVersionsList = function() { + return this.setCounterpartyVersionsList([]); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 7; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.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.connection.v1.MsgConnectionOpenTry} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional bytes proof_init = 8; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getProofInit = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes proof_init = 8; + * This is a type-conversion wrapper around `getProofInit()` + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getProofInit_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofInit())); +}; + + +/** + * optional bytes proof_init = 8; + * 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.connection.v1.MsgConnectionOpenTry.prototype.getProofInit_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofInit())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setProofInit = function(value) { + return jspb.Message.setProto3BytesField(this, 8, value); +}; + + +/** + * optional bytes proof_client = 9; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getProofClient = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * optional bytes proof_client = 9; + * This is a type-conversion wrapper around `getProofClient()` + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getProofClient_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofClient())); +}; + + +/** + * optional bytes proof_client = 9; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofClient()` + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getProofClient_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofClient())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setProofClient = function(value) { + return jspb.Message.setProto3BytesField(this, 9, value); +}; + + +/** + * optional bytes proof_consensus = 10; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getProofConsensus = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * optional bytes proof_consensus = 10; + * This is a type-conversion wrapper around `getProofConsensus()` + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getProofConsensus_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofConsensus())); +}; + + +/** + * optional bytes proof_consensus = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofConsensus()` + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getProofConsensus_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofConsensus())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setProofConsensus = function(value) { + return jspb.Message.setProto3BytesField(this, 10, value); +}; + + +/** + * optional ibc.core.client.v1.Height consensus_height = 11; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getConsensusHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 11)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setConsensusHeight = function(value) { + return jspb.Message.setWrapperField(this, 11, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.clearConsensusHeight = function() { + return this.setConsensusHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.hasConsensusHeight = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional string signer = 12; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 12, 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.connection.v1.MsgConnectionOpenTryResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgConnectionOpenTryResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.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.MsgConnectionOpenTryResponse} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse; + return proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.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.MsgConnectionOpenTryResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.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.MsgConnectionOpenTryResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.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.MsgConnectionOpenTryResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.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.MsgConnectionOpenAck.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgConnectionOpenAck.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgConnectionOpenAck} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.toObject = function(includeInstance, msg) { + var f, obj = { + connectionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + counterpartyConnectionId: jspb.Message.getFieldWithDefault(msg, 2, ""), + version: (f = msg.getVersion()) && ibc_core_connection_v1_connection_pb.Version.toObject(includeInstance, f), + clientState: (f = msg.getClientState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + proofTry: msg.getProofTry_asB64(), + 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, "") + }; + + 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.MsgConnectionOpenAck} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgConnectionOpenAck; + return proto.ibc.core.connection.v1.MsgConnectionOpenAck.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.MsgConnectionOpenAck} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.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.setCounterpartyConnectionId(value); + break; + case 3: + var value = new ibc_core_connection_v1_connection_pb.Version; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.Version.deserializeBinaryFromReader); + msg.setVersion(value); + break; + case 4: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setClientState(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 {!Uint8Array} */ (reader.readBytes()); + msg.setProofTry(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofClient(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofConsensus(value); + break; + case 9: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setConsensusHeight(value); + break; + case 10: + 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.connection.v1.MsgConnectionOpenAck.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgConnectionOpenAck.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.MsgConnectionOpenAck} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCounterpartyConnectionId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_connection_v1_connection_pb.Version.serializeBinaryToWriter + ); + } + f = message.getClientState(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 5, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getProofTry_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getProofClient_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getProofConsensus_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } + f = message.getConsensusHeight(); + if (f != null) { + writer.writeMessage( + 9, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } +}; + + +/** + * optional string connection_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string counterparty_connection_id = 2; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getCounterpartyConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setCounterpartyConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Version version = 3; + * @return {?proto.ibc.core.connection.v1.Version} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getVersion = function() { + return /** @type{?proto.ibc.core.connection.v1.Version} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.Version, 3)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.Version|undefined} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.clearVersion = function() { + return this.setVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.hasVersion = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Any client_state = 4; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getClientState = 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.connection.v1.MsgConnectionOpenAck} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setClientState = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.clearClientState = function() { + return this.setClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.hasClientState = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 5; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.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.connection.v1.MsgConnectionOpenAck} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes proof_try = 6; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getProofTry = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes proof_try = 6; + * This is a type-conversion wrapper around `getProofTry()` + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getProofTry_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofTry())); +}; + + +/** + * optional bytes proof_try = 6; + * 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.connection.v1.MsgConnectionOpenAck.prototype.getProofTry_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofTry())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setProofTry = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional bytes proof_client = 7; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getProofClient = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes proof_client = 7; + * This is a type-conversion wrapper around `getProofClient()` + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getProofClient_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofClient())); +}; + + +/** + * optional bytes proof_client = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofClient()` + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getProofClient_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofClient())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setProofClient = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional bytes proof_consensus = 8; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getProofConsensus = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes proof_consensus = 8; + * This is a type-conversion wrapper around `getProofConsensus()` + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getProofConsensus_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofConsensus())); +}; + + +/** + * optional bytes proof_consensus = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofConsensus()` + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getProofConsensus_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofConsensus())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setProofConsensus = function(value) { + return jspb.Message.setProto3BytesField(this, 8, value); +}; + + +/** + * optional ibc.core.client.v1.Height consensus_height = 9; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getConsensusHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 9)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setConsensusHeight = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.clearConsensusHeight = function() { + return this.setConsensusHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.hasConsensusHeight = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string signer = 10; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(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.ibc.core.connection.v1.MsgConnectionOpenAckResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgConnectionOpenAckResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.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.MsgConnectionOpenAckResponse} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse; + return proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.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.MsgConnectionOpenAckResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.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.MsgConnectionOpenAckResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.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.MsgConnectionOpenAckResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.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.MsgConnectionOpenConfirm.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgConnectionOpenConfirm} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.toObject = function(includeInstance, msg) { + var f, obj = { + connectionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + proofAck: msg.getProofAck_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.connection.v1.MsgConnectionOpenConfirm} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgConnectionOpenConfirm; + return proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.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.MsgConnectionOpenConfirm} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.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 {!Uint8Array} */ (reader.readBytes()); + msg.setProofAck(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.connection.v1.MsgConnectionOpenConfirm.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.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.MsgConnectionOpenConfirm} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProofAck_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 string connection_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.setConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes proof_ack = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.getProofAck = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes proof_ack = 2; + * This is a type-conversion wrapper around `getProofAck()` + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.getProofAck_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofAck())); +}; + + +/** + * optional bytes proof_ack = 2; + * 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.connection.v1.MsgConnectionOpenConfirm.prototype.getProofAck_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofAck())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.setProofAck = 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.connection.v1.MsgConnectionOpenConfirm.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.connection.v1.MsgConnectionOpenConfirm} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string signer = 4; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.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.connection.v1.MsgConnectionOpenConfirmResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgConnectionOpenConfirmResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.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.MsgConnectionOpenConfirmResponse} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse; + return proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.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.MsgConnectionOpenConfirmResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.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.MsgConnectionOpenConfirmResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.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.MsgConnectionOpenConfirmResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.ibc.core.connection.v1); diff --git a/dist/src/types/proto-types/ibc/core/types/v1/genesis_pb.js b/dist/src/types/proto-types/ibc/core/types/v1/genesis_pb.js new file mode 100644 index 00000000..6445d08f --- /dev/null +++ b/dist/src/types/proto-types/ibc/core/types/v1/genesis_pb.js @@ -0,0 +1,298 @@ +// source: ibc/core/types/v1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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_genesis_pb = require('../../../../ibc/core/client/v1/genesis_pb.js'); +goog.object.extend(proto, ibc_core_client_v1_genesis_pb); +var ibc_core_connection_v1_genesis_pb = require('../../../../ibc/core/connection/v1/genesis_pb.js'); +goog.object.extend(proto, ibc_core_connection_v1_genesis_pb); +var ibc_core_channel_v1_genesis_pb = require('../../../../ibc/core/channel/v1/genesis_pb.js'); +goog.object.extend(proto, ibc_core_channel_v1_genesis_pb); +goog.exportSymbol('proto.ibc.core.types.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.core.types.v1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.types.v1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.types.v1.GenesisState.displayName = 'proto.ibc.core.types.v1.GenesisState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.types.v1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.types.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.core.types.v1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.types.v1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + clientGenesis: (f = msg.getClientGenesis()) && ibc_core_client_v1_genesis_pb.GenesisState.toObject(includeInstance, f), + connectionGenesis: (f = msg.getConnectionGenesis()) && ibc_core_connection_v1_genesis_pb.GenesisState.toObject(includeInstance, f), + channelGenesis: (f = msg.getChannelGenesis()) && ibc_core_channel_v1_genesis_pb.GenesisState.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.types.v1.GenesisState} + */ +proto.ibc.core.types.v1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.types.v1.GenesisState; + return proto.ibc.core.types.v1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.types.v1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.types.v1.GenesisState} + */ +proto.ibc.core.types.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_core_client_v1_genesis_pb.GenesisState; + reader.readMessage(value,ibc_core_client_v1_genesis_pb.GenesisState.deserializeBinaryFromReader); + msg.setClientGenesis(value); + break; + case 2: + var value = new ibc_core_connection_v1_genesis_pb.GenesisState; + reader.readMessage(value,ibc_core_connection_v1_genesis_pb.GenesisState.deserializeBinaryFromReader); + msg.setConnectionGenesis(value); + break; + case 3: + var value = new ibc_core_channel_v1_genesis_pb.GenesisState; + reader.readMessage(value,ibc_core_channel_v1_genesis_pb.GenesisState.deserializeBinaryFromReader); + msg.setChannelGenesis(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.types.v1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.types.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.core.types.v1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.types.v1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientGenesis(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_client_v1_genesis_pb.GenesisState.serializeBinaryToWriter + ); + } + f = message.getConnectionGenesis(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_connection_v1_genesis_pb.GenesisState.serializeBinaryToWriter + ); + } + f = message.getChannelGenesis(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_channel_v1_genesis_pb.GenesisState.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ibc.core.client.v1.GenesisState client_genesis = 1; + * @return {?proto.ibc.core.client.v1.GenesisState} + */ +proto.ibc.core.types.v1.GenesisState.prototype.getClientGenesis = function() { + return /** @type{?proto.ibc.core.client.v1.GenesisState} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_genesis_pb.GenesisState, 1)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.GenesisState|undefined} value + * @return {!proto.ibc.core.types.v1.GenesisState} returns this +*/ +proto.ibc.core.types.v1.GenesisState.prototype.setClientGenesis = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.types.v1.GenesisState} returns this + */ +proto.ibc.core.types.v1.GenesisState.prototype.clearClientGenesis = function() { + return this.setClientGenesis(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.types.v1.GenesisState.prototype.hasClientGenesis = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ibc.core.connection.v1.GenesisState connection_genesis = 2; + * @return {?proto.ibc.core.connection.v1.GenesisState} + */ +proto.ibc.core.types.v1.GenesisState.prototype.getConnectionGenesis = function() { + return /** @type{?proto.ibc.core.connection.v1.GenesisState} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_genesis_pb.GenesisState, 2)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.GenesisState|undefined} value + * @return {!proto.ibc.core.types.v1.GenesisState} returns this +*/ +proto.ibc.core.types.v1.GenesisState.prototype.setConnectionGenesis = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.types.v1.GenesisState} returns this + */ +proto.ibc.core.types.v1.GenesisState.prototype.clearConnectionGenesis = function() { + return this.setConnectionGenesis(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.types.v1.GenesisState.prototype.hasConnectionGenesis = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ibc.core.channel.v1.GenesisState channel_genesis = 3; + * @return {?proto.ibc.core.channel.v1.GenesisState} + */ +proto.ibc.core.types.v1.GenesisState.prototype.getChannelGenesis = function() { + return /** @type{?proto.ibc.core.channel.v1.GenesisState} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_genesis_pb.GenesisState, 3)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.GenesisState|undefined} value + * @return {!proto.ibc.core.types.v1.GenesisState} returns this +*/ +proto.ibc.core.types.v1.GenesisState.prototype.setChannelGenesis = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.types.v1.GenesisState} returns this + */ +proto.ibc.core.types.v1.GenesisState.prototype.clearChannelGenesis = function() { + return this.setChannelGenesis(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.types.v1.GenesisState.prototype.hasChannelGenesis = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +goog.object.extend(exports, proto.ibc.core.types.v1); diff --git a/dist/src/types/proto-types/ibc/lightclients/localhost/v1/localhost_pb.js b/dist/src/types/proto-types/ibc/lightclients/localhost/v1/localhost_pb.js new file mode 100644 index 00000000..2a00f505 --- /dev/null +++ b/dist/src/types/proto-types/ibc/lightclients/localhost/v1/localhost_pb.js @@ -0,0 +1,222 @@ +// source: ibc/lightclients/localhost/v1/localhost.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.ibc.lightclients.localhost.v1.ClientState', 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.localhost.v1.ClientState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.localhost.v1.ClientState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.localhost.v1.ClientState.displayName = 'proto.ibc.lightclients.localhost.v1.ClientState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.localhost.v1.ClientState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.localhost.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.localhost.v1.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) { + var f, obj = { + chainId: jspb.Message.getFieldWithDefault(msg, 1, ""), + height: (f = msg.getHeight()) && 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.localhost.v1.ClientState} + */ +proto.ibc.lightclients.localhost.v1.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.localhost.v1.ClientState} + */ +proto.ibc.lightclients.localhost.v1.ClientState.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 = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.localhost.v1.ClientState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.localhost.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.localhost.v1.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) { + var f = undefined; + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * 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; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.lightclients.localhost.v1.ClientState.prototype.getHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 2)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.lightclients.localhost.v1.ClientState} returns this +*/ +proto.ibc.lightclients.localhost.v1.ClientState.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.localhost.v1.ClientState} returns this + */ +proto.ibc.lightclients.localhost.v1.ClientState.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.localhost.v1.ClientState.prototype.hasHeight = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.ibc.lightclients.localhost.v1); diff --git a/dist/src/types/proto-types/ibc/lightclients/solomachine/v1/solomachine_pb.js b/dist/src/types/proto-types/ibc/lightclients/solomachine/v1/solomachine_pb.js new file mode 100644 index 00000000..c1c458ce --- /dev/null +++ b/dist/src/types/proto-types/ibc/lightclients/solomachine/v1/solomachine_pb.js @@ -0,0 +1,3882 @@ +// source: ibc/lightclients/solomachine/v1/solomachine.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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/dist/src/types/proto-types/ibc/lightclients/tendermint/v1/tendermint_pb.js b/dist/src/types/proto-types/ibc/lightclients/tendermint/v1/tendermint_pb.js new file mode 100644 index 00000000..cdc957f0 --- /dev/null +++ b/dist/src/types/proto-types/ibc/lightclients/tendermint/v1/tendermint_pb.js @@ -0,0 +1,1698 @@ +// source: ibc/lightclients/tendermint/v1/tendermint.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 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'); +goog.object.extend(proto, google_protobuf_timestamp_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 gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.ibc.lightclients.tendermint.v1.ClientState', null, global); +goog.exportSymbol('proto.ibc.lightclients.tendermint.v1.ConsensusState', null, global); +goog.exportSymbol('proto.ibc.lightclients.tendermint.v1.Fraction', null, global); +goog.exportSymbol('proto.ibc.lightclients.tendermint.v1.Header', null, global); +goog.exportSymbol('proto.ibc.lightclients.tendermint.v1.Misbehaviour', 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.tendermint.v1.ClientState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.lightclients.tendermint.v1.ClientState.repeatedFields_, null); +}; +goog.inherits(proto.ibc.lightclients.tendermint.v1.ClientState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.tendermint.v1.ClientState.displayName = 'proto.ibc.lightclients.tendermint.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.tendermint.v1.ConsensusState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.tendermint.v1.ConsensusState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.tendermint.v1.ConsensusState.displayName = 'proto.ibc.lightclients.tendermint.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.tendermint.v1.Misbehaviour = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.tendermint.v1.Misbehaviour, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.tendermint.v1.Misbehaviour.displayName = 'proto.ibc.lightclients.tendermint.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.tendermint.v1.Header = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.tendermint.v1.Header, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.tendermint.v1.Header.displayName = 'proto.ibc.lightclients.tendermint.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.tendermint.v1.Fraction = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.tendermint.v1.Fraction, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.tendermint.v1.Fraction.displayName = 'proto.ibc.lightclients.tendermint.v1.Fraction'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.lightclients.tendermint.v1.ClientState.repeatedFields_ = [8,9]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.tendermint.v1.ClientState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.tendermint.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.tendermint.v1.ClientState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.ClientState.toObject = function(includeInstance, msg) { + var f, obj = { + chainId: jspb.Message.getFieldWithDefault(msg, 1, ""), + trustLevel: (f = msg.getTrustLevel()) && proto.ibc.lightclients.tendermint.v1.Fraction.toObject(includeInstance, f), + trustingPeriod: (f = msg.getTrustingPeriod()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + unbondingPeriod: (f = msg.getUnbondingPeriod()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + maxClockDrift: (f = msg.getMaxClockDrift()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + 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), + upgradePathList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f, + allowUpdateAfterExpiry: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + allowUpdateAfterMisbehaviour: 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.ibc.lightclients.tendermint.v1.ClientState} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.tendermint.v1.ClientState; + return proto.ibc.lightclients.tendermint.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.tendermint.v1.ClientState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.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 = new proto.ibc.lightclients.tendermint.v1.Fraction; + reader.readMessage(value,proto.ibc.lightclients.tendermint.v1.Fraction.deserializeBinaryFromReader); + msg.setTrustLevel(value); + break; + case 3: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setTrustingPeriod(value); + break; + case 4: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setUnbondingPeriod(value); + break; + case 5: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setMaxClockDrift(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.setFrozenHeight(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.setLatestHeight(value); + break; + case 8: + var value = new confio_proofs_pb.ProofSpec; + reader.readMessage(value,confio_proofs_pb.ProofSpec.deserializeBinaryFromReader); + msg.addProofSpecs(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.addUpgradePath(value); + break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAllowUpdateAfterExpiry(value); + break; + case 11: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAllowUpdateAfterMisbehaviour(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.tendermint.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.tendermint.v1.ClientState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.ClientState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTrustLevel(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.ibc.lightclients.tendermint.v1.Fraction.serializeBinaryToWriter + ); + } + f = message.getTrustingPeriod(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getUnbondingPeriod(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getMaxClockDrift(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getFrozenHeight(); + if (f != null) { + writer.writeMessage( + 6, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getLatestHeight(); + if (f != null) { + writer.writeMessage( + 7, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getProofSpecsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + confio_proofs_pb.ProofSpec.serializeBinaryToWriter + ); + } + f = message.getUpgradePathList(); + if (f.length > 0) { + writer.writeRepeatedString( + 9, + f + ); + } + f = message.getAllowUpdateAfterExpiry(); + if (f) { + writer.writeBool( + 10, + f + ); + } + f = message.getAllowUpdateAfterMisbehaviour(); + if (f) { + writer.writeBool( + 11, + f + ); + } +}; + + +/** + * optional string chain_id = 1; + * @return {string} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Fraction trust_level = 2; + * @return {?proto.ibc.lightclients.tendermint.v1.Fraction} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getTrustLevel = function() { + return /** @type{?proto.ibc.lightclients.tendermint.v1.Fraction} */ ( + jspb.Message.getWrapperField(this, proto.ibc.lightclients.tendermint.v1.Fraction, 2)); +}; + + +/** + * @param {?proto.ibc.lightclients.tendermint.v1.Fraction|undefined} value + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setTrustLevel = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.clearTrustLevel = function() { + return this.setTrustLevel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.hasTrustLevel = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Duration trusting_period = 3; + * @return {?proto.google.protobuf.Duration} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getTrustingPeriod = 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.ibc.lightclients.tendermint.v1.ClientState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setTrustingPeriod = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.clearTrustingPeriod = function() { + return this.setTrustingPeriod(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.hasTrustingPeriod = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Duration unbonding_period = 4; + * @return {?proto.google.protobuf.Duration} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getUnbondingPeriod = 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.ibc.lightclients.tendermint.v1.ClientState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setUnbondingPeriod = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.clearUnbondingPeriod = function() { + return this.setUnbondingPeriod(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.hasUnbondingPeriod = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Duration max_clock_drift = 5; + * @return {?proto.google.protobuf.Duration} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getMaxClockDrift = 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.ibc.lightclients.tendermint.v1.ClientState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setMaxClockDrift = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.clearMaxClockDrift = function() { + return this.setMaxClockDrift(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.hasMaxClockDrift = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional ibc.core.client.v1.Height frozen_height = 6; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getFrozenHeight = 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.lightclients.tendermint.v1.ClientState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setFrozenHeight = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.clearFrozenHeight = function() { + return this.setFrozenHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.hasFrozenHeight = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional ibc.core.client.v1.Height latest_height = 7; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getLatestHeight = 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.lightclients.tendermint.v1.ClientState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setLatestHeight = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.clearLatestHeight = function() { + return this.setLatestHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.hasLatestHeight = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * repeated ics23.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)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setProofSpecsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.ics23.ProofSpec=} opt_value + * @param {number=} opt_index + * @return {!proto.ics23.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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.clearProofSpecsList = function() { + return this.setProofSpecsList([]); +}; + + +/** + * repeated string upgrade_path = 9; + * @return {!Array} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getUpgradePathList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setUpgradePathList = function(value) { + return jspb.Message.setField(this, 9, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.addUpgradePath = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 9, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.clearUpgradePathList = function() { + return this.setUpgradePathList([]); +}; + + +/** + * optional bool allow_update_after_expiry = 10; + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getAllowUpdateAfterExpiry = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setAllowUpdateAfterExpiry = function(value) { + return jspb.Message.setProto3BooleanField(this, 10, value); +}; + + +/** + * optional bool allow_update_after_misbehaviour = 11; + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getAllowUpdateAfterMisbehaviour = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setAllowUpdateAfterMisbehaviour = function(value) { + return jspb.Message.setProto3BooleanField(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.ibc.lightclients.tendermint.v1.ConsensusState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.tendermint.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.tendermint.v1.ConsensusState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.toObject = function(includeInstance, msg) { + var f, obj = { + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + root: (f = msg.getRoot()) && ibc_core_commitment_v1_commitment_pb.MerkleRoot.toObject(includeInstance, f), + nextValidatorsHash: msg.getNextValidatorsHash_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.tendermint.v1.ConsensusState} + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.tendermint.v1.ConsensusState; + return proto.ibc.lightclients.tendermint.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.tendermint.v1.ConsensusState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.tendermint.v1.ConsensusState} + */ +proto.ibc.lightclients.tendermint.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_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 2: + var value = new ibc_core_commitment_v1_commitment_pb.MerkleRoot; + reader.readMessage(value,ibc_core_commitment_v1_commitment_pb.MerkleRoot.deserializeBinaryFromReader); + msg.setRoot(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNextValidatorsHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.tendermint.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.tendermint.v1.ConsensusState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getRoot(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_commitment_v1_commitment_pb.MerkleRoot.serializeBinaryToWriter + ); + } + f = message.getNextValidatorsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.ibc.lightclients.tendermint.v1.ConsensusState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.ConsensusState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ibc.core.commitment.v1.MerkleRoot root = 2; + * @return {?proto.ibc.core.commitment.v1.MerkleRoot} + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.getRoot = function() { + return /** @type{?proto.ibc.core.commitment.v1.MerkleRoot} */ ( + jspb.Message.getWrapperField(this, ibc_core_commitment_v1_commitment_pb.MerkleRoot, 2)); +}; + + +/** + * @param {?proto.ibc.core.commitment.v1.MerkleRoot|undefined} value + * @return {!proto.ibc.lightclients.tendermint.v1.ConsensusState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.setRoot = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.ConsensusState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.clearRoot = function() { + return this.setRoot(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.hasRoot = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes next_validators_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.getNextValidatorsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes next_validators_hash = 3; + * This is a type-conversion wrapper around `getNextValidatorsHash()` + * @return {string} + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.getNextValidatorsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNextValidatorsHash())); +}; + + +/** + * optional bytes next_validators_hash = 3; + * 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.ibc.lightclients.tendermint.v1.ConsensusState.prototype.getNextValidatorsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNextValidatorsHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.tendermint.v1.ConsensusState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.setNextValidatorsHash = 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.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.tendermint.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.tendermint.v1.Misbehaviour} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + header1: (f = msg.getHeader1()) && proto.ibc.lightclients.tendermint.v1.Header.toObject(includeInstance, f), + header2: (f = msg.getHeader2()) && proto.ibc.lightclients.tendermint.v1.Header.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.tendermint.v1.Misbehaviour} + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.tendermint.v1.Misbehaviour; + return proto.ibc.lightclients.tendermint.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.tendermint.v1.Misbehaviour} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.tendermint.v1.Misbehaviour} + */ +proto.ibc.lightclients.tendermint.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 = new proto.ibc.lightclients.tendermint.v1.Header; + reader.readMessage(value,proto.ibc.lightclients.tendermint.v1.Header.deserializeBinaryFromReader); + msg.setHeader1(value); + break; + case 3: + var value = new proto.ibc.lightclients.tendermint.v1.Header; + reader.readMessage(value,proto.ibc.lightclients.tendermint.v1.Header.deserializeBinaryFromReader); + msg.setHeader2(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.tendermint.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.tendermint.v1.Misbehaviour} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHeader1(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.ibc.lightclients.tendermint.v1.Header.serializeBinaryToWriter + ); + } + f = message.getHeader2(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.ibc.lightclients.tendermint.v1.Header.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.tendermint.v1.Misbehaviour} returns this + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Header header_1 = 2; + * @return {?proto.ibc.lightclients.tendermint.v1.Header} + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.getHeader1 = function() { + return /** @type{?proto.ibc.lightclients.tendermint.v1.Header} */ ( + jspb.Message.getWrapperField(this, proto.ibc.lightclients.tendermint.v1.Header, 2)); +}; + + +/** + * @param {?proto.ibc.lightclients.tendermint.v1.Header|undefined} value + * @return {!proto.ibc.lightclients.tendermint.v1.Misbehaviour} returns this +*/ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.setHeader1 = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.Misbehaviour} returns this + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.clearHeader1 = function() { + return this.setHeader1(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.hasHeader1 = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Header header_2 = 3; + * @return {?proto.ibc.lightclients.tendermint.v1.Header} + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.getHeader2 = function() { + return /** @type{?proto.ibc.lightclients.tendermint.v1.Header} */ ( + jspb.Message.getWrapperField(this, proto.ibc.lightclients.tendermint.v1.Header, 3)); +}; + + +/** + * @param {?proto.ibc.lightclients.tendermint.v1.Header|undefined} value + * @return {!proto.ibc.lightclients.tendermint.v1.Misbehaviour} returns this +*/ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.setHeader2 = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.Misbehaviour} returns this + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.clearHeader2 = function() { + return this.setHeader2(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.hasHeader2 = 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.tendermint.v1.Header.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.tendermint.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.tendermint.v1.Header} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.Header.toObject = function(includeInstance, msg) { + var f, obj = { + signedHeader: (f = msg.getSignedHeader()) && tendermint_types_types_pb.SignedHeader.toObject(includeInstance, f), + validatorSet: (f = msg.getValidatorSet()) && tendermint_types_validator_pb.ValidatorSet.toObject(includeInstance, f), + trustedHeight: (f = msg.getTrustedHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + trustedValidators: (f = msg.getTrustedValidators()) && tendermint_types_validator_pb.ValidatorSet.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.tendermint.v1.Header} + */ +proto.ibc.lightclients.tendermint.v1.Header.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.tendermint.v1.Header; + return proto.ibc.lightclients.tendermint.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.tendermint.v1.Header} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.tendermint.v1.Header} + */ +proto.ibc.lightclients.tendermint.v1.Header.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.SignedHeader; + reader.readMessage(value,tendermint_types_types_pb.SignedHeader.deserializeBinaryFromReader); + msg.setSignedHeader(value); + break; + case 2: + var value = new tendermint_types_validator_pb.ValidatorSet; + reader.readMessage(value,tendermint_types_validator_pb.ValidatorSet.deserializeBinaryFromReader); + msg.setValidatorSet(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.setTrustedHeight(value); + break; + case 4: + var value = new tendermint_types_validator_pb.ValidatorSet; + reader.readMessage(value,tendermint_types_validator_pb.ValidatorSet.deserializeBinaryFromReader); + msg.setTrustedValidators(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.tendermint.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.tendermint.v1.Header} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.Header.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignedHeader(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.SignedHeader.serializeBinaryToWriter + ); + } + f = message.getValidatorSet(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_validator_pb.ValidatorSet.serializeBinaryToWriter + ); + } + f = message.getTrustedHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getTrustedValidators(); + if (f != null) { + writer.writeMessage( + 4, + f, + tendermint_types_validator_pb.ValidatorSet.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.types.SignedHeader signed_header = 1; + * @return {?proto.tendermint.types.SignedHeader} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.getSignedHeader = function() { + return /** @type{?proto.tendermint.types.SignedHeader} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.SignedHeader, 1)); +}; + + +/** + * @param {?proto.tendermint.types.SignedHeader|undefined} value + * @return {!proto.ibc.lightclients.tendermint.v1.Header} returns this +*/ +proto.ibc.lightclients.tendermint.v1.Header.prototype.setSignedHeader = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.Header} returns this + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.clearSignedHeader = function() { + return this.setSignedHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.hasSignedHeader = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional tendermint.types.ValidatorSet validator_set = 2; + * @return {?proto.tendermint.types.ValidatorSet} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.getValidatorSet = function() { + return /** @type{?proto.tendermint.types.ValidatorSet} */ ( + jspb.Message.getWrapperField(this, tendermint_types_validator_pb.ValidatorSet, 2)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorSet|undefined} value + * @return {!proto.ibc.lightclients.tendermint.v1.Header} returns this +*/ +proto.ibc.lightclients.tendermint.v1.Header.prototype.setValidatorSet = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.Header} returns this + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.clearValidatorSet = function() { + return this.setValidatorSet(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.hasValidatorSet = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ibc.core.client.v1.Height trusted_height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.getTrustedHeight = 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.tendermint.v1.Header} returns this +*/ +proto.ibc.lightclients.tendermint.v1.Header.prototype.setTrustedHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.Header} returns this + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.clearTrustedHeight = function() { + return this.setTrustedHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.hasTrustedHeight = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional tendermint.types.ValidatorSet trusted_validators = 4; + * @return {?proto.tendermint.types.ValidatorSet} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.getTrustedValidators = function() { + return /** @type{?proto.tendermint.types.ValidatorSet} */ ( + jspb.Message.getWrapperField(this, tendermint_types_validator_pb.ValidatorSet, 4)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorSet|undefined} value + * @return {!proto.ibc.lightclients.tendermint.v1.Header} returns this +*/ +proto.ibc.lightclients.tendermint.v1.Header.prototype.setTrustedValidators = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.Header} returns this + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.clearTrustedValidators = function() { + return this.setTrustedValidators(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.hasTrustedValidators = 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.tendermint.v1.Fraction.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.tendermint.v1.Fraction.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint.v1.Fraction} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.Fraction.toObject = function(includeInstance, msg) { + var f, obj = { + numerator: jspb.Message.getFieldWithDefault(msg, 1, 0), + denominator: 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.tendermint.v1.Fraction} + */ +proto.ibc.lightclients.tendermint.v1.Fraction.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.tendermint.v1.Fraction; + return proto.ibc.lightclients.tendermint.v1.Fraction.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.tendermint.v1.Fraction} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.tendermint.v1.Fraction} + */ +proto.ibc.lightclients.tendermint.v1.Fraction.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.setNumerator(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDenominator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.tendermint.v1.Fraction.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.tendermint.v1.Fraction.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.tendermint.v1.Fraction} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.Fraction.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNumerator(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getDenominator(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 numerator = 1; + * @return {number} + */ +proto.ibc.lightclients.tendermint.v1.Fraction.prototype.getNumerator = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.tendermint.v1.Fraction} returns this + */ +proto.ibc.lightclients.tendermint.v1.Fraction.prototype.setNumerator = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 denominator = 2; + * @return {number} + */ +proto.ibc.lightclients.tendermint.v1.Fraction.prototype.getDenominator = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.tendermint.v1.Fraction} returns this + */ +proto.ibc.lightclients.tendermint.v1.Fraction.prototype.setDenominator = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.ibc.lightclients.tendermint.v1); diff --git a/dist/src/types/proto-types/irismod/coinswap/coinswap_pb.js b/dist/src/types/proto-types/irismod/coinswap/coinswap_pb.js new file mode 100644 index 00000000..eda19bcf --- /dev/null +++ b/dist/src/types/proto-types/irismod/coinswap/coinswap_pb.js @@ -0,0 +1,628 @@ +// source: irismod/coinswap/coinswap.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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.irismod.coinswap.Input', null, global); +goog.exportSymbol('proto.irismod.coinswap.Output', null, global); +goog.exportSymbol('proto.irismod.coinswap.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.irismod.coinswap.Input = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.Input, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.Input.displayName = 'proto.irismod.coinswap.Input'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.coinswap.Output = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.Output, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.Output.displayName = 'proto.irismod.coinswap.Output'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.coinswap.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.Params.displayName = 'proto.irismod.coinswap.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.irismod.coinswap.Input.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.Input.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.Input} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.Input.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + coin: (f = msg.getCoin()) && 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.irismod.coinswap.Input} + */ +proto.irismod.coinswap.Input.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.Input; + return proto.irismod.coinswap.Input.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.Input} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.Input} + */ +proto.irismod.coinswap.Input.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.setCoin(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.Input.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.Input.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.Input} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.Input.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCoin(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.irismod.coinswap.Input.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Input} returns this + */ +proto.irismod.coinswap.Input.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin coin = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.Input.prototype.getCoin = 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.irismod.coinswap.Input} returns this +*/ +proto.irismod.coinswap.Input.prototype.setCoin = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.Input} returns this + */ +proto.irismod.coinswap.Input.prototype.clearCoin = function() { + return this.setCoin(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.Input.prototype.hasCoin = 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.irismod.coinswap.Output.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.Output.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.Output} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.Output.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + coin: (f = msg.getCoin()) && 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.irismod.coinswap.Output} + */ +proto.irismod.coinswap.Output.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.Output; + return proto.irismod.coinswap.Output.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.Output} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.Output} + */ +proto.irismod.coinswap.Output.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.setCoin(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.Output.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.Output.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.Output} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.Output.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCoin(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.irismod.coinswap.Output.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Output} returns this + */ +proto.irismod.coinswap.Output.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin coin = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.Output.prototype.getCoin = 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.irismod.coinswap.Output} returns this +*/ +proto.irismod.coinswap.Output.prototype.setCoin = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.Output} returns this + */ +proto.irismod.coinswap.Output.prototype.clearCoin = function() { + return this.setCoin(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.Output.prototype.hasCoin = 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.irismod.coinswap.Params.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.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.irismod.coinswap.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.Params.toObject = function(includeInstance, msg) { + var f, obj = { + fee: (f = msg.getFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + standardDenom: 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.irismod.coinswap.Params} + */ +proto.irismod.coinswap.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.Params; + return proto.irismod.coinswap.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.Params} + */ +proto.irismod.coinswap.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.setFee(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setStandardDenom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.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.irismod.coinswap.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFee(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getStandardDenom(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin fee = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.Params.prototype.getFee = 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.irismod.coinswap.Params} returns this +*/ +proto.irismod.coinswap.Params.prototype.setFee = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.Params} returns this + */ +proto.irismod.coinswap.Params.prototype.clearFee = function() { + return this.setFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.Params.prototype.hasFee = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string standard_denom = 2; + * @return {string} + */ +proto.irismod.coinswap.Params.prototype.getStandardDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Params} returns this + */ +proto.irismod.coinswap.Params.prototype.setStandardDenom = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.irismod.coinswap); diff --git a/dist/src/types/proto-types/irismod/coinswap/genesis_pb.js b/dist/src/types/proto-types/irismod/coinswap/genesis_pb.js new file mode 100644 index 00000000..b8e31866 --- /dev/null +++ b/dist/src/types/proto-types/irismod/coinswap/genesis_pb.js @@ -0,0 +1,192 @@ +// source: irismod/coinswap/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 irismod_coinswap_coinswap_pb = require('../../irismod/coinswap/coinswap_pb.js'); +goog.object.extend(proto, irismod_coinswap_coinswap_pb); +goog.exportSymbol('proto.irismod.coinswap.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.irismod.coinswap.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.GenesisState.displayName = 'proto.irismod.coinswap.GenesisState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.coinswap.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.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.irismod.coinswap.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && irismod_coinswap_coinswap_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.irismod.coinswap.GenesisState} + */ +proto.irismod.coinswap.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.GenesisState; + return proto.irismod.coinswap.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.GenesisState} + */ +proto.irismod.coinswap.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_coinswap_coinswap_pb.Params; + reader.readMessage(value,irismod_coinswap_coinswap_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.irismod.coinswap.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.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.irismod.coinswap.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_coinswap_coinswap_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.irismod.coinswap.Params} + */ +proto.irismod.coinswap.GenesisState.prototype.getParams = function() { + return /** @type{?proto.irismod.coinswap.Params} */ ( + jspb.Message.getWrapperField(this, irismod_coinswap_coinswap_pb.Params, 1)); +}; + + +/** + * @param {?proto.irismod.coinswap.Params|undefined} value + * @return {!proto.irismod.coinswap.GenesisState} returns this +*/ +proto.irismod.coinswap.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.GenesisState} returns this + */ +proto.irismod.coinswap.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.irismod.coinswap); diff --git a/dist/src/types/proto-types/irismod/coinswap/query_grpc_web_pb.js b/dist/src/types/proto-types/irismod/coinswap/query_grpc_web_pb.js new file mode 100644 index 00000000..d3141770 --- /dev/null +++ b/dist/src/types/proto-types/irismod/coinswap/query_grpc_web_pb.js @@ -0,0 +1,161 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.coinswap + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.coinswap = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.coinswap.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.coinswap.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.coinswap.QueryLiquidityRequest, + * !proto.irismod.coinswap.QueryLiquidityResponse>} + */ +const methodDescriptor_Query_Liquidity = new grpc.web.MethodDescriptor( + '/irismod.coinswap.Query/Liquidity', + grpc.web.MethodType.UNARY, + proto.irismod.coinswap.QueryLiquidityRequest, + proto.irismod.coinswap.QueryLiquidityResponse, + /** + * @param {!proto.irismod.coinswap.QueryLiquidityRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.coinswap.QueryLiquidityRequest, + * !proto.irismod.coinswap.QueryLiquidityResponse>} + */ +const methodInfo_Query_Liquidity = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.coinswap.QueryLiquidityResponse, + /** + * @param {!proto.irismod.coinswap.QueryLiquidityRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.coinswap.QueryLiquidityRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.coinswap.QueryLiquidityResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.coinswap.QueryClient.prototype.liquidity = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.coinswap.Query/Liquidity', + request, + metadata || {}, + methodDescriptor_Query_Liquidity, + callback); +}; + + +/** + * @param {!proto.irismod.coinswap.QueryLiquidityRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.coinswap.QueryPromiseClient.prototype.liquidity = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.coinswap.Query/Liquidity', + request, + metadata || {}, + methodDescriptor_Query_Liquidity); +}; + + +module.exports = proto.irismod.coinswap; + diff --git a/dist/src/types/proto-types/irismod/coinswap/query_pb.js b/dist/src/types/proto-types/irismod/coinswap/query_pb.js new file mode 100644 index 00000000..bf9166da --- /dev/null +++ b/dist/src/types/proto-types/irismod/coinswap/query_pb.js @@ -0,0 +1,478 @@ +// source: irismod/coinswap/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 google_api_annotations_pb = require('../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityRequest', null, global); +goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityResponse', 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.irismod.coinswap.QueryLiquidityRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.QueryLiquidityRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.QueryLiquidityRequest.displayName = 'proto.irismod.coinswap.QueryLiquidityRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.coinswap.QueryLiquidityResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.QueryLiquidityResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.QueryLiquidityResponse.displayName = 'proto.irismod.coinswap.QueryLiquidityResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.coinswap.QueryLiquidityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.QueryLiquidityRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.QueryLiquidityRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: 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.irismod.coinswap.QueryLiquidityRequest} + */ +proto.irismod.coinswap.QueryLiquidityRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.QueryLiquidityRequest; + return proto.irismod.coinswap.QueryLiquidityRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.QueryLiquidityRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.QueryLiquidityRequest} + */ +proto.irismod.coinswap.QueryLiquidityRequest.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.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.QueryLiquidityRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.QueryLiquidityRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.QueryLiquidityRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.coinswap.QueryLiquidityRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.QueryLiquidityRequest} returns this + */ +proto.irismod.coinswap.QueryLiquidityRequest.prototype.setId = 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.irismod.coinswap.QueryLiquidityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.QueryLiquidityResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.QueryLiquidityResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityResponse.toObject = function(includeInstance, msg) { + var f, obj = { + standard: (f = msg.getStandard()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + token: (f = msg.getToken()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + liquidity: (f = msg.getLiquidity()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + fee: 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.irismod.coinswap.QueryLiquidityResponse} + */ +proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.QueryLiquidityResponse; + return proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.QueryLiquidityResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.QueryLiquidityResponse} + */ +proto.irismod.coinswap.QueryLiquidityResponse.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.setStandard(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setToken(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setLiquidity(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.QueryLiquidityResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.QueryLiquidityResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStandard(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getToken(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getLiquidity(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getFee(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin standard = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.getStandard = 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.irismod.coinswap.QueryLiquidityResponse} returns this +*/ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.setStandard = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearStandard = function() { + return this.setStandard(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.hasStandard = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional cosmos.base.v1beta1.Coin token = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.getToken = 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.irismod.coinswap.QueryLiquidityResponse} returns this +*/ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.setToken = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearToken = function() { + return this.setToken(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.hasToken = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional cosmos.base.v1beta1.Coin liquidity = 3; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.getLiquidity = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this +*/ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.setLiquidity = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearLiquidity = function() { + return this.setLiquidity(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.hasLiquidity = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string fee = 4; + * @return {string} + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.getFee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.setFee = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +goog.object.extend(exports, proto.irismod.coinswap); diff --git a/dist/src/types/proto-types/irismod/coinswap/tx_grpc_web_pb.js b/dist/src/types/proto-types/irismod/coinswap/tx_grpc_web_pb.js new file mode 100644 index 00000000..70903fe0 --- /dev/null +++ b/dist/src/types/proto-types/irismod/coinswap/tx_grpc_web_pb.js @@ -0,0 +1,321 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.coinswap + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var irismod_coinswap_coinswap_pb = require('../../irismod/coinswap/coinswap_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.coinswap = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.coinswap.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.coinswap.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.coinswap.MsgAddLiquidity, + * !proto.irismod.coinswap.MsgAddLiquidityResponse>} + */ +const methodDescriptor_Msg_AddLiquidity = new grpc.web.MethodDescriptor( + '/irismod.coinswap.Msg/AddLiquidity', + grpc.web.MethodType.UNARY, + proto.irismod.coinswap.MsgAddLiquidity, + proto.irismod.coinswap.MsgAddLiquidityResponse, + /** + * @param {!proto.irismod.coinswap.MsgAddLiquidity} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.MsgAddLiquidityResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.coinswap.MsgAddLiquidity, + * !proto.irismod.coinswap.MsgAddLiquidityResponse>} + */ +const methodInfo_Msg_AddLiquidity = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.coinswap.MsgAddLiquidityResponse, + /** + * @param {!proto.irismod.coinswap.MsgAddLiquidity} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.MsgAddLiquidityResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.coinswap.MsgAddLiquidity} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.coinswap.MsgAddLiquidityResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.coinswap.MsgClient.prototype.addLiquidity = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.coinswap.Msg/AddLiquidity', + request, + metadata || {}, + methodDescriptor_Msg_AddLiquidity, + callback); +}; + + +/** + * @param {!proto.irismod.coinswap.MsgAddLiquidity} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.coinswap.MsgPromiseClient.prototype.addLiquidity = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.coinswap.Msg/AddLiquidity', + request, + metadata || {}, + methodDescriptor_Msg_AddLiquidity); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.coinswap.MsgRemoveLiquidity, + * !proto.irismod.coinswap.MsgRemoveLiquidityResponse>} + */ +const methodDescriptor_Msg_RemoveLiquidity = new grpc.web.MethodDescriptor( + '/irismod.coinswap.Msg/RemoveLiquidity', + grpc.web.MethodType.UNARY, + proto.irismod.coinswap.MsgRemoveLiquidity, + proto.irismod.coinswap.MsgRemoveLiquidityResponse, + /** + * @param {!proto.irismod.coinswap.MsgRemoveLiquidity} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.MsgRemoveLiquidityResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.coinswap.MsgRemoveLiquidity, + * !proto.irismod.coinswap.MsgRemoveLiquidityResponse>} + */ +const methodInfo_Msg_RemoveLiquidity = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.coinswap.MsgRemoveLiquidityResponse, + /** + * @param {!proto.irismod.coinswap.MsgRemoveLiquidity} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.MsgRemoveLiquidityResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.coinswap.MsgRemoveLiquidity} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.coinswap.MsgRemoveLiquidityResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.coinswap.MsgClient.prototype.removeLiquidity = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.coinswap.Msg/RemoveLiquidity', + request, + metadata || {}, + methodDescriptor_Msg_RemoveLiquidity, + callback); +}; + + +/** + * @param {!proto.irismod.coinswap.MsgRemoveLiquidity} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.coinswap.MsgPromiseClient.prototype.removeLiquidity = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.coinswap.Msg/RemoveLiquidity', + request, + metadata || {}, + methodDescriptor_Msg_RemoveLiquidity); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.coinswap.MsgSwapOrder, + * !proto.irismod.coinswap.MsgSwapCoinResponse>} + */ +const methodDescriptor_Msg_SwapCoin = new grpc.web.MethodDescriptor( + '/irismod.coinswap.Msg/SwapCoin', + grpc.web.MethodType.UNARY, + proto.irismod.coinswap.MsgSwapOrder, + proto.irismod.coinswap.MsgSwapCoinResponse, + /** + * @param {!proto.irismod.coinswap.MsgSwapOrder} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.MsgSwapCoinResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.coinswap.MsgSwapOrder, + * !proto.irismod.coinswap.MsgSwapCoinResponse>} + */ +const methodInfo_Msg_SwapCoin = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.coinswap.MsgSwapCoinResponse, + /** + * @param {!proto.irismod.coinswap.MsgSwapOrder} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.MsgSwapCoinResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.coinswap.MsgSwapOrder} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.coinswap.MsgSwapCoinResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.coinswap.MsgClient.prototype.swapCoin = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.coinswap.Msg/SwapCoin', + request, + metadata || {}, + methodDescriptor_Msg_SwapCoin, + callback); +}; + + +/** + * @param {!proto.irismod.coinswap.MsgSwapOrder} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.coinswap.MsgPromiseClient.prototype.swapCoin = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.coinswap.Msg/SwapCoin', + request, + metadata || {}, + methodDescriptor_Msg_SwapCoin); +}; + + +module.exports = proto.irismod.coinswap; + diff --git a/dist/src/types/proto-types/irismod/coinswap/tx_pb.js b/dist/src/types/proto-types/irismod/coinswap/tx_pb.js new file mode 100644 index 00000000..ba9db291 --- /dev/null +++ b/dist/src/types/proto-types/irismod/coinswap/tx_pb.js @@ -0,0 +1,1369 @@ +// source: irismod/coinswap/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var irismod_coinswap_coinswap_pb = require('../../irismod/coinswap/coinswap_pb.js'); +goog.object.extend(proto, irismod_coinswap_coinswap_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.irismod.coinswap.MsgAddLiquidity', null, global); +goog.exportSymbol('proto.irismod.coinswap.MsgAddLiquidityResponse', null, global); +goog.exportSymbol('proto.irismod.coinswap.MsgRemoveLiquidity', null, global); +goog.exportSymbol('proto.irismod.coinswap.MsgRemoveLiquidityResponse', null, global); +goog.exportSymbol('proto.irismod.coinswap.MsgSwapCoinResponse', null, global); +goog.exportSymbol('proto.irismod.coinswap.MsgSwapOrder', 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.irismod.coinswap.MsgAddLiquidity = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.MsgAddLiquidity, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.MsgAddLiquidity.displayName = 'proto.irismod.coinswap.MsgAddLiquidity'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.coinswap.MsgAddLiquidityResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.MsgAddLiquidityResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.MsgAddLiquidityResponse.displayName = 'proto.irismod.coinswap.MsgAddLiquidityResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.coinswap.MsgRemoveLiquidity = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.MsgRemoveLiquidity, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.MsgRemoveLiquidity.displayName = 'proto.irismod.coinswap.MsgRemoveLiquidity'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.coinswap.MsgRemoveLiquidityResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.coinswap.MsgRemoveLiquidityResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.MsgRemoveLiquidityResponse.displayName = 'proto.irismod.coinswap.MsgRemoveLiquidityResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.coinswap.MsgSwapOrder = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.MsgSwapOrder, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.MsgSwapOrder.displayName = 'proto.irismod.coinswap.MsgSwapOrder'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.coinswap.MsgSwapCoinResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.MsgSwapCoinResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.MsgSwapCoinResponse.displayName = 'proto.irismod.coinswap.MsgSwapCoinResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.MsgAddLiquidity.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.MsgAddLiquidity} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgAddLiquidity.toObject = function(includeInstance, msg) { + var f, obj = { + maxToken: (f = msg.getMaxToken()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + exactStandardAmt: jspb.Message.getFieldWithDefault(msg, 2, ""), + minLiquidity: jspb.Message.getFieldWithDefault(msg, 3, ""), + deadline: jspb.Message.getFieldWithDefault(msg, 4, 0), + sender: 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.irismod.coinswap.MsgAddLiquidity} + */ +proto.irismod.coinswap.MsgAddLiquidity.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.MsgAddLiquidity; + return proto.irismod.coinswap.MsgAddLiquidity.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.MsgAddLiquidity} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.MsgAddLiquidity} + */ +proto.irismod.coinswap.MsgAddLiquidity.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.setMaxToken(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setExactStandardAmt(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMinLiquidity(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setDeadline(value); + break; + case 5: + 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.irismod.coinswap.MsgAddLiquidity.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.MsgAddLiquidity.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.MsgAddLiquidity} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgAddLiquidity.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxToken(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getExactStandardAmt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMinLiquidity(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDeadline(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin max_token = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.getMaxToken = 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.irismod.coinswap.MsgAddLiquidity} returns this +*/ +proto.irismod.coinswap.MsgAddLiquidity.prototype.setMaxToken = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.MsgAddLiquidity} returns this + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.clearMaxToken = function() { + return this.setMaxToken(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.hasMaxToken = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string exact_standard_amt = 2; + * @return {string} + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.getExactStandardAmt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.MsgAddLiquidity} returns this + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.setExactStandardAmt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string min_liquidity = 3; + * @return {string} + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.getMinLiquidity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.MsgAddLiquidity} returns this + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.setMinLiquidity = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int64 deadline = 4; + * @return {number} + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.getDeadline = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.coinswap.MsgAddLiquidity} returns this + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.setDeadline = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string sender = 5; + * @return {string} + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.MsgAddLiquidity} returns this + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.setSender = 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.irismod.coinswap.MsgAddLiquidityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.MsgAddLiquidityResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.MsgAddLiquidityResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgAddLiquidityResponse.toObject = function(includeInstance, msg) { + var f, obj = { + mintToken: (f = msg.getMintToken()) && 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.irismod.coinswap.MsgAddLiquidityResponse} + */ +proto.irismod.coinswap.MsgAddLiquidityResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.MsgAddLiquidityResponse; + return proto.irismod.coinswap.MsgAddLiquidityResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.MsgAddLiquidityResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.MsgAddLiquidityResponse} + */ +proto.irismod.coinswap.MsgAddLiquidityResponse.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.setMintToken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.MsgAddLiquidityResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.MsgAddLiquidityResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.MsgAddLiquidityResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgAddLiquidityResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMintToken(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin mint_token = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.MsgAddLiquidityResponse.prototype.getMintToken = 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.irismod.coinswap.MsgAddLiquidityResponse} returns this +*/ +proto.irismod.coinswap.MsgAddLiquidityResponse.prototype.setMintToken = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.MsgAddLiquidityResponse} returns this + */ +proto.irismod.coinswap.MsgAddLiquidityResponse.prototype.clearMintToken = function() { + return this.setMintToken(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.MsgAddLiquidityResponse.prototype.hasMintToken = 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.irismod.coinswap.MsgRemoveLiquidity.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.MsgRemoveLiquidity.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.MsgRemoveLiquidity} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgRemoveLiquidity.toObject = function(includeInstance, msg) { + var f, obj = { + withdrawLiquidity: (f = msg.getWithdrawLiquidity()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + minToken: jspb.Message.getFieldWithDefault(msg, 2, ""), + minStandardAmt: jspb.Message.getFieldWithDefault(msg, 3, ""), + deadline: jspb.Message.getFieldWithDefault(msg, 4, 0), + sender: 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.irismod.coinswap.MsgRemoveLiquidity} + */ +proto.irismod.coinswap.MsgRemoveLiquidity.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.MsgRemoveLiquidity; + return proto.irismod.coinswap.MsgRemoveLiquidity.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.MsgRemoveLiquidity} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.MsgRemoveLiquidity} + */ +proto.irismod.coinswap.MsgRemoveLiquidity.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.setWithdrawLiquidity(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMinToken(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMinStandardAmt(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setDeadline(value); + break; + case 5: + 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.irismod.coinswap.MsgRemoveLiquidity.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.MsgRemoveLiquidity.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.MsgRemoveLiquidity} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgRemoveLiquidity.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWithdrawLiquidity(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getMinToken(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMinStandardAmt(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDeadline(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin withdraw_liquidity = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.getWithdrawLiquidity = 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.irismod.coinswap.MsgRemoveLiquidity} returns this +*/ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.setWithdrawLiquidity = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.MsgRemoveLiquidity} returns this + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.clearWithdrawLiquidity = function() { + return this.setWithdrawLiquidity(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.hasWithdrawLiquidity = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string min_token = 2; + * @return {string} + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.getMinToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.MsgRemoveLiquidity} returns this + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.setMinToken = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string min_standard_amt = 3; + * @return {string} + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.getMinStandardAmt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.MsgRemoveLiquidity} returns this + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.setMinStandardAmt = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int64 deadline = 4; + * @return {number} + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.getDeadline = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.coinswap.MsgRemoveLiquidity} returns this + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.setDeadline = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string sender = 5; + * @return {string} + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.MsgRemoveLiquidity} returns this + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.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.irismod.coinswap.MsgRemoveLiquidityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.MsgRemoveLiquidityResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.MsgRemoveLiquidityResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.toObject = function(includeInstance, msg) { + var f, obj = { + withdrawCoinsList: jspb.Message.toObjectList(msg.getWithdrawCoinsList(), + 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.irismod.coinswap.MsgRemoveLiquidityResponse} + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.MsgRemoveLiquidityResponse; + return proto.irismod.coinswap.MsgRemoveLiquidityResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.MsgRemoveLiquidityResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.MsgRemoveLiquidityResponse} + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.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.addWithdrawCoins(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.MsgRemoveLiquidityResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.MsgRemoveLiquidityResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWithdrawCoinsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin withdraw_coins = 1; + * @return {!Array} + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.prototype.getWithdrawCoinsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.coinswap.MsgRemoveLiquidityResponse} returns this +*/ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.prototype.setWithdrawCoinsList = 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.irismod.coinswap.MsgRemoveLiquidityResponse.prototype.addWithdrawCoins = 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.irismod.coinswap.MsgRemoveLiquidityResponse} returns this + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.prototype.clearWithdrawCoinsList = function() { + return this.setWithdrawCoinsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.MsgSwapOrder.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.MsgSwapOrder} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgSwapOrder.toObject = function(includeInstance, msg) { + var f, obj = { + input: (f = msg.getInput()) && irismod_coinswap_coinswap_pb.Input.toObject(includeInstance, f), + output: (f = msg.getOutput()) && irismod_coinswap_coinswap_pb.Output.toObject(includeInstance, f), + deadline: jspb.Message.getFieldWithDefault(msg, 3, 0), + isBuyOrder: 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.irismod.coinswap.MsgSwapOrder} + */ +proto.irismod.coinswap.MsgSwapOrder.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.MsgSwapOrder; + return proto.irismod.coinswap.MsgSwapOrder.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.MsgSwapOrder} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.MsgSwapOrder} + */ +proto.irismod.coinswap.MsgSwapOrder.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_coinswap_coinswap_pb.Input; + reader.readMessage(value,irismod_coinswap_coinswap_pb.Input.deserializeBinaryFromReader); + msg.setInput(value); + break; + case 2: + var value = new irismod_coinswap_coinswap_pb.Output; + reader.readMessage(value,irismod_coinswap_coinswap_pb.Output.deserializeBinaryFromReader); + msg.setOutput(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setDeadline(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsBuyOrder(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.MsgSwapOrder.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.MsgSwapOrder} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgSwapOrder.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInput(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_coinswap_coinswap_pb.Input.serializeBinaryToWriter + ); + } + f = message.getOutput(); + if (f != null) { + writer.writeMessage( + 2, + f, + irismod_coinswap_coinswap_pb.Output.serializeBinaryToWriter + ); + } + f = message.getDeadline(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getIsBuyOrder(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional Input input = 1; + * @return {?proto.irismod.coinswap.Input} + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.getInput = function() { + return /** @type{?proto.irismod.coinswap.Input} */ ( + jspb.Message.getWrapperField(this, irismod_coinswap_coinswap_pb.Input, 1)); +}; + + +/** + * @param {?proto.irismod.coinswap.Input|undefined} value + * @return {!proto.irismod.coinswap.MsgSwapOrder} returns this +*/ +proto.irismod.coinswap.MsgSwapOrder.prototype.setInput = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.MsgSwapOrder} returns this + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.clearInput = function() { + return this.setInput(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.hasInput = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Output output = 2; + * @return {?proto.irismod.coinswap.Output} + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.getOutput = function() { + return /** @type{?proto.irismod.coinswap.Output} */ ( + jspb.Message.getWrapperField(this, irismod_coinswap_coinswap_pb.Output, 2)); +}; + + +/** + * @param {?proto.irismod.coinswap.Output|undefined} value + * @return {!proto.irismod.coinswap.MsgSwapOrder} returns this +*/ +proto.irismod.coinswap.MsgSwapOrder.prototype.setOutput = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.MsgSwapOrder} returns this + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.clearOutput = function() { + return this.setOutput(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.hasOutput = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 deadline = 3; + * @return {number} + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.getDeadline = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.coinswap.MsgSwapOrder} returns this + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.setDeadline = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bool is_buy_order = 4; + * @return {boolean} + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.getIsBuyOrder = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.coinswap.MsgSwapOrder} returns this + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.setIsBuyOrder = 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.irismod.coinswap.MsgSwapCoinResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.MsgSwapCoinResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.MsgSwapCoinResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgSwapCoinResponse.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.irismod.coinswap.MsgSwapCoinResponse} + */ +proto.irismod.coinswap.MsgSwapCoinResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.MsgSwapCoinResponse; + return proto.irismod.coinswap.MsgSwapCoinResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.MsgSwapCoinResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.MsgSwapCoinResponse} + */ +proto.irismod.coinswap.MsgSwapCoinResponse.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.irismod.coinswap.MsgSwapCoinResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.MsgSwapCoinResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.MsgSwapCoinResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgSwapCoinResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.irismod.coinswap); diff --git a/dist/src/types/proto-types/irismod/htlc/genesis_pb.js b/dist/src/types/proto-types/irismod/htlc/genesis_pb.js new file mode 100644 index 00000000..44c3dcdf --- /dev/null +++ b/dist/src/types/proto-types/irismod/htlc/genesis_pb.js @@ -0,0 +1,174 @@ +// source: irismod/htlc/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 irismod_htlc_htlc_pb = require('../../irismod/htlc/htlc_pb.js'); +goog.object.extend(proto, irismod_htlc_htlc_pb); +goog.exportSymbol('proto.irismod.htlc.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.irismod.htlc.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.htlc.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.GenesisState.displayName = 'proto.irismod.htlc.GenesisState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.htlc.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.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.irismod.htlc.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + pendingHtlcsMap: (f = msg.getPendingHtlcsMap()) ? f.toObject(includeInstance, proto.irismod.htlc.HTLC.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.htlc.GenesisState} + */ +proto.irismod.htlc.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.GenesisState; + return proto.irismod.htlc.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.GenesisState} + */ +proto.irismod.htlc.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getPendingHtlcsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.irismod.htlc.HTLC.deserializeBinaryFromReader, "", new proto.irismod.htlc.HTLC()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.htlc.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.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.irismod.htlc.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPendingHtlcsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.irismod.htlc.HTLC.serializeBinaryToWriter); + } +}; + + +/** + * map pending_htlcs = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.irismod.htlc.GenesisState.prototype.getPendingHtlcsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.irismod.htlc.HTLC)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.irismod.htlc.GenesisState} returns this + */ +proto.irismod.htlc.GenesisState.prototype.clearPendingHtlcsMap = function() { + this.getPendingHtlcsMap().clear(); + return this;}; + + +goog.object.extend(exports, proto.irismod.htlc); diff --git a/dist/src/types/proto-types/irismod/htlc/htlc_pb.js b/dist/src/types/proto-types/irismod/htlc/htlc_pb.js new file mode 100644 index 00000000..9848300d --- /dev/null +++ b/dist/src/types/proto-types/irismod/htlc/htlc_pb.js @@ -0,0 +1,422 @@ +// source: irismod/htlc/htlc.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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.irismod.htlc.HTLC', null, global); +goog.exportSymbol('proto.irismod.htlc.HTLCState', 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.irismod.htlc.HTLC = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.htlc.HTLC.repeatedFields_, null); +}; +goog.inherits(proto.irismod.htlc.HTLC, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.HTLC.displayName = 'proto.irismod.htlc.HTLC'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.htlc.HTLC.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.irismod.htlc.HTLC.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.HTLC.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.HTLC} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.HTLC.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + to: jspb.Message.getFieldWithDefault(msg, 2, ""), + receiverOnOtherChain: jspb.Message.getFieldWithDefault(msg, 3, ""), + amountList: jspb.Message.toObjectList(msg.getAmountList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + secret: jspb.Message.getFieldWithDefault(msg, 5, ""), + timestamp: jspb.Message.getFieldWithDefault(msg, 6, 0), + expirationHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), + state: 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.irismod.htlc.HTLC} + */ +proto.irismod.htlc.HTLC.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.HTLC; + return proto.irismod.htlc.HTLC.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.HTLC} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.HTLC} + */ +proto.irismod.htlc.HTLC.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 {string} */ (reader.readString()); + msg.setTo(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setReceiverOnOtherChain(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addAmount(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSecret(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpirationHeight(value); + break; + case 8: + var value = /** @type {!proto.irismod.htlc.HTLCState} */ (reader.readEnum()); + msg.setState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.htlc.HTLC.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.HTLC.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.HTLC} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.HTLC.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTo(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getReceiverOnOtherChain(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAmountList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getSecret(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getExpirationHeight(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 8, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.irismod.htlc.HTLC.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.HTLC} returns this + */ +proto.irismod.htlc.HTLC.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string to = 2; + * @return {string} + */ +proto.irismod.htlc.HTLC.prototype.getTo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.HTLC} returns this + */ +proto.irismod.htlc.HTLC.prototype.setTo = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string receiver_on_other_chain = 3; + * @return {string} + */ +proto.irismod.htlc.HTLC.prototype.getReceiverOnOtherChain = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.HTLC} returns this + */ +proto.irismod.htlc.HTLC.prototype.setReceiverOnOtherChain = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 4; + * @return {!Array} + */ +proto.irismod.htlc.HTLC.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.htlc.HTLC} returns this +*/ +proto.irismod.htlc.HTLC.prototype.setAmountList = 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.irismod.htlc.HTLC.prototype.addAmount = 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.irismod.htlc.HTLC} returns this + */ +proto.irismod.htlc.HTLC.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + +/** + * optional string secret = 5; + * @return {string} + */ +proto.irismod.htlc.HTLC.prototype.getSecret = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.HTLC} returns this + */ +proto.irismod.htlc.HTLC.prototype.setSecret = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional uint64 timestamp = 6; + * @return {number} + */ +proto.irismod.htlc.HTLC.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.htlc.HTLC} returns this + */ +proto.irismod.htlc.HTLC.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint64 expiration_height = 7; + * @return {number} + */ +proto.irismod.htlc.HTLC.prototype.getExpirationHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.htlc.HTLC} returns this + */ +proto.irismod.htlc.HTLC.prototype.setExpirationHeight = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional HTLCState state = 8; + * @return {!proto.irismod.htlc.HTLCState} + */ +proto.irismod.htlc.HTLC.prototype.getState = function() { + return /** @type {!proto.irismod.htlc.HTLCState} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {!proto.irismod.htlc.HTLCState} value + * @return {!proto.irismod.htlc.HTLC} returns this + */ +proto.irismod.htlc.HTLC.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 8, value); +}; + + +/** + * @enum {number} + */ +proto.irismod.htlc.HTLCState = { + HTLC_STATE_OPEN: 0, + HTLC_STATE_COMPLETED: 1, + HTLC_STATE_EXPIRED: 2, + HTLC_STATE_REFUNDED: 3 +}; + +goog.object.extend(exports, proto.irismod.htlc); diff --git a/dist/src/types/proto-types/irismod/htlc/query_grpc_web_pb.js b/dist/src/types/proto-types/irismod/htlc/query_grpc_web_pb.js new file mode 100644 index 00000000..96f0b129 --- /dev/null +++ b/dist/src/types/proto-types/irismod/htlc/query_grpc_web_pb.js @@ -0,0 +1,159 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.htlc + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var irismod_htlc_htlc_pb = require('../../irismod/htlc/htlc_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.htlc = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.htlc.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.htlc.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.htlc.QueryHTLCRequest, + * !proto.irismod.htlc.QueryHTLCResponse>} + */ +const methodDescriptor_Query_HTLC = new grpc.web.MethodDescriptor( + '/irismod.htlc.Query/HTLC', + grpc.web.MethodType.UNARY, + proto.irismod.htlc.QueryHTLCRequest, + proto.irismod.htlc.QueryHTLCResponse, + /** + * @param {!proto.irismod.htlc.QueryHTLCRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.htlc.QueryHTLCResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.htlc.QueryHTLCRequest, + * !proto.irismod.htlc.QueryHTLCResponse>} + */ +const methodInfo_Query_HTLC = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.htlc.QueryHTLCResponse, + /** + * @param {!proto.irismod.htlc.QueryHTLCRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.htlc.QueryHTLCResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.htlc.QueryHTLCRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.htlc.QueryHTLCResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.htlc.QueryClient.prototype.hTLC = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.htlc.Query/HTLC', + request, + metadata || {}, + methodDescriptor_Query_HTLC, + callback); +}; + + +/** + * @param {!proto.irismod.htlc.QueryHTLCRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.htlc.QueryPromiseClient.prototype.hTLC = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.htlc.Query/HTLC', + request, + metadata || {}, + methodDescriptor_Query_HTLC); +}; + + +module.exports = proto.irismod.htlc; + diff --git a/dist/src/types/proto-types/irismod/htlc/query_pb.js b/dist/src/types/proto-types/irismod/htlc/query_pb.js new file mode 100644 index 00000000..396104f1 --- /dev/null +++ b/dist/src/types/proto-types/irismod/htlc/query_pb.js @@ -0,0 +1,344 @@ +// source: irismod/htlc/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var irismod_htlc_htlc_pb = require('../../irismod/htlc/htlc_pb.js'); +goog.object.extend(proto, irismod_htlc_htlc_pb); +goog.exportSymbol('proto.irismod.htlc.QueryHTLCRequest', null, global); +goog.exportSymbol('proto.irismod.htlc.QueryHTLCResponse', 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.irismod.htlc.QueryHTLCRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.htlc.QueryHTLCRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.QueryHTLCRequest.displayName = 'proto.irismod.htlc.QueryHTLCRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.htlc.QueryHTLCResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.htlc.QueryHTLCResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.QueryHTLCResponse.displayName = 'proto.irismod.htlc.QueryHTLCResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.htlc.QueryHTLCRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.QueryHTLCRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.QueryHTLCRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.QueryHTLCRequest.toObject = function(includeInstance, msg) { + var f, obj = { + hashLock: 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.irismod.htlc.QueryHTLCRequest} + */ +proto.irismod.htlc.QueryHTLCRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.QueryHTLCRequest; + return proto.irismod.htlc.QueryHTLCRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.QueryHTLCRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.QueryHTLCRequest} + */ +proto.irismod.htlc.QueryHTLCRequest.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.setHashLock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.htlc.QueryHTLCRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.QueryHTLCRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.QueryHTLCRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.QueryHTLCRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHashLock(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string hash_lock = 1; + * @return {string} + */ +proto.irismod.htlc.QueryHTLCRequest.prototype.getHashLock = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.QueryHTLCRequest} returns this + */ +proto.irismod.htlc.QueryHTLCRequest.prototype.setHashLock = 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.irismod.htlc.QueryHTLCResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.QueryHTLCResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.QueryHTLCResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.QueryHTLCResponse.toObject = function(includeInstance, msg) { + var f, obj = { + htlc: (f = msg.getHtlc()) && irismod_htlc_htlc_pb.HTLC.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.irismod.htlc.QueryHTLCResponse} + */ +proto.irismod.htlc.QueryHTLCResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.QueryHTLCResponse; + return proto.irismod.htlc.QueryHTLCResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.QueryHTLCResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.QueryHTLCResponse} + */ +proto.irismod.htlc.QueryHTLCResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_htlc_htlc_pb.HTLC; + reader.readMessage(value,irismod_htlc_htlc_pb.HTLC.deserializeBinaryFromReader); + msg.setHtlc(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.htlc.QueryHTLCResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.QueryHTLCResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.QueryHTLCResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.QueryHTLCResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHtlc(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_htlc_htlc_pb.HTLC.serializeBinaryToWriter + ); + } +}; + + +/** + * optional HTLC htlc = 1; + * @return {?proto.irismod.htlc.HTLC} + */ +proto.irismod.htlc.QueryHTLCResponse.prototype.getHtlc = function() { + return /** @type{?proto.irismod.htlc.HTLC} */ ( + jspb.Message.getWrapperField(this, irismod_htlc_htlc_pb.HTLC, 1)); +}; + + +/** + * @param {?proto.irismod.htlc.HTLC|undefined} value + * @return {!proto.irismod.htlc.QueryHTLCResponse} returns this +*/ +proto.irismod.htlc.QueryHTLCResponse.prototype.setHtlc = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.htlc.QueryHTLCResponse} returns this + */ +proto.irismod.htlc.QueryHTLCResponse.prototype.clearHtlc = function() { + return this.setHtlc(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.htlc.QueryHTLCResponse.prototype.hasHtlc = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.irismod.htlc); diff --git a/dist/src/types/proto-types/irismod/htlc/tx_grpc_web_pb.js b/dist/src/types/proto-types/irismod/htlc/tx_grpc_web_pb.js new file mode 100644 index 00000000..177843c1 --- /dev/null +++ b/dist/src/types/proto-types/irismod/htlc/tx_grpc_web_pb.js @@ -0,0 +1,319 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.htlc + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.htlc = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.htlc.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.htlc.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.htlc.MsgCreateHTLC, + * !proto.irismod.htlc.MsgCreateHTLCResponse>} + */ +const methodDescriptor_Msg_CreateHTLC = new grpc.web.MethodDescriptor( + '/irismod.htlc.Msg/CreateHTLC', + grpc.web.MethodType.UNARY, + proto.irismod.htlc.MsgCreateHTLC, + proto.irismod.htlc.MsgCreateHTLCResponse, + /** + * @param {!proto.irismod.htlc.MsgCreateHTLC} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.htlc.MsgCreateHTLCResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.htlc.MsgCreateHTLC, + * !proto.irismod.htlc.MsgCreateHTLCResponse>} + */ +const methodInfo_Msg_CreateHTLC = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.htlc.MsgCreateHTLCResponse, + /** + * @param {!proto.irismod.htlc.MsgCreateHTLC} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.htlc.MsgCreateHTLCResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.htlc.MsgCreateHTLC} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.htlc.MsgCreateHTLCResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.htlc.MsgClient.prototype.createHTLC = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.htlc.Msg/CreateHTLC', + request, + metadata || {}, + methodDescriptor_Msg_CreateHTLC, + callback); +}; + + +/** + * @param {!proto.irismod.htlc.MsgCreateHTLC} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.htlc.MsgPromiseClient.prototype.createHTLC = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.htlc.Msg/CreateHTLC', + request, + metadata || {}, + methodDescriptor_Msg_CreateHTLC); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.htlc.MsgClaimHTLC, + * !proto.irismod.htlc.MsgClaimHTLCResponse>} + */ +const methodDescriptor_Msg_ClaimHTLC = new grpc.web.MethodDescriptor( + '/irismod.htlc.Msg/ClaimHTLC', + grpc.web.MethodType.UNARY, + proto.irismod.htlc.MsgClaimHTLC, + proto.irismod.htlc.MsgClaimHTLCResponse, + /** + * @param {!proto.irismod.htlc.MsgClaimHTLC} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.htlc.MsgClaimHTLCResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.htlc.MsgClaimHTLC, + * !proto.irismod.htlc.MsgClaimHTLCResponse>} + */ +const methodInfo_Msg_ClaimHTLC = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.htlc.MsgClaimHTLCResponse, + /** + * @param {!proto.irismod.htlc.MsgClaimHTLC} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.htlc.MsgClaimHTLCResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.htlc.MsgClaimHTLC} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.htlc.MsgClaimHTLCResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.htlc.MsgClient.prototype.claimHTLC = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.htlc.Msg/ClaimHTLC', + request, + metadata || {}, + methodDescriptor_Msg_ClaimHTLC, + callback); +}; + + +/** + * @param {!proto.irismod.htlc.MsgClaimHTLC} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.htlc.MsgPromiseClient.prototype.claimHTLC = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.htlc.Msg/ClaimHTLC', + request, + metadata || {}, + methodDescriptor_Msg_ClaimHTLC); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.htlc.MsgRefundHTLC, + * !proto.irismod.htlc.MsgRefundHTLCResponse>} + */ +const methodDescriptor_Msg_RefundHTLC = new grpc.web.MethodDescriptor( + '/irismod.htlc.Msg/RefundHTLC', + grpc.web.MethodType.UNARY, + proto.irismod.htlc.MsgRefundHTLC, + proto.irismod.htlc.MsgRefundHTLCResponse, + /** + * @param {!proto.irismod.htlc.MsgRefundHTLC} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.htlc.MsgRefundHTLCResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.htlc.MsgRefundHTLC, + * !proto.irismod.htlc.MsgRefundHTLCResponse>} + */ +const methodInfo_Msg_RefundHTLC = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.htlc.MsgRefundHTLCResponse, + /** + * @param {!proto.irismod.htlc.MsgRefundHTLC} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.htlc.MsgRefundHTLCResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.htlc.MsgRefundHTLC} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.htlc.MsgRefundHTLCResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.htlc.MsgClient.prototype.refundHTLC = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.htlc.Msg/RefundHTLC', + request, + metadata || {}, + methodDescriptor_Msg_RefundHTLC, + callback); +}; + + +/** + * @param {!proto.irismod.htlc.MsgRefundHTLC} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.htlc.MsgPromiseClient.prototype.refundHTLC = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.htlc.Msg/RefundHTLC', + request, + metadata || {}, + methodDescriptor_Msg_RefundHTLC); +}; + + +module.exports = proto.irismod.htlc; + diff --git a/dist/src/types/proto-types/irismod/htlc/tx_pb.js b/dist/src/types/proto-types/irismod/htlc/tx_pb.js new file mode 100644 index 00000000..96709c6c --- /dev/null +++ b/dist/src/types/proto-types/irismod/htlc/tx_pb.js @@ -0,0 +1,1144 @@ +// source: irismod/htlc/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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.irismod.htlc.MsgClaimHTLC', null, global); +goog.exportSymbol('proto.irismod.htlc.MsgClaimHTLCResponse', null, global); +goog.exportSymbol('proto.irismod.htlc.MsgCreateHTLC', null, global); +goog.exportSymbol('proto.irismod.htlc.MsgCreateHTLCResponse', null, global); +goog.exportSymbol('proto.irismod.htlc.MsgRefundHTLC', null, global); +goog.exportSymbol('proto.irismod.htlc.MsgRefundHTLCResponse', 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.irismod.htlc.MsgCreateHTLC = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.htlc.MsgCreateHTLC.repeatedFields_, null); +}; +goog.inherits(proto.irismod.htlc.MsgCreateHTLC, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.MsgCreateHTLC.displayName = 'proto.irismod.htlc.MsgCreateHTLC'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.htlc.MsgCreateHTLCResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.htlc.MsgCreateHTLCResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.MsgCreateHTLCResponse.displayName = 'proto.irismod.htlc.MsgCreateHTLCResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.htlc.MsgClaimHTLC = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.htlc.MsgClaimHTLC, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.MsgClaimHTLC.displayName = 'proto.irismod.htlc.MsgClaimHTLC'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.htlc.MsgClaimHTLCResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.htlc.MsgClaimHTLCResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.MsgClaimHTLCResponse.displayName = 'proto.irismod.htlc.MsgClaimHTLCResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.htlc.MsgRefundHTLC = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.htlc.MsgRefundHTLC, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.MsgRefundHTLC.displayName = 'proto.irismod.htlc.MsgRefundHTLC'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.htlc.MsgRefundHTLCResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.htlc.MsgRefundHTLCResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.MsgRefundHTLCResponse.displayName = 'proto.irismod.htlc.MsgRefundHTLCResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.htlc.MsgCreateHTLC.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.irismod.htlc.MsgCreateHTLC.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.MsgCreateHTLC.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.MsgCreateHTLC} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgCreateHTLC.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + to: jspb.Message.getFieldWithDefault(msg, 2, ""), + receiverOnOtherChain: jspb.Message.getFieldWithDefault(msg, 3, ""), + amountList: jspb.Message.toObjectList(msg.getAmountList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + hashLock: jspb.Message.getFieldWithDefault(msg, 5, ""), + timestamp: jspb.Message.getFieldWithDefault(msg, 6, 0), + timeLock: 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.irismod.htlc.MsgCreateHTLC} + */ +proto.irismod.htlc.MsgCreateHTLC.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.MsgCreateHTLC; + return proto.irismod.htlc.MsgCreateHTLC.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.MsgCreateHTLC} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.MsgCreateHTLC} + */ +proto.irismod.htlc.MsgCreateHTLC.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 {string} */ (reader.readString()); + msg.setTo(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setReceiverOnOtherChain(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addAmount(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setHashLock(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimeLock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.MsgCreateHTLC.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.MsgCreateHTLC} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgCreateHTLC.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTo(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getReceiverOnOtherChain(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAmountList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getHashLock(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getTimeLock(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgCreateHTLC} returns this + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string to = 2; + * @return {string} + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.getTo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgCreateHTLC} returns this + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.setTo = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string receiver_on_other_chain = 3; + * @return {string} + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.getReceiverOnOtherChain = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgCreateHTLC} returns this + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.setReceiverOnOtherChain = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 4; + * @return {!Array} + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.htlc.MsgCreateHTLC} returns this +*/ +proto.irismod.htlc.MsgCreateHTLC.prototype.setAmountList = 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.irismod.htlc.MsgCreateHTLC.prototype.addAmount = 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.irismod.htlc.MsgCreateHTLC} returns this + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + +/** + * optional string hash_lock = 5; + * @return {string} + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.getHashLock = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgCreateHTLC} returns this + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.setHashLock = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional uint64 timestamp = 6; + * @return {number} + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.htlc.MsgCreateHTLC} returns this + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint64 time_lock = 7; + * @return {number} + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.getTimeLock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.htlc.MsgCreateHTLC} returns this + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.setTimeLock = 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.irismod.htlc.MsgCreateHTLCResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.MsgCreateHTLCResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.MsgCreateHTLCResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgCreateHTLCResponse.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.irismod.htlc.MsgCreateHTLCResponse} + */ +proto.irismod.htlc.MsgCreateHTLCResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.MsgCreateHTLCResponse; + return proto.irismod.htlc.MsgCreateHTLCResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.MsgCreateHTLCResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.MsgCreateHTLCResponse} + */ +proto.irismod.htlc.MsgCreateHTLCResponse.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.irismod.htlc.MsgCreateHTLCResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.MsgCreateHTLCResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.MsgCreateHTLCResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgCreateHTLCResponse.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.irismod.htlc.MsgClaimHTLC.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.MsgClaimHTLC.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.MsgClaimHTLC} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgClaimHTLC.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + hashLock: jspb.Message.getFieldWithDefault(msg, 2, ""), + secret: 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.irismod.htlc.MsgClaimHTLC} + */ +proto.irismod.htlc.MsgClaimHTLC.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.MsgClaimHTLC; + return proto.irismod.htlc.MsgClaimHTLC.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.MsgClaimHTLC} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.MsgClaimHTLC} + */ +proto.irismod.htlc.MsgClaimHTLC.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 {string} */ (reader.readString()); + msg.setHashLock(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSecret(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.htlc.MsgClaimHTLC.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.MsgClaimHTLC.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.MsgClaimHTLC} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgClaimHTLC.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHashLock(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSecret(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.irismod.htlc.MsgClaimHTLC.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgClaimHTLC} returns this + */ +proto.irismod.htlc.MsgClaimHTLC.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string hash_lock = 2; + * @return {string} + */ +proto.irismod.htlc.MsgClaimHTLC.prototype.getHashLock = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgClaimHTLC} returns this + */ +proto.irismod.htlc.MsgClaimHTLC.prototype.setHashLock = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string secret = 3; + * @return {string} + */ +proto.irismod.htlc.MsgClaimHTLC.prototype.getSecret = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgClaimHTLC} returns this + */ +proto.irismod.htlc.MsgClaimHTLC.prototype.setSecret = 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.irismod.htlc.MsgClaimHTLCResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.MsgClaimHTLCResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.MsgClaimHTLCResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgClaimHTLCResponse.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.irismod.htlc.MsgClaimHTLCResponse} + */ +proto.irismod.htlc.MsgClaimHTLCResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.MsgClaimHTLCResponse; + return proto.irismod.htlc.MsgClaimHTLCResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.MsgClaimHTLCResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.MsgClaimHTLCResponse} + */ +proto.irismod.htlc.MsgClaimHTLCResponse.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.irismod.htlc.MsgClaimHTLCResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.MsgClaimHTLCResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.MsgClaimHTLCResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgClaimHTLCResponse.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.irismod.htlc.MsgRefundHTLC.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.MsgRefundHTLC.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.MsgRefundHTLC} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgRefundHTLC.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + hashLock: 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.irismod.htlc.MsgRefundHTLC} + */ +proto.irismod.htlc.MsgRefundHTLC.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.MsgRefundHTLC; + return proto.irismod.htlc.MsgRefundHTLC.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.MsgRefundHTLC} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.MsgRefundHTLC} + */ +proto.irismod.htlc.MsgRefundHTLC.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 {string} */ (reader.readString()); + msg.setHashLock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.htlc.MsgRefundHTLC.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.MsgRefundHTLC.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.MsgRefundHTLC} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgRefundHTLC.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHashLock(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.irismod.htlc.MsgRefundHTLC.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgRefundHTLC} returns this + */ +proto.irismod.htlc.MsgRefundHTLC.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string hash_lock = 2; + * @return {string} + */ +proto.irismod.htlc.MsgRefundHTLC.prototype.getHashLock = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgRefundHTLC} returns this + */ +proto.irismod.htlc.MsgRefundHTLC.prototype.setHashLock = 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.irismod.htlc.MsgRefundHTLCResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.MsgRefundHTLCResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.MsgRefundHTLCResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgRefundHTLCResponse.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.irismod.htlc.MsgRefundHTLCResponse} + */ +proto.irismod.htlc.MsgRefundHTLCResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.MsgRefundHTLCResponse; + return proto.irismod.htlc.MsgRefundHTLCResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.MsgRefundHTLCResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.MsgRefundHTLCResponse} + */ +proto.irismod.htlc.MsgRefundHTLCResponse.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.irismod.htlc.MsgRefundHTLCResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.MsgRefundHTLCResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.MsgRefundHTLCResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgRefundHTLCResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.irismod.htlc); diff --git a/dist/src/types/proto-types/irismod/nft/genesis_pb.js b/dist/src/types/proto-types/irismod/nft/genesis_pb.js new file mode 100644 index 00000000..e76d08af --- /dev/null +++ b/dist/src/types/proto-types/irismod/nft/genesis_pb.js @@ -0,0 +1,201 @@ +// source: irismod/nft/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 irismod_nft_nft_pb = require('../../irismod/nft/nft_pb.js'); +goog.object.extend(proto, irismod_nft_nft_pb); +goog.exportSymbol('proto.irismod.nft.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.irismod.nft.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.nft.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.irismod.nft.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.GenesisState.displayName = 'proto.irismod.nft.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.nft.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.irismod.nft.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.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.irismod.nft.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + collectionsList: jspb.Message.toObjectList(msg.getCollectionsList(), + irismod_nft_nft_pb.Collection.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.irismod.nft.GenesisState} + */ +proto.irismod.nft.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.GenesisState; + return proto.irismod.nft.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.GenesisState} + */ +proto.irismod.nft.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_nft_nft_pb.Collection; + reader.readMessage(value,irismod_nft_nft_pb.Collection.deserializeBinaryFromReader); + msg.addCollections(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.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.irismod.nft.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCollectionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_nft_nft_pb.Collection.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Collection collections = 1; + * @return {!Array} + */ +proto.irismod.nft.GenesisState.prototype.getCollectionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_nft_nft_pb.Collection, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.nft.GenesisState} returns this +*/ +proto.irismod.nft.GenesisState.prototype.setCollectionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.nft.Collection=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.nft.Collection} + */ +proto.irismod.nft.GenesisState.prototype.addCollections = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.nft.Collection, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.nft.GenesisState} returns this + */ +proto.irismod.nft.GenesisState.prototype.clearCollectionsList = function() { + return this.setCollectionsList([]); +}; + + +goog.object.extend(exports, proto.irismod.nft); diff --git a/dist/src/types/proto-types/irismod/nft/nft_pb.js b/dist/src/types/proto-types/irismod/nft/nft_pb.js new file mode 100644 index 00000000..dedb84c0 --- /dev/null +++ b/dist/src/types/proto-types/irismod/nft/nft_pb.js @@ -0,0 +1,1184 @@ +// source: irismod/nft/nft.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.irismod.nft.BaseNFT', null, global); +goog.exportSymbol('proto.irismod.nft.Collection', null, global); +goog.exportSymbol('proto.irismod.nft.Denom', null, global); +goog.exportSymbol('proto.irismod.nft.IDCollection', null, global); +goog.exportSymbol('proto.irismod.nft.Owner', 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.irismod.nft.BaseNFT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.BaseNFT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.BaseNFT.displayName = 'proto.irismod.nft.BaseNFT'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.Denom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.Denom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.Denom.displayName = 'proto.irismod.nft.Denom'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.IDCollection = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.nft.IDCollection.repeatedFields_, null); +}; +goog.inherits(proto.irismod.nft.IDCollection, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.IDCollection.displayName = 'proto.irismod.nft.IDCollection'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.Owner = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.nft.Owner.repeatedFields_, null); +}; +goog.inherits(proto.irismod.nft.Owner, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.Owner.displayName = 'proto.irismod.nft.Owner'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.Collection = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.nft.Collection.repeatedFields_, null); +}; +goog.inherits(proto.irismod.nft.Collection, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.Collection.displayName = 'proto.irismod.nft.Collection'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.nft.BaseNFT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.BaseNFT.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.BaseNFT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.BaseNFT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + uri: jspb.Message.getFieldWithDefault(msg, 3, ""), + data: jspb.Message.getFieldWithDefault(msg, 4, ""), + owner: 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.irismod.nft.BaseNFT} + */ +proto.irismod.nft.BaseNFT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.BaseNFT; + return proto.irismod.nft.BaseNFT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.BaseNFT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.BaseNFT} + */ +proto.irismod.nft.BaseNFT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setUri(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.BaseNFT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.BaseNFT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.BaseNFT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.BaseNFT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getUri(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.nft.BaseNFT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.BaseNFT} returns this + */ +proto.irismod.nft.BaseNFT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.irismod.nft.BaseNFT.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.BaseNFT} returns this + */ +proto.irismod.nft.BaseNFT.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string uri = 3; + * @return {string} + */ +proto.irismod.nft.BaseNFT.prototype.getUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.BaseNFT} returns this + */ +proto.irismod.nft.BaseNFT.prototype.setUri = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string data = 4; + * @return {string} + */ +proto.irismod.nft.BaseNFT.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.BaseNFT} returns this + */ +proto.irismod.nft.BaseNFT.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string owner = 5; + * @return {string} + */ +proto.irismod.nft.BaseNFT.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.BaseNFT} returns this + */ +proto.irismod.nft.BaseNFT.prototype.setOwner = 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.irismod.nft.Denom.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.Denom.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.Denom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.Denom.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + schema: jspb.Message.getFieldWithDefault(msg, 3, ""), + 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.irismod.nft.Denom} + */ +proto.irismod.nft.Denom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.Denom; + return proto.irismod.nft.Denom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.Denom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.Denom} + */ +proto.irismod.nft.Denom.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSchema(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.irismod.nft.Denom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.Denom.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.Denom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.Denom.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSchema(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string schema = 3; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getSchema = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setSchema = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string creator = 4; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.nft.IDCollection.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.irismod.nft.IDCollection.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.IDCollection.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.IDCollection} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.IDCollection.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + tokenIdsList: (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.irismod.nft.IDCollection} + */ +proto.irismod.nft.IDCollection.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.IDCollection; + return proto.irismod.nft.IDCollection.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.IDCollection} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.IDCollection} + */ +proto.irismod.nft.IDCollection.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.setDenomId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addTokenIds(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.IDCollection.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.IDCollection.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.IDCollection} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.IDCollection.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTokenIdsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.nft.IDCollection.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.IDCollection} returns this + */ +proto.irismod.nft.IDCollection.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string token_ids = 2; + * @return {!Array} + */ +proto.irismod.nft.IDCollection.prototype.getTokenIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.nft.IDCollection} returns this + */ +proto.irismod.nft.IDCollection.prototype.setTokenIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.nft.IDCollection} returns this + */ +proto.irismod.nft.IDCollection.prototype.addTokenIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.nft.IDCollection} returns this + */ +proto.irismod.nft.IDCollection.prototype.clearTokenIdsList = function() { + return this.setTokenIdsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.nft.Owner.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.irismod.nft.Owner.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.Owner.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.Owner} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.Owner.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + idCollectionsList: jspb.Message.toObjectList(msg.getIdCollectionsList(), + proto.irismod.nft.IDCollection.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.irismod.nft.Owner} + */ +proto.irismod.nft.Owner.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.Owner; + return proto.irismod.nft.Owner.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.Owner} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.Owner} + */ +proto.irismod.nft.Owner.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.irismod.nft.IDCollection; + reader.readMessage(value,proto.irismod.nft.IDCollection.deserializeBinaryFromReader); + msg.addIdCollections(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.Owner.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.Owner.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.Owner} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.Owner.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIdCollectionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.irismod.nft.IDCollection.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.irismod.nft.Owner.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Owner} returns this + */ +proto.irismod.nft.Owner.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated IDCollection id_collections = 2; + * @return {!Array} + */ +proto.irismod.nft.Owner.prototype.getIdCollectionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.nft.IDCollection, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.nft.Owner} returns this +*/ +proto.irismod.nft.Owner.prototype.setIdCollectionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.nft.IDCollection=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.nft.IDCollection} + */ +proto.irismod.nft.Owner.prototype.addIdCollections = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.nft.IDCollection, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.nft.Owner} returns this + */ +proto.irismod.nft.Owner.prototype.clearIdCollectionsList = function() { + return this.setIdCollectionsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.nft.Collection.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.irismod.nft.Collection.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.Collection.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.Collection} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.Collection.toObject = function(includeInstance, msg) { + var f, obj = { + denom: (f = msg.getDenom()) && proto.irismod.nft.Denom.toObject(includeInstance, f), + nftsList: jspb.Message.toObjectList(msg.getNftsList(), + proto.irismod.nft.BaseNFT.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.irismod.nft.Collection} + */ +proto.irismod.nft.Collection.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.Collection; + return proto.irismod.nft.Collection.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.Collection} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.Collection} + */ +proto.irismod.nft.Collection.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.nft.Denom; + reader.readMessage(value,proto.irismod.nft.Denom.deserializeBinaryFromReader); + msg.setDenom(value); + break; + case 2: + var value = new proto.irismod.nft.BaseNFT; + reader.readMessage(value,proto.irismod.nft.BaseNFT.deserializeBinaryFromReader); + msg.addNfts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.Collection.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.Collection.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.Collection} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.Collection.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenom(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.irismod.nft.Denom.serializeBinaryToWriter + ); + } + f = message.getNftsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.irismod.nft.BaseNFT.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Denom denom = 1; + * @return {?proto.irismod.nft.Denom} + */ +proto.irismod.nft.Collection.prototype.getDenom = function() { + return /** @type{?proto.irismod.nft.Denom} */ ( + jspb.Message.getWrapperField(this, proto.irismod.nft.Denom, 1)); +}; + + +/** + * @param {?proto.irismod.nft.Denom|undefined} value + * @return {!proto.irismod.nft.Collection} returns this +*/ +proto.irismod.nft.Collection.prototype.setDenom = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.Collection} returns this + */ +proto.irismod.nft.Collection.prototype.clearDenom = function() { + return this.setDenom(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.Collection.prototype.hasDenom = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated BaseNFT nfts = 2; + * @return {!Array} + */ +proto.irismod.nft.Collection.prototype.getNftsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.nft.BaseNFT, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.nft.Collection} returns this +*/ +proto.irismod.nft.Collection.prototype.setNftsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.nft.BaseNFT=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.nft.BaseNFT} + */ +proto.irismod.nft.Collection.prototype.addNfts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.nft.BaseNFT, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.nft.Collection} returns this + */ +proto.irismod.nft.Collection.prototype.clearNftsList = function() { + return this.setNftsList([]); +}; + + +goog.object.extend(exports, proto.irismod.nft); diff --git a/dist/src/types/proto-types/irismod/nft/query_grpc_web_pb.js b/dist/src/types/proto-types/irismod/nft/query_grpc_web_pb.js new file mode 100644 index 00000000..9d6e6643 --- /dev/null +++ b/dist/src/types/proto-types/irismod/nft/query_grpc_web_pb.js @@ -0,0 +1,561 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.nft + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var irismod_nft_nft_pb = require('../../irismod/nft/nft_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.nft = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.nft.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.nft.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.QuerySupplyRequest, + * !proto.irismod.nft.QuerySupplyResponse>} + */ +const methodDescriptor_Query_Supply = new grpc.web.MethodDescriptor( + '/irismod.nft.Query/Supply', + grpc.web.MethodType.UNARY, + proto.irismod.nft.QuerySupplyRequest, + proto.irismod.nft.QuerySupplyResponse, + /** + * @param {!proto.irismod.nft.QuerySupplyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QuerySupplyResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.QuerySupplyRequest, + * !proto.irismod.nft.QuerySupplyResponse>} + */ +const methodInfo_Query_Supply = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.QuerySupplyResponse, + /** + * @param {!proto.irismod.nft.QuerySupplyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QuerySupplyResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.QuerySupplyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.QuerySupplyResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.QueryClient.prototype.supply = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Query/Supply', + request, + metadata || {}, + methodDescriptor_Query_Supply, + callback); +}; + + +/** + * @param {!proto.irismod.nft.QuerySupplyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.QueryPromiseClient.prototype.supply = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Query/Supply', + request, + metadata || {}, + methodDescriptor_Query_Supply); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.QueryOwnerRequest, + * !proto.irismod.nft.QueryOwnerResponse>} + */ +const methodDescriptor_Query_Owner = new grpc.web.MethodDescriptor( + '/irismod.nft.Query/Owner', + grpc.web.MethodType.UNARY, + proto.irismod.nft.QueryOwnerRequest, + proto.irismod.nft.QueryOwnerResponse, + /** + * @param {!proto.irismod.nft.QueryOwnerRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryOwnerResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.QueryOwnerRequest, + * !proto.irismod.nft.QueryOwnerResponse>} + */ +const methodInfo_Query_Owner = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.QueryOwnerResponse, + /** + * @param {!proto.irismod.nft.QueryOwnerRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryOwnerResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.QueryOwnerRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.QueryOwnerResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.QueryClient.prototype.owner = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Query/Owner', + request, + metadata || {}, + methodDescriptor_Query_Owner, + callback); +}; + + +/** + * @param {!proto.irismod.nft.QueryOwnerRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.QueryPromiseClient.prototype.owner = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Query/Owner', + request, + metadata || {}, + methodDescriptor_Query_Owner); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.QueryCollectionRequest, + * !proto.irismod.nft.QueryCollectionResponse>} + */ +const methodDescriptor_Query_Collection = new grpc.web.MethodDescriptor( + '/irismod.nft.Query/Collection', + grpc.web.MethodType.UNARY, + proto.irismod.nft.QueryCollectionRequest, + proto.irismod.nft.QueryCollectionResponse, + /** + * @param {!proto.irismod.nft.QueryCollectionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryCollectionResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.QueryCollectionRequest, + * !proto.irismod.nft.QueryCollectionResponse>} + */ +const methodInfo_Query_Collection = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.QueryCollectionResponse, + /** + * @param {!proto.irismod.nft.QueryCollectionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryCollectionResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.QueryCollectionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.QueryCollectionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.QueryClient.prototype.collection = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Query/Collection', + request, + metadata || {}, + methodDescriptor_Query_Collection, + callback); +}; + + +/** + * @param {!proto.irismod.nft.QueryCollectionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.QueryPromiseClient.prototype.collection = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Query/Collection', + request, + metadata || {}, + methodDescriptor_Query_Collection); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.QueryDenomRequest, + * !proto.irismod.nft.QueryDenomResponse>} + */ +const methodDescriptor_Query_Denom = new grpc.web.MethodDescriptor( + '/irismod.nft.Query/Denom', + grpc.web.MethodType.UNARY, + proto.irismod.nft.QueryDenomRequest, + proto.irismod.nft.QueryDenomResponse, + /** + * @param {!proto.irismod.nft.QueryDenomRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryDenomResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.QueryDenomRequest, + * !proto.irismod.nft.QueryDenomResponse>} + */ +const methodInfo_Query_Denom = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.QueryDenomResponse, + /** + * @param {!proto.irismod.nft.QueryDenomRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryDenomResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.QueryDenomRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.QueryDenomResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.QueryClient.prototype.denom = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Query/Denom', + request, + metadata || {}, + methodDescriptor_Query_Denom, + callback); +}; + + +/** + * @param {!proto.irismod.nft.QueryDenomRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.QueryPromiseClient.prototype.denom = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Query/Denom', + request, + metadata || {}, + methodDescriptor_Query_Denom); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.QueryDenomsRequest, + * !proto.irismod.nft.QueryDenomsResponse>} + */ +const methodDescriptor_Query_Denoms = new grpc.web.MethodDescriptor( + '/irismod.nft.Query/Denoms', + grpc.web.MethodType.UNARY, + proto.irismod.nft.QueryDenomsRequest, + proto.irismod.nft.QueryDenomsResponse, + /** + * @param {!proto.irismod.nft.QueryDenomsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryDenomsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.QueryDenomsRequest, + * !proto.irismod.nft.QueryDenomsResponse>} + */ +const methodInfo_Query_Denoms = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.QueryDenomsResponse, + /** + * @param {!proto.irismod.nft.QueryDenomsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryDenomsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.QueryDenomsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.QueryDenomsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.QueryClient.prototype.denoms = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Query/Denoms', + request, + metadata || {}, + methodDescriptor_Query_Denoms, + callback); +}; + + +/** + * @param {!proto.irismod.nft.QueryDenomsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.QueryPromiseClient.prototype.denoms = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Query/Denoms', + request, + metadata || {}, + methodDescriptor_Query_Denoms); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.QueryNFTRequest, + * !proto.irismod.nft.QueryNFTResponse>} + */ +const methodDescriptor_Query_NFT = new grpc.web.MethodDescriptor( + '/irismod.nft.Query/NFT', + grpc.web.MethodType.UNARY, + proto.irismod.nft.QueryNFTRequest, + proto.irismod.nft.QueryNFTResponse, + /** + * @param {!proto.irismod.nft.QueryNFTRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryNFTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.QueryNFTRequest, + * !proto.irismod.nft.QueryNFTResponse>} + */ +const methodInfo_Query_NFT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.QueryNFTResponse, + /** + * @param {!proto.irismod.nft.QueryNFTRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryNFTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.QueryNFTRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.QueryNFTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.QueryClient.prototype.nFT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Query/NFT', + request, + metadata || {}, + methodDescriptor_Query_NFT, + callback); +}; + + +/** + * @param {!proto.irismod.nft.QueryNFTRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.QueryPromiseClient.prototype.nFT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Query/NFT', + request, + metadata || {}, + methodDescriptor_Query_NFT); +}; + + +module.exports = proto.irismod.nft; + diff --git a/dist/src/types/proto-types/irismod/nft/query_pb.js b/dist/src/types/proto-types/irismod/nft/query_pb.js new file mode 100644 index 00000000..aa45c68d --- /dev/null +++ b/dist/src/types/proto-types/irismod/nft/query_pb.js @@ -0,0 +1,2020 @@ +// source: irismod/nft/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_api_annotations_pb = require('../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var irismod_nft_nft_pb = require('../../irismod/nft/nft_pb.js'); +goog.object.extend(proto, irismod_nft_nft_pb); +goog.exportSymbol('proto.irismod.nft.QueryCollectionRequest', null, global); +goog.exportSymbol('proto.irismod.nft.QueryCollectionResponse', null, global); +goog.exportSymbol('proto.irismod.nft.QueryDenomRequest', null, global); +goog.exportSymbol('proto.irismod.nft.QueryDenomResponse', null, global); +goog.exportSymbol('proto.irismod.nft.QueryDenomsRequest', null, global); +goog.exportSymbol('proto.irismod.nft.QueryDenomsResponse', null, global); +goog.exportSymbol('proto.irismod.nft.QueryNFTRequest', null, global); +goog.exportSymbol('proto.irismod.nft.QueryNFTResponse', null, global); +goog.exportSymbol('proto.irismod.nft.QueryOwnerRequest', null, global); +goog.exportSymbol('proto.irismod.nft.QueryOwnerResponse', null, global); +goog.exportSymbol('proto.irismod.nft.QuerySupplyRequest', null, global); +goog.exportSymbol('proto.irismod.nft.QuerySupplyResponse', 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.irismod.nft.QuerySupplyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QuerySupplyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QuerySupplyRequest.displayName = 'proto.irismod.nft.QuerySupplyRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QuerySupplyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QuerySupplyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QuerySupplyResponse.displayName = 'proto.irismod.nft.QuerySupplyResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryOwnerRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryOwnerRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryOwnerRequest.displayName = 'proto.irismod.nft.QueryOwnerRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryOwnerResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryOwnerResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryOwnerResponse.displayName = 'proto.irismod.nft.QueryOwnerResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryCollectionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryCollectionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryCollectionRequest.displayName = 'proto.irismod.nft.QueryCollectionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryCollectionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryCollectionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryCollectionResponse.displayName = 'proto.irismod.nft.QueryCollectionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryDenomRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryDenomRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryDenomRequest.displayName = 'proto.irismod.nft.QueryDenomRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryDenomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryDenomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryDenomResponse.displayName = 'proto.irismod.nft.QueryDenomResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryDenomsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryDenomsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryDenomsRequest.displayName = 'proto.irismod.nft.QueryDenomsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryDenomsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.nft.QueryDenomsResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.nft.QueryDenomsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryDenomsResponse.displayName = 'proto.irismod.nft.QueryDenomsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryNFTRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryNFTRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryNFTRequest.displayName = 'proto.irismod.nft.QueryNFTRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryNFTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryNFTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryNFTResponse.displayName = 'proto.irismod.nft.QueryNFTResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.nft.QuerySupplyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QuerySupplyRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QuerySupplyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QuerySupplyRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + owner: 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.irismod.nft.QuerySupplyRequest} + */ +proto.irismod.nft.QuerySupplyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QuerySupplyRequest; + return proto.irismod.nft.QuerySupplyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QuerySupplyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QuerySupplyRequest} + */ +proto.irismod.nft.QuerySupplyRequest.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.setDenomId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QuerySupplyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QuerySupplyRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QuerySupplyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QuerySupplyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.nft.QuerySupplyRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.QuerySupplyRequest} returns this + */ +proto.irismod.nft.QuerySupplyRequest.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string owner = 2; + * @return {string} + */ +proto.irismod.nft.QuerySupplyRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.QuerySupplyRequest} returns this + */ +proto.irismod.nft.QuerySupplyRequest.prototype.setOwner = 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.irismod.nft.QuerySupplyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QuerySupplyResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QuerySupplyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QuerySupplyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + amount: 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.irismod.nft.QuerySupplyResponse} + */ +proto.irismod.nft.QuerySupplyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QuerySupplyResponse; + return proto.irismod.nft.QuerySupplyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QuerySupplyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QuerySupplyResponse} + */ +proto.irismod.nft.QuerySupplyResponse.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.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QuerySupplyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QuerySupplyResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QuerySupplyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QuerySupplyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 amount = 1; + * @return {number} + */ +proto.irismod.nft.QuerySupplyResponse.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.nft.QuerySupplyResponse} returns this + */ +proto.irismod.nft.QuerySupplyResponse.prototype.setAmount = 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.irismod.nft.QueryOwnerRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryOwnerRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryOwnerRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryOwnerRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + owner: 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.irismod.nft.QueryOwnerRequest} + */ +proto.irismod.nft.QueryOwnerRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryOwnerRequest; + return proto.irismod.nft.QueryOwnerRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryOwnerRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryOwnerRequest} + */ +proto.irismod.nft.QueryOwnerRequest.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.setDenomId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryOwnerRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryOwnerRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryOwnerRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryOwnerRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.nft.QueryOwnerRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.QueryOwnerRequest} returns this + */ +proto.irismod.nft.QueryOwnerRequest.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string owner = 2; + * @return {string} + */ +proto.irismod.nft.QueryOwnerRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.QueryOwnerRequest} returns this + */ +proto.irismod.nft.QueryOwnerRequest.prototype.setOwner = 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.irismod.nft.QueryOwnerResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryOwnerResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryOwnerResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryOwnerResponse.toObject = function(includeInstance, msg) { + var f, obj = { + owner: (f = msg.getOwner()) && irismod_nft_nft_pb.Owner.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.irismod.nft.QueryOwnerResponse} + */ +proto.irismod.nft.QueryOwnerResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryOwnerResponse; + return proto.irismod.nft.QueryOwnerResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryOwnerResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryOwnerResponse} + */ +proto.irismod.nft.QueryOwnerResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_nft_nft_pb.Owner; + reader.readMessage(value,irismod_nft_nft_pb.Owner.deserializeBinaryFromReader); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryOwnerResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryOwnerResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryOwnerResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryOwnerResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_nft_nft_pb.Owner.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Owner owner = 1; + * @return {?proto.irismod.nft.Owner} + */ +proto.irismod.nft.QueryOwnerResponse.prototype.getOwner = function() { + return /** @type{?proto.irismod.nft.Owner} */ ( + jspb.Message.getWrapperField(this, irismod_nft_nft_pb.Owner, 1)); +}; + + +/** + * @param {?proto.irismod.nft.Owner|undefined} value + * @return {!proto.irismod.nft.QueryOwnerResponse} returns this +*/ +proto.irismod.nft.QueryOwnerResponse.prototype.setOwner = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryOwnerResponse} returns this + */ +proto.irismod.nft.QueryOwnerResponse.prototype.clearOwner = function() { + return this.setOwner(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryOwnerResponse.prototype.hasOwner = 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.irismod.nft.QueryCollectionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryCollectionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryCollectionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryCollectionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: 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.irismod.nft.QueryCollectionRequest} + */ +proto.irismod.nft.QueryCollectionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryCollectionRequest; + return proto.irismod.nft.QueryCollectionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryCollectionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryCollectionRequest} + */ +proto.irismod.nft.QueryCollectionRequest.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.setDenomId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryCollectionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryCollectionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryCollectionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryCollectionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.nft.QueryCollectionRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.QueryCollectionRequest} returns this + */ +proto.irismod.nft.QueryCollectionRequest.prototype.setDenomId = 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.irismod.nft.QueryCollectionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryCollectionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryCollectionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryCollectionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + collection: (f = msg.getCollection()) && irismod_nft_nft_pb.Collection.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.irismod.nft.QueryCollectionResponse} + */ +proto.irismod.nft.QueryCollectionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryCollectionResponse; + return proto.irismod.nft.QueryCollectionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryCollectionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryCollectionResponse} + */ +proto.irismod.nft.QueryCollectionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_nft_nft_pb.Collection; + reader.readMessage(value,irismod_nft_nft_pb.Collection.deserializeBinaryFromReader); + msg.setCollection(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryCollectionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryCollectionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryCollectionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryCollectionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCollection(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_nft_nft_pb.Collection.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Collection collection = 1; + * @return {?proto.irismod.nft.Collection} + */ +proto.irismod.nft.QueryCollectionResponse.prototype.getCollection = function() { + return /** @type{?proto.irismod.nft.Collection} */ ( + jspb.Message.getWrapperField(this, irismod_nft_nft_pb.Collection, 1)); +}; + + +/** + * @param {?proto.irismod.nft.Collection|undefined} value + * @return {!proto.irismod.nft.QueryCollectionResponse} returns this +*/ +proto.irismod.nft.QueryCollectionResponse.prototype.setCollection = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryCollectionResponse} returns this + */ +proto.irismod.nft.QueryCollectionResponse.prototype.clearCollection = function() { + return this.setCollection(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryCollectionResponse.prototype.hasCollection = 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.irismod.nft.QueryDenomRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryDenomRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryDenomRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryDenomRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: 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.irismod.nft.QueryDenomRequest} + */ +proto.irismod.nft.QueryDenomRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryDenomRequest; + return proto.irismod.nft.QueryDenomRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryDenomRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryDenomRequest} + */ +proto.irismod.nft.QueryDenomRequest.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.setDenomId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryDenomRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryDenomRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryDenomRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryDenomRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.nft.QueryDenomRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.QueryDenomRequest} returns this + */ +proto.irismod.nft.QueryDenomRequest.prototype.setDenomId = 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.irismod.nft.QueryDenomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryDenomResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryDenomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryDenomResponse.toObject = function(includeInstance, msg) { + var f, obj = { + denom: (f = msg.getDenom()) && irismod_nft_nft_pb.Denom.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.irismod.nft.QueryDenomResponse} + */ +proto.irismod.nft.QueryDenomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryDenomResponse; + return proto.irismod.nft.QueryDenomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryDenomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryDenomResponse} + */ +proto.irismod.nft.QueryDenomResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_nft_nft_pb.Denom; + reader.readMessage(value,irismod_nft_nft_pb.Denom.deserializeBinaryFromReader); + msg.setDenom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryDenomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryDenomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryDenomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryDenomResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenom(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_nft_nft_pb.Denom.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Denom denom = 1; + * @return {?proto.irismod.nft.Denom} + */ +proto.irismod.nft.QueryDenomResponse.prototype.getDenom = function() { + return /** @type{?proto.irismod.nft.Denom} */ ( + jspb.Message.getWrapperField(this, irismod_nft_nft_pb.Denom, 1)); +}; + + +/** + * @param {?proto.irismod.nft.Denom|undefined} value + * @return {!proto.irismod.nft.QueryDenomResponse} returns this +*/ +proto.irismod.nft.QueryDenomResponse.prototype.setDenom = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryDenomResponse} returns this + */ +proto.irismod.nft.QueryDenomResponse.prototype.clearDenom = function() { + return this.setDenom(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryDenomResponse.prototype.hasDenom = 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.irismod.nft.QueryDenomsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryDenomsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryDenomsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryDenomsRequest.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.irismod.nft.QueryDenomsRequest} + */ +proto.irismod.nft.QueryDenomsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryDenomsRequest; + return proto.irismod.nft.QueryDenomsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryDenomsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryDenomsRequest} + */ +proto.irismod.nft.QueryDenomsRequest.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.irismod.nft.QueryDenomsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryDenomsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryDenomsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryDenomsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.nft.QueryDenomsResponse.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.irismod.nft.QueryDenomsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryDenomsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryDenomsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryDenomsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + denomsList: jspb.Message.toObjectList(msg.getDenomsList(), + irismod_nft_nft_pb.Denom.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.irismod.nft.QueryDenomsResponse} + */ +proto.irismod.nft.QueryDenomsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryDenomsResponse; + return proto.irismod.nft.QueryDenomsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryDenomsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryDenomsResponse} + */ +proto.irismod.nft.QueryDenomsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_nft_nft_pb.Denom; + reader.readMessage(value,irismod_nft_nft_pb.Denom.deserializeBinaryFromReader); + msg.addDenoms(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryDenomsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryDenomsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryDenomsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryDenomsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_nft_nft_pb.Denom.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Denom denoms = 1; + * @return {!Array} + */ +proto.irismod.nft.QueryDenomsResponse.prototype.getDenomsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_nft_nft_pb.Denom, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.nft.QueryDenomsResponse} returns this +*/ +proto.irismod.nft.QueryDenomsResponse.prototype.setDenomsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.nft.Denom=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.nft.Denom} + */ +proto.irismod.nft.QueryDenomsResponse.prototype.addDenoms = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.nft.Denom, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.nft.QueryDenomsResponse} returns this + */ +proto.irismod.nft.QueryDenomsResponse.prototype.clearDenomsList = function() { + return this.setDenomsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.nft.QueryNFTRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryNFTRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryNFTRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryNFTRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + tokenId: 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.irismod.nft.QueryNFTRequest} + */ +proto.irismod.nft.QueryNFTRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryNFTRequest; + return proto.irismod.nft.QueryNFTRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryNFTRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryNFTRequest} + */ +proto.irismod.nft.QueryNFTRequest.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.setDenomId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setTokenId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryNFTRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryNFTRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryNFTRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryNFTRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTokenId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.nft.QueryNFTRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.QueryNFTRequest} returns this + */ +proto.irismod.nft.QueryNFTRequest.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string token_id = 2; + * @return {string} + */ +proto.irismod.nft.QueryNFTRequest.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.QueryNFTRequest} returns this + */ +proto.irismod.nft.QueryNFTRequest.prototype.setTokenId = 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.irismod.nft.QueryNFTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryNFTResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryNFTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryNFTResponse.toObject = function(includeInstance, msg) { + var f, obj = { + nft: (f = msg.getNft()) && irismod_nft_nft_pb.BaseNFT.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.irismod.nft.QueryNFTResponse} + */ +proto.irismod.nft.QueryNFTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryNFTResponse; + return proto.irismod.nft.QueryNFTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryNFTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryNFTResponse} + */ +proto.irismod.nft.QueryNFTResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_nft_nft_pb.BaseNFT; + reader.readMessage(value,irismod_nft_nft_pb.BaseNFT.deserializeBinaryFromReader); + msg.setNft(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryNFTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryNFTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryNFTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryNFTResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNft(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_nft_nft_pb.BaseNFT.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BaseNFT nft = 1; + * @return {?proto.irismod.nft.BaseNFT} + */ +proto.irismod.nft.QueryNFTResponse.prototype.getNft = function() { + return /** @type{?proto.irismod.nft.BaseNFT} */ ( + jspb.Message.getWrapperField(this, irismod_nft_nft_pb.BaseNFT, 1)); +}; + + +/** + * @param {?proto.irismod.nft.BaseNFT|undefined} value + * @return {!proto.irismod.nft.QueryNFTResponse} returns this +*/ +proto.irismod.nft.QueryNFTResponse.prototype.setNft = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryNFTResponse} returns this + */ +proto.irismod.nft.QueryNFTResponse.prototype.clearNft = function() { + return this.setNft(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryNFTResponse.prototype.hasNft = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.irismod.nft); diff --git a/dist/src/types/proto-types/irismod/nft/tx_grpc_web_pb.js b/dist/src/types/proto-types/irismod/nft/tx_grpc_web_pb.js new file mode 100644 index 00000000..06011161 --- /dev/null +++ b/dist/src/types/proto-types/irismod/nft/tx_grpc_web_pb.js @@ -0,0 +1,477 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.nft + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.nft = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.nft.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.nft.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.MsgIssueDenom, + * !proto.irismod.nft.MsgIssueDenomResponse>} + */ +const methodDescriptor_Msg_IssueDenom = new grpc.web.MethodDescriptor( + '/irismod.nft.Msg/IssueDenom', + grpc.web.MethodType.UNARY, + proto.irismod.nft.MsgIssueDenom, + proto.irismod.nft.MsgIssueDenomResponse, + /** + * @param {!proto.irismod.nft.MsgIssueDenom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgIssueDenomResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.MsgIssueDenom, + * !proto.irismod.nft.MsgIssueDenomResponse>} + */ +const methodInfo_Msg_IssueDenom = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.MsgIssueDenomResponse, + /** + * @param {!proto.irismod.nft.MsgIssueDenom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgIssueDenomResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.MsgIssueDenom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.MsgIssueDenomResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.MsgClient.prototype.issueDenom = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Msg/IssueDenom', + request, + metadata || {}, + methodDescriptor_Msg_IssueDenom, + callback); +}; + + +/** + * @param {!proto.irismod.nft.MsgIssueDenom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.MsgPromiseClient.prototype.issueDenom = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Msg/IssueDenom', + request, + metadata || {}, + methodDescriptor_Msg_IssueDenom); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.MsgMintNFT, + * !proto.irismod.nft.MsgMintNFTResponse>} + */ +const methodDescriptor_Msg_MintNFT = new grpc.web.MethodDescriptor( + '/irismod.nft.Msg/MintNFT', + grpc.web.MethodType.UNARY, + proto.irismod.nft.MsgMintNFT, + proto.irismod.nft.MsgMintNFTResponse, + /** + * @param {!proto.irismod.nft.MsgMintNFT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgMintNFTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.MsgMintNFT, + * !proto.irismod.nft.MsgMintNFTResponse>} + */ +const methodInfo_Msg_MintNFT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.MsgMintNFTResponse, + /** + * @param {!proto.irismod.nft.MsgMintNFT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgMintNFTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.MsgMintNFT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.MsgMintNFTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.MsgClient.prototype.mintNFT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Msg/MintNFT', + request, + metadata || {}, + methodDescriptor_Msg_MintNFT, + callback); +}; + + +/** + * @param {!proto.irismod.nft.MsgMintNFT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.MsgPromiseClient.prototype.mintNFT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Msg/MintNFT', + request, + metadata || {}, + methodDescriptor_Msg_MintNFT); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.MsgEditNFT, + * !proto.irismod.nft.MsgEditNFTResponse>} + */ +const methodDescriptor_Msg_EditNFT = new grpc.web.MethodDescriptor( + '/irismod.nft.Msg/EditNFT', + grpc.web.MethodType.UNARY, + proto.irismod.nft.MsgEditNFT, + proto.irismod.nft.MsgEditNFTResponse, + /** + * @param {!proto.irismod.nft.MsgEditNFT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgEditNFTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.MsgEditNFT, + * !proto.irismod.nft.MsgEditNFTResponse>} + */ +const methodInfo_Msg_EditNFT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.MsgEditNFTResponse, + /** + * @param {!proto.irismod.nft.MsgEditNFT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgEditNFTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.MsgEditNFT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.MsgEditNFTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.MsgClient.prototype.editNFT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Msg/EditNFT', + request, + metadata || {}, + methodDescriptor_Msg_EditNFT, + callback); +}; + + +/** + * @param {!proto.irismod.nft.MsgEditNFT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.MsgPromiseClient.prototype.editNFT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Msg/EditNFT', + request, + metadata || {}, + methodDescriptor_Msg_EditNFT); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.MsgTransferNFT, + * !proto.irismod.nft.MsgTransferNFTResponse>} + */ +const methodDescriptor_Msg_TransferNFT = new grpc.web.MethodDescriptor( + '/irismod.nft.Msg/TransferNFT', + grpc.web.MethodType.UNARY, + proto.irismod.nft.MsgTransferNFT, + proto.irismod.nft.MsgTransferNFTResponse, + /** + * @param {!proto.irismod.nft.MsgTransferNFT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgTransferNFTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.MsgTransferNFT, + * !proto.irismod.nft.MsgTransferNFTResponse>} + */ +const methodInfo_Msg_TransferNFT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.MsgTransferNFTResponse, + /** + * @param {!proto.irismod.nft.MsgTransferNFT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgTransferNFTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.MsgTransferNFT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.MsgTransferNFTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.MsgClient.prototype.transferNFT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Msg/TransferNFT', + request, + metadata || {}, + methodDescriptor_Msg_TransferNFT, + callback); +}; + + +/** + * @param {!proto.irismod.nft.MsgTransferNFT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.MsgPromiseClient.prototype.transferNFT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Msg/TransferNFT', + request, + metadata || {}, + methodDescriptor_Msg_TransferNFT); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.MsgBurnNFT, + * !proto.irismod.nft.MsgBurnNFTResponse>} + */ +const methodDescriptor_Msg_BurnNFT = new grpc.web.MethodDescriptor( + '/irismod.nft.Msg/BurnNFT', + grpc.web.MethodType.UNARY, + proto.irismod.nft.MsgBurnNFT, + proto.irismod.nft.MsgBurnNFTResponse, + /** + * @param {!proto.irismod.nft.MsgBurnNFT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgBurnNFTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.MsgBurnNFT, + * !proto.irismod.nft.MsgBurnNFTResponse>} + */ +const methodInfo_Msg_BurnNFT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.MsgBurnNFTResponse, + /** + * @param {!proto.irismod.nft.MsgBurnNFT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgBurnNFTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.MsgBurnNFT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.MsgBurnNFTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.MsgClient.prototype.burnNFT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Msg/BurnNFT', + request, + metadata || {}, + methodDescriptor_Msg_BurnNFT, + callback); +}; + + +/** + * @param {!proto.irismod.nft.MsgBurnNFT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.MsgPromiseClient.prototype.burnNFT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Msg/BurnNFT', + request, + metadata || {}, + methodDescriptor_Msg_BurnNFT); +}; + + +module.exports = proto.irismod.nft; + diff --git a/dist/src/types/proto-types/irismod/nft/tx_pb.js b/dist/src/types/proto-types/irismod/nft/tx_pb.js new file mode 100644 index 00000000..608d9eac --- /dev/null +++ b/dist/src/types/proto-types/irismod/nft/tx_pb.js @@ -0,0 +1,2052 @@ +// source: irismod/nft/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.irismod.nft.MsgBurnNFT', null, global); +goog.exportSymbol('proto.irismod.nft.MsgBurnNFTResponse', null, global); +goog.exportSymbol('proto.irismod.nft.MsgEditNFT', null, global); +goog.exportSymbol('proto.irismod.nft.MsgEditNFTResponse', null, global); +goog.exportSymbol('proto.irismod.nft.MsgIssueDenom', null, global); +goog.exportSymbol('proto.irismod.nft.MsgIssueDenomResponse', null, global); +goog.exportSymbol('proto.irismod.nft.MsgMintNFT', null, global); +goog.exportSymbol('proto.irismod.nft.MsgMintNFTResponse', null, global); +goog.exportSymbol('proto.irismod.nft.MsgTransferNFT', null, global); +goog.exportSymbol('proto.irismod.nft.MsgTransferNFTResponse', 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.irismod.nft.MsgIssueDenom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgIssueDenom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgIssueDenom.displayName = 'proto.irismod.nft.MsgIssueDenom'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgIssueDenomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgIssueDenomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgIssueDenomResponse.displayName = 'proto.irismod.nft.MsgIssueDenomResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgTransferNFT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgTransferNFT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgTransferNFT.displayName = 'proto.irismod.nft.MsgTransferNFT'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgTransferNFTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgTransferNFTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgTransferNFTResponse.displayName = 'proto.irismod.nft.MsgTransferNFTResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgEditNFT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgEditNFT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgEditNFT.displayName = 'proto.irismod.nft.MsgEditNFT'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgEditNFTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgEditNFTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgEditNFTResponse.displayName = 'proto.irismod.nft.MsgEditNFTResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgMintNFT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgMintNFT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgMintNFT.displayName = 'proto.irismod.nft.MsgMintNFT'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgMintNFTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgMintNFTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgMintNFTResponse.displayName = 'proto.irismod.nft.MsgMintNFTResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgBurnNFT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgBurnNFT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgBurnNFT.displayName = 'proto.irismod.nft.MsgBurnNFT'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgBurnNFTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgBurnNFTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgBurnNFTResponse.displayName = 'proto.irismod.nft.MsgBurnNFTResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.nft.MsgIssueDenom.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgIssueDenom.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgIssueDenom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgIssueDenom.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + schema: jspb.Message.getFieldWithDefault(msg, 3, ""), + 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.irismod.nft.MsgIssueDenom} + */ +proto.irismod.nft.MsgIssueDenom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgIssueDenom; + return proto.irismod.nft.MsgIssueDenom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgIssueDenom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgIssueDenom} + */ +proto.irismod.nft.MsgIssueDenom.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSchema(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.irismod.nft.MsgIssueDenom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgIssueDenom.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgIssueDenom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgIssueDenom.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSchema(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string schema = 3; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getSchema = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setSchema = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string sender = 4; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.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.irismod.nft.MsgIssueDenomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgIssueDenomResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgIssueDenomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgIssueDenomResponse.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.irismod.nft.MsgIssueDenomResponse} + */ +proto.irismod.nft.MsgIssueDenomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgIssueDenomResponse; + return proto.irismod.nft.MsgIssueDenomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgIssueDenomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgIssueDenomResponse} + */ +proto.irismod.nft.MsgIssueDenomResponse.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.irismod.nft.MsgIssueDenomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgIssueDenomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgIssueDenomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgIssueDenomResponse.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.irismod.nft.MsgTransferNFT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgTransferNFT.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgTransferNFT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgTransferNFT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + uri: jspb.Message.getFieldWithDefault(msg, 4, ""), + data: jspb.Message.getFieldWithDefault(msg, 5, ""), + sender: jspb.Message.getFieldWithDefault(msg, 6, ""), + recipient: 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.irismod.nft.MsgTransferNFT} + */ +proto.irismod.nft.MsgTransferNFT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgTransferNFT; + return proto.irismod.nft.MsgTransferNFT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgTransferNFT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgTransferNFT} + */ +proto.irismod.nft.MsgTransferNFT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setUri(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setRecipient(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.MsgTransferNFT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgTransferNFT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgTransferNFT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgTransferNFT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getUri(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getRecipient(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.nft.MsgTransferNFT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferNFT} returns this + */ +proto.irismod.nft.MsgTransferNFT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.nft.MsgTransferNFT.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferNFT} returns this + */ +proto.irismod.nft.MsgTransferNFT.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string name = 3; + * @return {string} + */ +proto.irismod.nft.MsgTransferNFT.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferNFT} returns this + */ +proto.irismod.nft.MsgTransferNFT.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string uri = 4; + * @return {string} + */ +proto.irismod.nft.MsgTransferNFT.prototype.getUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferNFT} returns this + */ +proto.irismod.nft.MsgTransferNFT.prototype.setUri = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string data = 5; + * @return {string} + */ +proto.irismod.nft.MsgTransferNFT.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferNFT} returns this + */ +proto.irismod.nft.MsgTransferNFT.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string sender = 6; + * @return {string} + */ +proto.irismod.nft.MsgTransferNFT.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferNFT} returns this + */ +proto.irismod.nft.MsgTransferNFT.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string recipient = 7; + * @return {string} + */ +proto.irismod.nft.MsgTransferNFT.prototype.getRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferNFT} returns this + */ +proto.irismod.nft.MsgTransferNFT.prototype.setRecipient = 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.irismod.nft.MsgTransferNFTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgTransferNFTResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgTransferNFTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgTransferNFTResponse.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.irismod.nft.MsgTransferNFTResponse} + */ +proto.irismod.nft.MsgTransferNFTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgTransferNFTResponse; + return proto.irismod.nft.MsgTransferNFTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgTransferNFTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgTransferNFTResponse} + */ +proto.irismod.nft.MsgTransferNFTResponse.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.irismod.nft.MsgTransferNFTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgTransferNFTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgTransferNFTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgTransferNFTResponse.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.irismod.nft.MsgEditNFT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgEditNFT.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgEditNFT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgEditNFT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + uri: jspb.Message.getFieldWithDefault(msg, 4, ""), + data: jspb.Message.getFieldWithDefault(msg, 5, ""), + sender: 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.irismod.nft.MsgEditNFT} + */ +proto.irismod.nft.MsgEditNFT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgEditNFT; + return proto.irismod.nft.MsgEditNFT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgEditNFT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgEditNFT} + */ +proto.irismod.nft.MsgEditNFT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setUri(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 6: + 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.irismod.nft.MsgEditNFT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgEditNFT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgEditNFT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgEditNFT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getUri(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.nft.MsgEditNFT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgEditNFT} returns this + */ +proto.irismod.nft.MsgEditNFT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.nft.MsgEditNFT.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgEditNFT} returns this + */ +proto.irismod.nft.MsgEditNFT.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string name = 3; + * @return {string} + */ +proto.irismod.nft.MsgEditNFT.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgEditNFT} returns this + */ +proto.irismod.nft.MsgEditNFT.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string uri = 4; + * @return {string} + */ +proto.irismod.nft.MsgEditNFT.prototype.getUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgEditNFT} returns this + */ +proto.irismod.nft.MsgEditNFT.prototype.setUri = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string data = 5; + * @return {string} + */ +proto.irismod.nft.MsgEditNFT.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgEditNFT} returns this + */ +proto.irismod.nft.MsgEditNFT.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string sender = 6; + * @return {string} + */ +proto.irismod.nft.MsgEditNFT.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgEditNFT} returns this + */ +proto.irismod.nft.MsgEditNFT.prototype.setSender = 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.irismod.nft.MsgEditNFTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgEditNFTResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgEditNFTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgEditNFTResponse.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.irismod.nft.MsgEditNFTResponse} + */ +proto.irismod.nft.MsgEditNFTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgEditNFTResponse; + return proto.irismod.nft.MsgEditNFTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgEditNFTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgEditNFTResponse} + */ +proto.irismod.nft.MsgEditNFTResponse.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.irismod.nft.MsgEditNFTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgEditNFTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgEditNFTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgEditNFTResponse.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.irismod.nft.MsgMintNFT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgMintNFT.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgMintNFT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgMintNFT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + uri: jspb.Message.getFieldWithDefault(msg, 4, ""), + data: jspb.Message.getFieldWithDefault(msg, 5, ""), + sender: jspb.Message.getFieldWithDefault(msg, 6, ""), + recipient: 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.irismod.nft.MsgMintNFT} + */ +proto.irismod.nft.MsgMintNFT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgMintNFT; + return proto.irismod.nft.MsgMintNFT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgMintNFT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgMintNFT} + */ +proto.irismod.nft.MsgMintNFT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setUri(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setRecipient(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.MsgMintNFT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgMintNFT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgMintNFT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgMintNFT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getUri(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getRecipient(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.nft.MsgMintNFT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgMintNFT} returns this + */ +proto.irismod.nft.MsgMintNFT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.nft.MsgMintNFT.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgMintNFT} returns this + */ +proto.irismod.nft.MsgMintNFT.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string name = 3; + * @return {string} + */ +proto.irismod.nft.MsgMintNFT.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgMintNFT} returns this + */ +proto.irismod.nft.MsgMintNFT.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string uri = 4; + * @return {string} + */ +proto.irismod.nft.MsgMintNFT.prototype.getUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgMintNFT} returns this + */ +proto.irismod.nft.MsgMintNFT.prototype.setUri = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string data = 5; + * @return {string} + */ +proto.irismod.nft.MsgMintNFT.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgMintNFT} returns this + */ +proto.irismod.nft.MsgMintNFT.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string sender = 6; + * @return {string} + */ +proto.irismod.nft.MsgMintNFT.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgMintNFT} returns this + */ +proto.irismod.nft.MsgMintNFT.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string recipient = 7; + * @return {string} + */ +proto.irismod.nft.MsgMintNFT.prototype.getRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgMintNFT} returns this + */ +proto.irismod.nft.MsgMintNFT.prototype.setRecipient = 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.irismod.nft.MsgMintNFTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgMintNFTResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgMintNFTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgMintNFTResponse.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.irismod.nft.MsgMintNFTResponse} + */ +proto.irismod.nft.MsgMintNFTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgMintNFTResponse; + return proto.irismod.nft.MsgMintNFTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgMintNFTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgMintNFTResponse} + */ +proto.irismod.nft.MsgMintNFTResponse.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.irismod.nft.MsgMintNFTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgMintNFTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgMintNFTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgMintNFTResponse.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.irismod.nft.MsgBurnNFT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgBurnNFT.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgBurnNFT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgBurnNFT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + 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.irismod.nft.MsgBurnNFT} + */ +proto.irismod.nft.MsgBurnNFT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgBurnNFT; + return proto.irismod.nft.MsgBurnNFT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgBurnNFT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgBurnNFT} + */ +proto.irismod.nft.MsgBurnNFT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(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.irismod.nft.MsgBurnNFT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgBurnNFT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgBurnNFT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgBurnNFT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.nft.MsgBurnNFT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgBurnNFT} returns this + */ +proto.irismod.nft.MsgBurnNFT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.nft.MsgBurnNFT.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgBurnNFT} returns this + */ +proto.irismod.nft.MsgBurnNFT.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string sender = 3; + * @return {string} + */ +proto.irismod.nft.MsgBurnNFT.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgBurnNFT} returns this + */ +proto.irismod.nft.MsgBurnNFT.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.irismod.nft.MsgBurnNFTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgBurnNFTResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgBurnNFTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgBurnNFTResponse.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.irismod.nft.MsgBurnNFTResponse} + */ +proto.irismod.nft.MsgBurnNFTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgBurnNFTResponse; + return proto.irismod.nft.MsgBurnNFTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgBurnNFTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgBurnNFTResponse} + */ +proto.irismod.nft.MsgBurnNFTResponse.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.irismod.nft.MsgBurnNFTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgBurnNFTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgBurnNFTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgBurnNFTResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.irismod.nft); diff --git a/dist/src/types/proto-types/irismod/oracle/genesis_pb.js b/dist/src/types/proto-types/irismod/oracle/genesis_pb.js new file mode 100644 index 00000000..aee063b6 --- /dev/null +++ b/dist/src/types/proto-types/irismod/oracle/genesis_pb.js @@ -0,0 +1,466 @@ +// source: irismod/oracle/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var irismod_oracle_oracle_pb = require('../../irismod/oracle/oracle_pb.js'); +goog.object.extend(proto, irismod_oracle_oracle_pb); +var irismod_service_service_pb = require('../../irismod/service/service_pb.js'); +goog.object.extend(proto, irismod_service_service_pb); +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.irismod.oracle.FeedEntry', null, global); +goog.exportSymbol('proto.irismod.oracle.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.irismod.oracle.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.oracle.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.irismod.oracle.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.GenesisState.displayName = 'proto.irismod.oracle.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.irismod.oracle.FeedEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.oracle.FeedEntry.repeatedFields_, null); +}; +goog.inherits(proto.irismod.oracle.FeedEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.FeedEntry.displayName = 'proto.irismod.oracle.FeedEntry'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.oracle.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.irismod.oracle.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.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.irismod.oracle.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.irismod.oracle.FeedEntry.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.irismod.oracle.GenesisState} + */ +proto.irismod.oracle.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.GenesisState; + return proto.irismod.oracle.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.GenesisState} + */ +proto.irismod.oracle.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.oracle.FeedEntry; + reader.readMessage(value,proto.irismod.oracle.FeedEntry.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.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.irismod.oracle.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.irismod.oracle.FeedEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated FeedEntry entries = 1; + * @return {!Array} + */ +proto.irismod.oracle.GenesisState.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.oracle.FeedEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.GenesisState} returns this +*/ +proto.irismod.oracle.GenesisState.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.oracle.FeedEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.oracle.FeedEntry} + */ +proto.irismod.oracle.GenesisState.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.oracle.FeedEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.oracle.GenesisState} returns this + */ +proto.irismod.oracle.GenesisState.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.oracle.FeedEntry.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.irismod.oracle.FeedEntry.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.FeedEntry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.FeedEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.FeedEntry.toObject = function(includeInstance, msg) { + var f, obj = { + feed: (f = msg.getFeed()) && irismod_oracle_oracle_pb.Feed.toObject(includeInstance, f), + state: jspb.Message.getFieldWithDefault(msg, 2, 0), + valuesList: jspb.Message.toObjectList(msg.getValuesList(), + irismod_oracle_oracle_pb.FeedValue.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.irismod.oracle.FeedEntry} + */ +proto.irismod.oracle.FeedEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.FeedEntry; + return proto.irismod.oracle.FeedEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.FeedEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.FeedEntry} + */ +proto.irismod.oracle.FeedEntry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_oracle_oracle_pb.Feed; + reader.readMessage(value,irismod_oracle_oracle_pb.Feed.deserializeBinaryFromReader); + msg.setFeed(value); + break; + case 2: + var value = /** @type {!proto.irismod.service.RequestContextState} */ (reader.readEnum()); + msg.setState(value); + break; + case 3: + var value = new irismod_oracle_oracle_pb.FeedValue; + reader.readMessage(value,irismod_oracle_oracle_pb.FeedValue.deserializeBinaryFromReader); + msg.addValues(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.FeedEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.FeedEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.FeedEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.FeedEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeed(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_oracle_oracle_pb.Feed.serializeBinaryToWriter + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getValuesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + irismod_oracle_oracle_pb.FeedValue.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Feed feed = 1; + * @return {?proto.irismod.oracle.Feed} + */ +proto.irismod.oracle.FeedEntry.prototype.getFeed = function() { + return /** @type{?proto.irismod.oracle.Feed} */ ( + jspb.Message.getWrapperField(this, irismod_oracle_oracle_pb.Feed, 1)); +}; + + +/** + * @param {?proto.irismod.oracle.Feed|undefined} value + * @return {!proto.irismod.oracle.FeedEntry} returns this +*/ +proto.irismod.oracle.FeedEntry.prototype.setFeed = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.oracle.FeedEntry} returns this + */ +proto.irismod.oracle.FeedEntry.prototype.clearFeed = function() { + return this.setFeed(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.oracle.FeedEntry.prototype.hasFeed = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional irismod.service.RequestContextState state = 2; + * @return {!proto.irismod.service.RequestContextState} + */ +proto.irismod.oracle.FeedEntry.prototype.getState = function() { + return /** @type {!proto.irismod.service.RequestContextState} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.irismod.service.RequestContextState} value + * @return {!proto.irismod.oracle.FeedEntry} returns this + */ +proto.irismod.oracle.FeedEntry.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * repeated FeedValue values = 3; + * @return {!Array} + */ +proto.irismod.oracle.FeedEntry.prototype.getValuesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_oracle_oracle_pb.FeedValue, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.FeedEntry} returns this +*/ +proto.irismod.oracle.FeedEntry.prototype.setValuesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.irismod.oracle.FeedValue=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.oracle.FeedValue} + */ +proto.irismod.oracle.FeedEntry.prototype.addValues = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.irismod.oracle.FeedValue, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.oracle.FeedEntry} returns this + */ +proto.irismod.oracle.FeedEntry.prototype.clearValuesList = function() { + return this.setValuesList([]); +}; + + +goog.object.extend(exports, proto.irismod.oracle); diff --git a/dist/src/types/proto-types/irismod/oracle/oracle_pb.js b/dist/src/types/proto-types/irismod/oracle/oracle_pb.js new file mode 100644 index 00000000..6a469481 --- /dev/null +++ b/dist/src/types/proto-types/irismod/oracle/oracle_pb.js @@ -0,0 +1,554 @@ +// source: irismod/oracle/oracle.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.irismod.oracle.Feed', null, global); +goog.exportSymbol('proto.irismod.oracle.FeedValue', 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.irismod.oracle.Feed = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.Feed, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.Feed.displayName = 'proto.irismod.oracle.Feed'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.FeedValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.FeedValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.FeedValue.displayName = 'proto.irismod.oracle.FeedValue'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.oracle.Feed.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.Feed.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.Feed} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.Feed.toObject = function(includeInstance, msg) { + var f, obj = { + feedName: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + aggregateFunc: jspb.Message.getFieldWithDefault(msg, 3, ""), + valueJsonPath: jspb.Message.getFieldWithDefault(msg, 4, ""), + latestHistory: jspb.Message.getFieldWithDefault(msg, 5, 0), + requestContextId: jspb.Message.getFieldWithDefault(msg, 6, ""), + creator: 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.irismod.oracle.Feed} + */ +proto.irismod.oracle.Feed.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.Feed; + return proto.irismod.oracle.Feed.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.Feed} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.Feed} + */ +proto.irismod.oracle.Feed.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.setFeedName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAggregateFunc(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setValueJsonPath(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLatestHistory(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setRequestContextId(value); + break; + case 7: + 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.irismod.oracle.Feed.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.Feed.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.Feed} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.Feed.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAggregateFunc(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getValueJsonPath(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getLatestHistory(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string feed_name = 1; + * @return {string} + */ +proto.irismod.oracle.Feed.prototype.getFeedName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.Feed} returns this + */ +proto.irismod.oracle.Feed.prototype.setFeedName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.irismod.oracle.Feed.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.Feed} returns this + */ +proto.irismod.oracle.Feed.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string aggregate_func = 3; + * @return {string} + */ +proto.irismod.oracle.Feed.prototype.getAggregateFunc = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.Feed} returns this + */ +proto.irismod.oracle.Feed.prototype.setAggregateFunc = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string value_json_path = 4; + * @return {string} + */ +proto.irismod.oracle.Feed.prototype.getValueJsonPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.Feed} returns this + */ +proto.irismod.oracle.Feed.prototype.setValueJsonPath = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional uint64 latest_history = 5; + * @return {number} + */ +proto.irismod.oracle.Feed.prototype.getLatestHistory = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.Feed} returns this + */ +proto.irismod.oracle.Feed.prototype.setLatestHistory = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string request_context_id = 6; + * @return {string} + */ +proto.irismod.oracle.Feed.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.Feed} returns this + */ +proto.irismod.oracle.Feed.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string creator = 7; + * @return {string} + */ +proto.irismod.oracle.Feed.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.Feed} returns this + */ +proto.irismod.oracle.Feed.prototype.setCreator = 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.irismod.oracle.FeedValue.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.FeedValue.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.FeedValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.FeedValue.toObject = function(includeInstance, msg) { + var f, obj = { + data: jspb.Message.getFieldWithDefault(msg, 1, ""), + timestamp: (f = msg.getTimestamp()) && 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.irismod.oracle.FeedValue} + */ +proto.irismod.oracle.FeedValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.FeedValue; + return proto.irismod.oracle.FeedValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.FeedValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.FeedValue} + */ +proto.irismod.oracle.FeedValue.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.setData(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.FeedValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.FeedValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.FeedValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.FeedValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string data = 1; + * @return {string} + */ +proto.irismod.oracle.FeedValue.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.FeedValue} returns this + */ +proto.irismod.oracle.FeedValue.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.irismod.oracle.FeedValue.prototype.getTimestamp = 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.irismod.oracle.FeedValue} returns this +*/ +proto.irismod.oracle.FeedValue.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.oracle.FeedValue} returns this + */ +proto.irismod.oracle.FeedValue.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.oracle.FeedValue.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.irismod.oracle); diff --git a/dist/src/types/proto-types/irismod/oracle/query_grpc_web_pb.js b/dist/src/types/proto-types/irismod/oracle/query_grpc_web_pb.js new file mode 100644 index 00000000..3b1b58b5 --- /dev/null +++ b/dist/src/types/proto-types/irismod/oracle/query_grpc_web_pb.js @@ -0,0 +1,325 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.oracle + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var irismod_oracle_oracle_pb = require('../../irismod/oracle/oracle_pb.js') + +var irismod_service_service_pb = require('../../irismod/service/service_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.oracle = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.oracle.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.oracle.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.oracle.QueryFeedRequest, + * !proto.irismod.oracle.QueryFeedResponse>} + */ +const methodDescriptor_Query_Feed = new grpc.web.MethodDescriptor( + '/irismod.oracle.Query/Feed', + grpc.web.MethodType.UNARY, + proto.irismod.oracle.QueryFeedRequest, + proto.irismod.oracle.QueryFeedResponse, + /** + * @param {!proto.irismod.oracle.QueryFeedRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.QueryFeedResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.oracle.QueryFeedRequest, + * !proto.irismod.oracle.QueryFeedResponse>} + */ +const methodInfo_Query_Feed = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.oracle.QueryFeedResponse, + /** + * @param {!proto.irismod.oracle.QueryFeedRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.QueryFeedResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.oracle.QueryFeedRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.oracle.QueryFeedResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.oracle.QueryClient.prototype.feed = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.oracle.Query/Feed', + request, + metadata || {}, + methodDescriptor_Query_Feed, + callback); +}; + + +/** + * @param {!proto.irismod.oracle.QueryFeedRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.oracle.QueryPromiseClient.prototype.feed = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.oracle.Query/Feed', + request, + metadata || {}, + methodDescriptor_Query_Feed); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.oracle.QueryFeedsRequest, + * !proto.irismod.oracle.QueryFeedsResponse>} + */ +const methodDescriptor_Query_Feeds = new grpc.web.MethodDescriptor( + '/irismod.oracle.Query/Feeds', + grpc.web.MethodType.UNARY, + proto.irismod.oracle.QueryFeedsRequest, + proto.irismod.oracle.QueryFeedsResponse, + /** + * @param {!proto.irismod.oracle.QueryFeedsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.QueryFeedsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.oracle.QueryFeedsRequest, + * !proto.irismod.oracle.QueryFeedsResponse>} + */ +const methodInfo_Query_Feeds = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.oracle.QueryFeedsResponse, + /** + * @param {!proto.irismod.oracle.QueryFeedsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.QueryFeedsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.oracle.QueryFeedsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.oracle.QueryFeedsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.oracle.QueryClient.prototype.feeds = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.oracle.Query/Feeds', + request, + metadata || {}, + methodDescriptor_Query_Feeds, + callback); +}; + + +/** + * @param {!proto.irismod.oracle.QueryFeedsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.oracle.QueryPromiseClient.prototype.feeds = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.oracle.Query/Feeds', + request, + metadata || {}, + methodDescriptor_Query_Feeds); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.oracle.QueryFeedValueRequest, + * !proto.irismod.oracle.QueryFeedValueResponse>} + */ +const methodDescriptor_Query_FeedValue = new grpc.web.MethodDescriptor( + '/irismod.oracle.Query/FeedValue', + grpc.web.MethodType.UNARY, + proto.irismod.oracle.QueryFeedValueRequest, + proto.irismod.oracle.QueryFeedValueResponse, + /** + * @param {!proto.irismod.oracle.QueryFeedValueRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.QueryFeedValueResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.oracle.QueryFeedValueRequest, + * !proto.irismod.oracle.QueryFeedValueResponse>} + */ +const methodInfo_Query_FeedValue = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.oracle.QueryFeedValueResponse, + /** + * @param {!proto.irismod.oracle.QueryFeedValueRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.QueryFeedValueResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.oracle.QueryFeedValueRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.oracle.QueryFeedValueResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.oracle.QueryClient.prototype.feedValue = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.oracle.Query/FeedValue', + request, + metadata || {}, + methodDescriptor_Query_FeedValue, + callback); +}; + + +/** + * @param {!proto.irismod.oracle.QueryFeedValueRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.oracle.QueryPromiseClient.prototype.feedValue = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.oracle.Query/FeedValue', + request, + metadata || {}, + methodDescriptor_Query_FeedValue); +}; + + +module.exports = proto.irismod.oracle; + diff --git a/dist/src/types/proto-types/irismod/oracle/query_pb.js b/dist/src/types/proto-types/irismod/oracle/query_pb.js new file mode 100644 index 00000000..45b15ee6 --- /dev/null +++ b/dist/src/types/proto-types/irismod/oracle/query_pb.js @@ -0,0 +1,1480 @@ +// source: irismod/oracle/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var irismod_oracle_oracle_pb = require('../../irismod/oracle/oracle_pb.js'); +goog.object.extend(proto, irismod_oracle_oracle_pb); +var irismod_service_service_pb = require('../../irismod/service/service_pb.js'); +goog.object.extend(proto, irismod_service_service_pb); +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); +goog.exportSymbol('proto.irismod.oracle.FeedContext', null, global); +goog.exportSymbol('proto.irismod.oracle.QueryFeedRequest', null, global); +goog.exportSymbol('proto.irismod.oracle.QueryFeedResponse', null, global); +goog.exportSymbol('proto.irismod.oracle.QueryFeedValueRequest', null, global); +goog.exportSymbol('proto.irismod.oracle.QueryFeedValueResponse', null, global); +goog.exportSymbol('proto.irismod.oracle.QueryFeedsRequest', null, global); +goog.exportSymbol('proto.irismod.oracle.QueryFeedsResponse', 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.irismod.oracle.QueryFeedRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.QueryFeedRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.QueryFeedRequest.displayName = 'proto.irismod.oracle.QueryFeedRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.QueryFeedResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.QueryFeedResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.QueryFeedResponse.displayName = 'proto.irismod.oracle.QueryFeedResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.QueryFeedsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.QueryFeedsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.QueryFeedsRequest.displayName = 'proto.irismod.oracle.QueryFeedsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.QueryFeedsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.oracle.QueryFeedsResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.oracle.QueryFeedsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.QueryFeedsResponse.displayName = 'proto.irismod.oracle.QueryFeedsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.QueryFeedValueRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.QueryFeedValueRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.QueryFeedValueRequest.displayName = 'proto.irismod.oracle.QueryFeedValueRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.QueryFeedValueResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.oracle.QueryFeedValueResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.oracle.QueryFeedValueResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.QueryFeedValueResponse.displayName = 'proto.irismod.oracle.QueryFeedValueResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.FeedContext = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.oracle.FeedContext.repeatedFields_, null); +}; +goog.inherits(proto.irismod.oracle.FeedContext, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.FeedContext.displayName = 'proto.irismod.oracle.FeedContext'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.oracle.QueryFeedRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.QueryFeedRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.QueryFeedRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedRequest.toObject = function(includeInstance, msg) { + var f, obj = { + feedName: 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.irismod.oracle.QueryFeedRequest} + */ +proto.irismod.oracle.QueryFeedRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.QueryFeedRequest; + return proto.irismod.oracle.QueryFeedRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.QueryFeedRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.QueryFeedRequest} + */ +proto.irismod.oracle.QueryFeedRequest.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.setFeedName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.QueryFeedRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.QueryFeedRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.QueryFeedRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string feed_name = 1; + * @return {string} + */ +proto.irismod.oracle.QueryFeedRequest.prototype.getFeedName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.QueryFeedRequest} returns this + */ +proto.irismod.oracle.QueryFeedRequest.prototype.setFeedName = 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.irismod.oracle.QueryFeedResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.QueryFeedResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.QueryFeedResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedResponse.toObject = function(includeInstance, msg) { + var f, obj = { + feed: (f = msg.getFeed()) && proto.irismod.oracle.FeedContext.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.irismod.oracle.QueryFeedResponse} + */ +proto.irismod.oracle.QueryFeedResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.QueryFeedResponse; + return proto.irismod.oracle.QueryFeedResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.QueryFeedResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.QueryFeedResponse} + */ +proto.irismod.oracle.QueryFeedResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.oracle.FeedContext; + reader.readMessage(value,proto.irismod.oracle.FeedContext.deserializeBinaryFromReader); + msg.setFeed(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.QueryFeedResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.QueryFeedResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.QueryFeedResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeed(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.irismod.oracle.FeedContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional FeedContext feed = 1; + * @return {?proto.irismod.oracle.FeedContext} + */ +proto.irismod.oracle.QueryFeedResponse.prototype.getFeed = function() { + return /** @type{?proto.irismod.oracle.FeedContext} */ ( + jspb.Message.getWrapperField(this, proto.irismod.oracle.FeedContext, 1)); +}; + + +/** + * @param {?proto.irismod.oracle.FeedContext|undefined} value + * @return {!proto.irismod.oracle.QueryFeedResponse} returns this +*/ +proto.irismod.oracle.QueryFeedResponse.prototype.setFeed = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.oracle.QueryFeedResponse} returns this + */ +proto.irismod.oracle.QueryFeedResponse.prototype.clearFeed = function() { + return this.setFeed(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.oracle.QueryFeedResponse.prototype.hasFeed = 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.irismod.oracle.QueryFeedsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.QueryFeedsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.QueryFeedsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + state: 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.irismod.oracle.QueryFeedsRequest} + */ +proto.irismod.oracle.QueryFeedsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.QueryFeedsRequest; + return proto.irismod.oracle.QueryFeedsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.QueryFeedsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.QueryFeedsRequest} + */ +proto.irismod.oracle.QueryFeedsRequest.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.setState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.QueryFeedsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.QueryFeedsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.QueryFeedsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getState(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string state = 1; + * @return {string} + */ +proto.irismod.oracle.QueryFeedsRequest.prototype.getState = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.QueryFeedsRequest} returns this + */ +proto.irismod.oracle.QueryFeedsRequest.prototype.setState = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.oracle.QueryFeedsResponse.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.irismod.oracle.QueryFeedsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.QueryFeedsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.QueryFeedsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + feedsList: jspb.Message.toObjectList(msg.getFeedsList(), + proto.irismod.oracle.FeedContext.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.irismod.oracle.QueryFeedsResponse} + */ +proto.irismod.oracle.QueryFeedsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.QueryFeedsResponse; + return proto.irismod.oracle.QueryFeedsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.QueryFeedsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.QueryFeedsResponse} + */ +proto.irismod.oracle.QueryFeedsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.oracle.FeedContext; + reader.readMessage(value,proto.irismod.oracle.FeedContext.deserializeBinaryFromReader); + msg.addFeeds(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.QueryFeedsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.QueryFeedsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.QueryFeedsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.irismod.oracle.FeedContext.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated FeedContext feeds = 1; + * @return {!Array} + */ +proto.irismod.oracle.QueryFeedsResponse.prototype.getFeedsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.oracle.FeedContext, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.QueryFeedsResponse} returns this +*/ +proto.irismod.oracle.QueryFeedsResponse.prototype.setFeedsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.oracle.FeedContext=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.oracle.FeedContext} + */ +proto.irismod.oracle.QueryFeedsResponse.prototype.addFeeds = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.oracle.FeedContext, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.oracle.QueryFeedsResponse} returns this + */ +proto.irismod.oracle.QueryFeedsResponse.prototype.clearFeedsList = function() { + return this.setFeedsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.oracle.QueryFeedValueRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.QueryFeedValueRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.QueryFeedValueRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedValueRequest.toObject = function(includeInstance, msg) { + var f, obj = { + feedName: 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.irismod.oracle.QueryFeedValueRequest} + */ +proto.irismod.oracle.QueryFeedValueRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.QueryFeedValueRequest; + return proto.irismod.oracle.QueryFeedValueRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.QueryFeedValueRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.QueryFeedValueRequest} + */ +proto.irismod.oracle.QueryFeedValueRequest.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.setFeedName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.QueryFeedValueRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.QueryFeedValueRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.QueryFeedValueRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedValueRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string feed_name = 1; + * @return {string} + */ +proto.irismod.oracle.QueryFeedValueRequest.prototype.getFeedName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.QueryFeedValueRequest} returns this + */ +proto.irismod.oracle.QueryFeedValueRequest.prototype.setFeedName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.oracle.QueryFeedValueResponse.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.irismod.oracle.QueryFeedValueResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.QueryFeedValueResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.QueryFeedValueResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedValueResponse.toObject = function(includeInstance, msg) { + var f, obj = { + feedValuesList: jspb.Message.toObjectList(msg.getFeedValuesList(), + irismod_oracle_oracle_pb.FeedValue.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.irismod.oracle.QueryFeedValueResponse} + */ +proto.irismod.oracle.QueryFeedValueResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.QueryFeedValueResponse; + return proto.irismod.oracle.QueryFeedValueResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.QueryFeedValueResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.QueryFeedValueResponse} + */ +proto.irismod.oracle.QueryFeedValueResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_oracle_oracle_pb.FeedValue; + reader.readMessage(value,irismod_oracle_oracle_pb.FeedValue.deserializeBinaryFromReader); + msg.addFeedValues(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.QueryFeedValueResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.QueryFeedValueResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.QueryFeedValueResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedValueResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedValuesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_oracle_oracle_pb.FeedValue.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated FeedValue feed_values = 1; + * @return {!Array} + */ +proto.irismod.oracle.QueryFeedValueResponse.prototype.getFeedValuesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_oracle_oracle_pb.FeedValue, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.QueryFeedValueResponse} returns this +*/ +proto.irismod.oracle.QueryFeedValueResponse.prototype.setFeedValuesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.oracle.FeedValue=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.oracle.FeedValue} + */ +proto.irismod.oracle.QueryFeedValueResponse.prototype.addFeedValues = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.oracle.FeedValue, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.oracle.QueryFeedValueResponse} returns this + */ +proto.irismod.oracle.QueryFeedValueResponse.prototype.clearFeedValuesList = function() { + return this.setFeedValuesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.oracle.FeedContext.repeatedFields_ = [3,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.irismod.oracle.FeedContext.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.FeedContext.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.FeedContext} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.FeedContext.toObject = function(includeInstance, msg) { + var f, obj = { + feed: (f = msg.getFeed()) && irismod_oracle_oracle_pb.Feed.toObject(includeInstance, f), + serviceName: jspb.Message.getFieldWithDefault(msg, 2, ""), + providersList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + input: jspb.Message.getFieldWithDefault(msg, 4, ""), + timeout: jspb.Message.getFieldWithDefault(msg, 5, 0), + serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 7, 0), + responseThreshold: jspb.Message.getFieldWithDefault(msg, 8, 0), + state: 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.irismod.oracle.FeedContext} + */ +proto.irismod.oracle.FeedContext.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.FeedContext; + return proto.irismod.oracle.FeedContext.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.FeedContext} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.FeedContext} + */ +proto.irismod.oracle.FeedContext.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_oracle_oracle_pb.Feed; + reader.readMessage(value,irismod_oracle_oracle_pb.Feed.deserializeBinaryFromReader); + msg.setFeed(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setServiceName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addProviders(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInput(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeout(value); + break; + case 6: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFeeCap(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRepeatedFrequency(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setResponseThreshold(value); + break; + case 9: + var value = /** @type {!proto.irismod.service.RequestContextState} */ (reader.readEnum()); + msg.setState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.FeedContext.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.FeedContext.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.FeedContext} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.FeedContext.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeed(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_oracle_oracle_pb.Feed.serializeBinaryToWriter + ); + } + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getProvidersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getInput(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getTimeout(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getServiceFeeCapList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRepeatedFrequency(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getResponseThreshold(); + if (f !== 0) { + writer.writeUint32( + 8, + f + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 9, + f + ); + } +}; + + +/** + * optional Feed feed = 1; + * @return {?proto.irismod.oracle.Feed} + */ +proto.irismod.oracle.FeedContext.prototype.getFeed = function() { + return /** @type{?proto.irismod.oracle.Feed} */ ( + jspb.Message.getWrapperField(this, irismod_oracle_oracle_pb.Feed, 1)); +}; + + +/** + * @param {?proto.irismod.oracle.Feed|undefined} value + * @return {!proto.irismod.oracle.FeedContext} returns this +*/ +proto.irismod.oracle.FeedContext.prototype.setFeed = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.clearFeed = function() { + return this.setFeed(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.oracle.FeedContext.prototype.hasFeed = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string service_name = 2; + * @return {string} + */ +proto.irismod.oracle.FeedContext.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated string providers = 3; + * @return {!Array} + */ +proto.irismod.oracle.FeedContext.prototype.getProvidersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.setProvidersList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.addProviders = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.clearProvidersList = function() { + return this.setProvidersList([]); +}; + + +/** + * optional string input = 4; + * @return {string} + */ +proto.irismod.oracle.FeedContext.prototype.getInput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.setInput = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 timeout = 5; + * @return {number} + */ +proto.irismod.oracle.FeedContext.prototype.getTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.setTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee_cap = 6; + * @return {!Array} + */ +proto.irismod.oracle.FeedContext.prototype.getServiceFeeCapList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.FeedContext} returns this +*/ +proto.irismod.oracle.FeedContext.prototype.setServiceFeeCapList = 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.irismod.oracle.FeedContext.prototype.addServiceFeeCap = 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.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.clearServiceFeeCapList = function() { + return this.setServiceFeeCapList([]); +}; + + +/** + * optional uint64 repeated_frequency = 7; + * @return {number} + */ +proto.irismod.oracle.FeedContext.prototype.getRepeatedFrequency = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.setRepeatedFrequency = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional uint32 response_threshold = 8; + * @return {number} + */ +proto.irismod.oracle.FeedContext.prototype.getResponseThreshold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.setResponseThreshold = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional irismod.service.RequestContextState state = 9; + * @return {!proto.irismod.service.RequestContextState} + */ +proto.irismod.oracle.FeedContext.prototype.getState = function() { + return /** @type {!proto.irismod.service.RequestContextState} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {!proto.irismod.service.RequestContextState} value + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 9, value); +}; + + +goog.object.extend(exports, proto.irismod.oracle); diff --git a/dist/src/types/proto-types/irismod/oracle/tx_grpc_web_pb.js b/dist/src/types/proto-types/irismod/oracle/tx_grpc_web_pb.js new file mode 100644 index 00000000..4ed1df1d --- /dev/null +++ b/dist/src/types/proto-types/irismod/oracle/tx_grpc_web_pb.js @@ -0,0 +1,399 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.oracle + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.oracle = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.oracle.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.oracle.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.oracle.MsgCreateFeed, + * !proto.irismod.oracle.MsgCreateFeedResponse>} + */ +const methodDescriptor_Msg_CreateFeed = new grpc.web.MethodDescriptor( + '/irismod.oracle.Msg/CreateFeed', + grpc.web.MethodType.UNARY, + proto.irismod.oracle.MsgCreateFeed, + proto.irismod.oracle.MsgCreateFeedResponse, + /** + * @param {!proto.irismod.oracle.MsgCreateFeed} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.MsgCreateFeedResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.oracle.MsgCreateFeed, + * !proto.irismod.oracle.MsgCreateFeedResponse>} + */ +const methodInfo_Msg_CreateFeed = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.oracle.MsgCreateFeedResponse, + /** + * @param {!proto.irismod.oracle.MsgCreateFeed} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.MsgCreateFeedResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.oracle.MsgCreateFeed} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.oracle.MsgCreateFeedResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.oracle.MsgClient.prototype.createFeed = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.oracle.Msg/CreateFeed', + request, + metadata || {}, + methodDescriptor_Msg_CreateFeed, + callback); +}; + + +/** + * @param {!proto.irismod.oracle.MsgCreateFeed} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.oracle.MsgPromiseClient.prototype.createFeed = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.oracle.Msg/CreateFeed', + request, + metadata || {}, + methodDescriptor_Msg_CreateFeed); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.oracle.MsgEditFeed, + * !proto.irismod.oracle.MsgEditFeedResponse>} + */ +const methodDescriptor_Msg_EditFeed = new grpc.web.MethodDescriptor( + '/irismod.oracle.Msg/EditFeed', + grpc.web.MethodType.UNARY, + proto.irismod.oracle.MsgEditFeed, + proto.irismod.oracle.MsgEditFeedResponse, + /** + * @param {!proto.irismod.oracle.MsgEditFeed} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.MsgEditFeedResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.oracle.MsgEditFeed, + * !proto.irismod.oracle.MsgEditFeedResponse>} + */ +const methodInfo_Msg_EditFeed = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.oracle.MsgEditFeedResponse, + /** + * @param {!proto.irismod.oracle.MsgEditFeed} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.MsgEditFeedResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.oracle.MsgEditFeed} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.oracle.MsgEditFeedResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.oracle.MsgClient.prototype.editFeed = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.oracle.Msg/EditFeed', + request, + metadata || {}, + methodDescriptor_Msg_EditFeed, + callback); +}; + + +/** + * @param {!proto.irismod.oracle.MsgEditFeed} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.oracle.MsgPromiseClient.prototype.editFeed = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.oracle.Msg/EditFeed', + request, + metadata || {}, + methodDescriptor_Msg_EditFeed); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.oracle.MsgStartFeed, + * !proto.irismod.oracle.MsgStartFeedResponse>} + */ +const methodDescriptor_Msg_StartFeed = new grpc.web.MethodDescriptor( + '/irismod.oracle.Msg/StartFeed', + grpc.web.MethodType.UNARY, + proto.irismod.oracle.MsgStartFeed, + proto.irismod.oracle.MsgStartFeedResponse, + /** + * @param {!proto.irismod.oracle.MsgStartFeed} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.MsgStartFeedResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.oracle.MsgStartFeed, + * !proto.irismod.oracle.MsgStartFeedResponse>} + */ +const methodInfo_Msg_StartFeed = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.oracle.MsgStartFeedResponse, + /** + * @param {!proto.irismod.oracle.MsgStartFeed} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.MsgStartFeedResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.oracle.MsgStartFeed} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.oracle.MsgStartFeedResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.oracle.MsgClient.prototype.startFeed = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.oracle.Msg/StartFeed', + request, + metadata || {}, + methodDescriptor_Msg_StartFeed, + callback); +}; + + +/** + * @param {!proto.irismod.oracle.MsgStartFeed} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.oracle.MsgPromiseClient.prototype.startFeed = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.oracle.Msg/StartFeed', + request, + metadata || {}, + methodDescriptor_Msg_StartFeed); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.oracle.MsgPauseFeed, + * !proto.irismod.oracle.MsgPauseFeedResponse>} + */ +const methodDescriptor_Msg_PauseFeed = new grpc.web.MethodDescriptor( + '/irismod.oracle.Msg/PauseFeed', + grpc.web.MethodType.UNARY, + proto.irismod.oracle.MsgPauseFeed, + proto.irismod.oracle.MsgPauseFeedResponse, + /** + * @param {!proto.irismod.oracle.MsgPauseFeed} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.MsgPauseFeedResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.oracle.MsgPauseFeed, + * !proto.irismod.oracle.MsgPauseFeedResponse>} + */ +const methodInfo_Msg_PauseFeed = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.oracle.MsgPauseFeedResponse, + /** + * @param {!proto.irismod.oracle.MsgPauseFeed} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.MsgPauseFeedResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.oracle.MsgPauseFeed} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.oracle.MsgPauseFeedResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.oracle.MsgClient.prototype.pauseFeed = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.oracle.Msg/PauseFeed', + request, + metadata || {}, + methodDescriptor_Msg_PauseFeed, + callback); +}; + + +/** + * @param {!proto.irismod.oracle.MsgPauseFeed} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.oracle.MsgPromiseClient.prototype.pauseFeed = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.oracle.Msg/PauseFeed', + request, + metadata || {}, + methodDescriptor_Msg_PauseFeed); +}; + + +module.exports = proto.irismod.oracle; + diff --git a/dist/src/types/proto-types/irismod/oracle/tx_pb.js b/dist/src/types/proto-types/irismod/oracle/tx_pb.js new file mode 100644 index 00000000..4d9f9ab8 --- /dev/null +++ b/dist/src/types/proto-types/irismod/oracle/tx_pb.js @@ -0,0 +1,1877 @@ +// source: irismod/oracle/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.irismod.oracle.MsgCreateFeed', null, global); +goog.exportSymbol('proto.irismod.oracle.MsgCreateFeedResponse', null, global); +goog.exportSymbol('proto.irismod.oracle.MsgEditFeed', null, global); +goog.exportSymbol('proto.irismod.oracle.MsgEditFeedResponse', null, global); +goog.exportSymbol('proto.irismod.oracle.MsgPauseFeed', null, global); +goog.exportSymbol('proto.irismod.oracle.MsgPauseFeedResponse', null, global); +goog.exportSymbol('proto.irismod.oracle.MsgStartFeed', null, global); +goog.exportSymbol('proto.irismod.oracle.MsgStartFeedResponse', 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.irismod.oracle.MsgCreateFeed = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.oracle.MsgCreateFeed.repeatedFields_, null); +}; +goog.inherits(proto.irismod.oracle.MsgCreateFeed, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.MsgCreateFeed.displayName = 'proto.irismod.oracle.MsgCreateFeed'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.MsgCreateFeedResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.MsgCreateFeedResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.MsgCreateFeedResponse.displayName = 'proto.irismod.oracle.MsgCreateFeedResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.MsgStartFeed = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.MsgStartFeed, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.MsgStartFeed.displayName = 'proto.irismod.oracle.MsgStartFeed'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.MsgStartFeedResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.MsgStartFeedResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.MsgStartFeedResponse.displayName = 'proto.irismod.oracle.MsgStartFeedResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.MsgPauseFeed = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.MsgPauseFeed, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.MsgPauseFeed.displayName = 'proto.irismod.oracle.MsgPauseFeed'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.MsgPauseFeedResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.MsgPauseFeedResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.MsgPauseFeedResponse.displayName = 'proto.irismod.oracle.MsgPauseFeedResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.MsgEditFeed = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.oracle.MsgEditFeed.repeatedFields_, null); +}; +goog.inherits(proto.irismod.oracle.MsgEditFeed, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.MsgEditFeed.displayName = 'proto.irismod.oracle.MsgEditFeed'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.MsgEditFeedResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.MsgEditFeedResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.MsgEditFeedResponse.displayName = 'proto.irismod.oracle.MsgEditFeedResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.oracle.MsgCreateFeed.repeatedFields_ = [6,9]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.MsgCreateFeed.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.MsgCreateFeed} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgCreateFeed.toObject = function(includeInstance, msg) { + var f, obj = { + feedName: jspb.Message.getFieldWithDefault(msg, 1, ""), + latestHistory: jspb.Message.getFieldWithDefault(msg, 2, 0), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + creator: jspb.Message.getFieldWithDefault(msg, 4, ""), + serviceName: jspb.Message.getFieldWithDefault(msg, 5, ""), + providersList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + input: jspb.Message.getFieldWithDefault(msg, 7, ""), + timeout: jspb.Message.getFieldWithDefault(msg, 8, 0), + serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 10, 0), + aggregateFunc: jspb.Message.getFieldWithDefault(msg, 11, ""), + valueJsonPath: jspb.Message.getFieldWithDefault(msg, 12, ""), + responseThreshold: jspb.Message.getFieldWithDefault(msg, 13, 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.irismod.oracle.MsgCreateFeed} + */ +proto.irismod.oracle.MsgCreateFeed.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.MsgCreateFeed; + return proto.irismod.oracle.MsgCreateFeed.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.MsgCreateFeed} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.MsgCreateFeed} + */ +proto.irismod.oracle.MsgCreateFeed.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.setFeedName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLatestHistory(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setServiceName(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.addProviders(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setInput(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeout(value); + break; + case 9: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFeeCap(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRepeatedFrequency(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setAggregateFunc(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setValueJsonPath(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint32()); + msg.setResponseThreshold(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.MsgCreateFeed.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.MsgCreateFeed} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgCreateFeed.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLatestHistory(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getProvidersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 6, + f + ); + } + f = message.getInput(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getTimeout(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getServiceFeeCapList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRepeatedFrequency(); + if (f !== 0) { + writer.writeUint64( + 10, + f + ); + } + f = message.getAggregateFunc(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } + f = message.getValueJsonPath(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getResponseThreshold(); + if (f !== 0) { + writer.writeUint32( + 13, + f + ); + } +}; + + +/** + * optional string feed_name = 1; + * @return {string} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getFeedName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setFeedName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 latest_history = 2; + * @return {number} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getLatestHistory = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setLatestHistory = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string creator = 4; + * @return {string} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string service_name = 5; + * @return {string} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * repeated string providers = 6; + * @return {!Array} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getProvidersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setProvidersList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.addProviders = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.clearProvidersList = function() { + return this.setProvidersList([]); +}; + + +/** + * optional string input = 7; + * @return {string} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getInput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setInput = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional int64 timeout = 8; + * @return {number} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee_cap = 9; + * @return {!Array} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getServiceFeeCapList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this +*/ +proto.irismod.oracle.MsgCreateFeed.prototype.setServiceFeeCapList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.addServiceFeeCap = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.clearServiceFeeCapList = function() { + return this.setServiceFeeCapList([]); +}; + + +/** + * optional uint64 repeated_frequency = 10; + * @return {number} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getRepeatedFrequency = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setRepeatedFrequency = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional string aggregate_func = 11; + * @return {string} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getAggregateFunc = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setAggregateFunc = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + +/** + * optional string value_json_path = 12; + * @return {string} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getValueJsonPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setValueJsonPath = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * optional uint32 response_threshold = 13; + * @return {number} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getResponseThreshold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setResponseThreshold = function(value) { + return jspb.Message.setProto3IntField(this, 13, 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.irismod.oracle.MsgCreateFeedResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.MsgCreateFeedResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.MsgCreateFeedResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgCreateFeedResponse.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.irismod.oracle.MsgCreateFeedResponse} + */ +proto.irismod.oracle.MsgCreateFeedResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.MsgCreateFeedResponse; + return proto.irismod.oracle.MsgCreateFeedResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.MsgCreateFeedResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.MsgCreateFeedResponse} + */ +proto.irismod.oracle.MsgCreateFeedResponse.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.irismod.oracle.MsgCreateFeedResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.MsgCreateFeedResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.MsgCreateFeedResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgCreateFeedResponse.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.irismod.oracle.MsgStartFeed.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.MsgStartFeed.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.MsgStartFeed} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgStartFeed.toObject = function(includeInstance, msg) { + var f, obj = { + feedName: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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.irismod.oracle.MsgStartFeed} + */ +proto.irismod.oracle.MsgStartFeed.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.MsgStartFeed; + return proto.irismod.oracle.MsgStartFeed.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.MsgStartFeed} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.MsgStartFeed} + */ +proto.irismod.oracle.MsgStartFeed.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.setFeedName(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.irismod.oracle.MsgStartFeed.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.MsgStartFeed.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.MsgStartFeed} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgStartFeed.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string feed_name = 1; + * @return {string} + */ +proto.irismod.oracle.MsgStartFeed.prototype.getFeedName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgStartFeed} returns this + */ +proto.irismod.oracle.MsgStartFeed.prototype.setFeedName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string creator = 2; + * @return {string} + */ +proto.irismod.oracle.MsgStartFeed.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgStartFeed} returns this + */ +proto.irismod.oracle.MsgStartFeed.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.irismod.oracle.MsgStartFeedResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.MsgStartFeedResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.MsgStartFeedResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgStartFeedResponse.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.irismod.oracle.MsgStartFeedResponse} + */ +proto.irismod.oracle.MsgStartFeedResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.MsgStartFeedResponse; + return proto.irismod.oracle.MsgStartFeedResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.MsgStartFeedResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.MsgStartFeedResponse} + */ +proto.irismod.oracle.MsgStartFeedResponse.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.irismod.oracle.MsgStartFeedResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.MsgStartFeedResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.MsgStartFeedResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgStartFeedResponse.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.irismod.oracle.MsgPauseFeed.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.MsgPauseFeed.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.MsgPauseFeed} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgPauseFeed.toObject = function(includeInstance, msg) { + var f, obj = { + feedName: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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.irismod.oracle.MsgPauseFeed} + */ +proto.irismod.oracle.MsgPauseFeed.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.MsgPauseFeed; + return proto.irismod.oracle.MsgPauseFeed.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.MsgPauseFeed} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.MsgPauseFeed} + */ +proto.irismod.oracle.MsgPauseFeed.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.setFeedName(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.irismod.oracle.MsgPauseFeed.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.MsgPauseFeed.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.MsgPauseFeed} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgPauseFeed.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string feed_name = 1; + * @return {string} + */ +proto.irismod.oracle.MsgPauseFeed.prototype.getFeedName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgPauseFeed} returns this + */ +proto.irismod.oracle.MsgPauseFeed.prototype.setFeedName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string creator = 2; + * @return {string} + */ +proto.irismod.oracle.MsgPauseFeed.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgPauseFeed} returns this + */ +proto.irismod.oracle.MsgPauseFeed.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.irismod.oracle.MsgPauseFeedResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.MsgPauseFeedResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.MsgPauseFeedResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgPauseFeedResponse.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.irismod.oracle.MsgPauseFeedResponse} + */ +proto.irismod.oracle.MsgPauseFeedResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.MsgPauseFeedResponse; + return proto.irismod.oracle.MsgPauseFeedResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.MsgPauseFeedResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.MsgPauseFeedResponse} + */ +proto.irismod.oracle.MsgPauseFeedResponse.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.irismod.oracle.MsgPauseFeedResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.MsgPauseFeedResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.MsgPauseFeedResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgPauseFeedResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.oracle.MsgEditFeed.repeatedFields_ = [4,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.irismod.oracle.MsgEditFeed.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.MsgEditFeed.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.MsgEditFeed} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgEditFeed.toObject = function(includeInstance, msg) { + var f, obj = { + feedName: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + latestHistory: jspb.Message.getFieldWithDefault(msg, 3, 0), + providersList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, + timeout: jspb.Message.getFieldWithDefault(msg, 5, 0), + serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 7, 0), + responseThreshold: jspb.Message.getFieldWithDefault(msg, 8, 0), + creator: 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.irismod.oracle.MsgEditFeed} + */ +proto.irismod.oracle.MsgEditFeed.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.MsgEditFeed; + return proto.irismod.oracle.MsgEditFeed.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.MsgEditFeed} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.MsgEditFeed} + */ +proto.irismod.oracle.MsgEditFeed.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.setFeedName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLatestHistory(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.addProviders(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeout(value); + break; + case 6: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFeeCap(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRepeatedFrequency(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setResponseThreshold(value); + break; + case 9: + 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.irismod.oracle.MsgEditFeed.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.MsgEditFeed.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.MsgEditFeed} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgEditFeed.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLatestHistory(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getProvidersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 4, + f + ); + } + f = message.getTimeout(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getServiceFeeCapList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRepeatedFrequency(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getResponseThreshold(); + if (f !== 0) { + writer.writeUint32( + 8, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } +}; + + +/** + * optional string feed_name = 1; + * @return {string} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getFeedName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.setFeedName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 latest_history = 3; + * @return {number} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getLatestHistory = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.setLatestHistory = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * repeated string providers = 4; + * @return {!Array} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getProvidersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.setProvidersList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.addProviders = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.clearProvidersList = function() { + return this.setProvidersList([]); +}; + + +/** + * optional int64 timeout = 5; + * @return {number} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.setTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee_cap = 6; + * @return {!Array} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getServiceFeeCapList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this +*/ +proto.irismod.oracle.MsgEditFeed.prototype.setServiceFeeCapList = 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.irismod.oracle.MsgEditFeed.prototype.addServiceFeeCap = 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.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.clearServiceFeeCapList = function() { + return this.setServiceFeeCapList([]); +}; + + +/** + * optional uint64 repeated_frequency = 7; + * @return {number} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getRepeatedFrequency = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.setRepeatedFrequency = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional uint32 response_threshold = 8; + * @return {number} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getResponseThreshold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.setResponseThreshold = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional string creator = 9; + * @return {string} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.setCreator = 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.irismod.oracle.MsgEditFeedResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.MsgEditFeedResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.MsgEditFeedResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgEditFeedResponse.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.irismod.oracle.MsgEditFeedResponse} + */ +proto.irismod.oracle.MsgEditFeedResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.MsgEditFeedResponse; + return proto.irismod.oracle.MsgEditFeedResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.MsgEditFeedResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.MsgEditFeedResponse} + */ +proto.irismod.oracle.MsgEditFeedResponse.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.irismod.oracle.MsgEditFeedResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.MsgEditFeedResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.MsgEditFeedResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgEditFeedResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.irismod.oracle); diff --git a/dist/src/types/proto-types/irismod/random/genesis_pb.js b/dist/src/types/proto-types/irismod/random/genesis_pb.js new file mode 100644 index 00000000..a6b79784 --- /dev/null +++ b/dist/src/types/proto-types/irismod/random/genesis_pb.js @@ -0,0 +1,356 @@ +// source: irismod/random/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var irismod_random_random_pb = require('../../irismod/random/random_pb.js'); +goog.object.extend(proto, irismod_random_random_pb); +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.irismod.random.GenesisState', null, global); +goog.exportSymbol('proto.irismod.random.Requests', 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.irismod.random.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.random.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.GenesisState.displayName = 'proto.irismod.random.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.irismod.random.Requests = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.random.Requests.repeatedFields_, null); +}; +goog.inherits(proto.irismod.random.Requests, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.Requests.displayName = 'proto.irismod.random.Requests'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.random.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.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.irismod.random.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + pendingRandomRequestsMap: (f = msg.getPendingRandomRequestsMap()) ? f.toObject(includeInstance, proto.irismod.random.Requests.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.random.GenesisState} + */ +proto.irismod.random.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.GenesisState; + return proto.irismod.random.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.GenesisState} + */ +proto.irismod.random.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getPendingRandomRequestsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.irismod.random.Requests.deserializeBinaryFromReader, "", new proto.irismod.random.Requests()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.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.irismod.random.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPendingRandomRequestsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.irismod.random.Requests.serializeBinaryToWriter); + } +}; + + +/** + * map pending_random_requests = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.irismod.random.GenesisState.prototype.getPendingRandomRequestsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.irismod.random.Requests)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.irismod.random.GenesisState} returns this + */ +proto.irismod.random.GenesisState.prototype.clearPendingRandomRequestsMap = function() { + this.getPendingRandomRequestsMap().clear(); + return this;}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.random.Requests.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.irismod.random.Requests.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.Requests.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.random.Requests} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.Requests.toObject = function(includeInstance, msg) { + var f, obj = { + requestsList: jspb.Message.toObjectList(msg.getRequestsList(), + irismod_random_random_pb.Request.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.irismod.random.Requests} + */ +proto.irismod.random.Requests.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.Requests; + return proto.irismod.random.Requests.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.Requests} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.Requests} + */ +proto.irismod.random.Requests.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_random_random_pb.Request; + reader.readMessage(value,irismod_random_random_pb.Request.deserializeBinaryFromReader); + msg.addRequests(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.Requests.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.Requests.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.random.Requests} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.Requests.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_random_random_pb.Request.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Request requests = 1; + * @return {!Array} + */ +proto.irismod.random.Requests.prototype.getRequestsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_random_random_pb.Request, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.random.Requests} returns this +*/ +proto.irismod.random.Requests.prototype.setRequestsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.random.Request=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.random.Request} + */ +proto.irismod.random.Requests.prototype.addRequests = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.random.Request, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.random.Requests} returns this + */ +proto.irismod.random.Requests.prototype.clearRequestsList = function() { + return this.setRequestsList([]); +}; + + +goog.object.extend(exports, proto.irismod.random); diff --git a/dist/src/types/proto-types/irismod/random/query_grpc_web_pb.js b/dist/src/types/proto-types/irismod/random/query_grpc_web_pb.js new file mode 100644 index 00000000..51d72573 --- /dev/null +++ b/dist/src/types/proto-types/irismod/random/query_grpc_web_pb.js @@ -0,0 +1,241 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.random + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var irismod_random_random_pb = require('../../irismod/random/random_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.random = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.random.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.random.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.random.QueryRandomRequest, + * !proto.irismod.random.QueryRandomResponse>} + */ +const methodDescriptor_Query_Random = new grpc.web.MethodDescriptor( + '/irismod.random.Query/Random', + grpc.web.MethodType.UNARY, + proto.irismod.random.QueryRandomRequest, + proto.irismod.random.QueryRandomResponse, + /** + * @param {!proto.irismod.random.QueryRandomRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.random.QueryRandomResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.random.QueryRandomRequest, + * !proto.irismod.random.QueryRandomResponse>} + */ +const methodInfo_Query_Random = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.random.QueryRandomResponse, + /** + * @param {!proto.irismod.random.QueryRandomRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.random.QueryRandomResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.random.QueryRandomRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.random.QueryRandomResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.random.QueryClient.prototype.random = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.random.Query/Random', + request, + metadata || {}, + methodDescriptor_Query_Random, + callback); +}; + + +/** + * @param {!proto.irismod.random.QueryRandomRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.random.QueryPromiseClient.prototype.random = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.random.Query/Random', + request, + metadata || {}, + methodDescriptor_Query_Random); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.random.QueryRandomRequestQueueRequest, + * !proto.irismod.random.QueryRandomRequestQueueResponse>} + */ +const methodDescriptor_Query_RandomRequestQueue = new grpc.web.MethodDescriptor( + '/irismod.random.Query/RandomRequestQueue', + grpc.web.MethodType.UNARY, + proto.irismod.random.QueryRandomRequestQueueRequest, + proto.irismod.random.QueryRandomRequestQueueResponse, + /** + * @param {!proto.irismod.random.QueryRandomRequestQueueRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.random.QueryRandomRequestQueueResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.random.QueryRandomRequestQueueRequest, + * !proto.irismod.random.QueryRandomRequestQueueResponse>} + */ +const methodInfo_Query_RandomRequestQueue = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.random.QueryRandomRequestQueueResponse, + /** + * @param {!proto.irismod.random.QueryRandomRequestQueueRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.random.QueryRandomRequestQueueResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.random.QueryRandomRequestQueueRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.random.QueryRandomRequestQueueResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.random.QueryClient.prototype.randomRequestQueue = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.random.Query/RandomRequestQueue', + request, + metadata || {}, + methodDescriptor_Query_RandomRequestQueue, + callback); +}; + + +/** + * @param {!proto.irismod.random.QueryRandomRequestQueueRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.random.QueryPromiseClient.prototype.randomRequestQueue = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.random.Query/RandomRequestQueue', + request, + metadata || {}, + methodDescriptor_Query_RandomRequestQueue); +}; + + +module.exports = proto.irismod.random; + diff --git a/dist/src/types/proto-types/irismod/random/query_pb.js b/dist/src/types/proto-types/irismod/random/query_pb.js new file mode 100644 index 00000000..f21f6d48 --- /dev/null +++ b/dist/src/types/proto-types/irismod/random/query_pb.js @@ -0,0 +1,680 @@ +// source: irismod/random/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var irismod_random_random_pb = require('../../irismod/random/random_pb.js'); +goog.object.extend(proto, irismod_random_random_pb); +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); +goog.exportSymbol('proto.irismod.random.QueryRandomRequest', null, global); +goog.exportSymbol('proto.irismod.random.QueryRandomRequestQueueRequest', null, global); +goog.exportSymbol('proto.irismod.random.QueryRandomRequestQueueResponse', null, global); +goog.exportSymbol('proto.irismod.random.QueryRandomResponse', 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.irismod.random.QueryRandomRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.random.QueryRandomRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.QueryRandomRequest.displayName = 'proto.irismod.random.QueryRandomRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.random.QueryRandomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.random.QueryRandomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.QueryRandomResponse.displayName = 'proto.irismod.random.QueryRandomResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.random.QueryRandomRequestQueueRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.random.QueryRandomRequestQueueRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.QueryRandomRequestQueueRequest.displayName = 'proto.irismod.random.QueryRandomRequestQueueRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.random.QueryRandomRequestQueueResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.random.QueryRandomRequestQueueResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.random.QueryRandomRequestQueueResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.QueryRandomRequestQueueResponse.displayName = 'proto.irismod.random.QueryRandomRequestQueueResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.random.QueryRandomRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.QueryRandomRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.random.QueryRandomRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.QueryRandomRequest.toObject = function(includeInstance, msg) { + var f, obj = { + reqId: 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.irismod.random.QueryRandomRequest} + */ +proto.irismod.random.QueryRandomRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.QueryRandomRequest; + return proto.irismod.random.QueryRandomRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.QueryRandomRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.QueryRandomRequest} + */ +proto.irismod.random.QueryRandomRequest.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.setReqId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.QueryRandomRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.QueryRandomRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.random.QueryRandomRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.QueryRandomRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReqId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string req_id = 1; + * @return {string} + */ +proto.irismod.random.QueryRandomRequest.prototype.getReqId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.random.QueryRandomRequest} returns this + */ +proto.irismod.random.QueryRandomRequest.prototype.setReqId = 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.irismod.random.QueryRandomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.QueryRandomResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.random.QueryRandomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.QueryRandomResponse.toObject = function(includeInstance, msg) { + var f, obj = { + random: (f = msg.getRandom()) && irismod_random_random_pb.Random.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.irismod.random.QueryRandomResponse} + */ +proto.irismod.random.QueryRandomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.QueryRandomResponse; + return proto.irismod.random.QueryRandomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.QueryRandomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.QueryRandomResponse} + */ +proto.irismod.random.QueryRandomResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_random_random_pb.Random; + reader.readMessage(value,irismod_random_random_pb.Random.deserializeBinaryFromReader); + msg.setRandom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.QueryRandomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.QueryRandomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.random.QueryRandomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.QueryRandomResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRandom(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_random_random_pb.Random.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Random random = 1; + * @return {?proto.irismod.random.Random} + */ +proto.irismod.random.QueryRandomResponse.prototype.getRandom = function() { + return /** @type{?proto.irismod.random.Random} */ ( + jspb.Message.getWrapperField(this, irismod_random_random_pb.Random, 1)); +}; + + +/** + * @param {?proto.irismod.random.Random|undefined} value + * @return {!proto.irismod.random.QueryRandomResponse} returns this +*/ +proto.irismod.random.QueryRandomResponse.prototype.setRandom = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.random.QueryRandomResponse} returns this + */ +proto.irismod.random.QueryRandomResponse.prototype.clearRandom = function() { + return this.setRandom(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.random.QueryRandomResponse.prototype.hasRandom = 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.irismod.random.QueryRandomRequestQueueRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.QueryRandomRequestQueueRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.random.QueryRandomRequestQueueRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.QueryRandomRequestQueueRequest.toObject = function(includeInstance, msg) { + var f, obj = { + height: 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.irismod.random.QueryRandomRequestQueueRequest} + */ +proto.irismod.random.QueryRandomRequestQueueRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.QueryRandomRequestQueueRequest; + return proto.irismod.random.QueryRandomRequestQueueRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.QueryRandomRequestQueueRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.QueryRandomRequestQueueRequest} + */ +proto.irismod.random.QueryRandomRequestQueueRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.QueryRandomRequestQueueRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.QueryRandomRequestQueueRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.random.QueryRandomRequestQueueRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.QueryRandomRequestQueueRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.irismod.random.QueryRandomRequestQueueRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.random.QueryRandomRequestQueueRequest} returns this + */ +proto.irismod.random.QueryRandomRequestQueueRequest.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.random.QueryRandomRequestQueueResponse.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.irismod.random.QueryRandomRequestQueueResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.QueryRandomRequestQueueResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.random.QueryRandomRequestQueueResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.QueryRandomRequestQueueResponse.toObject = function(includeInstance, msg) { + var f, obj = { + requestsList: jspb.Message.toObjectList(msg.getRequestsList(), + irismod_random_random_pb.Request.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.irismod.random.QueryRandomRequestQueueResponse} + */ +proto.irismod.random.QueryRandomRequestQueueResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.QueryRandomRequestQueueResponse; + return proto.irismod.random.QueryRandomRequestQueueResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.QueryRandomRequestQueueResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.QueryRandomRequestQueueResponse} + */ +proto.irismod.random.QueryRandomRequestQueueResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_random_random_pb.Request; + reader.readMessage(value,irismod_random_random_pb.Request.deserializeBinaryFromReader); + msg.addRequests(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.QueryRandomRequestQueueResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.QueryRandomRequestQueueResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.random.QueryRandomRequestQueueResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.QueryRandomRequestQueueResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_random_random_pb.Request.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Request requests = 1; + * @return {!Array} + */ +proto.irismod.random.QueryRandomRequestQueueResponse.prototype.getRequestsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_random_random_pb.Request, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.random.QueryRandomRequestQueueResponse} returns this +*/ +proto.irismod.random.QueryRandomRequestQueueResponse.prototype.setRequestsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.random.Request=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.random.Request} + */ +proto.irismod.random.QueryRandomRequestQueueResponse.prototype.addRequests = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.random.Request, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.random.QueryRandomRequestQueueResponse} returns this + */ +proto.irismod.random.QueryRandomRequestQueueResponse.prototype.clearRequestsList = function() { + return this.setRequestsList([]); +}; + + +goog.object.extend(exports, proto.irismod.random); diff --git a/dist/src/types/proto-types/irismod/random/random_pb.js b/dist/src/types/proto-types/irismod/random/random_pb.js new file mode 100644 index 00000000..c6f11ebb --- /dev/null +++ b/dist/src/types/proto-types/irismod/random/random_pb.js @@ -0,0 +1,563 @@ +// source: irismod/random/random.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.irismod.random.Random', null, global); +goog.exportSymbol('proto.irismod.random.Request', 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.irismod.random.Random = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.random.Random, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.Random.displayName = 'proto.irismod.random.Random'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.random.Request = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.random.Request.repeatedFields_, null); +}; +goog.inherits(proto.irismod.random.Request, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.Request.displayName = 'proto.irismod.random.Request'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.random.Random.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.Random.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.random.Random} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.Random.toObject = function(includeInstance, msg) { + var f, obj = { + requestTxHash: jspb.Message.getFieldWithDefault(msg, 1, ""), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + value: 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.irismod.random.Random} + */ +proto.irismod.random.Random.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.Random; + return proto.irismod.random.Random.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.Random} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.Random} + */ +proto.irismod.random.Random.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.setRequestTxHash(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.Random.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.Random.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.random.Random} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.Random.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestTxHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getValue(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string request_tx_hash = 1; + * @return {string} + */ +proto.irismod.random.Random.prototype.getRequestTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.random.Random} returns this + */ +proto.irismod.random.Random.prototype.setRequestTxHash = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 height = 2; + * @return {number} + */ +proto.irismod.random.Random.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.random.Random} returns this + */ +proto.irismod.random.Random.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string value = 3; + * @return {string} + */ +proto.irismod.random.Random.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.random.Random} returns this + */ +proto.irismod.random.Random.prototype.setValue = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.random.Request.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.irismod.random.Request.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.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.irismod.random.Request} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.Request.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + consumer: jspb.Message.getFieldWithDefault(msg, 2, ""), + txHash: jspb.Message.getFieldWithDefault(msg, 3, ""), + oracle: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + serviceContextId: 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.irismod.random.Request} + */ +proto.irismod.random.Request.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.Request; + return proto.irismod.random.Request.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.Request} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.Request} + */ +proto.irismod.random.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.readInt64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTxHash(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOracle(value); + break; + case 5: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFeeCap(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setServiceContextId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.Request.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.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.irismod.random.Request} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.Request.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTxHash(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getOracle(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getServiceFeeCapList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getServiceContextId(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.irismod.random.Request.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.random.Request} returns this + */ +proto.irismod.random.Request.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string consumer = 2; + * @return {string} + */ +proto.irismod.random.Request.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.random.Request} returns this + */ +proto.irismod.random.Request.prototype.setConsumer = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string tx_hash = 3; + * @return {string} + */ +proto.irismod.random.Request.prototype.getTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.random.Request} returns this + */ +proto.irismod.random.Request.prototype.setTxHash = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bool oracle = 4; + * @return {boolean} + */ +proto.irismod.random.Request.prototype.getOracle = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.random.Request} returns this + */ +proto.irismod.random.Request.prototype.setOracle = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee_cap = 5; + * @return {!Array} + */ +proto.irismod.random.Request.prototype.getServiceFeeCapList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.random.Request} returns this +*/ +proto.irismod.random.Request.prototype.setServiceFeeCapList = 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.irismod.random.Request.prototype.addServiceFeeCap = 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.irismod.random.Request} returns this + */ +proto.irismod.random.Request.prototype.clearServiceFeeCapList = function() { + return this.setServiceFeeCapList([]); +}; + + +/** + * optional string service_context_id = 6; + * @return {string} + */ +proto.irismod.random.Request.prototype.getServiceContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.random.Request} returns this + */ +proto.irismod.random.Request.prototype.setServiceContextId = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +goog.object.extend(exports, proto.irismod.random); diff --git a/dist/src/types/proto-types/irismod/random/tx_grpc_web_pb.js b/dist/src/types/proto-types/irismod/random/tx_grpc_web_pb.js new file mode 100644 index 00000000..d527eb1b --- /dev/null +++ b/dist/src/types/proto-types/irismod/random/tx_grpc_web_pb.js @@ -0,0 +1,159 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.random + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.random = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.random.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.random.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.random.MsgRequestRandom, + * !proto.irismod.random.MsgRequestRandomResponse>} + */ +const methodDescriptor_Msg_RequestRandom = new grpc.web.MethodDescriptor( + '/irismod.random.Msg/RequestRandom', + grpc.web.MethodType.UNARY, + proto.irismod.random.MsgRequestRandom, + proto.irismod.random.MsgRequestRandomResponse, + /** + * @param {!proto.irismod.random.MsgRequestRandom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.random.MsgRequestRandomResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.random.MsgRequestRandom, + * !proto.irismod.random.MsgRequestRandomResponse>} + */ +const methodInfo_Msg_RequestRandom = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.random.MsgRequestRandomResponse, + /** + * @param {!proto.irismod.random.MsgRequestRandom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.random.MsgRequestRandomResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.random.MsgRequestRandom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.random.MsgRequestRandomResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.random.MsgClient.prototype.requestRandom = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.random.Msg/RequestRandom', + request, + metadata || {}, + methodDescriptor_Msg_RequestRandom, + callback); +}; + + +/** + * @param {!proto.irismod.random.MsgRequestRandom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.random.MsgPromiseClient.prototype.requestRandom = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.random.Msg/RequestRandom', + request, + metadata || {}, + methodDescriptor_Msg_RequestRandom); +}; + + +module.exports = proto.irismod.random; + diff --git a/dist/src/types/proto-types/irismod/random/tx_pb.js b/dist/src/types/proto-types/irismod/random/tx_pb.js new file mode 100644 index 00000000..958fc631 --- /dev/null +++ b/dist/src/types/proto-types/irismod/random/tx_pb.js @@ -0,0 +1,414 @@ +// source: irismod/random/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.irismod.random.MsgRequestRandom', null, global); +goog.exportSymbol('proto.irismod.random.MsgRequestRandomResponse', 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.irismod.random.MsgRequestRandom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.random.MsgRequestRandom.repeatedFields_, null); +}; +goog.inherits(proto.irismod.random.MsgRequestRandom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.MsgRequestRandom.displayName = 'proto.irismod.random.MsgRequestRandom'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.random.MsgRequestRandomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.random.MsgRequestRandomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.MsgRequestRandomResponse.displayName = 'proto.irismod.random.MsgRequestRandomResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.random.MsgRequestRandom.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.irismod.random.MsgRequestRandom.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.MsgRequestRandom.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.random.MsgRequestRandom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.MsgRequestRandom.toObject = function(includeInstance, msg) { + var f, obj = { + blockInterval: jspb.Message.getFieldWithDefault(msg, 1, 0), + consumer: jspb.Message.getFieldWithDefault(msg, 2, ""), + oracle: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), + 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.irismod.random.MsgRequestRandom} + */ +proto.irismod.random.MsgRequestRandom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.MsgRequestRandom; + return proto.irismod.random.MsgRequestRandom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.MsgRequestRandom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.MsgRequestRandom} + */ +proto.irismod.random.MsgRequestRandom.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.setBlockInterval(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOracle(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFeeCap(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.MsgRequestRandom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.MsgRequestRandom.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.random.MsgRequestRandom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.MsgRequestRandom.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockInterval(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getOracle(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getServiceFeeCapList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 block_interval = 1; + * @return {number} + */ +proto.irismod.random.MsgRequestRandom.prototype.getBlockInterval = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.random.MsgRequestRandom} returns this + */ +proto.irismod.random.MsgRequestRandom.prototype.setBlockInterval = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string consumer = 2; + * @return {string} + */ +proto.irismod.random.MsgRequestRandom.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.random.MsgRequestRandom} returns this + */ +proto.irismod.random.MsgRequestRandom.prototype.setConsumer = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool oracle = 3; + * @return {boolean} + */ +proto.irismod.random.MsgRequestRandom.prototype.getOracle = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.random.MsgRequestRandom} returns this + */ +proto.irismod.random.MsgRequestRandom.prototype.setOracle = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee_cap = 4; + * @return {!Array} + */ +proto.irismod.random.MsgRequestRandom.prototype.getServiceFeeCapList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.random.MsgRequestRandom} returns this +*/ +proto.irismod.random.MsgRequestRandom.prototype.setServiceFeeCapList = 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.irismod.random.MsgRequestRandom.prototype.addServiceFeeCap = 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.irismod.random.MsgRequestRandom} returns this + */ +proto.irismod.random.MsgRequestRandom.prototype.clearServiceFeeCapList = function() { + return this.setServiceFeeCapList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.random.MsgRequestRandomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.MsgRequestRandomResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.random.MsgRequestRandomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.MsgRequestRandomResponse.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.irismod.random.MsgRequestRandomResponse} + */ +proto.irismod.random.MsgRequestRandomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.MsgRequestRandomResponse; + return proto.irismod.random.MsgRequestRandomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.MsgRequestRandomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.MsgRequestRandomResponse} + */ +proto.irismod.random.MsgRequestRandomResponse.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.irismod.random.MsgRequestRandomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.MsgRequestRandomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.random.MsgRequestRandomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.MsgRequestRandomResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.irismod.random); diff --git a/dist/src/types/proto-types/irismod/record/genesis_pb.js b/dist/src/types/proto-types/irismod/record/genesis_pb.js new file mode 100644 index 00000000..e12f0d53 --- /dev/null +++ b/dist/src/types/proto-types/irismod/record/genesis_pb.js @@ -0,0 +1,201 @@ +// source: irismod/record/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 irismod_record_record_pb = require('../../irismod/record/record_pb.js'); +goog.object.extend(proto, irismod_record_record_pb); +goog.exportSymbol('proto.irismod.record.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.irismod.record.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.record.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.irismod.record.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.record.GenesisState.displayName = 'proto.irismod.record.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.record.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.irismod.record.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.record.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.irismod.record.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + recordsList: jspb.Message.toObjectList(msg.getRecordsList(), + irismod_record_record_pb.Record.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.irismod.record.GenesisState} + */ +proto.irismod.record.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.record.GenesisState; + return proto.irismod.record.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.record.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.record.GenesisState} + */ +proto.irismod.record.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_record_record_pb.Record; + reader.readMessage(value,irismod_record_record_pb.Record.deserializeBinaryFromReader); + msg.addRecords(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.record.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.record.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.irismod.record.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRecordsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_record_record_pb.Record.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Record records = 1; + * @return {!Array} + */ +proto.irismod.record.GenesisState.prototype.getRecordsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_record_record_pb.Record, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.record.GenesisState} returns this +*/ +proto.irismod.record.GenesisState.prototype.setRecordsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.record.Record=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.record.Record} + */ +proto.irismod.record.GenesisState.prototype.addRecords = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.record.Record, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.record.GenesisState} returns this + */ +proto.irismod.record.GenesisState.prototype.clearRecordsList = function() { + return this.setRecordsList([]); +}; + + +goog.object.extend(exports, proto.irismod.record); diff --git a/dist/src/types/proto-types/irismod/record/query_grpc_web_pb.js b/dist/src/types/proto-types/irismod/record/query_grpc_web_pb.js new file mode 100644 index 00000000..71b32ccd --- /dev/null +++ b/dist/src/types/proto-types/irismod/record/query_grpc_web_pb.js @@ -0,0 +1,159 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.record + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var irismod_record_record_pb = require('../../irismod/record/record_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.record = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.record.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.record.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.record.QueryRecordRequest, + * !proto.irismod.record.QueryRecordResponse>} + */ +const methodDescriptor_Query_Record = new grpc.web.MethodDescriptor( + '/irismod.record.Query/Record', + grpc.web.MethodType.UNARY, + proto.irismod.record.QueryRecordRequest, + proto.irismod.record.QueryRecordResponse, + /** + * @param {!proto.irismod.record.QueryRecordRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.record.QueryRecordResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.record.QueryRecordRequest, + * !proto.irismod.record.QueryRecordResponse>} + */ +const methodInfo_Query_Record = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.record.QueryRecordResponse, + /** + * @param {!proto.irismod.record.QueryRecordRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.record.QueryRecordResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.record.QueryRecordRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.record.QueryRecordResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.record.QueryClient.prototype.record = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.record.Query/Record', + request, + metadata || {}, + methodDescriptor_Query_Record, + callback); +}; + + +/** + * @param {!proto.irismod.record.QueryRecordRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.record.QueryPromiseClient.prototype.record = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.record.Query/Record', + request, + metadata || {}, + methodDescriptor_Query_Record); +}; + + +module.exports = proto.irismod.record; + diff --git a/dist/src/types/proto-types/irismod/record/query_pb.js b/dist/src/types/proto-types/irismod/record/query_pb.js new file mode 100644 index 00000000..2ece5146 --- /dev/null +++ b/dist/src/types/proto-types/irismod/record/query_pb.js @@ -0,0 +1,344 @@ +// source: irismod/record/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var irismod_record_record_pb = require('../../irismod/record/record_pb.js'); +goog.object.extend(proto, irismod_record_record_pb); +var google_api_annotations_pb = require('../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.irismod.record.QueryRecordRequest', null, global); +goog.exportSymbol('proto.irismod.record.QueryRecordResponse', 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.irismod.record.QueryRecordRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.record.QueryRecordRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.record.QueryRecordRequest.displayName = 'proto.irismod.record.QueryRecordRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.record.QueryRecordResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.record.QueryRecordResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.record.QueryRecordResponse.displayName = 'proto.irismod.record.QueryRecordResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.record.QueryRecordRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.record.QueryRecordRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.record.QueryRecordRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.QueryRecordRequest.toObject = function(includeInstance, msg) { + var f, obj = { + recordId: 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.irismod.record.QueryRecordRequest} + */ +proto.irismod.record.QueryRecordRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.record.QueryRecordRequest; + return proto.irismod.record.QueryRecordRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.record.QueryRecordRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.record.QueryRecordRequest} + */ +proto.irismod.record.QueryRecordRequest.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.setRecordId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.record.QueryRecordRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.record.QueryRecordRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.record.QueryRecordRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.QueryRecordRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRecordId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string record_id = 1; + * @return {string} + */ +proto.irismod.record.QueryRecordRequest.prototype.getRecordId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.QueryRecordRequest} returns this + */ +proto.irismod.record.QueryRecordRequest.prototype.setRecordId = 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.irismod.record.QueryRecordResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.record.QueryRecordResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.record.QueryRecordResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.QueryRecordResponse.toObject = function(includeInstance, msg) { + var f, obj = { + record: (f = msg.getRecord()) && irismod_record_record_pb.Record.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.irismod.record.QueryRecordResponse} + */ +proto.irismod.record.QueryRecordResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.record.QueryRecordResponse; + return proto.irismod.record.QueryRecordResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.record.QueryRecordResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.record.QueryRecordResponse} + */ +proto.irismod.record.QueryRecordResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_record_record_pb.Record; + reader.readMessage(value,irismod_record_record_pb.Record.deserializeBinaryFromReader); + msg.setRecord(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.record.QueryRecordResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.record.QueryRecordResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.record.QueryRecordResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.QueryRecordResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRecord(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_record_record_pb.Record.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Record record = 1; + * @return {?proto.irismod.record.Record} + */ +proto.irismod.record.QueryRecordResponse.prototype.getRecord = function() { + return /** @type{?proto.irismod.record.Record} */ ( + jspb.Message.getWrapperField(this, irismod_record_record_pb.Record, 1)); +}; + + +/** + * @param {?proto.irismod.record.Record|undefined} value + * @return {!proto.irismod.record.QueryRecordResponse} returns this +*/ +proto.irismod.record.QueryRecordResponse.prototype.setRecord = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.record.QueryRecordResponse} returns this + */ +proto.irismod.record.QueryRecordResponse.prototype.clearRecord = function() { + return this.setRecord(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.record.QueryRecordResponse.prototype.hasRecord = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.irismod.record); diff --git a/dist/src/types/proto-types/irismod/record/record_pb.js b/dist/src/types/proto-types/irismod/record/record_pb.js new file mode 100644 index 00000000..8381297c --- /dev/null +++ b/dist/src/types/proto-types/irismod/record/record_pb.js @@ -0,0 +1,501 @@ +// source: irismod/record/record.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.irismod.record.Content', null, global); +goog.exportSymbol('proto.irismod.record.Record', 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.irismod.record.Content = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.record.Content, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.record.Content.displayName = 'proto.irismod.record.Content'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.record.Record = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.record.Record.repeatedFields_, null); +}; +goog.inherits(proto.irismod.record.Record, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.record.Record.displayName = 'proto.irismod.record.Record'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.record.Content.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.record.Content.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.record.Content} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.Content.toObject = function(includeInstance, msg) { + var f, obj = { + digest: jspb.Message.getFieldWithDefault(msg, 1, ""), + digestAlgo: jspb.Message.getFieldWithDefault(msg, 2, ""), + uri: jspb.Message.getFieldWithDefault(msg, 3, ""), + meta: 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.irismod.record.Content} + */ +proto.irismod.record.Content.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.record.Content; + return proto.irismod.record.Content.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.record.Content} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.record.Content} + */ +proto.irismod.record.Content.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.setDigest(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDigestAlgo(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setUri(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMeta(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.record.Content.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.record.Content.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.record.Content} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.Content.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDigest(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDigestAlgo(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getUri(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMeta(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string digest = 1; + * @return {string} + */ +proto.irismod.record.Content.prototype.getDigest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.Content} returns this + */ +proto.irismod.record.Content.prototype.setDigest = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string digest_algo = 2; + * @return {string} + */ +proto.irismod.record.Content.prototype.getDigestAlgo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.Content} returns this + */ +proto.irismod.record.Content.prototype.setDigestAlgo = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string uri = 3; + * @return {string} + */ +proto.irismod.record.Content.prototype.getUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.Content} returns this + */ +proto.irismod.record.Content.prototype.setUri = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string meta = 4; + * @return {string} + */ +proto.irismod.record.Content.prototype.getMeta = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.Content} returns this + */ +proto.irismod.record.Content.prototype.setMeta = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.record.Record.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.irismod.record.Record.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.record.Record.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.record.Record} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.Record.toObject = function(includeInstance, msg) { + var f, obj = { + txHash: jspb.Message.getFieldWithDefault(msg, 1, ""), + contentsList: jspb.Message.toObjectList(msg.getContentsList(), + proto.irismod.record.Content.toObject, includeInstance), + creator: 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.irismod.record.Record} + */ +proto.irismod.record.Record.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.record.Record; + return proto.irismod.record.Record.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.record.Record} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.record.Record} + */ +proto.irismod.record.Record.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.setTxHash(value); + break; + case 2: + var value = new proto.irismod.record.Content; + reader.readMessage(value,proto.irismod.record.Content.deserializeBinaryFromReader); + msg.addContents(value); + break; + case 3: + 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.irismod.record.Record.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.record.Record.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.record.Record} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.Record.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getContentsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.irismod.record.Content.serializeBinaryToWriter + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string tx_hash = 1; + * @return {string} + */ +proto.irismod.record.Record.prototype.getTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.Record} returns this + */ +proto.irismod.record.Record.prototype.setTxHash = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated Content contents = 2; + * @return {!Array} + */ +proto.irismod.record.Record.prototype.getContentsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.record.Content, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.record.Record} returns this +*/ +proto.irismod.record.Record.prototype.setContentsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.record.Content=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.record.Content} + */ +proto.irismod.record.Record.prototype.addContents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.record.Content, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.record.Record} returns this + */ +proto.irismod.record.Record.prototype.clearContentsList = function() { + return this.setContentsList([]); +}; + + +/** + * optional string creator = 3; + * @return {string} + */ +proto.irismod.record.Record.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.Record} returns this + */ +proto.irismod.record.Record.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.irismod.record); diff --git a/dist/src/types/proto-types/irismod/record/tx_grpc_web_pb.js b/dist/src/types/proto-types/irismod/record/tx_grpc_web_pb.js new file mode 100644 index 00000000..04174a97 --- /dev/null +++ b/dist/src/types/proto-types/irismod/record/tx_grpc_web_pb.js @@ -0,0 +1,159 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.record + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var irismod_record_record_pb = require('../../irismod/record/record_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.record = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.record.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.record.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.record.MsgCreateRecord, + * !proto.irismod.record.MsgCreateRecordResponse>} + */ +const methodDescriptor_Msg_CreateRecord = new grpc.web.MethodDescriptor( + '/irismod.record.Msg/CreateRecord', + grpc.web.MethodType.UNARY, + proto.irismod.record.MsgCreateRecord, + proto.irismod.record.MsgCreateRecordResponse, + /** + * @param {!proto.irismod.record.MsgCreateRecord} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.record.MsgCreateRecordResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.record.MsgCreateRecord, + * !proto.irismod.record.MsgCreateRecordResponse>} + */ +const methodInfo_Msg_CreateRecord = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.record.MsgCreateRecordResponse, + /** + * @param {!proto.irismod.record.MsgCreateRecord} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.record.MsgCreateRecordResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.record.MsgCreateRecord} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.record.MsgCreateRecordResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.record.MsgClient.prototype.createRecord = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.record.Msg/CreateRecord', + request, + metadata || {}, + methodDescriptor_Msg_CreateRecord, + callback); +}; + + +/** + * @param {!proto.irismod.record.MsgCreateRecord} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.record.MsgPromiseClient.prototype.createRecord = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.record.Msg/CreateRecord', + request, + metadata || {}, + methodDescriptor_Msg_CreateRecord); +}; + + +module.exports = proto.irismod.record; + diff --git a/dist/src/types/proto-types/irismod/record/tx_pb.js b/dist/src/types/proto-types/irismod/record/tx_pb.js new file mode 100644 index 00000000..8e45bd7c --- /dev/null +++ b/dist/src/types/proto-types/irismod/record/tx_pb.js @@ -0,0 +1,383 @@ +// source: irismod/record/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var irismod_record_record_pb = require('../../irismod/record/record_pb.js'); +goog.object.extend(proto, irismod_record_record_pb); +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.irismod.record.MsgCreateRecord', null, global); +goog.exportSymbol('proto.irismod.record.MsgCreateRecordResponse', 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.irismod.record.MsgCreateRecord = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.record.MsgCreateRecord.repeatedFields_, null); +}; +goog.inherits(proto.irismod.record.MsgCreateRecord, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.record.MsgCreateRecord.displayName = 'proto.irismod.record.MsgCreateRecord'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.record.MsgCreateRecordResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.record.MsgCreateRecordResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.record.MsgCreateRecordResponse.displayName = 'proto.irismod.record.MsgCreateRecordResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.record.MsgCreateRecord.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.irismod.record.MsgCreateRecord.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.record.MsgCreateRecord.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.record.MsgCreateRecord} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.MsgCreateRecord.toObject = function(includeInstance, msg) { + var f, obj = { + contentsList: jspb.Message.toObjectList(msg.getContentsList(), + irismod_record_record_pb.Content.toObject, includeInstance), + 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.irismod.record.MsgCreateRecord} + */ +proto.irismod.record.MsgCreateRecord.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.record.MsgCreateRecord; + return proto.irismod.record.MsgCreateRecord.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.record.MsgCreateRecord} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.record.MsgCreateRecord} + */ +proto.irismod.record.MsgCreateRecord.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_record_record_pb.Content; + reader.readMessage(value,irismod_record_record_pb.Content.deserializeBinaryFromReader); + msg.addContents(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.irismod.record.MsgCreateRecord.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.record.MsgCreateRecord.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.record.MsgCreateRecord} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.MsgCreateRecord.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContentsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_record_record_pb.Content.serializeBinaryToWriter + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * repeated Content contents = 1; + * @return {!Array} + */ +proto.irismod.record.MsgCreateRecord.prototype.getContentsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_record_record_pb.Content, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.record.MsgCreateRecord} returns this +*/ +proto.irismod.record.MsgCreateRecord.prototype.setContentsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.record.Content=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.record.Content} + */ +proto.irismod.record.MsgCreateRecord.prototype.addContents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.record.Content, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.record.MsgCreateRecord} returns this + */ +proto.irismod.record.MsgCreateRecord.prototype.clearContentsList = function() { + return this.setContentsList([]); +}; + + +/** + * optional string creator = 2; + * @return {string} + */ +proto.irismod.record.MsgCreateRecord.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.MsgCreateRecord} returns this + */ +proto.irismod.record.MsgCreateRecord.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.irismod.record.MsgCreateRecordResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.record.MsgCreateRecordResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.record.MsgCreateRecordResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.MsgCreateRecordResponse.toObject = function(includeInstance, msg) { + var f, obj = { + id: 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.irismod.record.MsgCreateRecordResponse} + */ +proto.irismod.record.MsgCreateRecordResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.record.MsgCreateRecordResponse; + return proto.irismod.record.MsgCreateRecordResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.record.MsgCreateRecordResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.record.MsgCreateRecordResponse} + */ +proto.irismod.record.MsgCreateRecordResponse.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.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.record.MsgCreateRecordResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.record.MsgCreateRecordResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.record.MsgCreateRecordResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.MsgCreateRecordResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.record.MsgCreateRecordResponse.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.MsgCreateRecordResponse} returns this + */ +proto.irismod.record.MsgCreateRecordResponse.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +goog.object.extend(exports, proto.irismod.record); diff --git a/dist/src/types/proto-types/irismod/service/genesis_pb.js b/dist/src/types/proto-types/irismod/service/genesis_pb.js new file mode 100644 index 00000000..dc92e95d --- /dev/null +++ b/dist/src/types/proto-types/irismod/service/genesis_pb.js @@ -0,0 +1,371 @@ +// source: irismod/service/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 irismod_service_service_pb = require('../../irismod/service/service_pb.js'); +goog.object.extend(proto, irismod_service_service_pb); +goog.exportSymbol('proto.irismod.service.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.irismod.service.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.GenesisState.displayName = 'proto.irismod.service.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.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.irismod.service.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.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.irismod.service.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && irismod_service_service_pb.Params.toObject(includeInstance, f), + definitionsList: jspb.Message.toObjectList(msg.getDefinitionsList(), + irismod_service_service_pb.ServiceDefinition.toObject, includeInstance), + bindingsList: jspb.Message.toObjectList(msg.getBindingsList(), + irismod_service_service_pb.ServiceBinding.toObject, includeInstance), + withdrawAddressesMap: (f = msg.getWithdrawAddressesMap()) ? f.toObject(includeInstance, undefined) : [], + requestContextsMap: (f = msg.getRequestContextsMap()) ? f.toObject(includeInstance, proto.irismod.service.RequestContext.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.service.GenesisState} + */ +proto.irismod.service.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.GenesisState; + return proto.irismod.service.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.GenesisState} + */ +proto.irismod.service.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.Params; + reader.readMessage(value,irismod_service_service_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new irismod_service_service_pb.ServiceDefinition; + reader.readMessage(value,irismod_service_service_pb.ServiceDefinition.deserializeBinaryFromReader); + msg.addDefinitions(value); + break; + case 3: + var value = new irismod_service_service_pb.ServiceBinding; + reader.readMessage(value,irismod_service_service_pb.ServiceBinding.deserializeBinaryFromReader); + msg.addBindings(value); + break; + case 4: + var value = msg.getWithdrawAddressesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBytes, null, "", ""); + }); + break; + case 5: + var value = msg.getRequestContextsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.irismod.service.RequestContext.deserializeBinaryFromReader, "", new proto.irismod.service.RequestContext()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.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.irismod.service.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_service_service_pb.Params.serializeBinaryToWriter + ); + } + f = message.getDefinitionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + irismod_service_service_pb.ServiceDefinition.serializeBinaryToWriter + ); + } + f = message.getBindingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + irismod_service_service_pb.ServiceBinding.serializeBinaryToWriter + ); + } + f = message.getWithdrawAddressesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBytes); + } + f = message.getRequestContextsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.irismod.service.RequestContext.serializeBinaryToWriter); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.irismod.service.Params} + */ +proto.irismod.service.GenesisState.prototype.getParams = function() { + return /** @type{?proto.irismod.service.Params} */ ( + jspb.Message.getWrapperField(this, irismod_service_service_pb.Params, 1)); +}; + + +/** + * @param {?proto.irismod.service.Params|undefined} value + * @return {!proto.irismod.service.GenesisState} returns this +*/ +proto.irismod.service.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.GenesisState} returns this + */ +proto.irismod.service.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated ServiceDefinition definitions = 2; + * @return {!Array} + */ +proto.irismod.service.GenesisState.prototype.getDefinitionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_service_service_pb.ServiceDefinition, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.GenesisState} returns this +*/ +proto.irismod.service.GenesisState.prototype.setDefinitionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.service.ServiceDefinition=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.service.ServiceDefinition} + */ +proto.irismod.service.GenesisState.prototype.addDefinitions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.service.ServiceDefinition, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.GenesisState} returns this + */ +proto.irismod.service.GenesisState.prototype.clearDefinitionsList = function() { + return this.setDefinitionsList([]); +}; + + +/** + * repeated ServiceBinding bindings = 3; + * @return {!Array} + */ +proto.irismod.service.GenesisState.prototype.getBindingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_service_service_pb.ServiceBinding, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.GenesisState} returns this +*/ +proto.irismod.service.GenesisState.prototype.setBindingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.irismod.service.ServiceBinding=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.service.ServiceBinding} + */ +proto.irismod.service.GenesisState.prototype.addBindings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.irismod.service.ServiceBinding, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.GenesisState} returns this + */ +proto.irismod.service.GenesisState.prototype.clearBindingsList = function() { + return this.setBindingsList([]); +}; + + +/** + * map withdraw_addresses = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.irismod.service.GenesisState.prototype.getWithdrawAddressesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.irismod.service.GenesisState} returns this + */ +proto.irismod.service.GenesisState.prototype.clearWithdrawAddressesMap = function() { + this.getWithdrawAddressesMap().clear(); + return this;}; + + +/** + * map request_contexts = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.irismod.service.GenesisState.prototype.getRequestContextsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + proto.irismod.service.RequestContext)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.irismod.service.GenesisState} returns this + */ +proto.irismod.service.GenesisState.prototype.clearRequestContextsMap = function() { + this.getRequestContextsMap().clear(); + return this;}; + + +goog.object.extend(exports, proto.irismod.service); diff --git a/dist/src/types/proto-types/irismod/service/query_grpc_web_pb.js b/dist/src/types/proto-types/irismod/service/query_grpc_web_pb.js new file mode 100644 index 00000000..dbc6dccd --- /dev/null +++ b/dist/src/types/proto-types/irismod/service/query_grpc_web_pb.js @@ -0,0 +1,1125 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.service + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var irismod_service_service_pb = require('../../irismod/service/service_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.service = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.service.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.service.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryDefinitionRequest, + * !proto.irismod.service.QueryDefinitionResponse>} + */ +const methodDescriptor_Query_Definition = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Definition', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryDefinitionRequest, + proto.irismod.service.QueryDefinitionResponse, + /** + * @param {!proto.irismod.service.QueryDefinitionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryDefinitionResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryDefinitionRequest, + * !proto.irismod.service.QueryDefinitionResponse>} + */ +const methodInfo_Query_Definition = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryDefinitionResponse, + /** + * @param {!proto.irismod.service.QueryDefinitionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryDefinitionResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryDefinitionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryDefinitionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.definition = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Definition', + request, + metadata || {}, + methodDescriptor_Query_Definition, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryDefinitionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.definition = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Definition', + request, + metadata || {}, + methodDescriptor_Query_Definition); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryBindingRequest, + * !proto.irismod.service.QueryBindingResponse>} + */ +const methodDescriptor_Query_Binding = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Binding', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryBindingRequest, + proto.irismod.service.QueryBindingResponse, + /** + * @param {!proto.irismod.service.QueryBindingRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryBindingResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryBindingRequest, + * !proto.irismod.service.QueryBindingResponse>} + */ +const methodInfo_Query_Binding = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryBindingResponse, + /** + * @param {!proto.irismod.service.QueryBindingRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryBindingResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryBindingRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryBindingResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.binding = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Binding', + request, + metadata || {}, + methodDescriptor_Query_Binding, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryBindingRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.binding = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Binding', + request, + metadata || {}, + methodDescriptor_Query_Binding); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryBindingsRequest, + * !proto.irismod.service.QueryBindingsResponse>} + */ +const methodDescriptor_Query_Bindings = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Bindings', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryBindingsRequest, + proto.irismod.service.QueryBindingsResponse, + /** + * @param {!proto.irismod.service.QueryBindingsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryBindingsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryBindingsRequest, + * !proto.irismod.service.QueryBindingsResponse>} + */ +const methodInfo_Query_Bindings = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryBindingsResponse, + /** + * @param {!proto.irismod.service.QueryBindingsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryBindingsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryBindingsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryBindingsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.bindings = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Bindings', + request, + metadata || {}, + methodDescriptor_Query_Bindings, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryBindingsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.bindings = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Bindings', + request, + metadata || {}, + methodDescriptor_Query_Bindings); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryWithdrawAddressRequest, + * !proto.irismod.service.QueryWithdrawAddressResponse>} + */ +const methodDescriptor_Query_WithdrawAddress = new grpc.web.MethodDescriptor( + '/irismod.service.Query/WithdrawAddress', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryWithdrawAddressRequest, + proto.irismod.service.QueryWithdrawAddressResponse, + /** + * @param {!proto.irismod.service.QueryWithdrawAddressRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryWithdrawAddressResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryWithdrawAddressRequest, + * !proto.irismod.service.QueryWithdrawAddressResponse>} + */ +const methodInfo_Query_WithdrawAddress = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryWithdrawAddressResponse, + /** + * @param {!proto.irismod.service.QueryWithdrawAddressRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryWithdrawAddressResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryWithdrawAddressRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryWithdrawAddressResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.withdrawAddress = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/WithdrawAddress', + request, + metadata || {}, + methodDescriptor_Query_WithdrawAddress, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryWithdrawAddressRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.withdrawAddress = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/WithdrawAddress', + request, + metadata || {}, + methodDescriptor_Query_WithdrawAddress); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryRequestContextRequest, + * !proto.irismod.service.QueryRequestContextResponse>} + */ +const methodDescriptor_Query_RequestContext = new grpc.web.MethodDescriptor( + '/irismod.service.Query/RequestContext', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryRequestContextRequest, + proto.irismod.service.QueryRequestContextResponse, + /** + * @param {!proto.irismod.service.QueryRequestContextRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryRequestContextResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryRequestContextRequest, + * !proto.irismod.service.QueryRequestContextResponse>} + */ +const methodInfo_Query_RequestContext = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryRequestContextResponse, + /** + * @param {!proto.irismod.service.QueryRequestContextRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryRequestContextResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryRequestContextRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryRequestContextResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.requestContext = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/RequestContext', + request, + metadata || {}, + methodDescriptor_Query_RequestContext, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryRequestContextRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.requestContext = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/RequestContext', + request, + metadata || {}, + methodDescriptor_Query_RequestContext); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryRequestRequest, + * !proto.irismod.service.QueryRequestResponse>} + */ +const methodDescriptor_Query_Request = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Request', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryRequestRequest, + proto.irismod.service.QueryRequestResponse, + /** + * @param {!proto.irismod.service.QueryRequestRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryRequestResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryRequestRequest, + * !proto.irismod.service.QueryRequestResponse>} + */ +const methodInfo_Query_Request = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryRequestResponse, + /** + * @param {!proto.irismod.service.QueryRequestRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryRequestResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryRequestRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryRequestResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.request = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Request', + request, + metadata || {}, + methodDescriptor_Query_Request, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryRequestRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.request = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Request', + request, + metadata || {}, + methodDescriptor_Query_Request); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryRequestsRequest, + * !proto.irismod.service.QueryRequestsResponse>} + */ +const methodDescriptor_Query_Requests = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Requests', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryRequestsRequest, + proto.irismod.service.QueryRequestsResponse, + /** + * @param {!proto.irismod.service.QueryRequestsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryRequestsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryRequestsRequest, + * !proto.irismod.service.QueryRequestsResponse>} + */ +const methodInfo_Query_Requests = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryRequestsResponse, + /** + * @param {!proto.irismod.service.QueryRequestsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryRequestsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryRequestsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryRequestsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.requests = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Requests', + request, + metadata || {}, + methodDescriptor_Query_Requests, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryRequestsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.requests = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Requests', + request, + metadata || {}, + methodDescriptor_Query_Requests); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryRequestsByReqCtxRequest, + * !proto.irismod.service.QueryRequestsByReqCtxResponse>} + */ +const methodDescriptor_Query_RequestsByReqCtx = new grpc.web.MethodDescriptor( + '/irismod.service.Query/RequestsByReqCtx', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryRequestsByReqCtxRequest, + proto.irismod.service.QueryRequestsByReqCtxResponse, + /** + * @param {!proto.irismod.service.QueryRequestsByReqCtxRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryRequestsByReqCtxResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryRequestsByReqCtxRequest, + * !proto.irismod.service.QueryRequestsByReqCtxResponse>} + */ +const methodInfo_Query_RequestsByReqCtx = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryRequestsByReqCtxResponse, + /** + * @param {!proto.irismod.service.QueryRequestsByReqCtxRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryRequestsByReqCtxResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryRequestsByReqCtxRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryRequestsByReqCtxResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.requestsByReqCtx = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/RequestsByReqCtx', + request, + metadata || {}, + methodDescriptor_Query_RequestsByReqCtx, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryRequestsByReqCtxRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.requestsByReqCtx = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/RequestsByReqCtx', + request, + metadata || {}, + methodDescriptor_Query_RequestsByReqCtx); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryResponseRequest, + * !proto.irismod.service.QueryResponseResponse>} + */ +const methodDescriptor_Query_Response = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Response', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryResponseRequest, + proto.irismod.service.QueryResponseResponse, + /** + * @param {!proto.irismod.service.QueryResponseRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryResponseResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryResponseRequest, + * !proto.irismod.service.QueryResponseResponse>} + */ +const methodInfo_Query_Response = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryResponseResponse, + /** + * @param {!proto.irismod.service.QueryResponseRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryResponseResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryResponseRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryResponseResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.response = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Response', + request, + metadata || {}, + methodDescriptor_Query_Response, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryResponseRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.response = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Response', + request, + metadata || {}, + methodDescriptor_Query_Response); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryResponsesRequest, + * !proto.irismod.service.QueryResponsesResponse>} + */ +const methodDescriptor_Query_Responses = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Responses', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryResponsesRequest, + proto.irismod.service.QueryResponsesResponse, + /** + * @param {!proto.irismod.service.QueryResponsesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryResponsesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryResponsesRequest, + * !proto.irismod.service.QueryResponsesResponse>} + */ +const methodInfo_Query_Responses = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryResponsesResponse, + /** + * @param {!proto.irismod.service.QueryResponsesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryResponsesResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryResponsesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryResponsesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.responses = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Responses', + request, + metadata || {}, + methodDescriptor_Query_Responses, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryResponsesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.responses = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Responses', + request, + metadata || {}, + methodDescriptor_Query_Responses); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryEarnedFeesRequest, + * !proto.irismod.service.QueryEarnedFeesResponse>} + */ +const methodDescriptor_Query_EarnedFees = new grpc.web.MethodDescriptor( + '/irismod.service.Query/EarnedFees', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryEarnedFeesRequest, + proto.irismod.service.QueryEarnedFeesResponse, + /** + * @param {!proto.irismod.service.QueryEarnedFeesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryEarnedFeesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryEarnedFeesRequest, + * !proto.irismod.service.QueryEarnedFeesResponse>} + */ +const methodInfo_Query_EarnedFees = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryEarnedFeesResponse, + /** + * @param {!proto.irismod.service.QueryEarnedFeesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryEarnedFeesResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryEarnedFeesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryEarnedFeesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.earnedFees = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/EarnedFees', + request, + metadata || {}, + methodDescriptor_Query_EarnedFees, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryEarnedFeesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.earnedFees = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/EarnedFees', + request, + metadata || {}, + methodDescriptor_Query_EarnedFees); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QuerySchemaRequest, + * !proto.irismod.service.QuerySchemaResponse>} + */ +const methodDescriptor_Query_Schema = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Schema', + grpc.web.MethodType.UNARY, + proto.irismod.service.QuerySchemaRequest, + proto.irismod.service.QuerySchemaResponse, + /** + * @param {!proto.irismod.service.QuerySchemaRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QuerySchemaResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QuerySchemaRequest, + * !proto.irismod.service.QuerySchemaResponse>} + */ +const methodInfo_Query_Schema = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QuerySchemaResponse, + /** + * @param {!proto.irismod.service.QuerySchemaRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QuerySchemaResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QuerySchemaRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QuerySchemaResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.schema = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Schema', + request, + metadata || {}, + methodDescriptor_Query_Schema, + callback); +}; + + +/** + * @param {!proto.irismod.service.QuerySchemaRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.schema = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Schema', + request, + metadata || {}, + methodDescriptor_Query_Schema); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryParamsRequest, + * !proto.irismod.service.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Params', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryParamsRequest, + proto.irismod.service.QueryParamsResponse, + /** + * @param {!proto.irismod.service.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryParamsRequest, + * !proto.irismod.service.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryParamsResponse, + /** + * @param {!proto.irismod.service.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +module.exports = proto.irismod.service; + diff --git a/dist/src/types/proto-types/irismod/service/query_pb.js b/dist/src/types/proto-types/irismod/service/query_pb.js new file mode 100644 index 00000000..dde83401 --- /dev/null +++ b/dist/src/types/proto-types/irismod/service/query_pb.js @@ -0,0 +1,4425 @@ +// source: irismod/service/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 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 irismod_service_service_pb = require('../../irismod/service/service_pb.js'); +goog.object.extend(proto, irismod_service_service_pb); +goog.exportSymbol('proto.irismod.service.QueryBindingRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryBindingResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryBindingsRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryBindingsResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryDefinitionRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryDefinitionResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryEarnedFeesRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryEarnedFeesResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryParamsRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryParamsResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryRequestContextRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryRequestContextResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryRequestRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryRequestResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryRequestsByReqCtxRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryRequestsByReqCtxResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryRequestsRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryRequestsResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryResponseRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryResponseResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryResponsesRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryResponsesResponse', null, global); +goog.exportSymbol('proto.irismod.service.QuerySchemaRequest', null, global); +goog.exportSymbol('proto.irismod.service.QuerySchemaResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryWithdrawAddressRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryWithdrawAddressResponse', 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.irismod.service.QueryDefinitionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryDefinitionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryDefinitionRequest.displayName = 'proto.irismod.service.QueryDefinitionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryDefinitionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryDefinitionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryDefinitionResponse.displayName = 'proto.irismod.service.QueryDefinitionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryBindingRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryBindingRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryBindingRequest.displayName = 'proto.irismod.service.QueryBindingRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryBindingResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryBindingResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryBindingResponse.displayName = 'proto.irismod.service.QueryBindingResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryBindingsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryBindingsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryBindingsRequest.displayName = 'proto.irismod.service.QueryBindingsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryBindingsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.QueryBindingsResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.QueryBindingsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryBindingsResponse.displayName = 'proto.irismod.service.QueryBindingsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryWithdrawAddressRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryWithdrawAddressRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryWithdrawAddressRequest.displayName = 'proto.irismod.service.QueryWithdrawAddressRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryWithdrawAddressResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryWithdrawAddressResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryWithdrawAddressResponse.displayName = 'proto.irismod.service.QueryWithdrawAddressResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryRequestContextRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryRequestContextRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryRequestContextRequest.displayName = 'proto.irismod.service.QueryRequestContextRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryRequestContextResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryRequestContextResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryRequestContextResponse.displayName = 'proto.irismod.service.QueryRequestContextResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryRequestRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryRequestRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryRequestRequest.displayName = 'proto.irismod.service.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.irismod.service.QueryRequestResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryRequestResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryRequestResponse.displayName = 'proto.irismod.service.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.irismod.service.QueryRequestsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryRequestsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryRequestsRequest.displayName = 'proto.irismod.service.QueryRequestsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryRequestsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.QueryRequestsResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.QueryRequestsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryRequestsResponse.displayName = 'proto.irismod.service.QueryRequestsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryRequestsByReqCtxRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryRequestsByReqCtxRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryRequestsByReqCtxRequest.displayName = 'proto.irismod.service.QueryRequestsByReqCtxRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryRequestsByReqCtxResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.QueryRequestsByReqCtxResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.QueryRequestsByReqCtxResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryRequestsByReqCtxResponse.displayName = 'proto.irismod.service.QueryRequestsByReqCtxResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryResponseRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryResponseRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryResponseRequest.displayName = 'proto.irismod.service.QueryResponseRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryResponseResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryResponseResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryResponseResponse.displayName = 'proto.irismod.service.QueryResponseResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryResponsesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryResponsesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryResponsesRequest.displayName = 'proto.irismod.service.QueryResponsesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryResponsesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.QueryResponsesResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.QueryResponsesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryResponsesResponse.displayName = 'proto.irismod.service.QueryResponsesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryEarnedFeesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryEarnedFeesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryEarnedFeesRequest.displayName = 'proto.irismod.service.QueryEarnedFeesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryEarnedFeesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.QueryEarnedFeesResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.QueryEarnedFeesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryEarnedFeesResponse.displayName = 'proto.irismod.service.QueryEarnedFeesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QuerySchemaRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QuerySchemaRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QuerySchemaRequest.displayName = 'proto.irismod.service.QuerySchemaRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QuerySchemaResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QuerySchemaResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QuerySchemaResponse.displayName = 'proto.irismod.service.QuerySchemaResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryParamsRequest.displayName = 'proto.irismod.service.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.irismod.service.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryParamsResponse.displayName = 'proto.irismod.service.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.irismod.service.QueryDefinitionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryDefinitionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryDefinitionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryDefinitionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: 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.irismod.service.QueryDefinitionRequest} + */ +proto.irismod.service.QueryDefinitionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryDefinitionRequest; + return proto.irismod.service.QueryDefinitionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryDefinitionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryDefinitionRequest} + */ +proto.irismod.service.QueryDefinitionRequest.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.setServiceName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryDefinitionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryDefinitionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryDefinitionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryDefinitionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.QueryDefinitionRequest.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryDefinitionRequest} returns this + */ +proto.irismod.service.QueryDefinitionRequest.prototype.setServiceName = 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.irismod.service.QueryDefinitionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryDefinitionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryDefinitionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryDefinitionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + serviceDefinition: (f = msg.getServiceDefinition()) && irismod_service_service_pb.ServiceDefinition.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.irismod.service.QueryDefinitionResponse} + */ +proto.irismod.service.QueryDefinitionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryDefinitionResponse; + return proto.irismod.service.QueryDefinitionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryDefinitionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryDefinitionResponse} + */ +proto.irismod.service.QueryDefinitionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.ServiceDefinition; + reader.readMessage(value,irismod_service_service_pb.ServiceDefinition.deserializeBinaryFromReader); + msg.setServiceDefinition(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryDefinitionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryDefinitionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryDefinitionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryDefinitionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceDefinition(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_service_service_pb.ServiceDefinition.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ServiceDefinition service_definition = 1; + * @return {?proto.irismod.service.ServiceDefinition} + */ +proto.irismod.service.QueryDefinitionResponse.prototype.getServiceDefinition = function() { + return /** @type{?proto.irismod.service.ServiceDefinition} */ ( + jspb.Message.getWrapperField(this, irismod_service_service_pb.ServiceDefinition, 1)); +}; + + +/** + * @param {?proto.irismod.service.ServiceDefinition|undefined} value + * @return {!proto.irismod.service.QueryDefinitionResponse} returns this +*/ +proto.irismod.service.QueryDefinitionResponse.prototype.setServiceDefinition = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryDefinitionResponse} returns this + */ +proto.irismod.service.QueryDefinitionResponse.prototype.clearServiceDefinition = function() { + return this.setServiceDefinition(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryDefinitionResponse.prototype.hasServiceDefinition = 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.irismod.service.QueryBindingRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryBindingRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryBindingRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryBindingRequest.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: 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.irismod.service.QueryBindingRequest} + */ +proto.irismod.service.QueryBindingRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryBindingRequest; + return proto.irismod.service.QueryBindingRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryBindingRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryBindingRequest} + */ +proto.irismod.service.QueryBindingRequest.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryBindingRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryBindingRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryBindingRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryBindingRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.QueryBindingRequest.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryBindingRequest} returns this + */ +proto.irismod.service.QueryBindingRequest.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.QueryBindingRequest.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryBindingRequest} returns this + */ +proto.irismod.service.QueryBindingRequest.prototype.setProvider = 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.irismod.service.QueryBindingResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryBindingResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryBindingResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryBindingResponse.toObject = function(includeInstance, msg) { + var f, obj = { + serviceBinding: (f = msg.getServiceBinding()) && irismod_service_service_pb.ServiceBinding.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.irismod.service.QueryBindingResponse} + */ +proto.irismod.service.QueryBindingResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryBindingResponse; + return proto.irismod.service.QueryBindingResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryBindingResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryBindingResponse} + */ +proto.irismod.service.QueryBindingResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.ServiceBinding; + reader.readMessage(value,irismod_service_service_pb.ServiceBinding.deserializeBinaryFromReader); + msg.setServiceBinding(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryBindingResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryBindingResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryBindingResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryBindingResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceBinding(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_service_service_pb.ServiceBinding.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ServiceBinding service_binding = 1; + * @return {?proto.irismod.service.ServiceBinding} + */ +proto.irismod.service.QueryBindingResponse.prototype.getServiceBinding = function() { + return /** @type{?proto.irismod.service.ServiceBinding} */ ( + jspb.Message.getWrapperField(this, irismod_service_service_pb.ServiceBinding, 1)); +}; + + +/** + * @param {?proto.irismod.service.ServiceBinding|undefined} value + * @return {!proto.irismod.service.QueryBindingResponse} returns this +*/ +proto.irismod.service.QueryBindingResponse.prototype.setServiceBinding = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryBindingResponse} returns this + */ +proto.irismod.service.QueryBindingResponse.prototype.clearServiceBinding = function() { + return this.setServiceBinding(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryBindingResponse.prototype.hasServiceBinding = 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.irismod.service.QueryBindingsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryBindingsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryBindingsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryBindingsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + owner: 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.irismod.service.QueryBindingsRequest} + */ +proto.irismod.service.QueryBindingsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryBindingsRequest; + return proto.irismod.service.QueryBindingsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryBindingsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryBindingsRequest} + */ +proto.irismod.service.QueryBindingsRequest.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryBindingsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryBindingsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryBindingsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryBindingsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.QueryBindingsRequest.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryBindingsRequest} returns this + */ +proto.irismod.service.QueryBindingsRequest.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string owner = 2; + * @return {string} + */ +proto.irismod.service.QueryBindingsRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryBindingsRequest} returns this + */ +proto.irismod.service.QueryBindingsRequest.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.QueryBindingsResponse.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.irismod.service.QueryBindingsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryBindingsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryBindingsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryBindingsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + serviceBindingsList: jspb.Message.toObjectList(msg.getServiceBindingsList(), + irismod_service_service_pb.ServiceBinding.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.irismod.service.QueryBindingsResponse} + */ +proto.irismod.service.QueryBindingsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryBindingsResponse; + return proto.irismod.service.QueryBindingsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryBindingsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryBindingsResponse} + */ +proto.irismod.service.QueryBindingsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.ServiceBinding; + reader.readMessage(value,irismod_service_service_pb.ServiceBinding.deserializeBinaryFromReader); + msg.addServiceBindings(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryBindingsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryBindingsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryBindingsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryBindingsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceBindingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_service_service_pb.ServiceBinding.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ServiceBinding service_bindings = 1; + * @return {!Array} + */ +proto.irismod.service.QueryBindingsResponse.prototype.getServiceBindingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_service_service_pb.ServiceBinding, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.QueryBindingsResponse} returns this +*/ +proto.irismod.service.QueryBindingsResponse.prototype.setServiceBindingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.service.ServiceBinding=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.service.ServiceBinding} + */ +proto.irismod.service.QueryBindingsResponse.prototype.addServiceBindings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.service.ServiceBinding, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.QueryBindingsResponse} returns this + */ +proto.irismod.service.QueryBindingsResponse.prototype.clearServiceBindingsList = function() { + return this.setServiceBindingsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.service.QueryWithdrawAddressRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryWithdrawAddressRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryWithdrawAddressRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryWithdrawAddressRequest.toObject = function(includeInstance, msg) { + var f, obj = { + owner: 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.irismod.service.QueryWithdrawAddressRequest} + */ +proto.irismod.service.QueryWithdrawAddressRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryWithdrawAddressRequest; + return proto.irismod.service.QueryWithdrawAddressRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryWithdrawAddressRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryWithdrawAddressRequest} + */ +proto.irismod.service.QueryWithdrawAddressRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryWithdrawAddressRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryWithdrawAddressRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryWithdrawAddressRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryWithdrawAddressRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string owner = 1; + * @return {string} + */ +proto.irismod.service.QueryWithdrawAddressRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryWithdrawAddressRequest} returns this + */ +proto.irismod.service.QueryWithdrawAddressRequest.prototype.setOwner = 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.irismod.service.QueryWithdrawAddressResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryWithdrawAddressResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryWithdrawAddressResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryWithdrawAddressResponse.toObject = function(includeInstance, msg) { + var f, obj = { + withdrawAddress: 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.irismod.service.QueryWithdrawAddressResponse} + */ +proto.irismod.service.QueryWithdrawAddressResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryWithdrawAddressResponse; + return proto.irismod.service.QueryWithdrawAddressResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryWithdrawAddressResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryWithdrawAddressResponse} + */ +proto.irismod.service.QueryWithdrawAddressResponse.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.setWithdrawAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryWithdrawAddressResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryWithdrawAddressResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryWithdrawAddressResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryWithdrawAddressResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWithdrawAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string withdraw_address = 1; + * @return {string} + */ +proto.irismod.service.QueryWithdrawAddressResponse.prototype.getWithdrawAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryWithdrawAddressResponse} returns this + */ +proto.irismod.service.QueryWithdrawAddressResponse.prototype.setWithdrawAddress = 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.irismod.service.QueryRequestContextRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryRequestContextRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryRequestContextRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestContextRequest.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: 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.irismod.service.QueryRequestContextRequest} + */ +proto.irismod.service.QueryRequestContextRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryRequestContextRequest; + return proto.irismod.service.QueryRequestContextRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryRequestContextRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryRequestContextRequest} + */ +proto.irismod.service.QueryRequestContextRequest.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.setRequestContextId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryRequestContextRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryRequestContextRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryRequestContextRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestContextRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.QueryRequestContextRequest.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryRequestContextRequest} returns this + */ +proto.irismod.service.QueryRequestContextRequest.prototype.setRequestContextId = 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.irismod.service.QueryRequestContextResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryRequestContextResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryRequestContextResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestContextResponse.toObject = function(includeInstance, msg) { + var f, obj = { + requestContext: (f = msg.getRequestContext()) && irismod_service_service_pb.RequestContext.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.irismod.service.QueryRequestContextResponse} + */ +proto.irismod.service.QueryRequestContextResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryRequestContextResponse; + return proto.irismod.service.QueryRequestContextResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryRequestContextResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryRequestContextResponse} + */ +proto.irismod.service.QueryRequestContextResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.RequestContext; + reader.readMessage(value,irismod_service_service_pb.RequestContext.deserializeBinaryFromReader); + msg.setRequestContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryRequestContextResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryRequestContextResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryRequestContextResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestContextResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContext(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_service_service_pb.RequestContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional RequestContext request_context = 1; + * @return {?proto.irismod.service.RequestContext} + */ +proto.irismod.service.QueryRequestContextResponse.prototype.getRequestContext = function() { + return /** @type{?proto.irismod.service.RequestContext} */ ( + jspb.Message.getWrapperField(this, irismod_service_service_pb.RequestContext, 1)); +}; + + +/** + * @param {?proto.irismod.service.RequestContext|undefined} value + * @return {!proto.irismod.service.QueryRequestContextResponse} returns this +*/ +proto.irismod.service.QueryRequestContextResponse.prototype.setRequestContext = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryRequestContextResponse} returns this + */ +proto.irismod.service.QueryRequestContextResponse.prototype.clearRequestContext = function() { + return this.setRequestContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryRequestContextResponse.prototype.hasRequestContext = 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.irismod.service.QueryRequestRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.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.irismod.service.QueryRequestRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestRequest.toObject = function(includeInstance, msg) { + var f, obj = { + requestId: 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.irismod.service.QueryRequestRequest} + */ +proto.irismod.service.QueryRequestRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryRequestRequest; + return proto.irismod.service.QueryRequestRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryRequestRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryRequestRequest} + */ +proto.irismod.service.QueryRequestRequest.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.setRequestId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryRequestRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.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.irismod.service.QueryRequestRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string request_id = 1; + * @return {string} + */ +proto.irismod.service.QueryRequestRequest.prototype.getRequestId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryRequestRequest} returns this + */ +proto.irismod.service.QueryRequestRequest.prototype.setRequestId = 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.irismod.service.QueryRequestResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.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.irismod.service.QueryRequestResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestResponse.toObject = function(includeInstance, msg) { + var f, obj = { + request: (f = msg.getRequest()) && irismod_service_service_pb.Request.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.irismod.service.QueryRequestResponse} + */ +proto.irismod.service.QueryRequestResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryRequestResponse; + return proto.irismod.service.QueryRequestResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryRequestResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryRequestResponse} + */ +proto.irismod.service.QueryRequestResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.Request; + reader.readMessage(value,irismod_service_service_pb.Request.deserializeBinaryFromReader); + msg.setRequest(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryRequestResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.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.irismod.service.QueryRequestResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequest(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_service_service_pb.Request.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Request request = 1; + * @return {?proto.irismod.service.Request} + */ +proto.irismod.service.QueryRequestResponse.prototype.getRequest = function() { + return /** @type{?proto.irismod.service.Request} */ ( + jspb.Message.getWrapperField(this, irismod_service_service_pb.Request, 1)); +}; + + +/** + * @param {?proto.irismod.service.Request|undefined} value + * @return {!proto.irismod.service.QueryRequestResponse} returns this +*/ +proto.irismod.service.QueryRequestResponse.prototype.setRequest = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryRequestResponse} returns this + */ +proto.irismod.service.QueryRequestResponse.prototype.clearRequest = function() { + return this.setRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryRequestResponse.prototype.hasRequest = 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.irismod.service.QueryRequestsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryRequestsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryRequestsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: 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.irismod.service.QueryRequestsRequest} + */ +proto.irismod.service.QueryRequestsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryRequestsRequest; + return proto.irismod.service.QueryRequestsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryRequestsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryRequestsRequest} + */ +proto.irismod.service.QueryRequestsRequest.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryRequestsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryRequestsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryRequestsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.QueryRequestsRequest.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryRequestsRequest} returns this + */ +proto.irismod.service.QueryRequestsRequest.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.QueryRequestsRequest.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryRequestsRequest} returns this + */ +proto.irismod.service.QueryRequestsRequest.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.QueryRequestsResponse.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.irismod.service.QueryRequestsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryRequestsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryRequestsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + requestsList: jspb.Message.toObjectList(msg.getRequestsList(), + irismod_service_service_pb.Request.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.irismod.service.QueryRequestsResponse} + */ +proto.irismod.service.QueryRequestsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryRequestsResponse; + return proto.irismod.service.QueryRequestsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryRequestsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryRequestsResponse} + */ +proto.irismod.service.QueryRequestsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.Request; + reader.readMessage(value,irismod_service_service_pb.Request.deserializeBinaryFromReader); + msg.addRequests(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryRequestsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryRequestsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryRequestsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_service_service_pb.Request.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Request requests = 1; + * @return {!Array} + */ +proto.irismod.service.QueryRequestsResponse.prototype.getRequestsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_service_service_pb.Request, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.QueryRequestsResponse} returns this +*/ +proto.irismod.service.QueryRequestsResponse.prototype.setRequestsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.service.Request=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.service.Request} + */ +proto.irismod.service.QueryRequestsResponse.prototype.addRequests = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.service.Request, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.QueryRequestsResponse} returns this + */ +proto.irismod.service.QueryRequestsResponse.prototype.clearRequestsList = function() { + return this.setRequestsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryRequestsByReqCtxRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryRequestsByReqCtxRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), + batchCounter: 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.irismod.service.QueryRequestsByReqCtxRequest} + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryRequestsByReqCtxRequest; + return proto.irismod.service.QueryRequestsByReqCtxRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryRequestsByReqCtxRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryRequestsByReqCtxRequest} + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.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.setRequestContextId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBatchCounter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryRequestsByReqCtxRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryRequestsByReqCtxRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBatchCounter(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryRequestsByReqCtxRequest} returns this + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 batch_counter = 2; + * @return {number} + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.getBatchCounter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.QueryRequestsByReqCtxRequest} returns this + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.setBatchCounter = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.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.irismod.service.QueryRequestsByReqCtxResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryRequestsByReqCtxResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryRequestsByReqCtxResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.toObject = function(includeInstance, msg) { + var f, obj = { + requestsList: jspb.Message.toObjectList(msg.getRequestsList(), + irismod_service_service_pb.Request.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.irismod.service.QueryRequestsByReqCtxResponse} + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryRequestsByReqCtxResponse; + return proto.irismod.service.QueryRequestsByReqCtxResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryRequestsByReqCtxResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryRequestsByReqCtxResponse} + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.Request; + reader.readMessage(value,irismod_service_service_pb.Request.deserializeBinaryFromReader); + msg.addRequests(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryRequestsByReqCtxResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryRequestsByReqCtxResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_service_service_pb.Request.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Request requests = 1; + * @return {!Array} + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.getRequestsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_service_service_pb.Request, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.QueryRequestsByReqCtxResponse} returns this +*/ +proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.setRequestsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.service.Request=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.service.Request} + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.addRequests = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.service.Request, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.QueryRequestsByReqCtxResponse} returns this + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.clearRequestsList = function() { + return this.setRequestsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.service.QueryResponseRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryResponseRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryResponseRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryResponseRequest.toObject = function(includeInstance, msg) { + var f, obj = { + requestId: 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.irismod.service.QueryResponseRequest} + */ +proto.irismod.service.QueryResponseRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryResponseRequest; + return proto.irismod.service.QueryResponseRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryResponseRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryResponseRequest} + */ +proto.irismod.service.QueryResponseRequest.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.setRequestId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryResponseRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryResponseRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryResponseRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryResponseRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string request_id = 1; + * @return {string} + */ +proto.irismod.service.QueryResponseRequest.prototype.getRequestId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryResponseRequest} returns this + */ +proto.irismod.service.QueryResponseRequest.prototype.setRequestId = 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.irismod.service.QueryResponseResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryResponseResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryResponseResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryResponseResponse.toObject = function(includeInstance, msg) { + var f, obj = { + response: (f = msg.getResponse()) && irismod_service_service_pb.Response.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.irismod.service.QueryResponseResponse} + */ +proto.irismod.service.QueryResponseResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryResponseResponse; + return proto.irismod.service.QueryResponseResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryResponseResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryResponseResponse} + */ +proto.irismod.service.QueryResponseResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.Response; + reader.readMessage(value,irismod_service_service_pb.Response.deserializeBinaryFromReader); + msg.setResponse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryResponseResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryResponseResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryResponseResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryResponseResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResponse(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_service_service_pb.Response.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Response response = 1; + * @return {?proto.irismod.service.Response} + */ +proto.irismod.service.QueryResponseResponse.prototype.getResponse = function() { + return /** @type{?proto.irismod.service.Response} */ ( + jspb.Message.getWrapperField(this, irismod_service_service_pb.Response, 1)); +}; + + +/** + * @param {?proto.irismod.service.Response|undefined} value + * @return {!proto.irismod.service.QueryResponseResponse} returns this +*/ +proto.irismod.service.QueryResponseResponse.prototype.setResponse = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryResponseResponse} returns this + */ +proto.irismod.service.QueryResponseResponse.prototype.clearResponse = function() { + return this.setResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryResponseResponse.prototype.hasResponse = 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.irismod.service.QueryResponsesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryResponsesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryResponsesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryResponsesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), + batchCounter: 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.irismod.service.QueryResponsesRequest} + */ +proto.irismod.service.QueryResponsesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryResponsesRequest; + return proto.irismod.service.QueryResponsesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryResponsesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryResponsesRequest} + */ +proto.irismod.service.QueryResponsesRequest.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.setRequestContextId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBatchCounter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryResponsesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryResponsesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryResponsesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryResponsesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBatchCounter(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.QueryResponsesRequest.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryResponsesRequest} returns this + */ +proto.irismod.service.QueryResponsesRequest.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 batch_counter = 2; + * @return {number} + */ +proto.irismod.service.QueryResponsesRequest.prototype.getBatchCounter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.QueryResponsesRequest} returns this + */ +proto.irismod.service.QueryResponsesRequest.prototype.setBatchCounter = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.QueryResponsesResponse.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.irismod.service.QueryResponsesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryResponsesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryResponsesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryResponsesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + responsesList: jspb.Message.toObjectList(msg.getResponsesList(), + irismod_service_service_pb.Response.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.irismod.service.QueryResponsesResponse} + */ +proto.irismod.service.QueryResponsesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryResponsesResponse; + return proto.irismod.service.QueryResponsesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryResponsesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryResponsesResponse} + */ +proto.irismod.service.QueryResponsesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.Response; + reader.readMessage(value,irismod_service_service_pb.Response.deserializeBinaryFromReader); + msg.addResponses(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryResponsesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryResponsesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryResponsesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryResponsesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResponsesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_service_service_pb.Response.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Response responses = 1; + * @return {!Array} + */ +proto.irismod.service.QueryResponsesResponse.prototype.getResponsesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_service_service_pb.Response, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.QueryResponsesResponse} returns this +*/ +proto.irismod.service.QueryResponsesResponse.prototype.setResponsesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.service.Response=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.service.Response} + */ +proto.irismod.service.QueryResponsesResponse.prototype.addResponses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.service.Response, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.QueryResponsesResponse} returns this + */ +proto.irismod.service.QueryResponsesResponse.prototype.clearResponsesList = function() { + return this.setResponsesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.service.QueryEarnedFeesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryEarnedFeesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryEarnedFeesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryEarnedFeesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + provider: 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.irismod.service.QueryEarnedFeesRequest} + */ +proto.irismod.service.QueryEarnedFeesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryEarnedFeesRequest; + return proto.irismod.service.QueryEarnedFeesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryEarnedFeesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryEarnedFeesRequest} + */ +proto.irismod.service.QueryEarnedFeesRequest.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.setProvider(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryEarnedFeesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryEarnedFeesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryEarnedFeesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryEarnedFeesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string provider = 1; + * @return {string} + */ +proto.irismod.service.QueryEarnedFeesRequest.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryEarnedFeesRequest} returns this + */ +proto.irismod.service.QueryEarnedFeesRequest.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.QueryEarnedFeesResponse.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.irismod.service.QueryEarnedFeesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryEarnedFeesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryEarnedFeesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryEarnedFeesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + feesList: jspb.Message.toObjectList(msg.getFeesList(), + 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.irismod.service.QueryEarnedFeesResponse} + */ +proto.irismod.service.QueryEarnedFeesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryEarnedFeesResponse; + return proto.irismod.service.QueryEarnedFeesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryEarnedFeesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryEarnedFeesResponse} + */ +proto.irismod.service.QueryEarnedFeesResponse.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.addFees(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryEarnedFeesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryEarnedFeesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryEarnedFeesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryEarnedFeesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fees = 1; + * @return {!Array} + */ +proto.irismod.service.QueryEarnedFeesResponse.prototype.getFeesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.QueryEarnedFeesResponse} returns this +*/ +proto.irismod.service.QueryEarnedFeesResponse.prototype.setFeesList = 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.irismod.service.QueryEarnedFeesResponse.prototype.addFees = 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.irismod.service.QueryEarnedFeesResponse} returns this + */ +proto.irismod.service.QueryEarnedFeesResponse.prototype.clearFeesList = function() { + return this.setFeesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.service.QuerySchemaRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QuerySchemaRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QuerySchemaRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QuerySchemaRequest.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: 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.irismod.service.QuerySchemaRequest} + */ +proto.irismod.service.QuerySchemaRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QuerySchemaRequest; + return proto.irismod.service.QuerySchemaRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QuerySchemaRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QuerySchemaRequest} + */ +proto.irismod.service.QuerySchemaRequest.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.setSchemaName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QuerySchemaRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QuerySchemaRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QuerySchemaRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QuerySchemaRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.irismod.service.QuerySchemaRequest.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QuerySchemaRequest} returns this + */ +proto.irismod.service.QuerySchemaRequest.prototype.setSchemaName = 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.irismod.service.QuerySchemaResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QuerySchemaResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QuerySchemaResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QuerySchemaResponse.toObject = function(includeInstance, msg) { + var f, obj = { + schema: 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.irismod.service.QuerySchemaResponse} + */ +proto.irismod.service.QuerySchemaResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QuerySchemaResponse; + return proto.irismod.service.QuerySchemaResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QuerySchemaResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QuerySchemaResponse} + */ +proto.irismod.service.QuerySchemaResponse.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.setSchema(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QuerySchemaResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QuerySchemaResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QuerySchemaResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QuerySchemaResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchema(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string schema = 1; + * @return {string} + */ +proto.irismod.service.QuerySchemaResponse.prototype.getSchema = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QuerySchemaResponse} returns this + */ +proto.irismod.service.QuerySchemaResponse.prototype.setSchema = 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.irismod.service.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.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.irismod.service.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.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.irismod.service.QueryParamsRequest} + */ +proto.irismod.service.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryParamsRequest; + return proto.irismod.service.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryParamsRequest} + */ +proto.irismod.service.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.irismod.service.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.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.irismod.service.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.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.irismod.service.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.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.irismod.service.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && irismod_service_service_pb.Params.toObject(includeInstance, f), + res: (f = msg.getRes()) && 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.irismod.service.QueryParamsResponse} + */ +proto.irismod.service.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryParamsResponse; + return proto.irismod.service.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryParamsResponse} + */ +proto.irismod.service.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.Params; + reader.readMessage(value,irismod_service_service_pb.Params.deserializeBinaryFromReader); + msg.setParams(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.setRes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.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.irismod.service.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_service_service_pb.Params.serializeBinaryToWriter + ); + } + f = message.getRes(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.irismod.service.Params} + */ +proto.irismod.service.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.irismod.service.Params} */ ( + jspb.Message.getWrapperField(this, irismod_service_service_pb.Params, 1)); +}; + + +/** + * @param {?proto.irismod.service.Params|undefined} value + * @return {!proto.irismod.service.QueryParamsResponse} returns this +*/ +proto.irismod.service.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryParamsResponse} returns this + */ +proto.irismod.service.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse res = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.service.QueryParamsResponse.prototype.getRes = 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.irismod.service.QueryParamsResponse} returns this +*/ +proto.irismod.service.QueryParamsResponse.prototype.setRes = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryParamsResponse} returns this + */ +proto.irismod.service.QueryParamsResponse.prototype.clearRes = function() { + return this.setRes(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryParamsResponse.prototype.hasRes = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.irismod.service); diff --git a/dist/src/types/proto-types/irismod/service/service_pb.js b/dist/src/types/proto-types/irismod/service/service_pb.js new file mode 100644 index 00000000..a71a67f6 --- /dev/null +++ b/dist/src/types/proto-types/irismod/service/service_pb.js @@ -0,0 +1,3828 @@ +// source: irismod/service/service.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 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'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.irismod.service.CompactRequest', null, global); +goog.exportSymbol('proto.irismod.service.Params', null, global); +goog.exportSymbol('proto.irismod.service.Pricing', null, global); +goog.exportSymbol('proto.irismod.service.PromotionByTime', null, global); +goog.exportSymbol('proto.irismod.service.PromotionByVolume', null, global); +goog.exportSymbol('proto.irismod.service.Request', null, global); +goog.exportSymbol('proto.irismod.service.RequestContext', null, global); +goog.exportSymbol('proto.irismod.service.RequestContextBatchState', null, global); +goog.exportSymbol('proto.irismod.service.RequestContextState', null, global); +goog.exportSymbol('proto.irismod.service.Response', null, global); +goog.exportSymbol('proto.irismod.service.ServiceBinding', null, global); +goog.exportSymbol('proto.irismod.service.ServiceDefinition', 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.irismod.service.ServiceDefinition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.ServiceDefinition.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.ServiceDefinition, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.ServiceDefinition.displayName = 'proto.irismod.service.ServiceDefinition'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.ServiceBinding = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.ServiceBinding.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.ServiceBinding, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.ServiceBinding.displayName = 'proto.irismod.service.ServiceBinding'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.RequestContext = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.RequestContext.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.RequestContext, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.RequestContext.displayName = 'proto.irismod.service.RequestContext'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.Request = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.Request.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.Request, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.Request.displayName = 'proto.irismod.service.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.irismod.service.CompactRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.CompactRequest.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.CompactRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.CompactRequest.displayName = 'proto.irismod.service.CompactRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.Response = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.Response, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.Response.displayName = 'proto.irismod.service.Response'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.Pricing = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.Pricing.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.Pricing, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.Pricing.displayName = 'proto.irismod.service.Pricing'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.PromotionByTime = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.PromotionByTime, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.PromotionByTime.displayName = 'proto.irismod.service.PromotionByTime'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.PromotionByVolume = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.PromotionByVolume, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.PromotionByVolume.displayName = 'proto.irismod.service.PromotionByVolume'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.Params.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.Params.displayName = 'proto.irismod.service.Params'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.ServiceDefinition.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.irismod.service.ServiceDefinition.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.ServiceDefinition.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.ServiceDefinition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.ServiceDefinition.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + tagsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + author: jspb.Message.getFieldWithDefault(msg, 4, ""), + authorDescription: jspb.Message.getFieldWithDefault(msg, 5, ""), + schemas: 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.irismod.service.ServiceDefinition} + */ +proto.irismod.service.ServiceDefinition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.ServiceDefinition; + return proto.irismod.service.ServiceDefinition.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.ServiceDefinition} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.ServiceDefinition} + */ +proto.irismod.service.ServiceDefinition.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.addTags(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthor(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthorDescription(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setSchemas(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.ServiceDefinition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.ServiceDefinition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.ServiceDefinition} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.ServiceDefinition.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.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getAuthor(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getAuthorDescription(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSchemas(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.irismod.service.ServiceDefinition.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceDefinition} returns this + */ +proto.irismod.service.ServiceDefinition.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.irismod.service.ServiceDefinition.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceDefinition} returns this + */ +proto.irismod.service.ServiceDefinition.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated string tags = 3; + * @return {!Array} + */ +proto.irismod.service.ServiceDefinition.prototype.getTagsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.ServiceDefinition} returns this + */ +proto.irismod.service.ServiceDefinition.prototype.setTagsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.service.ServiceDefinition} returns this + */ +proto.irismod.service.ServiceDefinition.prototype.addTags = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.ServiceDefinition} returns this + */ +proto.irismod.service.ServiceDefinition.prototype.clearTagsList = function() { + return this.setTagsList([]); +}; + + +/** + * optional string author = 4; + * @return {string} + */ +proto.irismod.service.ServiceDefinition.prototype.getAuthor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceDefinition} returns this + */ +proto.irismod.service.ServiceDefinition.prototype.setAuthor = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string author_description = 5; + * @return {string} + */ +proto.irismod.service.ServiceDefinition.prototype.getAuthorDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceDefinition} returns this + */ +proto.irismod.service.ServiceDefinition.prototype.setAuthorDescription = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string schemas = 6; + * @return {string} + */ +proto.irismod.service.ServiceDefinition.prototype.getSchemas = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceDefinition} returns this + */ +proto.irismod.service.ServiceDefinition.prototype.setSchemas = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.ServiceBinding.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.irismod.service.ServiceBinding.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.ServiceBinding.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.ServiceBinding} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.ServiceBinding.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: jspb.Message.getFieldWithDefault(msg, 2, ""), + depositList: jspb.Message.toObjectList(msg.getDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + pricing: jspb.Message.getFieldWithDefault(msg, 4, ""), + qos: jspb.Message.getFieldWithDefault(msg, 5, 0), + options: jspb.Message.getFieldWithDefault(msg, 6, ""), + available: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + disabledTime: (f = msg.getDisabledTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + owner: 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.irismod.service.ServiceBinding} + */ +proto.irismod.service.ServiceBinding.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.ServiceBinding; + return proto.irismod.service.ServiceBinding.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.ServiceBinding} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.ServiceBinding} + */ +proto.irismod.service.ServiceBinding.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addDeposit(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPricing(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setQos(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setOptions(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAvailable(value); + break; + case 8: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setDisabledTime(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.ServiceBinding.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.ServiceBinding.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.ServiceBinding} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.ServiceBinding.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPricing(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getQos(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getOptions(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getAvailable(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getDisabledTime(); + if (f != null) { + writer.writeMessage( + 8, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.ServiceBinding.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.ServiceBinding.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin deposit = 3; + * @return {!Array} + */ +proto.irismod.service.ServiceBinding.prototype.getDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.ServiceBinding} returns this +*/ +proto.irismod.service.ServiceBinding.prototype.setDepositList = 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.irismod.service.ServiceBinding.prototype.addDeposit = 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.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.clearDepositList = function() { + return this.setDepositList([]); +}; + + +/** + * optional string pricing = 4; + * @return {string} + */ +proto.irismod.service.ServiceBinding.prototype.getPricing = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.setPricing = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional uint64 qos = 5; + * @return {number} + */ +proto.irismod.service.ServiceBinding.prototype.getQos = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.setQos = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string options = 6; + * @return {string} + */ +proto.irismod.service.ServiceBinding.prototype.getOptions = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.setOptions = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional bool available = 7; + * @return {boolean} + */ +proto.irismod.service.ServiceBinding.prototype.getAvailable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.setAvailable = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional google.protobuf.Timestamp disabled_time = 8; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.irismod.service.ServiceBinding.prototype.getDisabledTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.irismod.service.ServiceBinding} returns this +*/ +proto.irismod.service.ServiceBinding.prototype.setDisabledTime = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.clearDisabledTime = function() { + return this.setDisabledTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.ServiceBinding.prototype.hasDisabledTime = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string owner = 9; + * @return {string} + */ +proto.irismod.service.ServiceBinding.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.RequestContext.repeatedFields_ = [2,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.irismod.service.RequestContext.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.RequestContext.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.RequestContext} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.RequestContext.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + providersList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + consumer: jspb.Message.getFieldWithDefault(msg, 3, ""), + input: jspb.Message.getFieldWithDefault(msg, 4, ""), + serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + moduleName: jspb.Message.getFieldWithDefault(msg, 6, ""), + timeout: jspb.Message.getFieldWithDefault(msg, 7, 0), + superMode: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + repeated: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), + repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 10, 0), + repeatedTotal: jspb.Message.getFieldWithDefault(msg, 11, 0), + batchCounter: jspb.Message.getFieldWithDefault(msg, 12, 0), + batchRequestCount: jspb.Message.getFieldWithDefault(msg, 13, 0), + batchResponseCount: jspb.Message.getFieldWithDefault(msg, 14, 0), + batchResponseThreshold: jspb.Message.getFieldWithDefault(msg, 15, 0), + responseThreshold: jspb.Message.getFieldWithDefault(msg, 16, 0), + batchState: jspb.Message.getFieldWithDefault(msg, 17, 0), + state: jspb.Message.getFieldWithDefault(msg, 18, 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.irismod.service.RequestContext} + */ +proto.irismod.service.RequestContext.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.RequestContext; + return proto.irismod.service.RequestContext.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.RequestContext} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.RequestContext} + */ +proto.irismod.service.RequestContext.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addProviders(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInput(value); + break; + case 5: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFeeCap(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setModuleName(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeout(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuperMode(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRepeated(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRepeatedFrequency(value); + break; + case 11: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRepeatedTotal(value); + break; + case 12: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBatchCounter(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBatchRequestCount(value); + break; + case 14: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBatchResponseCount(value); + break; + case 15: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBatchResponseThreshold(value); + break; + case 16: + var value = /** @type {number} */ (reader.readUint32()); + msg.setResponseThreshold(value); + break; + case 17: + var value = /** @type {!proto.irismod.service.RequestContextBatchState} */ (reader.readEnum()); + msg.setBatchState(value); + break; + case 18: + var value = /** @type {!proto.irismod.service.RequestContextState} */ (reader.readEnum()); + msg.setState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.RequestContext.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.RequestContext.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.RequestContext} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.RequestContext.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvidersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInput(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getServiceFeeCapList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getModuleName(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getTimeout(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getSuperMode(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getRepeated(); + if (f) { + writer.writeBool( + 9, + f + ); + } + f = message.getRepeatedFrequency(); + if (f !== 0) { + writer.writeUint64( + 10, + f + ); + } + f = message.getRepeatedTotal(); + if (f !== 0) { + writer.writeInt64( + 11, + f + ); + } + f = message.getBatchCounter(); + if (f !== 0) { + writer.writeUint64( + 12, + f + ); + } + f = message.getBatchRequestCount(); + if (f !== 0) { + writer.writeUint32( + 13, + f + ); + } + f = message.getBatchResponseCount(); + if (f !== 0) { + writer.writeUint32( + 14, + f + ); + } + f = message.getBatchResponseThreshold(); + if (f !== 0) { + writer.writeUint32( + 15, + f + ); + } + f = message.getResponseThreshold(); + if (f !== 0) { + writer.writeUint32( + 16, + f + ); + } + f = message.getBatchState(); + if (f !== 0.0) { + writer.writeEnum( + 17, + f + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 18, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.RequestContext.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string providers = 2; + * @return {!Array} + */ +proto.irismod.service.RequestContext.prototype.getProvidersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setProvidersList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.addProviders = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.clearProvidersList = function() { + return this.setProvidersList([]); +}; + + +/** + * optional string consumer = 3; + * @return {string} + */ +proto.irismod.service.RequestContext.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setConsumer = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string input = 4; + * @return {string} + */ +proto.irismod.service.RequestContext.prototype.getInput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setInput = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee_cap = 5; + * @return {!Array} + */ +proto.irismod.service.RequestContext.prototype.getServiceFeeCapList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.RequestContext} returns this +*/ +proto.irismod.service.RequestContext.prototype.setServiceFeeCapList = 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.irismod.service.RequestContext.prototype.addServiceFeeCap = 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.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.clearServiceFeeCapList = function() { + return this.setServiceFeeCapList([]); +}; + + +/** + * optional string module_name = 6; + * @return {string} + */ +proto.irismod.service.RequestContext.prototype.getModuleName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setModuleName = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional int64 timeout = 7; + * @return {number} + */ +proto.irismod.service.RequestContext.prototype.getTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional bool super_mode = 8; + * @return {boolean} + */ +proto.irismod.service.RequestContext.prototype.getSuperMode = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setSuperMode = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + +/** + * optional bool repeated = 9; + * @return {boolean} + */ +proto.irismod.service.RequestContext.prototype.getRepeated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setRepeated = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, value); +}; + + +/** + * optional uint64 repeated_frequency = 10; + * @return {number} + */ +proto.irismod.service.RequestContext.prototype.getRepeatedFrequency = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setRepeatedFrequency = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional int64 repeated_total = 11; + * @return {number} + */ +proto.irismod.service.RequestContext.prototype.getRepeatedTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setRepeatedTotal = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + +/** + * optional uint64 batch_counter = 12; + * @return {number} + */ +proto.irismod.service.RequestContext.prototype.getBatchCounter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setBatchCounter = function(value) { + return jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional uint32 batch_request_count = 13; + * @return {number} + */ +proto.irismod.service.RequestContext.prototype.getBatchRequestCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setBatchRequestCount = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); +}; + + +/** + * optional uint32 batch_response_count = 14; + * @return {number} + */ +proto.irismod.service.RequestContext.prototype.getBatchResponseCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setBatchResponseCount = function(value) { + return jspb.Message.setProto3IntField(this, 14, value); +}; + + +/** + * optional uint32 batch_response_threshold = 15; + * @return {number} + */ +proto.irismod.service.RequestContext.prototype.getBatchResponseThreshold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setBatchResponseThreshold = function(value) { + return jspb.Message.setProto3IntField(this, 15, value); +}; + + +/** + * optional uint32 response_threshold = 16; + * @return {number} + */ +proto.irismod.service.RequestContext.prototype.getResponseThreshold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setResponseThreshold = function(value) { + return jspb.Message.setProto3IntField(this, 16, value); +}; + + +/** + * optional RequestContextBatchState batch_state = 17; + * @return {!proto.irismod.service.RequestContextBatchState} + */ +proto.irismod.service.RequestContext.prototype.getBatchState = function() { + return /** @type {!proto.irismod.service.RequestContextBatchState} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); +}; + + +/** + * @param {!proto.irismod.service.RequestContextBatchState} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setBatchState = function(value) { + return jspb.Message.setProto3EnumField(this, 17, value); +}; + + +/** + * optional RequestContextState state = 18; + * @return {!proto.irismod.service.RequestContextState} + */ +proto.irismod.service.RequestContext.prototype.getState = function() { + return /** @type {!proto.irismod.service.RequestContextState} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); +}; + + +/** + * @param {!proto.irismod.service.RequestContextState} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 18, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.Request.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.irismod.service.Request.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.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.irismod.service.Request} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.Request.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + serviceName: jspb.Message.getFieldWithDefault(msg, 2, ""), + provider: jspb.Message.getFieldWithDefault(msg, 3, ""), + consumer: jspb.Message.getFieldWithDefault(msg, 4, ""), + input: jspb.Message.getFieldWithDefault(msg, 5, ""), + serviceFeeList: jspb.Message.toObjectList(msg.getServiceFeeList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + superMode: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + requestHeight: jspb.Message.getFieldWithDefault(msg, 8, 0), + expirationHeight: jspb.Message.getFieldWithDefault(msg, 9, 0), + requestContextId: jspb.Message.getFieldWithDefault(msg, 10, ""), + requestContextBatchCounter: jspb.Message.getFieldWithDefault(msg, 11, 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.irismod.service.Request} + */ +proto.irismod.service.Request.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.Request; + return proto.irismod.service.Request.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.Request} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.Request} + */ +proto.irismod.service.Request.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setServiceName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setInput(value); + break; + case 6: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFee(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuperMode(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRequestHeight(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpirationHeight(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setRequestContextId(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestContextBatchCounter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.Request.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.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.irismod.service.Request} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.Request.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getInput(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getServiceFeeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getSuperMode(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getRequestHeight(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getExpirationHeight(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } + f = message.getRequestContextBatchCounter(); + if (f !== 0) { + writer.writeUint64( + 11, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.service.Request.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string service_name = 2; + * @return {string} + */ +proto.irismod.service.Request.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string provider = 3; + * @return {string} + */ +proto.irismod.service.Request.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string consumer = 4; + * @return {string} + */ +proto.irismod.service.Request.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setConsumer = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string input = 5; + * @return {string} + */ +proto.irismod.service.Request.prototype.getInput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setInput = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee = 6; + * @return {!Array} + */ +proto.irismod.service.Request.prototype.getServiceFeeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.Request} returns this +*/ +proto.irismod.service.Request.prototype.setServiceFeeList = 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.irismod.service.Request.prototype.addServiceFee = 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.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.clearServiceFeeList = function() { + return this.setServiceFeeList([]); +}; + + +/** + * optional bool super_mode = 7; + * @return {boolean} + */ +proto.irismod.service.Request.prototype.getSuperMode = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setSuperMode = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional int64 request_height = 8; + * @return {number} + */ +proto.irismod.service.Request.prototype.getRequestHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setRequestHeight = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional int64 expiration_height = 9; + * @return {number} + */ +proto.irismod.service.Request.prototype.getExpirationHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setExpirationHeight = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional string request_context_id = 10; + * @return {string} + */ +proto.irismod.service.Request.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + +/** + * optional uint64 request_context_batch_counter = 11; + * @return {number} + */ +proto.irismod.service.Request.prototype.getRequestContextBatchCounter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setRequestContextBatchCounter = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.CompactRequest.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.irismod.service.CompactRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.CompactRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.CompactRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.CompactRequest.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), + requestContextBatchCounter: jspb.Message.getFieldWithDefault(msg, 2, 0), + provider: jspb.Message.getFieldWithDefault(msg, 3, ""), + serviceFeeList: jspb.Message.toObjectList(msg.getServiceFeeList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + requestHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), + expirationHeight: 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.irismod.service.CompactRequest} + */ +proto.irismod.service.CompactRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.CompactRequest; + return proto.irismod.service.CompactRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.CompactRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.CompactRequest} + */ +proto.irismod.service.CompactRequest.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.setRequestContextId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestContextBatchCounter(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFee(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRequestHeight(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpirationHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.CompactRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.CompactRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.CompactRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.CompactRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRequestContextBatchCounter(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getServiceFeeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRequestHeight(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getExpirationHeight(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.CompactRequest.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.CompactRequest} returns this + */ +proto.irismod.service.CompactRequest.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 request_context_batch_counter = 2; + * @return {number} + */ +proto.irismod.service.CompactRequest.prototype.getRequestContextBatchCounter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.CompactRequest} returns this + */ +proto.irismod.service.CompactRequest.prototype.setRequestContextBatchCounter = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string provider = 3; + * @return {string} + */ +proto.irismod.service.CompactRequest.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.CompactRequest} returns this + */ +proto.irismod.service.CompactRequest.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee = 4; + * @return {!Array} + */ +proto.irismod.service.CompactRequest.prototype.getServiceFeeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.CompactRequest} returns this +*/ +proto.irismod.service.CompactRequest.prototype.setServiceFeeList = 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.irismod.service.CompactRequest.prototype.addServiceFee = 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.irismod.service.CompactRequest} returns this + */ +proto.irismod.service.CompactRequest.prototype.clearServiceFeeList = function() { + return this.setServiceFeeList([]); +}; + + +/** + * optional int64 request_height = 5; + * @return {number} + */ +proto.irismod.service.CompactRequest.prototype.getRequestHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.CompactRequest} returns this + */ +proto.irismod.service.CompactRequest.prototype.setRequestHeight = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 expiration_height = 6; + * @return {number} + */ +proto.irismod.service.CompactRequest.prototype.getExpirationHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.CompactRequest} returns this + */ +proto.irismod.service.CompactRequest.prototype.setExpirationHeight = 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.irismod.service.Response.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.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.irismod.service.Response} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.Response.toObject = function(includeInstance, msg) { + var f, obj = { + provider: jspb.Message.getFieldWithDefault(msg, 1, ""), + consumer: jspb.Message.getFieldWithDefault(msg, 2, ""), + result: jspb.Message.getFieldWithDefault(msg, 3, ""), + output: jspb.Message.getFieldWithDefault(msg, 4, ""), + requestContextId: jspb.Message.getFieldWithDefault(msg, 5, ""), + requestContextBatchCounter: 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.irismod.service.Response} + */ +proto.irismod.service.Response.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.Response; + return proto.irismod.service.Response.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.Response} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.Response} + */ +proto.irismod.service.Response.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.setProvider(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setResult(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setOutput(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setRequestContextId(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestContextBatchCounter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.Response.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.Response.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.Response} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.Response.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getResult(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getOutput(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getRequestContextBatchCounter(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } +}; + + +/** + * optional string provider = 1; + * @return {string} + */ +proto.irismod.service.Response.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Response} returns this + */ +proto.irismod.service.Response.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string consumer = 2; + * @return {string} + */ +proto.irismod.service.Response.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Response} returns this + */ +proto.irismod.service.Response.prototype.setConsumer = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string result = 3; + * @return {string} + */ +proto.irismod.service.Response.prototype.getResult = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Response} returns this + */ +proto.irismod.service.Response.prototype.setResult = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string output = 4; + * @return {string} + */ +proto.irismod.service.Response.prototype.getOutput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Response} returns this + */ +proto.irismod.service.Response.prototype.setOutput = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string request_context_id = 5; + * @return {string} + */ +proto.irismod.service.Response.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Response} returns this + */ +proto.irismod.service.Response.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional uint64 request_context_batch_counter = 6; + * @return {number} + */ +proto.irismod.service.Response.prototype.getRequestContextBatchCounter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.Response} returns this + */ +proto.irismod.service.Response.prototype.setRequestContextBatchCounter = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.Pricing.repeatedFields_ = [6,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.irismod.service.Pricing.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.Pricing.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.Pricing} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.Pricing.toObject = function(includeInstance, msg) { + var f, obj = { + priceList: jspb.Message.toObjectList(msg.getPriceList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + promotionsByTimeList: jspb.Message.toObjectList(msg.getPromotionsByTimeList(), + proto.irismod.service.PromotionByTime.toObject, includeInstance), + promotionsByVolumeList: jspb.Message.toObjectList(msg.getPromotionsByVolumeList(), + proto.irismod.service.PromotionByVolume.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.irismod.service.Pricing} + */ +proto.irismod.service.Pricing.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.Pricing; + return proto.irismod.service.Pricing.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.Pricing} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.Pricing} + */ +proto.irismod.service.Pricing.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 6: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addPrice(value); + break; + case 2: + var value = new proto.irismod.service.PromotionByTime; + reader.readMessage(value,proto.irismod.service.PromotionByTime.deserializeBinaryFromReader); + msg.addPromotionsByTime(value); + break; + case 3: + var value = new proto.irismod.service.PromotionByVolume; + reader.readMessage(value,proto.irismod.service.PromotionByVolume.deserializeBinaryFromReader); + msg.addPromotionsByVolume(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.Pricing.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.Pricing.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.Pricing} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.Pricing.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPriceList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPromotionsByTimeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.irismod.service.PromotionByTime.serializeBinaryToWriter + ); + } + f = message.getPromotionsByVolumeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.irismod.service.PromotionByVolume.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin price = 6; + * @return {!Array} + */ +proto.irismod.service.Pricing.prototype.getPriceList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.Pricing} returns this +*/ +proto.irismod.service.Pricing.prototype.setPriceList = 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.irismod.service.Pricing.prototype.addPrice = 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.irismod.service.Pricing} returns this + */ +proto.irismod.service.Pricing.prototype.clearPriceList = function() { + return this.setPriceList([]); +}; + + +/** + * repeated PromotionByTime promotions_by_time = 2; + * @return {!Array} + */ +proto.irismod.service.Pricing.prototype.getPromotionsByTimeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.service.PromotionByTime, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.Pricing} returns this +*/ +proto.irismod.service.Pricing.prototype.setPromotionsByTimeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.service.PromotionByTime=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.service.PromotionByTime} + */ +proto.irismod.service.Pricing.prototype.addPromotionsByTime = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.service.PromotionByTime, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.Pricing} returns this + */ +proto.irismod.service.Pricing.prototype.clearPromotionsByTimeList = function() { + return this.setPromotionsByTimeList([]); +}; + + +/** + * repeated PromotionByVolume promotions_by_volume = 3; + * @return {!Array} + */ +proto.irismod.service.Pricing.prototype.getPromotionsByVolumeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.service.PromotionByVolume, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.Pricing} returns this +*/ +proto.irismod.service.Pricing.prototype.setPromotionsByVolumeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.irismod.service.PromotionByVolume=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.service.PromotionByVolume} + */ +proto.irismod.service.Pricing.prototype.addPromotionsByVolume = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.irismod.service.PromotionByVolume, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.Pricing} returns this + */ +proto.irismod.service.Pricing.prototype.clearPromotionsByVolumeList = function() { + return this.setPromotionsByVolumeList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.service.PromotionByTime.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.PromotionByTime.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.PromotionByTime} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.PromotionByTime.toObject = function(includeInstance, msg) { + var f, obj = { + startTime: (f = msg.getStartTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + endTime: (f = msg.getEndTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + discount: 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.irismod.service.PromotionByTime} + */ +proto.irismod.service.PromotionByTime.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.PromotionByTime; + return proto.irismod.service.PromotionByTime.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.PromotionByTime} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.PromotionByTime} + */ +proto.irismod.service.PromotionByTime.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setStartTime(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setEndTime(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDiscount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.PromotionByTime.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.PromotionByTime.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.PromotionByTime} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.PromotionByTime.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartTime(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getEndTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getDiscount(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional google.protobuf.Timestamp start_time = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.irismod.service.PromotionByTime.prototype.getStartTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.irismod.service.PromotionByTime} returns this +*/ +proto.irismod.service.PromotionByTime.prototype.setStartTime = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.PromotionByTime} returns this + */ +proto.irismod.service.PromotionByTime.prototype.clearStartTime = function() { + return this.setStartTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.PromotionByTime.prototype.hasStartTime = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Timestamp end_time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.irismod.service.PromotionByTime.prototype.getEndTime = 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.irismod.service.PromotionByTime} returns this +*/ +proto.irismod.service.PromotionByTime.prototype.setEndTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.PromotionByTime} returns this + */ +proto.irismod.service.PromotionByTime.prototype.clearEndTime = function() { + return this.setEndTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.PromotionByTime.prototype.hasEndTime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string discount = 3; + * @return {string} + */ +proto.irismod.service.PromotionByTime.prototype.getDiscount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.PromotionByTime} returns this + */ +proto.irismod.service.PromotionByTime.prototype.setDiscount = 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.irismod.service.PromotionByVolume.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.PromotionByVolume.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.PromotionByVolume} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.PromotionByVolume.toObject = function(includeInstance, msg) { + var f, obj = { + volume: jspb.Message.getFieldWithDefault(msg, 1, 0), + discount: 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.irismod.service.PromotionByVolume} + */ +proto.irismod.service.PromotionByVolume.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.PromotionByVolume; + return proto.irismod.service.PromotionByVolume.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.PromotionByVolume} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.PromotionByVolume} + */ +proto.irismod.service.PromotionByVolume.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.setVolume(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDiscount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.PromotionByVolume.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.PromotionByVolume.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.PromotionByVolume} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.PromotionByVolume.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVolume(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getDiscount(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint64 volume = 1; + * @return {number} + */ +proto.irismod.service.PromotionByVolume.prototype.getVolume = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.PromotionByVolume} returns this + */ +proto.irismod.service.PromotionByVolume.prototype.setVolume = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string discount = 2; + * @return {string} + */ +proto.irismod.service.PromotionByVolume.prototype.getDiscount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.PromotionByVolume} returns this + */ +proto.irismod.service.PromotionByVolume.prototype.setDiscount = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.Params.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.irismod.service.Params.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.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.irismod.service.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.Params.toObject = function(includeInstance, msg) { + var f, obj = { + maxRequestTimeout: jspb.Message.getFieldWithDefault(msg, 1, 0), + minDepositMultiple: jspb.Message.getFieldWithDefault(msg, 2, 0), + minDepositList: jspb.Message.toObjectList(msg.getMinDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + serviceFeeTax: jspb.Message.getFieldWithDefault(msg, 4, ""), + slashFraction: jspb.Message.getFieldWithDefault(msg, 5, ""), + complaintRetrospect: (f = msg.getComplaintRetrospect()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + arbitrationTimeLimit: (f = msg.getArbitrationTimeLimit()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + txSizeLimit: jspb.Message.getFieldWithDefault(msg, 8, 0), + baseDenom: 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.irismod.service.Params} + */ +proto.irismod.service.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.Params; + return proto.irismod.service.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.Params} + */ +proto.irismod.service.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.readInt64()); + msg.setMaxRequestTimeout(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMinDepositMultiple(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addMinDeposit(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setServiceFeeTax(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSlashFraction(value); + break; + case 6: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setComplaintRetrospect(value); + break; + case 7: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setArbitrationTimeLimit(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTxSizeLimit(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setBaseDenom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.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.irismod.service.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxRequestTimeout(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMinDepositMultiple(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getMinDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getServiceFeeTax(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getSlashFraction(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getComplaintRetrospect(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getArbitrationTimeLimit(); + if (f != null) { + writer.writeMessage( + 7, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getTxSizeLimit(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } + f = message.getBaseDenom(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } +}; + + +/** + * optional int64 max_request_timeout = 1; + * @return {number} + */ +proto.irismod.service.Params.prototype.getMaxRequestTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.setMaxRequestTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 min_deposit_multiple = 2; + * @return {number} + */ +proto.irismod.service.Params.prototype.getMinDepositMultiple = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.setMinDepositMultiple = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin min_deposit = 3; + * @return {!Array} + */ +proto.irismod.service.Params.prototype.getMinDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.Params} returns this +*/ +proto.irismod.service.Params.prototype.setMinDepositList = 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.irismod.service.Params.prototype.addMinDeposit = 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.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.clearMinDepositList = function() { + return this.setMinDepositList([]); +}; + + +/** + * optional string service_fee_tax = 4; + * @return {string} + */ +proto.irismod.service.Params.prototype.getServiceFeeTax = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.setServiceFeeTax = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string slash_fraction = 5; + * @return {string} + */ +proto.irismod.service.Params.prototype.getSlashFraction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.setSlashFraction = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional google.protobuf.Duration complaint_retrospect = 6; + * @return {?proto.google.protobuf.Duration} + */ +proto.irismod.service.Params.prototype.getComplaintRetrospect = 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.irismod.service.Params} returns this +*/ +proto.irismod.service.Params.prototype.setComplaintRetrospect = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.clearComplaintRetrospect = function() { + return this.setComplaintRetrospect(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.Params.prototype.hasComplaintRetrospect = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional google.protobuf.Duration arbitration_time_limit = 7; + * @return {?proto.google.protobuf.Duration} + */ +proto.irismod.service.Params.prototype.getArbitrationTimeLimit = 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.irismod.service.Params} returns this +*/ +proto.irismod.service.Params.prototype.setArbitrationTimeLimit = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.clearArbitrationTimeLimit = function() { + return this.setArbitrationTimeLimit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.Params.prototype.hasArbitrationTimeLimit = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional uint64 tx_size_limit = 8; + * @return {number} + */ +proto.irismod.service.Params.prototype.getTxSizeLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.setTxSizeLimit = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional string base_denom = 9; + * @return {string} + */ +proto.irismod.service.Params.prototype.getBaseDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.setBaseDenom = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * @enum {number} + */ +proto.irismod.service.RequestContextBatchState = { + BATCH_RUNNING: 0, + BATCH_COMPLETED: 1 +}; + +/** + * @enum {number} + */ +proto.irismod.service.RequestContextState = { + RUNNING: 0, + PAUSED: 1, + COMPLETED: 2 +}; + +goog.object.extend(exports, proto.irismod.service); diff --git a/dist/src/types/proto-types/irismod/service/tx_grpc_web_pb.js b/dist/src/types/proto-types/irismod/service/tx_grpc_web_pb.js new file mode 100644 index 00000000..07815aca --- /dev/null +++ b/dist/src/types/proto-types/irismod/service/tx_grpc_web_pb.js @@ -0,0 +1,1199 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.service + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.service = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.service.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.service.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgDefineService, + * !proto.irismod.service.MsgDefineServiceResponse>} + */ +const methodDescriptor_Msg_DefineService = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/DefineService', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgDefineService, + proto.irismod.service.MsgDefineServiceResponse, + /** + * @param {!proto.irismod.service.MsgDefineService} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgDefineServiceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgDefineService, + * !proto.irismod.service.MsgDefineServiceResponse>} + */ +const methodInfo_Msg_DefineService = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgDefineServiceResponse, + /** + * @param {!proto.irismod.service.MsgDefineService} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgDefineServiceResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgDefineService} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgDefineServiceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.defineService = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/DefineService', + request, + metadata || {}, + methodDescriptor_Msg_DefineService, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgDefineService} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.defineService = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/DefineService', + request, + metadata || {}, + methodDescriptor_Msg_DefineService); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgBindService, + * !proto.irismod.service.MsgBindServiceResponse>} + */ +const methodDescriptor_Msg_BindService = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/BindService', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgBindService, + proto.irismod.service.MsgBindServiceResponse, + /** + * @param {!proto.irismod.service.MsgBindService} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgBindServiceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgBindService, + * !proto.irismod.service.MsgBindServiceResponse>} + */ +const methodInfo_Msg_BindService = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgBindServiceResponse, + /** + * @param {!proto.irismod.service.MsgBindService} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgBindServiceResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgBindService} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgBindServiceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.bindService = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/BindService', + request, + metadata || {}, + methodDescriptor_Msg_BindService, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgBindService} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.bindService = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/BindService', + request, + metadata || {}, + methodDescriptor_Msg_BindService); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgUpdateServiceBinding, + * !proto.irismod.service.MsgUpdateServiceBindingResponse>} + */ +const methodDescriptor_Msg_UpdateServiceBinding = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/UpdateServiceBinding', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgUpdateServiceBinding, + proto.irismod.service.MsgUpdateServiceBindingResponse, + /** + * @param {!proto.irismod.service.MsgUpdateServiceBinding} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgUpdateServiceBindingResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgUpdateServiceBinding, + * !proto.irismod.service.MsgUpdateServiceBindingResponse>} + */ +const methodInfo_Msg_UpdateServiceBinding = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgUpdateServiceBindingResponse, + /** + * @param {!proto.irismod.service.MsgUpdateServiceBinding} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgUpdateServiceBindingResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgUpdateServiceBinding} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgUpdateServiceBindingResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.updateServiceBinding = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/UpdateServiceBinding', + request, + metadata || {}, + methodDescriptor_Msg_UpdateServiceBinding, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgUpdateServiceBinding} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.updateServiceBinding = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/UpdateServiceBinding', + request, + metadata || {}, + methodDescriptor_Msg_UpdateServiceBinding); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgSetWithdrawAddress, + * !proto.irismod.service.MsgSetWithdrawAddressResponse>} + */ +const methodDescriptor_Msg_SetWithdrawAddress = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/SetWithdrawAddress', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgSetWithdrawAddress, + proto.irismod.service.MsgSetWithdrawAddressResponse, + /** + * @param {!proto.irismod.service.MsgSetWithdrawAddress} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgSetWithdrawAddressResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgSetWithdrawAddress, + * !proto.irismod.service.MsgSetWithdrawAddressResponse>} + */ +const methodInfo_Msg_SetWithdrawAddress = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgSetWithdrawAddressResponse, + /** + * @param {!proto.irismod.service.MsgSetWithdrawAddress} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgSetWithdrawAddressResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgSetWithdrawAddress} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgSetWithdrawAddressResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.setWithdrawAddress = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/SetWithdrawAddress', + request, + metadata || {}, + methodDescriptor_Msg_SetWithdrawAddress, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgSetWithdrawAddress} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.setWithdrawAddress = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/SetWithdrawAddress', + request, + metadata || {}, + methodDescriptor_Msg_SetWithdrawAddress); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgEnableServiceBinding, + * !proto.irismod.service.MsgEnableServiceBindingResponse>} + */ +const methodDescriptor_Msg_EnableServiceBinding = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/EnableServiceBinding', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgEnableServiceBinding, + proto.irismod.service.MsgEnableServiceBindingResponse, + /** + * @param {!proto.irismod.service.MsgEnableServiceBinding} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgEnableServiceBindingResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgEnableServiceBinding, + * !proto.irismod.service.MsgEnableServiceBindingResponse>} + */ +const methodInfo_Msg_EnableServiceBinding = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgEnableServiceBindingResponse, + /** + * @param {!proto.irismod.service.MsgEnableServiceBinding} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgEnableServiceBindingResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgEnableServiceBinding} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgEnableServiceBindingResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.enableServiceBinding = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/EnableServiceBinding', + request, + metadata || {}, + methodDescriptor_Msg_EnableServiceBinding, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgEnableServiceBinding} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.enableServiceBinding = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/EnableServiceBinding', + request, + metadata || {}, + methodDescriptor_Msg_EnableServiceBinding); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgDisableServiceBinding, + * !proto.irismod.service.MsgDisableServiceBindingResponse>} + */ +const methodDescriptor_Msg_DisableServiceBinding = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/DisableServiceBinding', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgDisableServiceBinding, + proto.irismod.service.MsgDisableServiceBindingResponse, + /** + * @param {!proto.irismod.service.MsgDisableServiceBinding} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgDisableServiceBindingResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgDisableServiceBinding, + * !proto.irismod.service.MsgDisableServiceBindingResponse>} + */ +const methodInfo_Msg_DisableServiceBinding = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgDisableServiceBindingResponse, + /** + * @param {!proto.irismod.service.MsgDisableServiceBinding} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgDisableServiceBindingResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgDisableServiceBinding} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgDisableServiceBindingResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.disableServiceBinding = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/DisableServiceBinding', + request, + metadata || {}, + methodDescriptor_Msg_DisableServiceBinding, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgDisableServiceBinding} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.disableServiceBinding = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/DisableServiceBinding', + request, + metadata || {}, + methodDescriptor_Msg_DisableServiceBinding); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgRefundServiceDeposit, + * !proto.irismod.service.MsgRefundServiceDepositResponse>} + */ +const methodDescriptor_Msg_RefundServiceDeposit = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/RefundServiceDeposit', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgRefundServiceDeposit, + proto.irismod.service.MsgRefundServiceDepositResponse, + /** + * @param {!proto.irismod.service.MsgRefundServiceDeposit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgRefundServiceDepositResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgRefundServiceDeposit, + * !proto.irismod.service.MsgRefundServiceDepositResponse>} + */ +const methodInfo_Msg_RefundServiceDeposit = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgRefundServiceDepositResponse, + /** + * @param {!proto.irismod.service.MsgRefundServiceDeposit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgRefundServiceDepositResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgRefundServiceDeposit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgRefundServiceDepositResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.refundServiceDeposit = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/RefundServiceDeposit', + request, + metadata || {}, + methodDescriptor_Msg_RefundServiceDeposit, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgRefundServiceDeposit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.refundServiceDeposit = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/RefundServiceDeposit', + request, + metadata || {}, + methodDescriptor_Msg_RefundServiceDeposit); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgCallService, + * !proto.irismod.service.MsgCallServiceResponse>} + */ +const methodDescriptor_Msg_CallService = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/CallService', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgCallService, + proto.irismod.service.MsgCallServiceResponse, + /** + * @param {!proto.irismod.service.MsgCallService} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgCallServiceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgCallService, + * !proto.irismod.service.MsgCallServiceResponse>} + */ +const methodInfo_Msg_CallService = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgCallServiceResponse, + /** + * @param {!proto.irismod.service.MsgCallService} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgCallServiceResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgCallService} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgCallServiceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.callService = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/CallService', + request, + metadata || {}, + methodDescriptor_Msg_CallService, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgCallService} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.callService = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/CallService', + request, + metadata || {}, + methodDescriptor_Msg_CallService); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgRespondService, + * !proto.irismod.service.MsgRespondServiceResponse>} + */ +const methodDescriptor_Msg_RespondService = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/RespondService', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgRespondService, + proto.irismod.service.MsgRespondServiceResponse, + /** + * @param {!proto.irismod.service.MsgRespondService} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgRespondServiceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgRespondService, + * !proto.irismod.service.MsgRespondServiceResponse>} + */ +const methodInfo_Msg_RespondService = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgRespondServiceResponse, + /** + * @param {!proto.irismod.service.MsgRespondService} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgRespondServiceResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgRespondService} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgRespondServiceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.respondService = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/RespondService', + request, + metadata || {}, + methodDescriptor_Msg_RespondService, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgRespondService} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.respondService = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/RespondService', + request, + metadata || {}, + methodDescriptor_Msg_RespondService); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgPauseRequestContext, + * !proto.irismod.service.MsgPauseRequestContextResponse>} + */ +const methodDescriptor_Msg_PauseRequestContext = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/PauseRequestContext', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgPauseRequestContext, + proto.irismod.service.MsgPauseRequestContextResponse, + /** + * @param {!proto.irismod.service.MsgPauseRequestContext} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgPauseRequestContextResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgPauseRequestContext, + * !proto.irismod.service.MsgPauseRequestContextResponse>} + */ +const methodInfo_Msg_PauseRequestContext = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgPauseRequestContextResponse, + /** + * @param {!proto.irismod.service.MsgPauseRequestContext} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgPauseRequestContextResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgPauseRequestContext} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgPauseRequestContextResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.pauseRequestContext = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/PauseRequestContext', + request, + metadata || {}, + methodDescriptor_Msg_PauseRequestContext, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgPauseRequestContext} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.pauseRequestContext = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/PauseRequestContext', + request, + metadata || {}, + methodDescriptor_Msg_PauseRequestContext); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgStartRequestContext, + * !proto.irismod.service.MsgStartRequestContextResponse>} + */ +const methodDescriptor_Msg_StartRequestContext = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/StartRequestContext', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgStartRequestContext, + proto.irismod.service.MsgStartRequestContextResponse, + /** + * @param {!proto.irismod.service.MsgStartRequestContext} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgStartRequestContextResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgStartRequestContext, + * !proto.irismod.service.MsgStartRequestContextResponse>} + */ +const methodInfo_Msg_StartRequestContext = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgStartRequestContextResponse, + /** + * @param {!proto.irismod.service.MsgStartRequestContext} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgStartRequestContextResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgStartRequestContext} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgStartRequestContextResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.startRequestContext = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/StartRequestContext', + request, + metadata || {}, + methodDescriptor_Msg_StartRequestContext, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgStartRequestContext} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.startRequestContext = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/StartRequestContext', + request, + metadata || {}, + methodDescriptor_Msg_StartRequestContext); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgKillRequestContext, + * !proto.irismod.service.MsgKillRequestContextResponse>} + */ +const methodDescriptor_Msg_KillRequestContext = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/KillRequestContext', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgKillRequestContext, + proto.irismod.service.MsgKillRequestContextResponse, + /** + * @param {!proto.irismod.service.MsgKillRequestContext} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgKillRequestContextResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgKillRequestContext, + * !proto.irismod.service.MsgKillRequestContextResponse>} + */ +const methodInfo_Msg_KillRequestContext = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgKillRequestContextResponse, + /** + * @param {!proto.irismod.service.MsgKillRequestContext} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgKillRequestContextResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgKillRequestContext} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgKillRequestContextResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.killRequestContext = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/KillRequestContext', + request, + metadata || {}, + methodDescriptor_Msg_KillRequestContext, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgKillRequestContext} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.killRequestContext = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/KillRequestContext', + request, + metadata || {}, + methodDescriptor_Msg_KillRequestContext); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgUpdateRequestContext, + * !proto.irismod.service.MsgUpdateRequestContextResponse>} + */ +const methodDescriptor_Msg_UpdateRequestContext = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/UpdateRequestContext', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgUpdateRequestContext, + proto.irismod.service.MsgUpdateRequestContextResponse, + /** + * @param {!proto.irismod.service.MsgUpdateRequestContext} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgUpdateRequestContextResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgUpdateRequestContext, + * !proto.irismod.service.MsgUpdateRequestContextResponse>} + */ +const methodInfo_Msg_UpdateRequestContext = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgUpdateRequestContextResponse, + /** + * @param {!proto.irismod.service.MsgUpdateRequestContext} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgUpdateRequestContextResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgUpdateRequestContext} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgUpdateRequestContextResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.updateRequestContext = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/UpdateRequestContext', + request, + metadata || {}, + methodDescriptor_Msg_UpdateRequestContext, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgUpdateRequestContext} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.updateRequestContext = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/UpdateRequestContext', + request, + metadata || {}, + methodDescriptor_Msg_UpdateRequestContext); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgWithdrawEarnedFees, + * !proto.irismod.service.MsgWithdrawEarnedFeesResponse>} + */ +const methodDescriptor_Msg_WithdrawEarnedFees = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/WithdrawEarnedFees', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgWithdrawEarnedFees, + proto.irismod.service.MsgWithdrawEarnedFeesResponse, + /** + * @param {!proto.irismod.service.MsgWithdrawEarnedFees} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgWithdrawEarnedFeesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgWithdrawEarnedFees, + * !proto.irismod.service.MsgWithdrawEarnedFeesResponse>} + */ +const methodInfo_Msg_WithdrawEarnedFees = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgWithdrawEarnedFeesResponse, + /** + * @param {!proto.irismod.service.MsgWithdrawEarnedFees} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgWithdrawEarnedFeesResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgWithdrawEarnedFees} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgWithdrawEarnedFeesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.withdrawEarnedFees = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/WithdrawEarnedFees', + request, + metadata || {}, + methodDescriptor_Msg_WithdrawEarnedFees, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgWithdrawEarnedFees} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.withdrawEarnedFees = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/WithdrawEarnedFees', + request, + metadata || {}, + methodDescriptor_Msg_WithdrawEarnedFees); +}; + + +module.exports = proto.irismod.service; + diff --git a/dist/src/types/proto-types/irismod/service/tx_pb.js b/dist/src/types/proto-types/irismod/service/tx_pb.js new file mode 100644 index 00000000..f075c923 --- /dev/null +++ b/dist/src/types/proto-types/irismod/service/tx_pb.js @@ -0,0 +1,5522 @@ +// source: irismod/service/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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.irismod.service.MsgBindService', null, global); +goog.exportSymbol('proto.irismod.service.MsgBindServiceResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgCallService', null, global); +goog.exportSymbol('proto.irismod.service.MsgCallServiceResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgDefineService', null, global); +goog.exportSymbol('proto.irismod.service.MsgDefineServiceResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgDisableServiceBinding', null, global); +goog.exportSymbol('proto.irismod.service.MsgDisableServiceBindingResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgEnableServiceBinding', null, global); +goog.exportSymbol('proto.irismod.service.MsgEnableServiceBindingResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgKillRequestContext', null, global); +goog.exportSymbol('proto.irismod.service.MsgKillRequestContextResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgPauseRequestContext', null, global); +goog.exportSymbol('proto.irismod.service.MsgPauseRequestContextResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgRefundServiceDeposit', null, global); +goog.exportSymbol('proto.irismod.service.MsgRefundServiceDepositResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgRespondService', null, global); +goog.exportSymbol('proto.irismod.service.MsgRespondServiceResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgSetWithdrawAddress', null, global); +goog.exportSymbol('proto.irismod.service.MsgSetWithdrawAddressResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgStartRequestContext', null, global); +goog.exportSymbol('proto.irismod.service.MsgStartRequestContextResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgUpdateRequestContext', null, global); +goog.exportSymbol('proto.irismod.service.MsgUpdateRequestContextResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgUpdateServiceBinding', null, global); +goog.exportSymbol('proto.irismod.service.MsgUpdateServiceBindingResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgWithdrawEarnedFees', null, global); +goog.exportSymbol('proto.irismod.service.MsgWithdrawEarnedFeesResponse', 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.irismod.service.MsgDefineService = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.MsgDefineService.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.MsgDefineService, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgDefineService.displayName = 'proto.irismod.service.MsgDefineService'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgDefineServiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgDefineServiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgDefineServiceResponse.displayName = 'proto.irismod.service.MsgDefineServiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgBindService = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.MsgBindService.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.MsgBindService, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgBindService.displayName = 'proto.irismod.service.MsgBindService'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgBindServiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgBindServiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgBindServiceResponse.displayName = 'proto.irismod.service.MsgBindServiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgUpdateServiceBinding = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.MsgUpdateServiceBinding.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.MsgUpdateServiceBinding, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgUpdateServiceBinding.displayName = 'proto.irismod.service.MsgUpdateServiceBinding'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgUpdateServiceBindingResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgUpdateServiceBindingResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgUpdateServiceBindingResponse.displayName = 'proto.irismod.service.MsgUpdateServiceBindingResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgSetWithdrawAddress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgSetWithdrawAddress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgSetWithdrawAddress.displayName = 'proto.irismod.service.MsgSetWithdrawAddress'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgSetWithdrawAddressResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgSetWithdrawAddressResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgSetWithdrawAddressResponse.displayName = 'proto.irismod.service.MsgSetWithdrawAddressResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgDisableServiceBinding = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgDisableServiceBinding, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgDisableServiceBinding.displayName = 'proto.irismod.service.MsgDisableServiceBinding'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgDisableServiceBindingResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgDisableServiceBindingResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgDisableServiceBindingResponse.displayName = 'proto.irismod.service.MsgDisableServiceBindingResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgEnableServiceBinding = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.MsgEnableServiceBinding.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.MsgEnableServiceBinding, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgEnableServiceBinding.displayName = 'proto.irismod.service.MsgEnableServiceBinding'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgEnableServiceBindingResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgEnableServiceBindingResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgEnableServiceBindingResponse.displayName = 'proto.irismod.service.MsgEnableServiceBindingResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgRefundServiceDeposit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgRefundServiceDeposit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgRefundServiceDeposit.displayName = 'proto.irismod.service.MsgRefundServiceDeposit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgRefundServiceDepositResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgRefundServiceDepositResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgRefundServiceDepositResponse.displayName = 'proto.irismod.service.MsgRefundServiceDepositResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgCallService = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.MsgCallService.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.MsgCallService, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgCallService.displayName = 'proto.irismod.service.MsgCallService'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgCallServiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgCallServiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgCallServiceResponse.displayName = 'proto.irismod.service.MsgCallServiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgRespondService = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgRespondService, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgRespondService.displayName = 'proto.irismod.service.MsgRespondService'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgRespondServiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgRespondServiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgRespondServiceResponse.displayName = 'proto.irismod.service.MsgRespondServiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgPauseRequestContext = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgPauseRequestContext, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgPauseRequestContext.displayName = 'proto.irismod.service.MsgPauseRequestContext'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgPauseRequestContextResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgPauseRequestContextResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgPauseRequestContextResponse.displayName = 'proto.irismod.service.MsgPauseRequestContextResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgStartRequestContext = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgStartRequestContext, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgStartRequestContext.displayName = 'proto.irismod.service.MsgStartRequestContext'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgStartRequestContextResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgStartRequestContextResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgStartRequestContextResponse.displayName = 'proto.irismod.service.MsgStartRequestContextResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgKillRequestContext = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgKillRequestContext, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgKillRequestContext.displayName = 'proto.irismod.service.MsgKillRequestContext'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgKillRequestContextResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgKillRequestContextResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgKillRequestContextResponse.displayName = 'proto.irismod.service.MsgKillRequestContextResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgUpdateRequestContext = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.MsgUpdateRequestContext.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.MsgUpdateRequestContext, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgUpdateRequestContext.displayName = 'proto.irismod.service.MsgUpdateRequestContext'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgUpdateRequestContextResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgUpdateRequestContextResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgUpdateRequestContextResponse.displayName = 'proto.irismod.service.MsgUpdateRequestContextResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgWithdrawEarnedFees = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgWithdrawEarnedFees, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgWithdrawEarnedFees.displayName = 'proto.irismod.service.MsgWithdrawEarnedFees'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgWithdrawEarnedFeesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgWithdrawEarnedFeesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgWithdrawEarnedFeesResponse.displayName = 'proto.irismod.service.MsgWithdrawEarnedFeesResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.MsgDefineService.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.irismod.service.MsgDefineService.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgDefineService.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgDefineService} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgDefineService.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + tagsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + author: jspb.Message.getFieldWithDefault(msg, 4, ""), + authorDescription: jspb.Message.getFieldWithDefault(msg, 5, ""), + schemas: 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.irismod.service.MsgDefineService} + */ +proto.irismod.service.MsgDefineService.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgDefineService; + return proto.irismod.service.MsgDefineService.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgDefineService} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgDefineService} + */ +proto.irismod.service.MsgDefineService.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.addTags(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthor(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthorDescription(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setSchemas(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgDefineService.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgDefineService.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgDefineService} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgDefineService.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.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getAuthor(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getAuthorDescription(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSchemas(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.irismod.service.MsgDefineService.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgDefineService} returns this + */ +proto.irismod.service.MsgDefineService.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.irismod.service.MsgDefineService.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgDefineService} returns this + */ +proto.irismod.service.MsgDefineService.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated string tags = 3; + * @return {!Array} + */ +proto.irismod.service.MsgDefineService.prototype.getTagsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.MsgDefineService} returns this + */ +proto.irismod.service.MsgDefineService.prototype.setTagsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.service.MsgDefineService} returns this + */ +proto.irismod.service.MsgDefineService.prototype.addTags = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.MsgDefineService} returns this + */ +proto.irismod.service.MsgDefineService.prototype.clearTagsList = function() { + return this.setTagsList([]); +}; + + +/** + * optional string author = 4; + * @return {string} + */ +proto.irismod.service.MsgDefineService.prototype.getAuthor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgDefineService} returns this + */ +proto.irismod.service.MsgDefineService.prototype.setAuthor = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string author_description = 5; + * @return {string} + */ +proto.irismod.service.MsgDefineService.prototype.getAuthorDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgDefineService} returns this + */ +proto.irismod.service.MsgDefineService.prototype.setAuthorDescription = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string schemas = 6; + * @return {string} + */ +proto.irismod.service.MsgDefineService.prototype.getSchemas = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgDefineService} returns this + */ +proto.irismod.service.MsgDefineService.prototype.setSchemas = 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.irismod.service.MsgDefineServiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgDefineServiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgDefineServiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgDefineServiceResponse.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.irismod.service.MsgDefineServiceResponse} + */ +proto.irismod.service.MsgDefineServiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgDefineServiceResponse; + return proto.irismod.service.MsgDefineServiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgDefineServiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgDefineServiceResponse} + */ +proto.irismod.service.MsgDefineServiceResponse.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.irismod.service.MsgDefineServiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgDefineServiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgDefineServiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgDefineServiceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.MsgBindService.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.irismod.service.MsgBindService.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgBindService.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgBindService} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgBindService.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: jspb.Message.getFieldWithDefault(msg, 2, ""), + depositList: jspb.Message.toObjectList(msg.getDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + pricing: jspb.Message.getFieldWithDefault(msg, 4, ""), + qos: jspb.Message.getFieldWithDefault(msg, 5, 0), + options: jspb.Message.getFieldWithDefault(msg, 6, ""), + owner: 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.irismod.service.MsgBindService} + */ +proto.irismod.service.MsgBindService.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgBindService; + return proto.irismod.service.MsgBindService.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgBindService} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgBindService} + */ +proto.irismod.service.MsgBindService.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addDeposit(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPricing(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setQos(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setOptions(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgBindService.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgBindService.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgBindService} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgBindService.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPricing(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getQos(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getOptions(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.MsgBindService.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgBindService} returns this + */ +proto.irismod.service.MsgBindService.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.MsgBindService.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgBindService} returns this + */ +proto.irismod.service.MsgBindService.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin deposit = 3; + * @return {!Array} + */ +proto.irismod.service.MsgBindService.prototype.getDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.MsgBindService} returns this +*/ +proto.irismod.service.MsgBindService.prototype.setDepositList = 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.irismod.service.MsgBindService.prototype.addDeposit = 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.irismod.service.MsgBindService} returns this + */ +proto.irismod.service.MsgBindService.prototype.clearDepositList = function() { + return this.setDepositList([]); +}; + + +/** + * optional string pricing = 4; + * @return {string} + */ +proto.irismod.service.MsgBindService.prototype.getPricing = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgBindService} returns this + */ +proto.irismod.service.MsgBindService.prototype.setPricing = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional uint64 qos = 5; + * @return {number} + */ +proto.irismod.service.MsgBindService.prototype.getQos = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.MsgBindService} returns this + */ +proto.irismod.service.MsgBindService.prototype.setQos = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string options = 6; + * @return {string} + */ +proto.irismod.service.MsgBindService.prototype.getOptions = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgBindService} returns this + */ +proto.irismod.service.MsgBindService.prototype.setOptions = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string owner = 7; + * @return {string} + */ +proto.irismod.service.MsgBindService.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgBindService} returns this + */ +proto.irismod.service.MsgBindService.prototype.setOwner = 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.irismod.service.MsgBindServiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgBindServiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgBindServiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgBindServiceResponse.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.irismod.service.MsgBindServiceResponse} + */ +proto.irismod.service.MsgBindServiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgBindServiceResponse; + return proto.irismod.service.MsgBindServiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgBindServiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgBindServiceResponse} + */ +proto.irismod.service.MsgBindServiceResponse.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.irismod.service.MsgBindServiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgBindServiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgBindServiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgBindServiceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.MsgUpdateServiceBinding.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.irismod.service.MsgUpdateServiceBinding.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgUpdateServiceBinding.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgUpdateServiceBinding} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgUpdateServiceBinding.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: jspb.Message.getFieldWithDefault(msg, 2, ""), + depositList: jspb.Message.toObjectList(msg.getDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + pricing: jspb.Message.getFieldWithDefault(msg, 4, ""), + qos: jspb.Message.getFieldWithDefault(msg, 5, 0), + options: jspb.Message.getFieldWithDefault(msg, 6, ""), + owner: 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.irismod.service.MsgUpdateServiceBinding} + */ +proto.irismod.service.MsgUpdateServiceBinding.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgUpdateServiceBinding; + return proto.irismod.service.MsgUpdateServiceBinding.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgUpdateServiceBinding} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgUpdateServiceBinding} + */ +proto.irismod.service.MsgUpdateServiceBinding.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addDeposit(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPricing(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setQos(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setOptions(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgUpdateServiceBinding.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgUpdateServiceBinding} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgUpdateServiceBinding.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPricing(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getQos(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getOptions(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgUpdateServiceBinding} returns this + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgUpdateServiceBinding} returns this + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin deposit = 3; + * @return {!Array} + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.getDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.MsgUpdateServiceBinding} returns this +*/ +proto.irismod.service.MsgUpdateServiceBinding.prototype.setDepositList = 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.irismod.service.MsgUpdateServiceBinding.prototype.addDeposit = 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.irismod.service.MsgUpdateServiceBinding} returns this + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.clearDepositList = function() { + return this.setDepositList([]); +}; + + +/** + * optional string pricing = 4; + * @return {string} + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.getPricing = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgUpdateServiceBinding} returns this + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.setPricing = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional uint64 qos = 5; + * @return {number} + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.getQos = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.MsgUpdateServiceBinding} returns this + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.setQos = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string options = 6; + * @return {string} + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.getOptions = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgUpdateServiceBinding} returns this + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.setOptions = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string owner = 7; + * @return {string} + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgUpdateServiceBinding} returns this + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.setOwner = 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.irismod.service.MsgUpdateServiceBindingResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgUpdateServiceBindingResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgUpdateServiceBindingResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgUpdateServiceBindingResponse.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.irismod.service.MsgUpdateServiceBindingResponse} + */ +proto.irismod.service.MsgUpdateServiceBindingResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgUpdateServiceBindingResponse; + return proto.irismod.service.MsgUpdateServiceBindingResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgUpdateServiceBindingResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgUpdateServiceBindingResponse} + */ +proto.irismod.service.MsgUpdateServiceBindingResponse.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.irismod.service.MsgUpdateServiceBindingResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgUpdateServiceBindingResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgUpdateServiceBindingResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgUpdateServiceBindingResponse.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.irismod.service.MsgSetWithdrawAddress.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgSetWithdrawAddress.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgSetWithdrawAddress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgSetWithdrawAddress.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + withdrawAddress: 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.irismod.service.MsgSetWithdrawAddress} + */ +proto.irismod.service.MsgSetWithdrawAddress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgSetWithdrawAddress; + return proto.irismod.service.MsgSetWithdrawAddress.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgSetWithdrawAddress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgSetWithdrawAddress} + */ +proto.irismod.service.MsgSetWithdrawAddress.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.setWithdrawAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgSetWithdrawAddress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgSetWithdrawAddress.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgSetWithdrawAddress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgSetWithdrawAddress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getWithdrawAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string owner = 1; + * @return {string} + */ +proto.irismod.service.MsgSetWithdrawAddress.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgSetWithdrawAddress} returns this + */ +proto.irismod.service.MsgSetWithdrawAddress.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string withdraw_address = 2; + * @return {string} + */ +proto.irismod.service.MsgSetWithdrawAddress.prototype.getWithdrawAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgSetWithdrawAddress} returns this + */ +proto.irismod.service.MsgSetWithdrawAddress.prototype.setWithdrawAddress = 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.irismod.service.MsgSetWithdrawAddressResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgSetWithdrawAddressResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgSetWithdrawAddressResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgSetWithdrawAddressResponse.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.irismod.service.MsgSetWithdrawAddressResponse} + */ +proto.irismod.service.MsgSetWithdrawAddressResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgSetWithdrawAddressResponse; + return proto.irismod.service.MsgSetWithdrawAddressResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgSetWithdrawAddressResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgSetWithdrawAddressResponse} + */ +proto.irismod.service.MsgSetWithdrawAddressResponse.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.irismod.service.MsgSetWithdrawAddressResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgSetWithdrawAddressResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgSetWithdrawAddressResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgSetWithdrawAddressResponse.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.irismod.service.MsgDisableServiceBinding.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgDisableServiceBinding.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgDisableServiceBinding} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgDisableServiceBinding.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: jspb.Message.getFieldWithDefault(msg, 2, ""), + owner: 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.irismod.service.MsgDisableServiceBinding} + */ +proto.irismod.service.MsgDisableServiceBinding.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgDisableServiceBinding; + return proto.irismod.service.MsgDisableServiceBinding.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgDisableServiceBinding} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgDisableServiceBinding} + */ +proto.irismod.service.MsgDisableServiceBinding.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgDisableServiceBinding.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgDisableServiceBinding.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgDisableServiceBinding} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgDisableServiceBinding.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.MsgDisableServiceBinding.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgDisableServiceBinding} returns this + */ +proto.irismod.service.MsgDisableServiceBinding.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.MsgDisableServiceBinding.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgDisableServiceBinding} returns this + */ +proto.irismod.service.MsgDisableServiceBinding.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string owner = 3; + * @return {string} + */ +proto.irismod.service.MsgDisableServiceBinding.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgDisableServiceBinding} returns this + */ +proto.irismod.service.MsgDisableServiceBinding.prototype.setOwner = 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.irismod.service.MsgDisableServiceBindingResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgDisableServiceBindingResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgDisableServiceBindingResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgDisableServiceBindingResponse.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.irismod.service.MsgDisableServiceBindingResponse} + */ +proto.irismod.service.MsgDisableServiceBindingResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgDisableServiceBindingResponse; + return proto.irismod.service.MsgDisableServiceBindingResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgDisableServiceBindingResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgDisableServiceBindingResponse} + */ +proto.irismod.service.MsgDisableServiceBindingResponse.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.irismod.service.MsgDisableServiceBindingResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgDisableServiceBindingResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgDisableServiceBindingResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgDisableServiceBindingResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.MsgEnableServiceBinding.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.irismod.service.MsgEnableServiceBinding.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgEnableServiceBinding.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgEnableServiceBinding} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgEnableServiceBinding.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: jspb.Message.getFieldWithDefault(msg, 2, ""), + depositList: jspb.Message.toObjectList(msg.getDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + owner: 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.irismod.service.MsgEnableServiceBinding} + */ +proto.irismod.service.MsgEnableServiceBinding.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgEnableServiceBinding; + return proto.irismod.service.MsgEnableServiceBinding.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgEnableServiceBinding} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgEnableServiceBinding} + */ +proto.irismod.service.MsgEnableServiceBinding.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addDeposit(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgEnableServiceBinding.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgEnableServiceBinding} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgEnableServiceBinding.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgEnableServiceBinding} returns this + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgEnableServiceBinding} returns this + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin deposit = 3; + * @return {!Array} + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.getDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.MsgEnableServiceBinding} returns this +*/ +proto.irismod.service.MsgEnableServiceBinding.prototype.setDepositList = 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.irismod.service.MsgEnableServiceBinding.prototype.addDeposit = 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.irismod.service.MsgEnableServiceBinding} returns this + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.clearDepositList = function() { + return this.setDepositList([]); +}; + + +/** + * optional string owner = 4; + * @return {string} + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgEnableServiceBinding} returns this + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.setOwner = 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.irismod.service.MsgEnableServiceBindingResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgEnableServiceBindingResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgEnableServiceBindingResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgEnableServiceBindingResponse.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.irismod.service.MsgEnableServiceBindingResponse} + */ +proto.irismod.service.MsgEnableServiceBindingResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgEnableServiceBindingResponse; + return proto.irismod.service.MsgEnableServiceBindingResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgEnableServiceBindingResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgEnableServiceBindingResponse} + */ +proto.irismod.service.MsgEnableServiceBindingResponse.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.irismod.service.MsgEnableServiceBindingResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgEnableServiceBindingResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgEnableServiceBindingResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgEnableServiceBindingResponse.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.irismod.service.MsgRefundServiceDeposit.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgRefundServiceDeposit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgRefundServiceDeposit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgRefundServiceDeposit.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: jspb.Message.getFieldWithDefault(msg, 2, ""), + owner: 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.irismod.service.MsgRefundServiceDeposit} + */ +proto.irismod.service.MsgRefundServiceDeposit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgRefundServiceDeposit; + return proto.irismod.service.MsgRefundServiceDeposit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgRefundServiceDeposit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgRefundServiceDeposit} + */ +proto.irismod.service.MsgRefundServiceDeposit.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgRefundServiceDeposit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgRefundServiceDeposit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgRefundServiceDeposit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgRefundServiceDeposit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.MsgRefundServiceDeposit.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgRefundServiceDeposit} returns this + */ +proto.irismod.service.MsgRefundServiceDeposit.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.MsgRefundServiceDeposit.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgRefundServiceDeposit} returns this + */ +proto.irismod.service.MsgRefundServiceDeposit.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string owner = 3; + * @return {string} + */ +proto.irismod.service.MsgRefundServiceDeposit.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgRefundServiceDeposit} returns this + */ +proto.irismod.service.MsgRefundServiceDeposit.prototype.setOwner = 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.irismod.service.MsgRefundServiceDepositResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgRefundServiceDepositResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgRefundServiceDepositResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgRefundServiceDepositResponse.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.irismod.service.MsgRefundServiceDepositResponse} + */ +proto.irismod.service.MsgRefundServiceDepositResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgRefundServiceDepositResponse; + return proto.irismod.service.MsgRefundServiceDepositResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgRefundServiceDepositResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgRefundServiceDepositResponse} + */ +proto.irismod.service.MsgRefundServiceDepositResponse.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.irismod.service.MsgRefundServiceDepositResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgRefundServiceDepositResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgRefundServiceDepositResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgRefundServiceDepositResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.MsgCallService.repeatedFields_ = [2,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.irismod.service.MsgCallService.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgCallService.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgCallService} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgCallService.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + providersList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + consumer: jspb.Message.getFieldWithDefault(msg, 3, ""), + input: jspb.Message.getFieldWithDefault(msg, 4, ""), + serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + timeout: jspb.Message.getFieldWithDefault(msg, 6, 0), + superMode: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + repeated: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 9, 0), + repeatedTotal: 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.irismod.service.MsgCallService} + */ +proto.irismod.service.MsgCallService.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgCallService; + return proto.irismod.service.MsgCallService.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgCallService} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgCallService} + */ +proto.irismod.service.MsgCallService.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addProviders(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInput(value); + break; + case 5: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFeeCap(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeout(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuperMode(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRepeated(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRepeatedFrequency(value); + break; + case 10: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRepeatedTotal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgCallService.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgCallService.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgCallService} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgCallService.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvidersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInput(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getServiceFeeCapList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getTimeout(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getSuperMode(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getRepeated(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getRepeatedFrequency(); + if (f !== 0) { + writer.writeUint64( + 9, + f + ); + } + f = message.getRepeatedTotal(); + if (f !== 0) { + writer.writeInt64( + 10, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.MsgCallService.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string providers = 2; + * @return {!Array} + */ +proto.irismod.service.MsgCallService.prototype.getProvidersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setProvidersList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.addProviders = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.clearProvidersList = function() { + return this.setProvidersList([]); +}; + + +/** + * optional string consumer = 3; + * @return {string} + */ +proto.irismod.service.MsgCallService.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setConsumer = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string input = 4; + * @return {string} + */ +proto.irismod.service.MsgCallService.prototype.getInput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setInput = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee_cap = 5; + * @return {!Array} + */ +proto.irismod.service.MsgCallService.prototype.getServiceFeeCapList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.MsgCallService} returns this +*/ +proto.irismod.service.MsgCallService.prototype.setServiceFeeCapList = 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.irismod.service.MsgCallService.prototype.addServiceFeeCap = 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.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.clearServiceFeeCapList = function() { + return this.setServiceFeeCapList([]); +}; + + +/** + * optional int64 timeout = 6; + * @return {number} + */ +proto.irismod.service.MsgCallService.prototype.getTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional bool super_mode = 7; + * @return {boolean} + */ +proto.irismod.service.MsgCallService.prototype.getSuperMode = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setSuperMode = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional bool repeated = 8; + * @return {boolean} + */ +proto.irismod.service.MsgCallService.prototype.getRepeated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setRepeated = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + +/** + * optional uint64 repeated_frequency = 9; + * @return {number} + */ +proto.irismod.service.MsgCallService.prototype.getRepeatedFrequency = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setRepeatedFrequency = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional int64 repeated_total = 10; + * @return {number} + */ +proto.irismod.service.MsgCallService.prototype.getRepeatedTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setRepeatedTotal = function(value) { + return jspb.Message.setProto3IntField(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.irismod.service.MsgCallServiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgCallServiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgCallServiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgCallServiceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: 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.irismod.service.MsgCallServiceResponse} + */ +proto.irismod.service.MsgCallServiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgCallServiceResponse; + return proto.irismod.service.MsgCallServiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgCallServiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgCallServiceResponse} + */ +proto.irismod.service.MsgCallServiceResponse.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.setRequestContextId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgCallServiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgCallServiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgCallServiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgCallServiceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.MsgCallServiceResponse.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgCallServiceResponse} returns this + */ +proto.irismod.service.MsgCallServiceResponse.prototype.setRequestContextId = 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.irismod.service.MsgRespondService.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgRespondService.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgRespondService} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgRespondService.toObject = function(includeInstance, msg) { + var f, obj = { + requestId: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: jspb.Message.getFieldWithDefault(msg, 2, ""), + result: jspb.Message.getFieldWithDefault(msg, 3, ""), + output: 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.irismod.service.MsgRespondService} + */ +proto.irismod.service.MsgRespondService.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgRespondService; + return proto.irismod.service.MsgRespondService.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgRespondService} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgRespondService} + */ +proto.irismod.service.MsgRespondService.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.setRequestId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setResult(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setOutput(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgRespondService.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgRespondService.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgRespondService} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgRespondService.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getResult(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getOutput(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string request_id = 1; + * @return {string} + */ +proto.irismod.service.MsgRespondService.prototype.getRequestId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgRespondService} returns this + */ +proto.irismod.service.MsgRespondService.prototype.setRequestId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.MsgRespondService.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgRespondService} returns this + */ +proto.irismod.service.MsgRespondService.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string result = 3; + * @return {string} + */ +proto.irismod.service.MsgRespondService.prototype.getResult = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgRespondService} returns this + */ +proto.irismod.service.MsgRespondService.prototype.setResult = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string output = 4; + * @return {string} + */ +proto.irismod.service.MsgRespondService.prototype.getOutput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgRespondService} returns this + */ +proto.irismod.service.MsgRespondService.prototype.setOutput = 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.irismod.service.MsgRespondServiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgRespondServiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgRespondServiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgRespondServiceResponse.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.irismod.service.MsgRespondServiceResponse} + */ +proto.irismod.service.MsgRespondServiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgRespondServiceResponse; + return proto.irismod.service.MsgRespondServiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgRespondServiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgRespondServiceResponse} + */ +proto.irismod.service.MsgRespondServiceResponse.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.irismod.service.MsgRespondServiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgRespondServiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgRespondServiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgRespondServiceResponse.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.irismod.service.MsgPauseRequestContext.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgPauseRequestContext.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgPauseRequestContext} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgPauseRequestContext.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), + consumer: 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.irismod.service.MsgPauseRequestContext} + */ +proto.irismod.service.MsgPauseRequestContext.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgPauseRequestContext; + return proto.irismod.service.MsgPauseRequestContext.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgPauseRequestContext} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgPauseRequestContext} + */ +proto.irismod.service.MsgPauseRequestContext.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.setRequestContextId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgPauseRequestContext.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgPauseRequestContext.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgPauseRequestContext} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgPauseRequestContext.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.MsgPauseRequestContext.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgPauseRequestContext} returns this + */ +proto.irismod.service.MsgPauseRequestContext.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string consumer = 2; + * @return {string} + */ +proto.irismod.service.MsgPauseRequestContext.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgPauseRequestContext} returns this + */ +proto.irismod.service.MsgPauseRequestContext.prototype.setConsumer = 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.irismod.service.MsgPauseRequestContextResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgPauseRequestContextResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgPauseRequestContextResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgPauseRequestContextResponse.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.irismod.service.MsgPauseRequestContextResponse} + */ +proto.irismod.service.MsgPauseRequestContextResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgPauseRequestContextResponse; + return proto.irismod.service.MsgPauseRequestContextResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgPauseRequestContextResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgPauseRequestContextResponse} + */ +proto.irismod.service.MsgPauseRequestContextResponse.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.irismod.service.MsgPauseRequestContextResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgPauseRequestContextResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgPauseRequestContextResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgPauseRequestContextResponse.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.irismod.service.MsgStartRequestContext.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgStartRequestContext.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgStartRequestContext} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgStartRequestContext.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), + consumer: 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.irismod.service.MsgStartRequestContext} + */ +proto.irismod.service.MsgStartRequestContext.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgStartRequestContext; + return proto.irismod.service.MsgStartRequestContext.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgStartRequestContext} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgStartRequestContext} + */ +proto.irismod.service.MsgStartRequestContext.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.setRequestContextId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgStartRequestContext.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgStartRequestContext.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgStartRequestContext} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgStartRequestContext.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.MsgStartRequestContext.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgStartRequestContext} returns this + */ +proto.irismod.service.MsgStartRequestContext.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string consumer = 2; + * @return {string} + */ +proto.irismod.service.MsgStartRequestContext.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgStartRequestContext} returns this + */ +proto.irismod.service.MsgStartRequestContext.prototype.setConsumer = 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.irismod.service.MsgStartRequestContextResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgStartRequestContextResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgStartRequestContextResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgStartRequestContextResponse.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.irismod.service.MsgStartRequestContextResponse} + */ +proto.irismod.service.MsgStartRequestContextResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgStartRequestContextResponse; + return proto.irismod.service.MsgStartRequestContextResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgStartRequestContextResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgStartRequestContextResponse} + */ +proto.irismod.service.MsgStartRequestContextResponse.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.irismod.service.MsgStartRequestContextResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgStartRequestContextResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgStartRequestContextResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgStartRequestContextResponse.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.irismod.service.MsgKillRequestContext.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgKillRequestContext.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgKillRequestContext} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgKillRequestContext.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), + consumer: 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.irismod.service.MsgKillRequestContext} + */ +proto.irismod.service.MsgKillRequestContext.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgKillRequestContext; + return proto.irismod.service.MsgKillRequestContext.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgKillRequestContext} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgKillRequestContext} + */ +proto.irismod.service.MsgKillRequestContext.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.setRequestContextId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgKillRequestContext.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgKillRequestContext.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgKillRequestContext} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgKillRequestContext.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.MsgKillRequestContext.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgKillRequestContext} returns this + */ +proto.irismod.service.MsgKillRequestContext.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string consumer = 2; + * @return {string} + */ +proto.irismod.service.MsgKillRequestContext.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgKillRequestContext} returns this + */ +proto.irismod.service.MsgKillRequestContext.prototype.setConsumer = 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.irismod.service.MsgKillRequestContextResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgKillRequestContextResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgKillRequestContextResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgKillRequestContextResponse.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.irismod.service.MsgKillRequestContextResponse} + */ +proto.irismod.service.MsgKillRequestContextResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgKillRequestContextResponse; + return proto.irismod.service.MsgKillRequestContextResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgKillRequestContextResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgKillRequestContextResponse} + */ +proto.irismod.service.MsgKillRequestContextResponse.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.irismod.service.MsgKillRequestContextResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgKillRequestContextResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgKillRequestContextResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgKillRequestContextResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.MsgUpdateRequestContext.repeatedFields_ = [2,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.irismod.service.MsgUpdateRequestContext.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgUpdateRequestContext.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgUpdateRequestContext} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgUpdateRequestContext.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), + providersList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + consumer: jspb.Message.getFieldWithDefault(msg, 3, ""), + serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + timeout: jspb.Message.getFieldWithDefault(msg, 5, 0), + repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 6, 0), + repeatedTotal: 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.irismod.service.MsgUpdateRequestContext} + */ +proto.irismod.service.MsgUpdateRequestContext.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgUpdateRequestContext; + return proto.irismod.service.MsgUpdateRequestContext.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgUpdateRequestContext} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgUpdateRequestContext} + */ +proto.irismod.service.MsgUpdateRequestContext.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.setRequestContextId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addProviders(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFeeCap(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeout(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRepeatedFrequency(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRepeatedTotal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgUpdateRequestContext.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgUpdateRequestContext} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgUpdateRequestContext.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvidersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getServiceFeeCapList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getTimeout(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getRepeatedFrequency(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getRepeatedTotal(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string providers = 2; + * @return {!Array} + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.getProvidersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.setProvidersList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.addProviders = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.clearProvidersList = function() { + return this.setProvidersList([]); +}; + + +/** + * optional string consumer = 3; + * @return {string} + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.setConsumer = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee_cap = 4; + * @return {!Array} + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.getServiceFeeCapList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this +*/ +proto.irismod.service.MsgUpdateRequestContext.prototype.setServiceFeeCapList = 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.irismod.service.MsgUpdateRequestContext.prototype.addServiceFeeCap = 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.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.clearServiceFeeCapList = function() { + return this.setServiceFeeCapList([]); +}; + + +/** + * optional int64 timeout = 5; + * @return {number} + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.getTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.setTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 repeated_frequency = 6; + * @return {number} + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.getRepeatedFrequency = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.setRepeatedFrequency = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional int64 repeated_total = 7; + * @return {number} + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.getRepeatedTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.setRepeatedTotal = 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.irismod.service.MsgUpdateRequestContextResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgUpdateRequestContextResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgUpdateRequestContextResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgUpdateRequestContextResponse.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.irismod.service.MsgUpdateRequestContextResponse} + */ +proto.irismod.service.MsgUpdateRequestContextResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgUpdateRequestContextResponse; + return proto.irismod.service.MsgUpdateRequestContextResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgUpdateRequestContextResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgUpdateRequestContextResponse} + */ +proto.irismod.service.MsgUpdateRequestContextResponse.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.irismod.service.MsgUpdateRequestContextResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgUpdateRequestContextResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgUpdateRequestContextResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgUpdateRequestContextResponse.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.irismod.service.MsgWithdrawEarnedFees.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgWithdrawEarnedFees.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgWithdrawEarnedFees} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgWithdrawEarnedFees.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: 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.irismod.service.MsgWithdrawEarnedFees} + */ +proto.irismod.service.MsgWithdrawEarnedFees.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgWithdrawEarnedFees; + return proto.irismod.service.MsgWithdrawEarnedFees.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgWithdrawEarnedFees} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgWithdrawEarnedFees} + */ +proto.irismod.service.MsgWithdrawEarnedFees.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.setProvider(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgWithdrawEarnedFees.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgWithdrawEarnedFees.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgWithdrawEarnedFees} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgWithdrawEarnedFees.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string owner = 1; + * @return {string} + */ +proto.irismod.service.MsgWithdrawEarnedFees.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgWithdrawEarnedFees} returns this + */ +proto.irismod.service.MsgWithdrawEarnedFees.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.MsgWithdrawEarnedFees.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgWithdrawEarnedFees} returns this + */ +proto.irismod.service.MsgWithdrawEarnedFees.prototype.setProvider = 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.irismod.service.MsgWithdrawEarnedFeesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgWithdrawEarnedFeesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgWithdrawEarnedFeesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgWithdrawEarnedFeesResponse.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.irismod.service.MsgWithdrawEarnedFeesResponse} + */ +proto.irismod.service.MsgWithdrawEarnedFeesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgWithdrawEarnedFeesResponse; + return proto.irismod.service.MsgWithdrawEarnedFeesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgWithdrawEarnedFeesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgWithdrawEarnedFeesResponse} + */ +proto.irismod.service.MsgWithdrawEarnedFeesResponse.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.irismod.service.MsgWithdrawEarnedFeesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgWithdrawEarnedFeesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgWithdrawEarnedFeesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgWithdrawEarnedFeesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.irismod.service); diff --git a/dist/src/types/proto-types/irismod/token/genesis_pb.js b/dist/src/types/proto-types/irismod/token/genesis_pb.js new file mode 100644 index 00000000..b10f95d7 --- /dev/null +++ b/dist/src/types/proto-types/irismod/token/genesis_pb.js @@ -0,0 +1,252 @@ +// source: irismod/token/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 irismod_token_token_pb = require('../../irismod/token/token_pb.js'); +goog.object.extend(proto, irismod_token_token_pb); +goog.exportSymbol('proto.irismod.token.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.irismod.token.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.token.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.irismod.token.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.GenesisState.displayName = 'proto.irismod.token.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.token.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.irismod.token.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.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.irismod.token.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && irismod_token_token_pb.Params.toObject(includeInstance, f), + tokensList: jspb.Message.toObjectList(msg.getTokensList(), + irismod_token_token_pb.Token.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.irismod.token.GenesisState} + */ +proto.irismod.token.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.GenesisState; + return proto.irismod.token.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.GenesisState} + */ +proto.irismod.token.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_token_token_pb.Params; + reader.readMessage(value,irismod_token_token_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new irismod_token_token_pb.Token; + reader.readMessage(value,irismod_token_token_pb.Token.deserializeBinaryFromReader); + msg.addTokens(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.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.irismod.token.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_token_token_pb.Params.serializeBinaryToWriter + ); + } + f = message.getTokensList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + irismod_token_token_pb.Token.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.irismod.token.Params} + */ +proto.irismod.token.GenesisState.prototype.getParams = function() { + return /** @type{?proto.irismod.token.Params} */ ( + jspb.Message.getWrapperField(this, irismod_token_token_pb.Params, 1)); +}; + + +/** + * @param {?proto.irismod.token.Params|undefined} value + * @return {!proto.irismod.token.GenesisState} returns this +*/ +proto.irismod.token.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.GenesisState} returns this + */ +proto.irismod.token.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Token tokens = 2; + * @return {!Array} + */ +proto.irismod.token.GenesisState.prototype.getTokensList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_token_token_pb.Token, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.token.GenesisState} returns this +*/ +proto.irismod.token.GenesisState.prototype.setTokensList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.token.Token=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.token.Token} + */ +proto.irismod.token.GenesisState.prototype.addTokens = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.token.Token, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.token.GenesisState} returns this + */ +proto.irismod.token.GenesisState.prototype.clearTokensList = function() { + return this.setTokensList([]); +}; + + +goog.object.extend(exports, proto.irismod.token); diff --git a/dist/src/types/proto-types/irismod/token/query_grpc_web_pb.js b/dist/src/types/proto-types/irismod/token/query_grpc_web_pb.js new file mode 100644 index 00000000..42d1cb4f --- /dev/null +++ b/dist/src/types/proto-types/irismod/token/query_grpc_web_pb.js @@ -0,0 +1,409 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.token + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_proto_cosmos_pb = require('../../cosmos_proto/cosmos_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var irismod_token_token_pb = require('../../irismod/token/token_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.token = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.token.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.token.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.QueryTokenRequest, + * !proto.irismod.token.QueryTokenResponse>} + */ +const methodDescriptor_Query_Token = new grpc.web.MethodDescriptor( + '/irismod.token.Query/Token', + grpc.web.MethodType.UNARY, + proto.irismod.token.QueryTokenRequest, + proto.irismod.token.QueryTokenResponse, + /** + * @param {!proto.irismod.token.QueryTokenRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryTokenResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.QueryTokenRequest, + * !proto.irismod.token.QueryTokenResponse>} + */ +const methodInfo_Query_Token = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.QueryTokenResponse, + /** + * @param {!proto.irismod.token.QueryTokenRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryTokenResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.QueryTokenRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.QueryTokenResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.QueryClient.prototype.token = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Query/Token', + request, + metadata || {}, + methodDescriptor_Query_Token, + callback); +}; + + +/** + * @param {!proto.irismod.token.QueryTokenRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.QueryPromiseClient.prototype.token = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Query/Token', + request, + metadata || {}, + methodDescriptor_Query_Token); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.QueryTokensRequest, + * !proto.irismod.token.QueryTokensResponse>} + */ +const methodDescriptor_Query_Tokens = new grpc.web.MethodDescriptor( + '/irismod.token.Query/Tokens', + grpc.web.MethodType.UNARY, + proto.irismod.token.QueryTokensRequest, + proto.irismod.token.QueryTokensResponse, + /** + * @param {!proto.irismod.token.QueryTokensRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryTokensResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.QueryTokensRequest, + * !proto.irismod.token.QueryTokensResponse>} + */ +const methodInfo_Query_Tokens = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.QueryTokensResponse, + /** + * @param {!proto.irismod.token.QueryTokensRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryTokensResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.QueryTokensRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.QueryTokensResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.QueryClient.prototype.tokens = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Query/Tokens', + request, + metadata || {}, + methodDescriptor_Query_Tokens, + callback); +}; + + +/** + * @param {!proto.irismod.token.QueryTokensRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.QueryPromiseClient.prototype.tokens = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Query/Tokens', + request, + metadata || {}, + methodDescriptor_Query_Tokens); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.QueryFeesRequest, + * !proto.irismod.token.QueryFeesResponse>} + */ +const methodDescriptor_Query_Fees = new grpc.web.MethodDescriptor( + '/irismod.token.Query/Fees', + grpc.web.MethodType.UNARY, + proto.irismod.token.QueryFeesRequest, + proto.irismod.token.QueryFeesResponse, + /** + * @param {!proto.irismod.token.QueryFeesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryFeesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.QueryFeesRequest, + * !proto.irismod.token.QueryFeesResponse>} + */ +const methodInfo_Query_Fees = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.QueryFeesResponse, + /** + * @param {!proto.irismod.token.QueryFeesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryFeesResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.QueryFeesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.QueryFeesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.QueryClient.prototype.fees = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Query/Fees', + request, + metadata || {}, + methodDescriptor_Query_Fees, + callback); +}; + + +/** + * @param {!proto.irismod.token.QueryFeesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.QueryPromiseClient.prototype.fees = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Query/Fees', + request, + metadata || {}, + methodDescriptor_Query_Fees); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.QueryParamsRequest, + * !proto.irismod.token.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/irismod.token.Query/Params', + grpc.web.MethodType.UNARY, + proto.irismod.token.QueryParamsRequest, + proto.irismod.token.QueryParamsResponse, + /** + * @param {!proto.irismod.token.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.QueryParamsRequest, + * !proto.irismod.token.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.QueryParamsResponse, + /** + * @param {!proto.irismod.token.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.irismod.token.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +module.exports = proto.irismod.token; + diff --git a/dist/src/types/proto-types/irismod/token/query_pb.js b/dist/src/types/proto-types/irismod/token/query_pb.js new file mode 100644 index 00000000..08f32097 --- /dev/null +++ b/dist/src/types/proto-types/irismod/token/query_pb.js @@ -0,0 +1,1441 @@ +// source: irismod/token/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_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_api_annotations_pb = require('../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var irismod_token_token_pb = require('../../irismod/token/token_pb.js'); +goog.object.extend(proto, irismod_token_token_pb); +goog.exportSymbol('proto.irismod.token.QueryFeesRequest', null, global); +goog.exportSymbol('proto.irismod.token.QueryFeesResponse', null, global); +goog.exportSymbol('proto.irismod.token.QueryParamsRequest', null, global); +goog.exportSymbol('proto.irismod.token.QueryParamsResponse', null, global); +goog.exportSymbol('proto.irismod.token.QueryTokenRequest', null, global); +goog.exportSymbol('proto.irismod.token.QueryTokenResponse', null, global); +goog.exportSymbol('proto.irismod.token.QueryTokensRequest', null, global); +goog.exportSymbol('proto.irismod.token.QueryTokensResponse', 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.irismod.token.QueryTokenRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.QueryTokenRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryTokenRequest.displayName = 'proto.irismod.token.QueryTokenRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.QueryTokenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.QueryTokenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryTokenResponse.displayName = 'proto.irismod.token.QueryTokenResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.QueryTokensRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.QueryTokensRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryTokensRequest.displayName = 'proto.irismod.token.QueryTokensRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.QueryTokensResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.token.QueryTokensResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.token.QueryTokensResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryTokensResponse.displayName = 'proto.irismod.token.QueryTokensResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.QueryFeesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.QueryFeesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryFeesRequest.displayName = 'proto.irismod.token.QueryFeesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.QueryFeesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.QueryFeesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryFeesResponse.displayName = 'proto.irismod.token.QueryFeesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryParamsRequest.displayName = 'proto.irismod.token.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.irismod.token.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryParamsResponse.displayName = 'proto.irismod.token.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.irismod.token.QueryTokenRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.QueryTokenRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.QueryTokenRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTokenRequest.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.irismod.token.QueryTokenRequest} + */ +proto.irismod.token.QueryTokenRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryTokenRequest; + return proto.irismod.token.QueryTokenRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryTokenRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryTokenRequest} + */ +proto.irismod.token.QueryTokenRequest.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.irismod.token.QueryTokenRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.QueryTokenRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.QueryTokenRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTokenRequest.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.irismod.token.QueryTokenRequest.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.QueryTokenRequest} returns this + */ +proto.irismod.token.QueryTokenRequest.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.irismod.token.QueryTokenResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.QueryTokenResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.QueryTokenResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTokenResponse.toObject = function(includeInstance, msg) { + var f, obj = { + token: (f = msg.getToken()) && 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.irismod.token.QueryTokenResponse} + */ +proto.irismod.token.QueryTokenResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryTokenResponse; + return proto.irismod.token.QueryTokenResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryTokenResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryTokenResponse} + */ +proto.irismod.token.QueryTokenResponse.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.setToken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.QueryTokenResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.QueryTokenResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.QueryTokenResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTokenResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getToken(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Any Token = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.irismod.token.QueryTokenResponse.prototype.getToken = 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.irismod.token.QueryTokenResponse} returns this +*/ +proto.irismod.token.QueryTokenResponse.prototype.setToken = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.QueryTokenResponse} returns this + */ +proto.irismod.token.QueryTokenResponse.prototype.clearToken = function() { + return this.setToken(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.QueryTokenResponse.prototype.hasToken = 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.irismod.token.QueryTokensRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.QueryTokensRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.QueryTokensRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTokensRequest.toObject = function(includeInstance, msg) { + var f, obj = { + owner: 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.irismod.token.QueryTokensRequest} + */ +proto.irismod.token.QueryTokensRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryTokensRequest; + return proto.irismod.token.QueryTokensRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryTokensRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryTokensRequest} + */ +proto.irismod.token.QueryTokensRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.QueryTokensRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.QueryTokensRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.QueryTokensRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTokensRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string owner = 1; + * @return {string} + */ +proto.irismod.token.QueryTokensRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.QueryTokensRequest} returns this + */ +proto.irismod.token.QueryTokensRequest.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.token.QueryTokensResponse.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.irismod.token.QueryTokensResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.QueryTokensResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.QueryTokensResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTokensResponse.toObject = function(includeInstance, msg) { + var f, obj = { + tokensList: jspb.Message.toObjectList(msg.getTokensList(), + 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.irismod.token.QueryTokensResponse} + */ +proto.irismod.token.QueryTokensResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryTokensResponse; + return proto.irismod.token.QueryTokensResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryTokensResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryTokensResponse} + */ +proto.irismod.token.QueryTokensResponse.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.addTokens(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.QueryTokensResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.QueryTokensResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.QueryTokensResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTokensResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokensList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated google.protobuf.Any Tokens = 1; + * @return {!Array} + */ +proto.irismod.token.QueryTokensResponse.prototype.getTokensList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.token.QueryTokensResponse} returns this +*/ +proto.irismod.token.QueryTokensResponse.prototype.setTokensList = 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.irismod.token.QueryTokensResponse.prototype.addTokens = 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.irismod.token.QueryTokensResponse} returns this + */ +proto.irismod.token.QueryTokensResponse.prototype.clearTokensList = function() { + return this.setTokensList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.token.QueryFeesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.QueryFeesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.QueryFeesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryFeesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + symbol: 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.irismod.token.QueryFeesRequest} + */ +proto.irismod.token.QueryFeesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryFeesRequest; + return proto.irismod.token.QueryFeesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryFeesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryFeesRequest} + */ +proto.irismod.token.QueryFeesRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.QueryFeesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.QueryFeesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.QueryFeesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryFeesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string symbol = 1; + * @return {string} + */ +proto.irismod.token.QueryFeesRequest.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.QueryFeesRequest} returns this + */ +proto.irismod.token.QueryFeesRequest.prototype.setSymbol = 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.irismod.token.QueryFeesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.QueryFeesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.QueryFeesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryFeesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + exist: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + issueFee: (f = msg.getIssueFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + mintFee: (f = msg.getMintFee()) && 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.irismod.token.QueryFeesResponse} + */ +proto.irismod.token.QueryFeesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryFeesResponse; + return proto.irismod.token.QueryFeesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryFeesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryFeesResponse} + */ +proto.irismod.token.QueryFeesResponse.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.setExist(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setIssueFee(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setMintFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.QueryFeesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.QueryFeesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.QueryFeesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryFeesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExist(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getIssueFee(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getMintFee(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bool exist = 1; + * @return {boolean} + */ +proto.irismod.token.QueryFeesResponse.prototype.getExist = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.token.QueryFeesResponse} returns this + */ +proto.irismod.token.QueryFeesResponse.prototype.setExist = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin issue_fee = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.token.QueryFeesResponse.prototype.getIssueFee = 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.irismod.token.QueryFeesResponse} returns this +*/ +proto.irismod.token.QueryFeesResponse.prototype.setIssueFee = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.QueryFeesResponse} returns this + */ +proto.irismod.token.QueryFeesResponse.prototype.clearIssueFee = function() { + return this.setIssueFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.QueryFeesResponse.prototype.hasIssueFee = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional cosmos.base.v1beta1.Coin mint_fee = 3; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.token.QueryFeesResponse.prototype.getMintFee = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.token.QueryFeesResponse} returns this +*/ +proto.irismod.token.QueryFeesResponse.prototype.setMintFee = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.QueryFeesResponse} returns this + */ +proto.irismod.token.QueryFeesResponse.prototype.clearMintFee = function() { + return this.setMintFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.QueryFeesResponse.prototype.hasMintFee = 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.irismod.token.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.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.irismod.token.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.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.irismod.token.QueryParamsRequest} + */ +proto.irismod.token.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryParamsRequest; + return proto.irismod.token.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryParamsRequest} + */ +proto.irismod.token.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.irismod.token.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.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.irismod.token.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.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.irismod.token.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.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.irismod.token.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && irismod_token_token_pb.Params.toObject(includeInstance, f), + res: (f = msg.getRes()) && 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.irismod.token.QueryParamsResponse} + */ +proto.irismod.token.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryParamsResponse; + return proto.irismod.token.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryParamsResponse} + */ +proto.irismod.token.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_token_token_pb.Params; + reader.readMessage(value,irismod_token_token_pb.Params.deserializeBinaryFromReader); + msg.setParams(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.setRes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.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.irismod.token.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_token_token_pb.Params.serializeBinaryToWriter + ); + } + f = message.getRes(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.irismod.token.Params} + */ +proto.irismod.token.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.irismod.token.Params} */ ( + jspb.Message.getWrapperField(this, irismod_token_token_pb.Params, 1)); +}; + + +/** + * @param {?proto.irismod.token.Params|undefined} value + * @return {!proto.irismod.token.QueryParamsResponse} returns this +*/ +proto.irismod.token.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.QueryParamsResponse} returns this + */ +proto.irismod.token.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse res = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.token.QueryParamsResponse.prototype.getRes = 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.irismod.token.QueryParamsResponse} returns this +*/ +proto.irismod.token.QueryParamsResponse.prototype.setRes = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.QueryParamsResponse} returns this + */ +proto.irismod.token.QueryParamsResponse.prototype.clearRes = function() { + return this.setRes(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.QueryParamsResponse.prototype.hasRes = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.irismod.token); diff --git a/dist/src/types/proto-types/irismod/token/token_pb.js b/dist/src/types/proto-types/irismod/token/token_pb.js new file mode 100644 index 00000000..497ee9ba --- /dev/null +++ b/dist/src/types/proto-types/irismod/token/token_pb.js @@ -0,0 +1,614 @@ +// source: irismod/token/token.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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.irismod.token.Params', null, global); +goog.exportSymbol('proto.irismod.token.Token', 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.irismod.token.Token = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.Token, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.Token.displayName = 'proto.irismod.token.Token'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.Params.displayName = 'proto.irismod.token.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.irismod.token.Token.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.Token.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.Token} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.Token.toObject = function(includeInstance, msg) { + var f, obj = { + symbol: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + scale: jspb.Message.getFieldWithDefault(msg, 3, 0), + minUnit: jspb.Message.getFieldWithDefault(msg, 4, ""), + initialSupply: jspb.Message.getFieldWithDefault(msg, 5, 0), + maxSupply: jspb.Message.getFieldWithDefault(msg, 6, 0), + mintable: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + owner: 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.irismod.token.Token} + */ +proto.irismod.token.Token.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.Token; + return proto.irismod.token.Token.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.Token} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.Token} + */ +proto.irismod.token.Token.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 {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setScale(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMinUnit(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInitialSupply(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxSupply(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMintable(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.Token.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.Token.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.Token} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.Token.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getScale(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getMinUnit(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getInitialSupply(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getMaxSupply(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getMintable(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional string symbol = 1; + * @return {string} + */ +proto.irismod.token.Token.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.Token} returns this + */ +proto.irismod.token.Token.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.irismod.token.Token.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.Token} returns this + */ +proto.irismod.token.Token.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint32 scale = 3; + * @return {number} + */ +proto.irismod.token.Token.prototype.getScale = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.Token} returns this + */ +proto.irismod.token.Token.prototype.setScale = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string min_unit = 4; + * @return {string} + */ +proto.irismod.token.Token.prototype.getMinUnit = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.Token} returns this + */ +proto.irismod.token.Token.prototype.setMinUnit = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional uint64 initial_supply = 5; + * @return {number} + */ +proto.irismod.token.Token.prototype.getInitialSupply = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.Token} returns this + */ +proto.irismod.token.Token.prototype.setInitialSupply = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 max_supply = 6; + * @return {number} + */ +proto.irismod.token.Token.prototype.getMaxSupply = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.Token} returns this + */ +proto.irismod.token.Token.prototype.setMaxSupply = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional bool mintable = 7; + * @return {boolean} + */ +proto.irismod.token.Token.prototype.getMintable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.token.Token} returns this + */ +proto.irismod.token.Token.prototype.setMintable = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional string owner = 8; + * @return {string} + */ +proto.irismod.token.Token.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.Token} returns this + */ +proto.irismod.token.Token.prototype.setOwner = 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.irismod.token.Params.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.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.irismod.token.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.Params.toObject = function(includeInstance, msg) { + var f, obj = { + tokenTaxRate: jspb.Message.getFieldWithDefault(msg, 1, ""), + issueTokenBaseFee: (f = msg.getIssueTokenBaseFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + mintTokenFeeRatio: 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.irismod.token.Params} + */ +proto.irismod.token.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.Params; + return proto.irismod.token.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.Params} + */ +proto.irismod.token.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.setTokenTaxRate(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setIssueTokenBaseFee(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMintTokenFeeRatio(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.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.irismod.token.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenTaxRate(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIssueTokenBaseFee(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getMintTokenFeeRatio(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string token_tax_rate = 1; + * @return {string} + */ +proto.irismod.token.Params.prototype.getTokenTaxRate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.Params} returns this + */ +proto.irismod.token.Params.prototype.setTokenTaxRate = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin issue_token_base_fee = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.token.Params.prototype.getIssueTokenBaseFee = 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.irismod.token.Params} returns this +*/ +proto.irismod.token.Params.prototype.setIssueTokenBaseFee = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.Params} returns this + */ +proto.irismod.token.Params.prototype.clearIssueTokenBaseFee = function() { + return this.setIssueTokenBaseFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.Params.prototype.hasIssueTokenBaseFee = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string mint_token_fee_ratio = 3; + * @return {string} + */ +proto.irismod.token.Params.prototype.getMintTokenFeeRatio = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.Params} returns this + */ +proto.irismod.token.Params.prototype.setMintTokenFeeRatio = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.irismod.token); diff --git a/dist/src/types/proto-types/irismod/token/tx_grpc_web_pb.js b/dist/src/types/proto-types/irismod/token/tx_grpc_web_pb.js new file mode 100644 index 00000000..6505dba2 --- /dev/null +++ b/dist/src/types/proto-types/irismod/token/tx_grpc_web_pb.js @@ -0,0 +1,397 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.token + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.token = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.token.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.token.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.MsgIssueToken, + * !proto.irismod.token.MsgIssueTokenResponse>} + */ +const methodDescriptor_Msg_IssueToken = new grpc.web.MethodDescriptor( + '/irismod.token.Msg/IssueToken', + grpc.web.MethodType.UNARY, + proto.irismod.token.MsgIssueToken, + proto.irismod.token.MsgIssueTokenResponse, + /** + * @param {!proto.irismod.token.MsgIssueToken} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgIssueTokenResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.MsgIssueToken, + * !proto.irismod.token.MsgIssueTokenResponse>} + */ +const methodInfo_Msg_IssueToken = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.MsgIssueTokenResponse, + /** + * @param {!proto.irismod.token.MsgIssueToken} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgIssueTokenResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.MsgIssueToken} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.MsgIssueTokenResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.MsgClient.prototype.issueToken = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Msg/IssueToken', + request, + metadata || {}, + methodDescriptor_Msg_IssueToken, + callback); +}; + + +/** + * @param {!proto.irismod.token.MsgIssueToken} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.MsgPromiseClient.prototype.issueToken = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Msg/IssueToken', + request, + metadata || {}, + methodDescriptor_Msg_IssueToken); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.MsgEditToken, + * !proto.irismod.token.MsgEditTokenResponse>} + */ +const methodDescriptor_Msg_EditToken = new grpc.web.MethodDescriptor( + '/irismod.token.Msg/EditToken', + grpc.web.MethodType.UNARY, + proto.irismod.token.MsgEditToken, + proto.irismod.token.MsgEditTokenResponse, + /** + * @param {!proto.irismod.token.MsgEditToken} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgEditTokenResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.MsgEditToken, + * !proto.irismod.token.MsgEditTokenResponse>} + */ +const methodInfo_Msg_EditToken = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.MsgEditTokenResponse, + /** + * @param {!proto.irismod.token.MsgEditToken} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgEditTokenResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.MsgEditToken} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.MsgEditTokenResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.MsgClient.prototype.editToken = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Msg/EditToken', + request, + metadata || {}, + methodDescriptor_Msg_EditToken, + callback); +}; + + +/** + * @param {!proto.irismod.token.MsgEditToken} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.MsgPromiseClient.prototype.editToken = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Msg/EditToken', + request, + metadata || {}, + methodDescriptor_Msg_EditToken); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.MsgMintToken, + * !proto.irismod.token.MsgMintTokenResponse>} + */ +const methodDescriptor_Msg_MintToken = new grpc.web.MethodDescriptor( + '/irismod.token.Msg/MintToken', + grpc.web.MethodType.UNARY, + proto.irismod.token.MsgMintToken, + proto.irismod.token.MsgMintTokenResponse, + /** + * @param {!proto.irismod.token.MsgMintToken} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgMintTokenResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.MsgMintToken, + * !proto.irismod.token.MsgMintTokenResponse>} + */ +const methodInfo_Msg_MintToken = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.MsgMintTokenResponse, + /** + * @param {!proto.irismod.token.MsgMintToken} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgMintTokenResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.MsgMintToken} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.MsgMintTokenResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.MsgClient.prototype.mintToken = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Msg/MintToken', + request, + metadata || {}, + methodDescriptor_Msg_MintToken, + callback); +}; + + +/** + * @param {!proto.irismod.token.MsgMintToken} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.MsgPromiseClient.prototype.mintToken = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Msg/MintToken', + request, + metadata || {}, + methodDescriptor_Msg_MintToken); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.MsgTransferTokenOwner, + * !proto.irismod.token.MsgTransferTokenOwnerResponse>} + */ +const methodDescriptor_Msg_TransferTokenOwner = new grpc.web.MethodDescriptor( + '/irismod.token.Msg/TransferTokenOwner', + grpc.web.MethodType.UNARY, + proto.irismod.token.MsgTransferTokenOwner, + proto.irismod.token.MsgTransferTokenOwnerResponse, + /** + * @param {!proto.irismod.token.MsgTransferTokenOwner} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgTransferTokenOwnerResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.MsgTransferTokenOwner, + * !proto.irismod.token.MsgTransferTokenOwnerResponse>} + */ +const methodInfo_Msg_TransferTokenOwner = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.MsgTransferTokenOwnerResponse, + /** + * @param {!proto.irismod.token.MsgTransferTokenOwner} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgTransferTokenOwnerResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.MsgTransferTokenOwner} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.MsgTransferTokenOwnerResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.MsgClient.prototype.transferTokenOwner = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Msg/TransferTokenOwner', + request, + metadata || {}, + methodDescriptor_Msg_TransferTokenOwner, + callback); +}; + + +/** + * @param {!proto.irismod.token.MsgTransferTokenOwner} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.MsgPromiseClient.prototype.transferTokenOwner = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Msg/TransferTokenOwner', + request, + metadata || {}, + methodDescriptor_Msg_TransferTokenOwner); +}; + + +module.exports = proto.irismod.token; + diff --git a/dist/src/types/proto-types/irismod/token/tx_pb.js b/dist/src/types/proto-types/irismod/token/tx_pb.js new file mode 100644 index 00000000..2de8a0ec --- /dev/null +++ b/dist/src/types/proto-types/irismod/token/tx_pb.js @@ -0,0 +1,1597 @@ +// source: irismod/token/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.irismod.token.MsgEditToken', null, global); +goog.exportSymbol('proto.irismod.token.MsgEditTokenResponse', null, global); +goog.exportSymbol('proto.irismod.token.MsgIssueToken', null, global); +goog.exportSymbol('proto.irismod.token.MsgIssueTokenResponse', null, global); +goog.exportSymbol('proto.irismod.token.MsgMintToken', null, global); +goog.exportSymbol('proto.irismod.token.MsgMintTokenResponse', null, global); +goog.exportSymbol('proto.irismod.token.MsgTransferTokenOwner', null, global); +goog.exportSymbol('proto.irismod.token.MsgTransferTokenOwnerResponse', 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.irismod.token.MsgIssueToken = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgIssueToken, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgIssueToken.displayName = 'proto.irismod.token.MsgIssueToken'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.MsgIssueTokenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgIssueTokenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgIssueTokenResponse.displayName = 'proto.irismod.token.MsgIssueTokenResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.MsgTransferTokenOwner = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgTransferTokenOwner, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgTransferTokenOwner.displayName = 'proto.irismod.token.MsgTransferTokenOwner'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.MsgTransferTokenOwnerResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgTransferTokenOwnerResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgTransferTokenOwnerResponse.displayName = 'proto.irismod.token.MsgTransferTokenOwnerResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.MsgEditToken = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgEditToken, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgEditToken.displayName = 'proto.irismod.token.MsgEditToken'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.MsgEditTokenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgEditTokenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgEditTokenResponse.displayName = 'proto.irismod.token.MsgEditTokenResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.MsgMintToken = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgMintToken, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgMintToken.displayName = 'proto.irismod.token.MsgMintToken'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.MsgMintTokenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgMintTokenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgMintTokenResponse.displayName = 'proto.irismod.token.MsgMintTokenResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.token.MsgIssueToken.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgIssueToken.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.MsgIssueToken} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgIssueToken.toObject = function(includeInstance, msg) { + var f, obj = { + symbol: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + scale: jspb.Message.getFieldWithDefault(msg, 3, 0), + minUnit: jspb.Message.getFieldWithDefault(msg, 4, ""), + initialSupply: jspb.Message.getFieldWithDefault(msg, 5, 0), + maxSupply: jspb.Message.getFieldWithDefault(msg, 6, 0), + mintable: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + owner: 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.irismod.token.MsgIssueToken} + */ +proto.irismod.token.MsgIssueToken.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgIssueToken; + return proto.irismod.token.MsgIssueToken.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgIssueToken} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgIssueToken} + */ +proto.irismod.token.MsgIssueToken.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 {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setScale(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMinUnit(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInitialSupply(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxSupply(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMintable(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.MsgIssueToken.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgIssueToken.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgIssueToken} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgIssueToken.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getScale(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getMinUnit(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getInitialSupply(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getMaxSupply(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getMintable(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional string symbol = 1; + * @return {string} + */ +proto.irismod.token.MsgIssueToken.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgIssueToken} returns this + */ +proto.irismod.token.MsgIssueToken.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.irismod.token.MsgIssueToken.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgIssueToken} returns this + */ +proto.irismod.token.MsgIssueToken.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint32 scale = 3; + * @return {number} + */ +proto.irismod.token.MsgIssueToken.prototype.getScale = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.MsgIssueToken} returns this + */ +proto.irismod.token.MsgIssueToken.prototype.setScale = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string min_unit = 4; + * @return {string} + */ +proto.irismod.token.MsgIssueToken.prototype.getMinUnit = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgIssueToken} returns this + */ +proto.irismod.token.MsgIssueToken.prototype.setMinUnit = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional uint64 initial_supply = 5; + * @return {number} + */ +proto.irismod.token.MsgIssueToken.prototype.getInitialSupply = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.MsgIssueToken} returns this + */ +proto.irismod.token.MsgIssueToken.prototype.setInitialSupply = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 max_supply = 6; + * @return {number} + */ +proto.irismod.token.MsgIssueToken.prototype.getMaxSupply = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.MsgIssueToken} returns this + */ +proto.irismod.token.MsgIssueToken.prototype.setMaxSupply = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional bool mintable = 7; + * @return {boolean} + */ +proto.irismod.token.MsgIssueToken.prototype.getMintable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.token.MsgIssueToken} returns this + */ +proto.irismod.token.MsgIssueToken.prototype.setMintable = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional string owner = 8; + * @return {string} + */ +proto.irismod.token.MsgIssueToken.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgIssueToken} returns this + */ +proto.irismod.token.MsgIssueToken.prototype.setOwner = 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.irismod.token.MsgIssueTokenResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgIssueTokenResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.MsgIssueTokenResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgIssueTokenResponse.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.irismod.token.MsgIssueTokenResponse} + */ +proto.irismod.token.MsgIssueTokenResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgIssueTokenResponse; + return proto.irismod.token.MsgIssueTokenResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgIssueTokenResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgIssueTokenResponse} + */ +proto.irismod.token.MsgIssueTokenResponse.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.irismod.token.MsgIssueTokenResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgIssueTokenResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgIssueTokenResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgIssueTokenResponse.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.irismod.token.MsgTransferTokenOwner.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgTransferTokenOwner.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.MsgTransferTokenOwner} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgTransferTokenOwner.toObject = function(includeInstance, msg) { + var f, obj = { + srcOwner: jspb.Message.getFieldWithDefault(msg, 1, ""), + dstOwner: jspb.Message.getFieldWithDefault(msg, 2, ""), + symbol: 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.irismod.token.MsgTransferTokenOwner} + */ +proto.irismod.token.MsgTransferTokenOwner.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgTransferTokenOwner; + return proto.irismod.token.MsgTransferTokenOwner.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgTransferTokenOwner} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgTransferTokenOwner} + */ +proto.irismod.token.MsgTransferTokenOwner.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.setSrcOwner(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDstOwner(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSymbol(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.MsgTransferTokenOwner.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgTransferTokenOwner.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgTransferTokenOwner} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgTransferTokenOwner.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSrcOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDstOwner(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string src_owner = 1; + * @return {string} + */ +proto.irismod.token.MsgTransferTokenOwner.prototype.getSrcOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgTransferTokenOwner} returns this + */ +proto.irismod.token.MsgTransferTokenOwner.prototype.setSrcOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string dst_owner = 2; + * @return {string} + */ +proto.irismod.token.MsgTransferTokenOwner.prototype.getDstOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgTransferTokenOwner} returns this + */ +proto.irismod.token.MsgTransferTokenOwner.prototype.setDstOwner = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string symbol = 3; + * @return {string} + */ +proto.irismod.token.MsgTransferTokenOwner.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgTransferTokenOwner} returns this + */ +proto.irismod.token.MsgTransferTokenOwner.prototype.setSymbol = 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.irismod.token.MsgTransferTokenOwnerResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgTransferTokenOwnerResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.MsgTransferTokenOwnerResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgTransferTokenOwnerResponse.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.irismod.token.MsgTransferTokenOwnerResponse} + */ +proto.irismod.token.MsgTransferTokenOwnerResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgTransferTokenOwnerResponse; + return proto.irismod.token.MsgTransferTokenOwnerResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgTransferTokenOwnerResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgTransferTokenOwnerResponse} + */ +proto.irismod.token.MsgTransferTokenOwnerResponse.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.irismod.token.MsgTransferTokenOwnerResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgTransferTokenOwnerResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgTransferTokenOwnerResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgTransferTokenOwnerResponse.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.irismod.token.MsgEditToken.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgEditToken.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.MsgEditToken} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgEditToken.toObject = function(includeInstance, msg) { + var f, obj = { + symbol: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + maxSupply: jspb.Message.getFieldWithDefault(msg, 3, 0), + mintable: jspb.Message.getFieldWithDefault(msg, 4, ""), + owner: 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.irismod.token.MsgEditToken} + */ +proto.irismod.token.MsgEditToken.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgEditToken; + return proto.irismod.token.MsgEditToken.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgEditToken} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgEditToken} + */ +proto.irismod.token.MsgEditToken.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 {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxSupply(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMintable(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.MsgEditToken.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgEditToken.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgEditToken} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgEditToken.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMaxSupply(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getMintable(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string symbol = 1; + * @return {string} + */ +proto.irismod.token.MsgEditToken.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgEditToken} returns this + */ +proto.irismod.token.MsgEditToken.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.irismod.token.MsgEditToken.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgEditToken} returns this + */ +proto.irismod.token.MsgEditToken.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 max_supply = 3; + * @return {number} + */ +proto.irismod.token.MsgEditToken.prototype.getMaxSupply = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.MsgEditToken} returns this + */ +proto.irismod.token.MsgEditToken.prototype.setMaxSupply = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string mintable = 4; + * @return {string} + */ +proto.irismod.token.MsgEditToken.prototype.getMintable = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgEditToken} returns this + */ +proto.irismod.token.MsgEditToken.prototype.setMintable = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string owner = 5; + * @return {string} + */ +proto.irismod.token.MsgEditToken.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgEditToken} returns this + */ +proto.irismod.token.MsgEditToken.prototype.setOwner = 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.irismod.token.MsgEditTokenResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgEditTokenResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.MsgEditTokenResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgEditTokenResponse.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.irismod.token.MsgEditTokenResponse} + */ +proto.irismod.token.MsgEditTokenResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgEditTokenResponse; + return proto.irismod.token.MsgEditTokenResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgEditTokenResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgEditTokenResponse} + */ +proto.irismod.token.MsgEditTokenResponse.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.irismod.token.MsgEditTokenResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgEditTokenResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgEditTokenResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgEditTokenResponse.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.irismod.token.MsgMintToken.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgMintToken.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.MsgMintToken} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgMintToken.toObject = function(includeInstance, msg) { + var f, obj = { + symbol: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + to: jspb.Message.getFieldWithDefault(msg, 3, ""), + owner: 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.irismod.token.MsgMintToken} + */ +proto.irismod.token.MsgMintToken.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgMintToken; + return proto.irismod.token.MsgMintToken.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgMintToken} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgMintToken} + */ +proto.irismod.token.MsgMintToken.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.setAmount(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTo(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.MsgMintToken.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgMintToken.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgMintToken} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgMintToken.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getTo(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string symbol = 1; + * @return {string} + */ +proto.irismod.token.MsgMintToken.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgMintToken} returns this + */ +proto.irismod.token.MsgMintToken.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 amount = 2; + * @return {number} + */ +proto.irismod.token.MsgMintToken.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.MsgMintToken} returns this + */ +proto.irismod.token.MsgMintToken.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string to = 3; + * @return {string} + */ +proto.irismod.token.MsgMintToken.prototype.getTo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgMintToken} returns this + */ +proto.irismod.token.MsgMintToken.prototype.setTo = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string owner = 4; + * @return {string} + */ +proto.irismod.token.MsgMintToken.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgMintToken} returns this + */ +proto.irismod.token.MsgMintToken.prototype.setOwner = 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.irismod.token.MsgMintTokenResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgMintTokenResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.MsgMintTokenResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgMintTokenResponse.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.irismod.token.MsgMintTokenResponse} + */ +proto.irismod.token.MsgMintTokenResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgMintTokenResponse; + return proto.irismod.token.MsgMintTokenResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgMintTokenResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgMintTokenResponse} + */ +proto.irismod.token.MsgMintTokenResponse.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.irismod.token.MsgMintTokenResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgMintTokenResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgMintTokenResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgMintTokenResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.irismod.token); diff --git a/dist/src/types/proto-types/tendermint/abci/types_grpc_web_pb.js b/dist/src/types/proto-types/tendermint/abci/types_grpc_web_pb.js new file mode 100644 index 00000000..b808ab92 --- /dev/null +++ b/dist/src/types/proto-types/tendermint/abci/types_grpc_web_pb.js @@ -0,0 +1,1287 @@ +/** + * @fileoverview gRPC-Web generated client stub for tendermint.abci + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var tendermint_crypto_proof_pb = require('../../tendermint/crypto/proof_pb.js') + +var tendermint_types_types_pb = require('../../tendermint/types/types_pb.js') + +var tendermint_crypto_keys_pb = require('../../tendermint/crypto/keys_pb.js') + +var tendermint_types_params_pb = require('../../tendermint/types/params_pb.js') + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') +const proto = {}; +proto.tendermint = {}; +proto.tendermint.abci = require('./types_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.tendermint.abci.ABCIApplicationClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.tendermint.abci.ABCIApplicationPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestEcho, + * !proto.tendermint.abci.ResponseEcho>} + */ +const methodDescriptor_ABCIApplication_Echo = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/Echo', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestEcho, + proto.tendermint.abci.ResponseEcho, + /** + * @param {!proto.tendermint.abci.RequestEcho} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseEcho.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestEcho, + * !proto.tendermint.abci.ResponseEcho>} + */ +const methodInfo_ABCIApplication_Echo = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseEcho, + /** + * @param {!proto.tendermint.abci.RequestEcho} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseEcho.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestEcho} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseEcho)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.echo = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Echo', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Echo, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestEcho} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.echo = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Echo', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Echo); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestFlush, + * !proto.tendermint.abci.ResponseFlush>} + */ +const methodDescriptor_ABCIApplication_Flush = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/Flush', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestFlush, + proto.tendermint.abci.ResponseFlush, + /** + * @param {!proto.tendermint.abci.RequestFlush} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseFlush.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestFlush, + * !proto.tendermint.abci.ResponseFlush>} + */ +const methodInfo_ABCIApplication_Flush = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseFlush, + /** + * @param {!proto.tendermint.abci.RequestFlush} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseFlush.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestFlush} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseFlush)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.flush = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Flush', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Flush, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestFlush} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.flush = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Flush', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Flush); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestInfo, + * !proto.tendermint.abci.ResponseInfo>} + */ +const methodDescriptor_ABCIApplication_Info = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/Info', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestInfo, + proto.tendermint.abci.ResponseInfo, + /** + * @param {!proto.tendermint.abci.RequestInfo} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseInfo.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestInfo, + * !proto.tendermint.abci.ResponseInfo>} + */ +const methodInfo_ABCIApplication_Info = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseInfo, + /** + * @param {!proto.tendermint.abci.RequestInfo} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseInfo.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestInfo} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseInfo)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.info = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Info', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Info, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestInfo} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.info = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Info', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Info); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestSetOption, + * !proto.tendermint.abci.ResponseSetOption>} + */ +const methodDescriptor_ABCIApplication_SetOption = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/SetOption', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestSetOption, + proto.tendermint.abci.ResponseSetOption, + /** + * @param {!proto.tendermint.abci.RequestSetOption} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseSetOption.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestSetOption, + * !proto.tendermint.abci.ResponseSetOption>} + */ +const methodInfo_ABCIApplication_SetOption = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseSetOption, + /** + * @param {!proto.tendermint.abci.RequestSetOption} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseSetOption.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestSetOption} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseSetOption)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.setOption = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/SetOption', + request, + metadata || {}, + methodDescriptor_ABCIApplication_SetOption, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestSetOption} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.setOption = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/SetOption', + request, + metadata || {}, + methodDescriptor_ABCIApplication_SetOption); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestDeliverTx, + * !proto.tendermint.abci.ResponseDeliverTx>} + */ +const methodDescriptor_ABCIApplication_DeliverTx = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/DeliverTx', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestDeliverTx, + proto.tendermint.abci.ResponseDeliverTx, + /** + * @param {!proto.tendermint.abci.RequestDeliverTx} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseDeliverTx.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestDeliverTx, + * !proto.tendermint.abci.ResponseDeliverTx>} + */ +const methodInfo_ABCIApplication_DeliverTx = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseDeliverTx, + /** + * @param {!proto.tendermint.abci.RequestDeliverTx} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseDeliverTx.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestDeliverTx} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseDeliverTx)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.deliverTx = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/DeliverTx', + request, + metadata || {}, + methodDescriptor_ABCIApplication_DeliverTx, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestDeliverTx} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.deliverTx = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/DeliverTx', + request, + metadata || {}, + methodDescriptor_ABCIApplication_DeliverTx); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestCheckTx, + * !proto.tendermint.abci.ResponseCheckTx>} + */ +const methodDescriptor_ABCIApplication_CheckTx = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/CheckTx', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestCheckTx, + proto.tendermint.abci.ResponseCheckTx, + /** + * @param {!proto.tendermint.abci.RequestCheckTx} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseCheckTx.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestCheckTx, + * !proto.tendermint.abci.ResponseCheckTx>} + */ +const methodInfo_ABCIApplication_CheckTx = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseCheckTx, + /** + * @param {!proto.tendermint.abci.RequestCheckTx} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseCheckTx.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestCheckTx} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseCheckTx)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.checkTx = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/CheckTx', + request, + metadata || {}, + methodDescriptor_ABCIApplication_CheckTx, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestCheckTx} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.checkTx = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/CheckTx', + request, + metadata || {}, + methodDescriptor_ABCIApplication_CheckTx); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestQuery, + * !proto.tendermint.abci.ResponseQuery>} + */ +const methodDescriptor_ABCIApplication_Query = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/Query', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestQuery, + proto.tendermint.abci.ResponseQuery, + /** + * @param {!proto.tendermint.abci.RequestQuery} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseQuery.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestQuery, + * !proto.tendermint.abci.ResponseQuery>} + */ +const methodInfo_ABCIApplication_Query = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseQuery, + /** + * @param {!proto.tendermint.abci.RequestQuery} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseQuery.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestQuery} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseQuery)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.query = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Query', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Query, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestQuery} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.query = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Query', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Query); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestCommit, + * !proto.tendermint.abci.ResponseCommit>} + */ +const methodDescriptor_ABCIApplication_Commit = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/Commit', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestCommit, + proto.tendermint.abci.ResponseCommit, + /** + * @param {!proto.tendermint.abci.RequestCommit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseCommit.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestCommit, + * !proto.tendermint.abci.ResponseCommit>} + */ +const methodInfo_ABCIApplication_Commit = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseCommit, + /** + * @param {!proto.tendermint.abci.RequestCommit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseCommit.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestCommit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseCommit)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.commit = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Commit', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Commit, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestCommit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.commit = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Commit', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Commit); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestInitChain, + * !proto.tendermint.abci.ResponseInitChain>} + */ +const methodDescriptor_ABCIApplication_InitChain = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/InitChain', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestInitChain, + proto.tendermint.abci.ResponseInitChain, + /** + * @param {!proto.tendermint.abci.RequestInitChain} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseInitChain.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestInitChain, + * !proto.tendermint.abci.ResponseInitChain>} + */ +const methodInfo_ABCIApplication_InitChain = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseInitChain, + /** + * @param {!proto.tendermint.abci.RequestInitChain} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseInitChain.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestInitChain} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseInitChain)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.initChain = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/InitChain', + request, + metadata || {}, + methodDescriptor_ABCIApplication_InitChain, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestInitChain} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.initChain = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/InitChain', + request, + metadata || {}, + methodDescriptor_ABCIApplication_InitChain); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestBeginBlock, + * !proto.tendermint.abci.ResponseBeginBlock>} + */ +const methodDescriptor_ABCIApplication_BeginBlock = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/BeginBlock', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestBeginBlock, + proto.tendermint.abci.ResponseBeginBlock, + /** + * @param {!proto.tendermint.abci.RequestBeginBlock} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseBeginBlock.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestBeginBlock, + * !proto.tendermint.abci.ResponseBeginBlock>} + */ +const methodInfo_ABCIApplication_BeginBlock = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseBeginBlock, + /** + * @param {!proto.tendermint.abci.RequestBeginBlock} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseBeginBlock.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestBeginBlock} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseBeginBlock)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.beginBlock = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/BeginBlock', + request, + metadata || {}, + methodDescriptor_ABCIApplication_BeginBlock, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestBeginBlock} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.beginBlock = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/BeginBlock', + request, + metadata || {}, + methodDescriptor_ABCIApplication_BeginBlock); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestEndBlock, + * !proto.tendermint.abci.ResponseEndBlock>} + */ +const methodDescriptor_ABCIApplication_EndBlock = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/EndBlock', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestEndBlock, + proto.tendermint.abci.ResponseEndBlock, + /** + * @param {!proto.tendermint.abci.RequestEndBlock} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseEndBlock.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestEndBlock, + * !proto.tendermint.abci.ResponseEndBlock>} + */ +const methodInfo_ABCIApplication_EndBlock = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseEndBlock, + /** + * @param {!proto.tendermint.abci.RequestEndBlock} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseEndBlock.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestEndBlock} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseEndBlock)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.endBlock = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/EndBlock', + request, + metadata || {}, + methodDescriptor_ABCIApplication_EndBlock, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestEndBlock} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.endBlock = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/EndBlock', + request, + metadata || {}, + methodDescriptor_ABCIApplication_EndBlock); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestListSnapshots, + * !proto.tendermint.abci.ResponseListSnapshots>} + */ +const methodDescriptor_ABCIApplication_ListSnapshots = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/ListSnapshots', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestListSnapshots, + proto.tendermint.abci.ResponseListSnapshots, + /** + * @param {!proto.tendermint.abci.RequestListSnapshots} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseListSnapshots.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestListSnapshots, + * !proto.tendermint.abci.ResponseListSnapshots>} + */ +const methodInfo_ABCIApplication_ListSnapshots = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseListSnapshots, + /** + * @param {!proto.tendermint.abci.RequestListSnapshots} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseListSnapshots.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestListSnapshots} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseListSnapshots)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.listSnapshots = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/ListSnapshots', + request, + metadata || {}, + methodDescriptor_ABCIApplication_ListSnapshots, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestListSnapshots} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.listSnapshots = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/ListSnapshots', + request, + metadata || {}, + methodDescriptor_ABCIApplication_ListSnapshots); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestOfferSnapshot, + * !proto.tendermint.abci.ResponseOfferSnapshot>} + */ +const methodDescriptor_ABCIApplication_OfferSnapshot = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/OfferSnapshot', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestOfferSnapshot, + proto.tendermint.abci.ResponseOfferSnapshot, + /** + * @param {!proto.tendermint.abci.RequestOfferSnapshot} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestOfferSnapshot, + * !proto.tendermint.abci.ResponseOfferSnapshot>} + */ +const methodInfo_ABCIApplication_OfferSnapshot = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseOfferSnapshot, + /** + * @param {!proto.tendermint.abci.RequestOfferSnapshot} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestOfferSnapshot} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseOfferSnapshot)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.offerSnapshot = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/OfferSnapshot', + request, + metadata || {}, + methodDescriptor_ABCIApplication_OfferSnapshot, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestOfferSnapshot} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.offerSnapshot = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/OfferSnapshot', + request, + metadata || {}, + methodDescriptor_ABCIApplication_OfferSnapshot); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestLoadSnapshotChunk, + * !proto.tendermint.abci.ResponseLoadSnapshotChunk>} + */ +const methodDescriptor_ABCIApplication_LoadSnapshotChunk = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/LoadSnapshotChunk', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestLoadSnapshotChunk, + proto.tendermint.abci.ResponseLoadSnapshotChunk, + /** + * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestLoadSnapshotChunk, + * !proto.tendermint.abci.ResponseLoadSnapshotChunk>} + */ +const methodInfo_ABCIApplication_LoadSnapshotChunk = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseLoadSnapshotChunk, + /** + * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseLoadSnapshotChunk)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.loadSnapshotChunk = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/LoadSnapshotChunk', + request, + metadata || {}, + methodDescriptor_ABCIApplication_LoadSnapshotChunk, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.loadSnapshotChunk = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/LoadSnapshotChunk', + request, + metadata || {}, + methodDescriptor_ABCIApplication_LoadSnapshotChunk); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestApplySnapshotChunk, + * !proto.tendermint.abci.ResponseApplySnapshotChunk>} + */ +const methodDescriptor_ABCIApplication_ApplySnapshotChunk = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/ApplySnapshotChunk', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestApplySnapshotChunk, + proto.tendermint.abci.ResponseApplySnapshotChunk, + /** + * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseApplySnapshotChunk.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestApplySnapshotChunk, + * !proto.tendermint.abci.ResponseApplySnapshotChunk>} + */ +const methodInfo_ABCIApplication_ApplySnapshotChunk = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseApplySnapshotChunk, + /** + * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseApplySnapshotChunk.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseApplySnapshotChunk)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.applySnapshotChunk = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/ApplySnapshotChunk', + request, + metadata || {}, + methodDescriptor_ABCIApplication_ApplySnapshotChunk, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.applySnapshotChunk = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/ApplySnapshotChunk', + request, + metadata || {}, + methodDescriptor_ABCIApplication_ApplySnapshotChunk); +}; + + +module.exports = proto.tendermint.abci; + diff --git a/dist/src/types/proto-types/tendermint/abci/types_pb.js b/dist/src/types/proto-types/tendermint/abci/types_pb.js new file mode 100644 index 00000000..4c767e02 --- /dev/null +++ b/dist/src/types/proto-types/tendermint/abci/types_pb.js @@ -0,0 +1,11785 @@ +// source: tendermint/abci/types.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 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.tendermint.abci.BlockParams', null, global); +goog.exportSymbol('proto.tendermint.abci.CheckTxType', null, global); +goog.exportSymbol('proto.tendermint.abci.ConsensusParams', null, global); +goog.exportSymbol('proto.tendermint.abci.Event', null, global); +goog.exportSymbol('proto.tendermint.abci.EventAttribute', null, global); +goog.exportSymbol('proto.tendermint.abci.Evidence', null, global); +goog.exportSymbol('proto.tendermint.abci.EvidenceType', null, global); +goog.exportSymbol('proto.tendermint.abci.LastCommitInfo', 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.RequestFlush', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestInfo', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestInitChain', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestListSnapshots', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestLoadSnapshotChunk', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestOfferSnapshot', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestQuery', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestSetOption', 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.ResponseFlush', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseInfo', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseInitChain', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseListSnapshots', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseLoadSnapshotChunk', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseOfferSnapshot', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseOfferSnapshot.Result', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseQuery', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseSetOption', 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); +goog.exportSymbol('proto.tendermint.abci.ValidatorUpdate', null, global); +goog.exportSymbol('proto.tendermint.abci.VoteInfo', 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.tendermint.abci.Request = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.abci.Request.oneofGroups_); +}; +goog.inherits(proto.tendermint.abci.Request, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Request.displayName = 'proto.tendermint.abci.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.tendermint.abci.RequestEcho = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestEcho, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestEcho.displayName = 'proto.tendermint.abci.RequestEcho'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestFlush = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestFlush, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestFlush.displayName = 'proto.tendermint.abci.RequestFlush'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestInfo.displayName = 'proto.tendermint.abci.RequestInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestSetOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestSetOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestSetOption.displayName = 'proto.tendermint.abci.RequestSetOption'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestInitChain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.RequestInitChain.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.RequestInitChain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestInitChain.displayName = 'proto.tendermint.abci.RequestInitChain'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestQuery = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestQuery, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestQuery.displayName = 'proto.tendermint.abci.RequestQuery'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestBeginBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.RequestBeginBlock.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.RequestBeginBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestBeginBlock.displayName = 'proto.tendermint.abci.RequestBeginBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestCheckTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestCheckTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestCheckTx.displayName = 'proto.tendermint.abci.RequestCheckTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestDeliverTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestDeliverTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestDeliverTx.displayName = 'proto.tendermint.abci.RequestDeliverTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestEndBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestEndBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestEndBlock.displayName = 'proto.tendermint.abci.RequestEndBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestCommit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestCommit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestCommit.displayName = 'proto.tendermint.abci.RequestCommit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestListSnapshots = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestListSnapshots, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestListSnapshots.displayName = 'proto.tendermint.abci.RequestListSnapshots'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestOfferSnapshot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestOfferSnapshot, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestOfferSnapshot.displayName = 'proto.tendermint.abci.RequestOfferSnapshot'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestLoadSnapshotChunk = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestLoadSnapshotChunk, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestLoadSnapshotChunk.displayName = 'proto.tendermint.abci.RequestLoadSnapshotChunk'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestApplySnapshotChunk = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestApplySnapshotChunk, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestApplySnapshotChunk.displayName = 'proto.tendermint.abci.RequestApplySnapshotChunk'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Response = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.abci.Response.oneofGroups_); +}; +goog.inherits(proto.tendermint.abci.Response, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Response.displayName = 'proto.tendermint.abci.Response'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseException = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseException, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseException.displayName = 'proto.tendermint.abci.ResponseException'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseEcho = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseEcho, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseEcho.displayName = 'proto.tendermint.abci.ResponseEcho'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseFlush = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseFlush, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseFlush.displayName = 'proto.tendermint.abci.ResponseFlush'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseInfo.displayName = 'proto.tendermint.abci.ResponseInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseSetOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseSetOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseSetOption.displayName = 'proto.tendermint.abci.ResponseSetOption'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseInitChain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseInitChain.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseInitChain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseInitChain.displayName = 'proto.tendermint.abci.ResponseInitChain'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseQuery = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseQuery, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseQuery.displayName = 'proto.tendermint.abci.ResponseQuery'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseBeginBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseBeginBlock.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseBeginBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseBeginBlock.displayName = 'proto.tendermint.abci.ResponseBeginBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseCheckTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseCheckTx.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseCheckTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseCheckTx.displayName = 'proto.tendermint.abci.ResponseCheckTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseDeliverTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseDeliverTx.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseDeliverTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseDeliverTx.displayName = 'proto.tendermint.abci.ResponseDeliverTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseEndBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseEndBlock.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseEndBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseEndBlock.displayName = 'proto.tendermint.abci.ResponseEndBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseCommit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseCommit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseCommit.displayName = 'proto.tendermint.abci.ResponseCommit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseListSnapshots = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseListSnapshots.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseListSnapshots, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseListSnapshots.displayName = 'proto.tendermint.abci.ResponseListSnapshots'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseOfferSnapshot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseOfferSnapshot, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseOfferSnapshot.displayName = 'proto.tendermint.abci.ResponseOfferSnapshot'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseLoadSnapshotChunk = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseLoadSnapshotChunk, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseLoadSnapshotChunk.displayName = 'proto.tendermint.abci.ResponseLoadSnapshotChunk'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseApplySnapshotChunk = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseApplySnapshotChunk.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseApplySnapshotChunk, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseApplySnapshotChunk.displayName = 'proto.tendermint.abci.ResponseApplySnapshotChunk'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ConsensusParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ConsensusParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ConsensusParams.displayName = 'proto.tendermint.abci.ConsensusParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.BlockParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.BlockParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.BlockParams.displayName = 'proto.tendermint.abci.BlockParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.LastCommitInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.LastCommitInfo.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.LastCommitInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.LastCommitInfo.displayName = 'proto.tendermint.abci.LastCommitInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Event = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.Event.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.Event, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Event.displayName = 'proto.tendermint.abci.Event'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.EventAttribute = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.EventAttribute, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + 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.TxResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.TxResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.TxResult.displayName = 'proto.tendermint.abci.TxResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Validator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.Validator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Validator.displayName = 'proto.tendermint.abci.Validator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ValidatorUpdate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ValidatorUpdate.displayName = 'proto.tendermint.abci.ValidatorUpdate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.VoteInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.VoteInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.VoteInfo.displayName = 'proto.tendermint.abci.VoteInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Evidence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.Evidence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Evidence.displayName = 'proto.tendermint.abci.Evidence'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Snapshot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.Snapshot, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Snapshot.displayName = 'proto.tendermint.abci.Snapshot'; +} + +/** + * 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.Request.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]]; + +/** + * @enum {number} + */ +proto.tendermint.abci.Request.ValueCase = { + VALUE_NOT_SET: 0, + ECHO: 1, + FLUSH: 2, + INFO: 3, + SET_OPTION: 4, + 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 +}; + +/** + * @return {proto.tendermint.abci.Request.ValueCase} + */ +proto.tendermint.abci.Request.prototype.getValueCase = function() { + return /** @type {proto.tendermint.abci.Request.ValueCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.abci.Request.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.Request.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.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.tendermint.abci.Request} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Request.toObject = function(includeInstance, msg) { + var f, obj = { + echo: (f = msg.getEcho()) && proto.tendermint.abci.RequestEcho.toObject(includeInstance, f), + flush: (f = msg.getFlush()) && proto.tendermint.abci.RequestFlush.toObject(includeInstance, f), + info: (f = msg.getInfo()) && proto.tendermint.abci.RequestInfo.toObject(includeInstance, f), + setOption: (f = msg.getSetOption()) && proto.tendermint.abci.RequestSetOption.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) + }; + + 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.Request} + */ +proto.tendermint.abci.Request.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.Request; + return proto.tendermint.abci.Request.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.Request} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Request} + */ +proto.tendermint.abci.Request.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.RequestEcho; + reader.readMessage(value,proto.tendermint.abci.RequestEcho.deserializeBinaryFromReader); + msg.setEcho(value); + break; + case 2: + var value = new proto.tendermint.abci.RequestFlush; + reader.readMessage(value,proto.tendermint.abci.RequestFlush.deserializeBinaryFromReader); + msg.setFlush(value); + break; + case 3: + var value = new proto.tendermint.abci.RequestInfo; + reader.readMessage(value,proto.tendermint.abci.RequestInfo.deserializeBinaryFromReader); + msg.setInfo(value); + break; + case 4: + var value = new proto.tendermint.abci.RequestSetOption; + reader.readMessage(value,proto.tendermint.abci.RequestSetOption.deserializeBinaryFromReader); + msg.setSetOption(value); + break; + case 5: + var value = new proto.tendermint.abci.RequestInitChain; + reader.readMessage(value,proto.tendermint.abci.RequestInitChain.deserializeBinaryFromReader); + msg.setInitChain(value); + break; + case 6: + var value = new proto.tendermint.abci.RequestQuery; + 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); + msg.setCommit(value); + break; + case 12: + var value = new proto.tendermint.abci.RequestListSnapshots; + reader.readMessage(value,proto.tendermint.abci.RequestListSnapshots.deserializeBinaryFromReader); + msg.setListSnapshots(value); + break; + case 13: + var value = new proto.tendermint.abci.RequestOfferSnapshot; + reader.readMessage(value,proto.tendermint.abci.RequestOfferSnapshot.deserializeBinaryFromReader); + msg.setOfferSnapshot(value); + break; + case 14: + var value = new proto.tendermint.abci.RequestLoadSnapshotChunk; + reader.readMessage(value,proto.tendermint.abci.RequestLoadSnapshotChunk.deserializeBinaryFromReader); + msg.setLoadSnapshotChunk(value); + break; + case 15: + var value = new proto.tendermint.abci.RequestApplySnapshotChunk; + reader.readMessage(value,proto.tendermint.abci.RequestApplySnapshotChunk.deserializeBinaryFromReader); + msg.setApplySnapshotChunk(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Request.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.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.tendermint.abci.Request} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Request.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEcho(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.RequestEcho.serializeBinaryToWriter + ); + } + f = message.getFlush(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.abci.RequestFlush.serializeBinaryToWriter + ); + } + f = message.getInfo(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.abci.RequestInfo.serializeBinaryToWriter + ); + } + f = message.getSetOption(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.abci.RequestSetOption.serializeBinaryToWriter + ); + } + f = message.getInitChain(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.tendermint.abci.RequestInitChain.serializeBinaryToWriter + ); + } + f = message.getQuery(); + if (f != null) { + writer.writeMessage( + 6, + f, + 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( + 8, + f, + 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( + 11, + f, + proto.tendermint.abci.RequestCommit.serializeBinaryToWriter + ); + } + f = message.getListSnapshots(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.tendermint.abci.RequestListSnapshots.serializeBinaryToWriter + ); + } + f = message.getOfferSnapshot(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.tendermint.abci.RequestOfferSnapshot.serializeBinaryToWriter + ); + } + f = message.getLoadSnapshotChunk(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.tendermint.abci.RequestLoadSnapshotChunk.serializeBinaryToWriter + ); + } + f = message.getApplySnapshotChunk(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.tendermint.abci.RequestApplySnapshotChunk.serializeBinaryToWriter + ); + } +}; + + +/** + * optional RequestEcho echo = 1; + * @return {?proto.tendermint.abci.RequestEcho} + */ +proto.tendermint.abci.Request.prototype.getEcho = function() { + return /** @type{?proto.tendermint.abci.RequestEcho} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestEcho, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestEcho|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setEcho = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, 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.clearEcho = function() { + return this.setEcho(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasEcho = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional RequestFlush flush = 2; + * @return {?proto.tendermint.abci.RequestFlush} + */ +proto.tendermint.abci.Request.prototype.getFlush = function() { + return /** @type{?proto.tendermint.abci.RequestFlush} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestFlush, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestFlush|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setFlush = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, 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.clearFlush = function() { + return this.setFlush(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasFlush = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional RequestInfo info = 3; + * @return {?proto.tendermint.abci.RequestInfo} + */ +proto.tendermint.abci.Request.prototype.getInfo = function() { + return /** @type{?proto.tendermint.abci.RequestInfo} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestInfo, 3)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestInfo|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setInfo = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, 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.clearInfo = function() { + return this.setInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasInfo = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional RequestSetOption set_option = 4; + * @return {?proto.tendermint.abci.RequestSetOption} + */ +proto.tendermint.abci.Request.prototype.getSetOption = function() { + return /** @type{?proto.tendermint.abci.RequestSetOption} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestSetOption, 4)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestSetOption|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setSetOption = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, 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.clearSetOption = function() { + return this.setSetOption(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasSetOption = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional RequestInitChain init_chain = 5; + * @return {?proto.tendermint.abci.RequestInitChain} + */ +proto.tendermint.abci.Request.prototype.getInitChain = function() { + return /** @type{?proto.tendermint.abci.RequestInitChain} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestInitChain, 5)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestInitChain|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setInitChain = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, 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.clearInitChain = function() { + return this.setInitChain(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasInitChain = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional RequestQuery query = 6; + * @return {?proto.tendermint.abci.RequestQuery} + */ +proto.tendermint.abci.Request.prototype.getQuery = function() { + return /** @type{?proto.tendermint.abci.RequestQuery} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestQuery, 6)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestQuery|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setQuery = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, 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.clearQuery = function() { + return this.setQuery(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasQuery = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * 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} + */ +proto.tendermint.abci.Request.prototype.getCheckTx = function() { + return /** @type{?proto.tendermint.abci.RequestCheckTx} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestCheckTx, 8)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestCheckTx|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setCheckTx = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, 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.clearCheckTx = function() { + return this.setCheckTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasCheckTx = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional RequestDeliverTx deliver_tx = 9; + * @return {?proto.tendermint.abci.RequestDeliverTx} + */ +proto.tendermint.abci.Request.prototype.getDeliverTx = function() { + return /** @type{?proto.tendermint.abci.RequestDeliverTx} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestDeliverTx, 9)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestDeliverTx|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); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasDeliverTx = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional RequestEndBlock end_block = 10; + * @return {?proto.tendermint.abci.RequestEndBlock} + */ +proto.tendermint.abci.Request.prototype.getEndBlock = function() { + return /** @type{?proto.tendermint.abci.RequestEndBlock} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestEndBlock, 10)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestEndBlock|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); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasEndBlock = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional RequestCommit commit = 11; + * @return {?proto.tendermint.abci.RequestCommit} + */ +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.RequestCommit|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); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasCommit = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional RequestListSnapshots list_snapshots = 12; + * @return {?proto.tendermint.abci.RequestListSnapshots} + */ +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.RequestListSnapshots|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); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasListSnapshots = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional RequestOfferSnapshot offer_snapshot = 13; + * @return {?proto.tendermint.abci.RequestOfferSnapshot} + */ +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.RequestOfferSnapshot|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); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasOfferSnapshot = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional RequestLoadSnapshotChunk load_snapshot_chunk = 14; + * @return {?proto.tendermint.abci.RequestLoadSnapshotChunk} + */ +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.RequestLoadSnapshotChunk|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); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasLoadSnapshotChunk = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional RequestApplySnapshotChunk apply_snapshot_chunk = 15; + * @return {?proto.tendermint.abci.RequestApplySnapshotChunk} + */ +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.RequestApplySnapshotChunk|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); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasApplySnapshotChunk = function() { + return jspb.Message.getField(this, 15) != 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.tendermint.abci.RequestEcho.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestEcho.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestEcho} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestEcho.toObject = function(includeInstance, msg) { + var f, obj = { + message: 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.tendermint.abci.RequestEcho} + */ +proto.tendermint.abci.RequestEcho.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestEcho; + return proto.tendermint.abci.RequestEcho.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestEcho} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestEcho} + */ +proto.tendermint.abci.RequestEcho.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.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestEcho.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestEcho.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.RequestEcho} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestEcho.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string message = 1; + * @return {string} + */ +proto.tendermint.abci.RequestEcho.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestEcho} returns this + */ +proto.tendermint.abci.RequestEcho.prototype.setMessage = 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.tendermint.abci.RequestFlush.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestFlush.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestFlush} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestFlush.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.RequestFlush} + */ +proto.tendermint.abci.RequestFlush.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestFlush; + return proto.tendermint.abci.RequestFlush.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestFlush} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestFlush} + */ +proto.tendermint.abci.RequestFlush.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.tendermint.abci.RequestFlush.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestFlush.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.RequestFlush} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestFlush.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.RequestInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestInfo.toObject = function(includeInstance, msg) { + var f, obj = { + version: jspb.Message.getFieldWithDefault(msg, 1, ""), + blockVersion: jspb.Message.getFieldWithDefault(msg, 2, 0), + p2pVersion: 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.tendermint.abci.RequestInfo} + */ +proto.tendermint.abci.RequestInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestInfo; + return proto.tendermint.abci.RequestInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestInfo} + */ +proto.tendermint.abci.RequestInfo.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 {number} */ (reader.readUint64()); + msg.setBlockVersion(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setP2pVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestInfo.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.RequestInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBlockVersion(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getP2pVersion(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional string version = 1; + * @return {string} + */ +proto.tendermint.abci.RequestInfo.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestInfo} returns this + */ +proto.tendermint.abci.RequestInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 block_version = 2; + * @return {number} + */ +proto.tendermint.abci.RequestInfo.prototype.getBlockVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestInfo} returns this + */ +proto.tendermint.abci.RequestInfo.prototype.setBlockVersion = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 p2p_version = 3; + * @return {number} + */ +proto.tendermint.abci.RequestInfo.prototype.getP2pVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestInfo} returns this + */ +proto.tendermint.abci.RequestInfo.prototype.setP2pVersion = 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.tendermint.abci.RequestSetOption.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestSetOption.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestSetOption} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestSetOption.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + value: 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.tendermint.abci.RequestSetOption} + */ +proto.tendermint.abci.RequestSetOption.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestSetOption; + return proto.tendermint.abci.RequestSetOption.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestSetOption} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestSetOption} + */ +proto.tendermint.abci.RequestSetOption.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestSetOption.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestSetOption.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.RequestSetOption} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestSetOption.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 + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.tendermint.abci.RequestSetOption.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestSetOption} returns this + */ +proto.tendermint.abci.RequestSetOption.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string value = 2; + * @return {string} + */ +proto.tendermint.abci.RequestSetOption.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestSetOption} returns this + */ +proto.tendermint.abci.RequestSetOption.prototype.setValue = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.RequestInitChain.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.tendermint.abci.RequestInitChain.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestInitChain.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestInitChain} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestInitChain.toObject = function(includeInstance, msg) { + var f, obj = { + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + chainId: jspb.Message.getFieldWithDefault(msg, 2, ""), + consensusParams: (f = msg.getConsensusParams()) && proto.tendermint.abci.ConsensusParams.toObject(includeInstance, f), + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + proto.tendermint.abci.ValidatorUpdate.toObject, includeInstance), + appStateBytes: msg.getAppStateBytes_asB64(), + initialHeight: 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.tendermint.abci.RequestInitChain} + */ +proto.tendermint.abci.RequestInitChain.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestInitChain; + return proto.tendermint.abci.RequestInitChain.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestInitChain} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestInitChain} + */ +proto.tendermint.abci.RequestInitChain.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + case 3: + var value = new proto.tendermint.abci.ConsensusParams; + reader.readMessage(value,proto.tendermint.abci.ConsensusParams.deserializeBinaryFromReader); + msg.setConsensusParams(value); + break; + case 4: + var value = new proto.tendermint.abci.ValidatorUpdate; + reader.readMessage(value,proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader); + msg.addValidators(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAppStateBytes(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setInitialHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestInitChain.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestInitChain.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.RequestInitChain} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestInitChain.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getConsensusParams(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.abci.ConsensusParams.serializeBinaryToWriter + ); + } + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.tendermint.abci.ValidatorUpdate.serializeBinaryToWriter + ); + } + f = message.getAppStateBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getInitialHeight(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } +}; + + +/** + * optional google.protobuf.Timestamp time = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.abci.RequestInitChain.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this +*/ +proto.tendermint.abci.RequestInitChain.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestInitChain.prototype.hasTime = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string chain_id = 2; + * @return {string} + */ +proto.tendermint.abci.RequestInitChain.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional ConsensusParams consensus_params = 3; + * @return {?proto.tendermint.abci.ConsensusParams} + */ +proto.tendermint.abci.RequestInitChain.prototype.getConsensusParams = function() { + return /** @type{?proto.tendermint.abci.ConsensusParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ConsensusParams, 3)); +}; + + +/** + * @param {?proto.tendermint.abci.ConsensusParams|undefined} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this +*/ +proto.tendermint.abci.RequestInitChain.prototype.setConsensusParams = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.clearConsensusParams = function() { + return this.setConsensusParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestInitChain.prototype.hasConsensusParams = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated ValidatorUpdate validators = 4; + * @return {!Array} + */ +proto.tendermint.abci.RequestInitChain.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.ValidatorUpdate, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this +*/ +proto.tendermint.abci.RequestInitChain.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.tendermint.abci.ValidatorUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ValidatorUpdate} + */ +proto.tendermint.abci.RequestInitChain.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.tendermint.abci.ValidatorUpdate, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional bytes app_state_bytes = 5; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestInitChain.prototype.getAppStateBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes app_state_bytes = 5; + * This is a type-conversion wrapper around `getAppStateBytes()` + * @return {string} + */ +proto.tendermint.abci.RequestInitChain.prototype.getAppStateBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppStateBytes())); +}; + + +/** + * optional bytes app_state_bytes = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAppStateBytes()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestInitChain.prototype.getAppStateBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppStateBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.setAppStateBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional int64 initial_height = 6; + * @return {number} + */ +proto.tendermint.abci.RequestInitChain.prototype.getInitialHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.setInitialHeight = 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.tendermint.abci.RequestQuery.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestQuery.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestQuery} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestQuery.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64(), + path: jspb.Message.getFieldWithDefault(msg, 2, ""), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + prove: 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.tendermint.abci.RequestQuery} + */ +proto.tendermint.abci.RequestQuery.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestQuery; + return proto.tendermint.abci.RequestQuery.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestQuery} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestQuery} + */ +proto.tendermint.abci.RequestQuery.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 {string} */ (reader.readString()); + msg.setPath(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestQuery.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestQuery.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.RequestQuery} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestQuery.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestQuery.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.tendermint.abci.RequestQuery.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.tendermint.abci.RequestQuery.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestQuery} returns this + */ +proto.tendermint.abci.RequestQuery.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string path = 2; + * @return {string} + */ +proto.tendermint.abci.RequestQuery.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestQuery} returns this + */ +proto.tendermint.abci.RequestQuery.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 height = 3; + * @return {number} + */ +proto.tendermint.abci.RequestQuery.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestQuery} returns this + */ +proto.tendermint.abci.RequestQuery.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bool prove = 4; + * @return {boolean} + */ +proto.tendermint.abci.RequestQuery.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.tendermint.abci.RequestQuery} returns this + */ +proto.tendermint.abci.RequestQuery.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.RequestBeginBlock.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.tendermint.abci.RequestBeginBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestBeginBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestBeginBlock} 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) { + 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.LastCommitInfo.toObject(includeInstance, f), + byzantineValidatorsList: jspb.Message.toObjectList(msg.getByzantineValidatorsList(), + proto.tendermint.abci.Evidence.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.tendermint.abci.RequestBeginBlock} + */ +proto.tendermint.abci.RequestBeginBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestBeginBlock; + return proto.tendermint.abci.RequestBeginBlock.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestBeginBlock} + */ +proto.tendermint.abci.RequestBeginBlock.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.setHash(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.LastCommitInfo; + reader.readMessage(value,proto.tendermint.abci.LastCommitInfo.deserializeBinaryFromReader); + msg.setLastCommitInfo(value); + break; + case 4: + var value = new proto.tendermint.abci.Evidence; + reader.readMessage(value,proto.tendermint.abci.Evidence.deserializeBinaryFromReader); + msg.addByzantineValidators(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestBeginBlock.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.RequestBeginBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestBeginBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_types_pb.Header.serializeBinaryToWriter + ); + } + f = message.getLastCommitInfo(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.abci.LastCommitInfo.serializeBinaryToWriter + ); + } + f = message.getByzantineValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.tendermint.abci.Evidence.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestBeginBlock.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.RequestBeginBlock.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.RequestBeginBlock.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestBeginBlock} returns this + */ +proto.tendermint.abci.RequestBeginBlock.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional tendermint.types.Header header = 2; + * @return {?proto.tendermint.types.Header} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.getHeader = function() { + return /** @type{?proto.tendermint.types.Header} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Header, 2)); +}; + + +/** + * @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); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.hasHeader = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional LastCommitInfo last_commit_info = 3; + * @return {?proto.tendermint.abci.LastCommitInfo} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.getLastCommitInfo = function() { + return /** @type{?proto.tendermint.abci.LastCommitInfo} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.LastCommitInfo, 3)); +}; + + +/** + * @param {?proto.tendermint.abci.LastCommitInfo|undefined} value + * @return {!proto.tendermint.abci.RequestBeginBlock} returns this +*/ +proto.tendermint.abci.RequestBeginBlock.prototype.setLastCommitInfo = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.hasLastCommitInfo = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated Evidence byzantine_validators = 4; + * @return {!Array} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.getByzantineValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Evidence, 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); +}; + + +/** + * @param {!proto.tendermint.abci.Evidence=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Evidence} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.addByzantineValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.tendermint.abci.Evidence, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.RequestBeginBlock} returns this + */ +proto.tendermint.abci.RequestBeginBlock.prototype.clearByzantineValidatorsList = function() { + return this.setByzantineValidatorsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.RequestCheckTx.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestCheckTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestCheckTx} 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) { + var f, obj = { + tx: msg.getTx_asB64(), + type: 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.tendermint.abci.RequestCheckTx} + */ +proto.tendermint.abci.RequestCheckTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.RequestCheckTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestCheckTx} + */ +proto.tendermint.abci.RequestCheckTx.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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestCheckTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestCheckTx.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.RequestCheckTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestCheckTx.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); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.RequestDeliverTx.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestDeliverTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestDeliverTx} 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) { + var f, obj = { + tx: msg.getTx_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.RequestDeliverTx} + */ +proto.tendermint.abci.RequestDeliverTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestDeliverTx; + return proto.tendermint.abci.RequestDeliverTx.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestDeliverTx} + */ +proto.tendermint.abci.RequestDeliverTx.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestDeliverTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestDeliverTx.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.RequestDeliverTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestDeliverTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes tx = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestDeliverTx.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.RequestDeliverTx.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.RequestDeliverTx.prototype.getTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTx())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestDeliverTx} returns this + */ +proto.tendermint.abci.RequestDeliverTx.prototype.setTx = 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.tendermint.abci.RequestEndBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestEndBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestEndBlock} 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) { + var f, obj = { + height: 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.abci.RequestEndBlock} + */ +proto.tendermint.abci.RequestEndBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestEndBlock; + return proto.tendermint.abci.RequestEndBlock.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestEndBlock} + */ +proto.tendermint.abci.RequestEndBlock.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestEndBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestEndBlock.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.RequestEndBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestEndBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.abci.RequestEndBlock.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestEndBlock} returns this + */ +proto.tendermint.abci.RequestEndBlock.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} + */ +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); +}; + + +/** + * 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.RequestCommit.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.tendermint.abci.RequestCommit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestCommit.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.RequestCommit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestCommit.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.RequestListSnapshots.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestListSnapshots.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestListSnapshots} 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) { + 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.RequestListSnapshots} + */ +proto.tendermint.abci.RequestListSnapshots.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.RequestListSnapshots} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestListSnapshots} + */ +proto.tendermint.abci.RequestListSnapshots.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.tendermint.abci.RequestListSnapshots.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestListSnapshots.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.RequestListSnapshots} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestListSnapshots.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( + 1, + f, + proto.tendermint.abci.Snapshot.serializeBinaryToWriter + ); + } + f = message.getAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + 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 + */ +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.RequestOfferSnapshot.prototype.getAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestOfferSnapshot} returns this + */ +proto.tendermint.abci.RequestOfferSnapshot.prototype.setAppHash = 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.tendermint.abci.RequestLoadSnapshotChunk.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestLoadSnapshotChunk.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestLoadSnapshotChunk} 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) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + format: jspb.Message.getFieldWithDefault(msg, 2, 0), + chunk: 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.tendermint.abci.RequestLoadSnapshotChunk} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.RequestLoadSnapshotChunk} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.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.setChunk(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() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestLoadSnapshotChunk.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.RequestLoadSnapshotChunk} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.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.getChunk(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } +}; + + +/** + * optional uint64 height = 1; + * @return {number} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} returns this + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 format = 2; + * @return {number} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.getFormat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} returns this + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.setFormat = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 chunk = 3; + * @return {number} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.getChunk = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} returns this + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.setChunk = 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.tendermint.abci.RequestApplySnapshotChunk.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestApplySnapshotChunk.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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 + */ +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) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} + */ +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); +}; + + +/** + * 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} + */ +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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestApplySnapshotChunk.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.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 + ); + } +}; + + +/** + * optional uint32 index = 1; + * @return {number} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} returns this + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes chunk = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getChunk = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes chunk = 2; + * This is a type-conversion wrapper around `getChunk()` + * @return {string} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getChunk_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChunk())); +}; + + +/** + * 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 `getChunk()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getChunk_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChunk())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} returns this + */ +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); +}; + + + +/** + * 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,5,6,7,8,9,10,11,12,13,14,15,16]]; + +/** + * @enum {number} + */ +proto.tendermint.abci.Response.ValueCase = { + VALUE_NOT_SET: 0, + EXCEPTION: 1, + ECHO: 2, + FLUSH: 3, + INFO: 4, + SET_OPTION: 5, + 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 +}; + +/** + * @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), + setOption: (f = msg.getSetOption()) && proto.tendermint.abci.ResponseSetOption.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) + }; + + 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 5: + var value = new proto.tendermint.abci.ResponseSetOption; + reader.readMessage(value,proto.tendermint.abci.ResponseSetOption.deserializeBinaryFromReader); + msg.setSetOption(value); + break; + case 6: + var value = new proto.tendermint.abci.ResponseInitChain; + reader.readMessage(value,proto.tendermint.abci.ResponseInitChain.deserializeBinaryFromReader); + msg.setInitChain(value); + break; + case 7: + var value = new proto.tendermint.abci.ResponseQuery; + 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); + msg.setCommit(value); + break; + case 13: + var value = new proto.tendermint.abci.ResponseListSnapshots; + reader.readMessage(value,proto.tendermint.abci.ResponseListSnapshots.deserializeBinaryFromReader); + msg.setListSnapshots(value); + break; + case 14: + var value = new proto.tendermint.abci.ResponseOfferSnapshot; + reader.readMessage(value,proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinaryFromReader); + msg.setOfferSnapshot(value); + break; + case 15: + var value = new proto.tendermint.abci.ResponseLoadSnapshotChunk; + reader.readMessage(value,proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinaryFromReader); + msg.setLoadSnapshotChunk(value); + break; + case 16: + var value = new proto.tendermint.abci.ResponseApplySnapshotChunk; + reader.readMessage(value,proto.tendermint.abci.ResponseApplySnapshotChunk.deserializeBinaryFromReader); + msg.setApplySnapshotChunk(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Response.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.Response.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.Response} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Response.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getException(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.ResponseException.serializeBinaryToWriter + ); + } + f = message.getEcho(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.abci.ResponseEcho.serializeBinaryToWriter + ); + } + f = message.getFlush(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.abci.ResponseFlush.serializeBinaryToWriter + ); + } + f = message.getInfo(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.abci.ResponseInfo.serializeBinaryToWriter + ); + } + f = message.getSetOption(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.tendermint.abci.ResponseSetOption.serializeBinaryToWriter + ); + } + f = message.getInitChain(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.tendermint.abci.ResponseInitChain.serializeBinaryToWriter + ); + } + f = message.getQuery(); + if (f != null) { + writer.writeMessage( + 7, + f, + 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( + 9, + f, + 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( + 12, + f, + proto.tendermint.abci.ResponseCommit.serializeBinaryToWriter + ); + } + f = message.getListSnapshots(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.tendermint.abci.ResponseListSnapshots.serializeBinaryToWriter + ); + } + f = message.getOfferSnapshot(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.tendermint.abci.ResponseOfferSnapshot.serializeBinaryToWriter + ); + } + f = message.getLoadSnapshotChunk(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.tendermint.abci.ResponseLoadSnapshotChunk.serializeBinaryToWriter + ); + } + f = message.getApplySnapshotChunk(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.tendermint.abci.ResponseApplySnapshotChunk.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ResponseException exception = 1; + * @return {?proto.tendermint.abci.ResponseException} + */ +proto.tendermint.abci.Response.prototype.getException = function() { + return /** @type{?proto.tendermint.abci.ResponseException} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseException, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseException|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setException = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, 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.clearException = function() { + return this.setException(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasException = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ResponseEcho echo = 2; + * @return {?proto.tendermint.abci.ResponseEcho} + */ +proto.tendermint.abci.Response.prototype.getEcho = function() { + return /** @type{?proto.tendermint.abci.ResponseEcho} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseEcho, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseEcho|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setEcho = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, 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.clearEcho = function() { + return this.setEcho(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasEcho = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ResponseFlush flush = 3; + * @return {?proto.tendermint.abci.ResponseFlush} + */ +proto.tendermint.abci.Response.prototype.getFlush = function() { + return /** @type{?proto.tendermint.abci.ResponseFlush} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseFlush, 3)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseFlush|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setFlush = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, 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.clearFlush = function() { + return this.setFlush(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasFlush = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ResponseInfo info = 4; + * @return {?proto.tendermint.abci.ResponseInfo} + */ +proto.tendermint.abci.Response.prototype.getInfo = function() { + return /** @type{?proto.tendermint.abci.ResponseInfo} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseInfo, 4)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseInfo|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setInfo = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, 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.clearInfo = function() { + return this.setInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasInfo = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional ResponseSetOption set_option = 5; + * @return {?proto.tendermint.abci.ResponseSetOption} + */ +proto.tendermint.abci.Response.prototype.getSetOption = function() { + return /** @type{?proto.tendermint.abci.ResponseSetOption} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseSetOption, 5)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseSetOption|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setSetOption = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, 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.clearSetOption = function() { + return this.setSetOption(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasSetOption = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional ResponseInitChain init_chain = 6; + * @return {?proto.tendermint.abci.ResponseInitChain} + */ +proto.tendermint.abci.Response.prototype.getInitChain = function() { + return /** @type{?proto.tendermint.abci.ResponseInitChain} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseInitChain, 6)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseInitChain|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setInitChain = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, 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.clearInitChain = function() { + return this.setInitChain(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasInitChain = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional ResponseQuery query = 7; + * @return {?proto.tendermint.abci.ResponseQuery} + */ +proto.tendermint.abci.Response.prototype.getQuery = function() { + return /** @type{?proto.tendermint.abci.ResponseQuery} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseQuery, 7)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseQuery|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setQuery = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, 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.clearQuery = function() { + return this.setQuery(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasQuery = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * 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} + */ +proto.tendermint.abci.Response.prototype.getCheckTx = function() { + return /** @type{?proto.tendermint.abci.ResponseCheckTx} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseCheckTx, 9)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseCheckTx|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setCheckTx = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, 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.clearCheckTx = function() { + return this.setCheckTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasCheckTx = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * 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} + */ +proto.tendermint.abci.Response.prototype.getCommit = function() { + return /** @type{?proto.tendermint.abci.ResponseCommit} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseCommit, 12)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseCommit|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setCommit = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, 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.clearCommit = function() { + return this.setCommit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasCommit = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional ResponseListSnapshots list_snapshots = 13; + * @return {?proto.tendermint.abci.ResponseListSnapshots} + */ +proto.tendermint.abci.Response.prototype.getListSnapshots = function() { + return /** @type{?proto.tendermint.abci.ResponseListSnapshots} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseListSnapshots, 13)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseListSnapshots|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setListSnapshots = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, 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.clearListSnapshots = function() { + return this.setListSnapshots(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasListSnapshots = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional ResponseOfferSnapshot offer_snapshot = 14; + * @return {?proto.tendermint.abci.ResponseOfferSnapshot} + */ +proto.tendermint.abci.Response.prototype.getOfferSnapshot = function() { + return /** @type{?proto.tendermint.abci.ResponseOfferSnapshot} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseOfferSnapshot, 14)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseOfferSnapshot|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setOfferSnapshot = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, 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.clearOfferSnapshot = function() { + return this.setOfferSnapshot(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasOfferSnapshot = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional ResponseLoadSnapshotChunk load_snapshot_chunk = 15; + * @return {?proto.tendermint.abci.ResponseLoadSnapshotChunk} + */ +proto.tendermint.abci.Response.prototype.getLoadSnapshotChunk = function() { + return /** @type{?proto.tendermint.abci.ResponseLoadSnapshotChunk} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseLoadSnapshotChunk, 15)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseLoadSnapshotChunk|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setLoadSnapshotChunk = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, 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.clearLoadSnapshotChunk = function() { + return this.setLoadSnapshotChunk(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasLoadSnapshotChunk = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional ResponseApplySnapshotChunk apply_snapshot_chunk = 16; + * @return {?proto.tendermint.abci.ResponseApplySnapshotChunk} + */ +proto.tendermint.abci.Response.prototype.getApplySnapshotChunk = function() { + return /** @type{?proto.tendermint.abci.ResponseApplySnapshotChunk} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseApplySnapshotChunk, 16)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseApplySnapshotChunk|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setApplySnapshotChunk = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, 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.clearApplySnapshotChunk = function() { + return this.setApplySnapshotChunk(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasApplySnapshotChunk = function() { + return jspb.Message.getField(this, 16) != 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.tendermint.abci.ResponseException.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseException.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseException} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseException.toObject = function(includeInstance, msg) { + var f, obj = { + error: 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.tendermint.abci.ResponseException} + */ +proto.tendermint.abci.ResponseException.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseException; + return proto.tendermint.abci.ResponseException.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseException} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseException} + */ +proto.tendermint.abci.ResponseException.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.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseException.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseException.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.ResponseException} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseException.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getError(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string error = 1; + * @return {string} + */ +proto.tendermint.abci.ResponseException.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseException} returns this + */ +proto.tendermint.abci.ResponseException.prototype.setError = 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.tendermint.abci.ResponseEcho.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseEcho.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseEcho} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseEcho.toObject = function(includeInstance, msg) { + var f, obj = { + message: 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.tendermint.abci.ResponseEcho} + */ +proto.tendermint.abci.ResponseEcho.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseEcho; + return proto.tendermint.abci.ResponseEcho.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseEcho} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseEcho} + */ +proto.tendermint.abci.ResponseEcho.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.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseEcho.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseEcho.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.ResponseEcho} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseEcho.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string message = 1; + * @return {string} + */ +proto.tendermint.abci.ResponseEcho.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseEcho} returns this + */ +proto.tendermint.abci.ResponseEcho.prototype.setMessage = 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.tendermint.abci.ResponseFlush.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseFlush.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseFlush} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseFlush.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.ResponseFlush} + */ +proto.tendermint.abci.ResponseFlush.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseFlush; + return proto.tendermint.abci.ResponseFlush.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseFlush} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseFlush} + */ +proto.tendermint.abci.ResponseFlush.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.tendermint.abci.ResponseFlush.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseFlush.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.ResponseFlush} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseFlush.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.ResponseInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseInfo.toObject = function(includeInstance, msg) { + var f, obj = { + data: jspb.Message.getFieldWithDefault(msg, 1, ""), + version: jspb.Message.getFieldWithDefault(msg, 2, ""), + appVersion: jspb.Message.getFieldWithDefault(msg, 3, 0), + lastBlockHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + lastBlockAppHash: msg.getLastBlockAppHash_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.ResponseInfo} + */ +proto.tendermint.abci.ResponseInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseInfo; + return proto.tendermint.abci.ResponseInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseInfo} + */ +proto.tendermint.abci.ResponseInfo.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.setData(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAppVersion(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLastBlockHeight(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastBlockAppHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseInfo.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.ResponseInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAppVersion(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getLastBlockHeight(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getLastBlockAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional string data = 1; + * @return {string} + */ +proto.tendermint.abci.ResponseInfo.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseInfo} returns this + */ +proto.tendermint.abci.ResponseInfo.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string version = 2; + * @return {string} + */ +proto.tendermint.abci.ResponseInfo.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseInfo} returns this + */ +proto.tendermint.abci.ResponseInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 app_version = 3; + * @return {number} + */ +proto.tendermint.abci.ResponseInfo.prototype.getAppVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseInfo} returns this + */ +proto.tendermint.abci.ResponseInfo.prototype.setAppVersion = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 last_block_height = 4; + * @return {number} + */ +proto.tendermint.abci.ResponseInfo.prototype.getLastBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseInfo} returns this + */ +proto.tendermint.abci.ResponseInfo.prototype.setLastBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bytes last_block_app_hash = 5; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseInfo.prototype.getLastBlockAppHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes last_block_app_hash = 5; + * This is a type-conversion wrapper around `getLastBlockAppHash()` + * @return {string} + */ +proto.tendermint.abci.ResponseInfo.prototype.getLastBlockAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastBlockAppHash())); +}; + + +/** + * optional bytes last_block_app_hash = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastBlockAppHash()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseInfo.prototype.getLastBlockAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastBlockAppHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseInfo} returns this + */ +proto.tendermint.abci.ResponseInfo.prototype.setLastBlockAppHash = 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.tendermint.abci.ResponseSetOption.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseSetOption.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseSetOption} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseSetOption.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + log: jspb.Message.getFieldWithDefault(msg, 3, ""), + info: 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.tendermint.abci.ResponseSetOption} + */ +proto.tendermint.abci.ResponseSetOption.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseSetOption; + return proto.tendermint.abci.ResponseSetOption.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseSetOption} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseSetOption} + */ +proto.tendermint.abci.ResponseSetOption.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 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLog(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseSetOption.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseSetOption.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.ResponseSetOption} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseSetOption.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getLog(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional uint32 code = 1; + * @return {number} + */ +proto.tendermint.abci.ResponseSetOption.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseSetOption} returns this + */ +proto.tendermint.abci.ResponseSetOption.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string log = 3; + * @return {string} + */ +proto.tendermint.abci.ResponseSetOption.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseSetOption} returns this + */ +proto.tendermint.abci.ResponseSetOption.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.tendermint.abci.ResponseSetOption.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseSetOption} returns this + */ +proto.tendermint.abci.ResponseSetOption.prototype.setInfo = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseInitChain.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.tendermint.abci.ResponseInitChain.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseInitChain.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseInitChain} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseInitChain.toObject = function(includeInstance, msg) { + var f, obj = { + consensusParams: (f = msg.getConsensusParams()) && proto.tendermint.abci.ConsensusParams.toObject(includeInstance, f), + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + proto.tendermint.abci.ValidatorUpdate.toObject, includeInstance), + 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.ResponseInitChain} + */ +proto.tendermint.abci.ResponseInitChain.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseInitChain; + return proto.tendermint.abci.ResponseInitChain.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseInitChain} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseInitChain} + */ +proto.tendermint.abci.ResponseInitChain.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.ConsensusParams; + reader.readMessage(value,proto.tendermint.abci.ConsensusParams.deserializeBinaryFromReader); + msg.setConsensusParams(value); + break; + case 2: + var value = new proto.tendermint.abci.ValidatorUpdate; + reader.readMessage(value,proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader); + msg.addValidators(value); + break; + case 3: + 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.ResponseInitChain.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseInitChain.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.ResponseInitChain} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseInitChain.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConsensusParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.ConsensusParams.serializeBinaryToWriter + ); + } + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.tendermint.abci.ValidatorUpdate.serializeBinaryToWriter + ); + } + f = message.getAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional ConsensusParams consensus_params = 1; + * @return {?proto.tendermint.abci.ConsensusParams} + */ +proto.tendermint.abci.ResponseInitChain.prototype.getConsensusParams = function() { + return /** @type{?proto.tendermint.abci.ConsensusParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ConsensusParams, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.ConsensusParams|undefined} value + * @return {!proto.tendermint.abci.ResponseInitChain} returns this +*/ +proto.tendermint.abci.ResponseInitChain.prototype.setConsensusParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ResponseInitChain} returns this + */ +proto.tendermint.abci.ResponseInitChain.prototype.clearConsensusParams = function() { + return this.setConsensusParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ResponseInitChain.prototype.hasConsensusParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated ValidatorUpdate validators = 2; + * @return {!Array} + */ +proto.tendermint.abci.ResponseInitChain.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.ValidatorUpdate, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseInitChain} returns this +*/ +proto.tendermint.abci.ResponseInitChain.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.tendermint.abci.ValidatorUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ValidatorUpdate} + */ +proto.tendermint.abci.ResponseInitChain.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tendermint.abci.ValidatorUpdate, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseInitChain} returns this + */ +proto.tendermint.abci.ResponseInitChain.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional bytes app_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseInitChain.prototype.getAppHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes app_hash = 3; + * This is a type-conversion wrapper around `getAppHash()` + * @return {string} + */ +proto.tendermint.abci.ResponseInitChain.prototype.getAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppHash())); +}; + + +/** + * optional bytes app_hash = 3; + * 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.ResponseInitChain.prototype.getAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseInitChain} returns this + */ +proto.tendermint.abci.ResponseInitChain.prototype.setAppHash = 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.tendermint.abci.ResponseQuery.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseQuery.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseQuery} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseQuery.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + log: jspb.Message.getFieldWithDefault(msg, 3, ""), + info: jspb.Message.getFieldWithDefault(msg, 4, ""), + index: jspb.Message.getFieldWithDefault(msg, 5, 0), + key: msg.getKey_asB64(), + value: msg.getValue_asB64(), + proofOps: (f = msg.getProofOps()) && tendermint_crypto_proof_pb.ProofOps.toObject(includeInstance, f), + height: jspb.Message.getFieldWithDefault(msg, 9, 0), + codespace: 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.tendermint.abci.ResponseQuery} + */ +proto.tendermint.abci.ResponseQuery.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseQuery; + return proto.tendermint.abci.ResponseQuery.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseQuery} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseQuery} + */ +proto.tendermint.abci.ResponseQuery.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 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.setIndex(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + case 8: + var value = new tendermint_crypto_proof_pb.ProofOps; + reader.readMessage(value,tendermint_crypto_proof_pb.ProofOps.deserializeBinaryFromReader); + msg.setProofOps(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setCodespace(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseQuery.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseQuery.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.ResponseQuery} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseQuery.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + 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.getIndex(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getProofOps(); + if (f != null) { + writer.writeMessage( + 8, + f, + tendermint_crypto_proof_pb.ProofOps.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getCodespace(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } +}; + + +/** + * optional uint32 code = 1; + * @return {number} + */ +proto.tendermint.abci.ResponseQuery.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string log = 3; + * @return {string} + */ +proto.tendermint.abci.ResponseQuery.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.tendermint.abci.ResponseQuery.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setInfo = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 index = 5; + * @return {number} + */ +proto.tendermint.abci.ResponseQuery.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional bytes key = 6; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseQuery.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes key = 6; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.tendermint.abci.ResponseQuery.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 6; + * 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.tendermint.abci.ResponseQuery.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional bytes value = 7; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseQuery.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes value = 7; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.tendermint.abci.ResponseQuery.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 7; + * 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.tendermint.abci.ResponseQuery.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional tendermint.crypto.ProofOps proof_ops = 8; + * @return {?proto.tendermint.crypto.ProofOps} + */ +proto.tendermint.abci.ResponseQuery.prototype.getProofOps = function() { + return /** @type{?proto.tendermint.crypto.ProofOps} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_proof_pb.ProofOps, 8)); +}; + + +/** + * @param {?proto.tendermint.crypto.ProofOps|undefined} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this +*/ +proto.tendermint.abci.ResponseQuery.prototype.setProofOps = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.clearProofOps = function() { + return this.setProofOps(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ResponseQuery.prototype.hasProofOps = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional int64 height = 9; + * @return {number} + */ +proto.tendermint.abci.ResponseQuery.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional string codespace = 10; + * @return {string} + */ +proto.tendermint.abci.ResponseQuery.prototype.getCodespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setCodespace = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseBeginBlock.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.tendermint.abci.ResponseBeginBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseBeginBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseBeginBlock} 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) { + var f, obj = { + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.tendermint.abci.Event.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.tendermint.abci.ResponseBeginBlock} + */ +proto.tendermint.abci.ResponseBeginBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseBeginBlock; + return proto.tendermint.abci.ResponseBeginBlock.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseBeginBlock} + */ +proto.tendermint.abci.ResponseBeginBlock.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.Event; + reader.readMessage(value,proto.tendermint.abci.Event.deserializeBinaryFromReader); + msg.addEvents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseBeginBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseBeginBlock.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 + */ +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 + ); + } +}; + + +/** + * repeated Event events = 1; + * @return {!Array} + */ +proto.tendermint.abci.ResponseBeginBlock.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Event, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseBeginBlock} returns this +*/ +proto.tendermint.abci.ResponseBeginBlock.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.abci.Event=} opt_value + * @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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseBeginBlock} returns this + */ +proto.tendermint.abci.ResponseBeginBlock.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseCheckTx.repeatedFields_ = [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.tendermint.abci.ResponseCheckTx.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseCheckTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseCheckTx} 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) { + 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, "") + }; + + 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.ResponseCheckTx} + */ +proto.tendermint.abci.ResponseCheckTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.ResponseCheckTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseCheckTx} + */ +proto.tendermint.abci.ResponseCheckTx.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + 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.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.ResponseCheckTx.prototype.setGasUsed = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * repeated Event events = 7; + * @return {!Array} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Event, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this +*/ +proto.tendermint.abci.ResponseCheckTx.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.tendermint.abci.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Event} + */ +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.ResponseCheckTx} returns this + */ +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, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + */ +proto.tendermint.abci.ResponseCheckTx.prototype.setCodespace = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseDeliverTx.repeatedFields_ = [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.tendermint.abci.ResponseDeliverTx.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseDeliverTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseDeliverTx} 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) { + 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, "") + }; + + 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.ResponseDeliverTx} + */ +proto.tendermint.abci.ResponseDeliverTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseDeliverTx; + return proto.tendermint.abci.ResponseDeliverTx.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseDeliverTx} + */ +proto.tendermint.abci.ResponseDeliverTx.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseDeliverTx.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.ResponseDeliverTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseDeliverTx.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.ResponseDeliverTx.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseDeliverTx.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.ResponseDeliverTx.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.ResponseDeliverTx.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string log = 3; + * @return {string} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setInfo = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 gas_wanted = 5; + * @return {number} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getGasWanted = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setGasWanted = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 gas_used = 6; + * @return {number} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getGasUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setGasUsed = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * repeated Event events = 7; + * @return {!Array} + */ +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); +}; + + +/** + * @param {!proto.tendermint.abci.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Event} + */ +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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + +/** + * optional string codespace = 8; + * @return {string} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getCodespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setCodespace = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseEndBlock.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.ResponseEndBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseEndBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseEndBlock} 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) { + var f, obj = { + validatorUpdatesList: jspb.Message.toObjectList(msg.getValidatorUpdatesList(), + proto.tendermint.abci.ValidatorUpdate.toObject, includeInstance), + consensusParamUpdates: (f = msg.getConsensusParamUpdates()) && proto.tendermint.abci.ConsensusParams.toObject(includeInstance, f), + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.tendermint.abci.Event.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.tendermint.abci.ResponseEndBlock} + */ +proto.tendermint.abci.ResponseEndBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseEndBlock; + return proto.tendermint.abci.ResponseEndBlock.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseEndBlock} + */ +proto.tendermint.abci.ResponseEndBlock.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.ValidatorUpdate; + reader.readMessage(value,proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader); + msg.addValidatorUpdates(value); + break; + case 2: + var value = new proto.tendermint.abci.ConsensusParams; + reader.readMessage(value,proto.tendermint.abci.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); + 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, + proto.tendermint.abci.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); +}; + + +/** + * @param {!proto.tendermint.abci.ValidatorUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ValidatorUpdate} + */ +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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseEndBlock} returns this + */ +proto.tendermint.abci.ResponseEndBlock.prototype.clearValidatorUpdatesList = function() { + return this.setValidatorUpdatesList([]); +}; + + +/** + * optional ConsensusParams consensus_param_updates = 2; + * @return {?proto.tendermint.abci.ConsensusParams} + */ +proto.tendermint.abci.ResponseEndBlock.prototype.getConsensusParamUpdates = function() { + return /** @type{?proto.tendermint.abci.ConsensusParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ConsensusParams, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ResponseEndBlock} returns this + */ +proto.tendermint.abci.ResponseEndBlock.prototype.clearConsensusParamUpdates = function() { + return this.setConsensusParamUpdates(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ResponseEndBlock.prototype.hasConsensusParamUpdates = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated Event events = 3; + * @return {!Array} + */ +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); +}; + + +/** + * @param {!proto.tendermint.abci.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Event} + */ +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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseEndBlock} returns this + */ +proto.tendermint.abci.ResponseEndBlock.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.ResponseCommit.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseCommit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseCommit} 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) { + var f, obj = { + data: msg.getData_asB64(), + retainHeight: 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.tendermint.abci.ResponseCommit} + */ +proto.tendermint.abci.ResponseCommit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.ResponseCommit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseCommit} + */ +proto.tendermint.abci.ResponseCommit.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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseCommit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseCommit.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.ResponseCommit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseCommit.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 + ); + } +}; + + +/** + * 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 + */ +proto.tendermint.abci.ResponseCommit.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional int64 retain_height = 3; + * @return {number} + */ +proto.tendermint.abci.ResponseCommit.prototype.getRetainHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseCommit} returns this + */ +proto.tendermint.abci.ResponseCommit.prototype.setRetainHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseListSnapshots.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.tendermint.abci.ResponseListSnapshots.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseListSnapshots.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.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; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseListSnapshots} + */ +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); +}; + + +/** + * 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.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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseListSnapshots.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseListSnapshots.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.ResponseListSnapshots} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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 Snapshot snapshots = 1; + * @return {!Array} + */ +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.ResponseListSnapshots} returns this +*/ +proto.tendermint.abci.ResponseListSnapshots.prototype.setSnapshotsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.abci.Snapshot=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Snapshot} + */ +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.ResponseListSnapshots} returns this + */ +proto.tendermint.abci.ResponseListSnapshots.prototype.clearSnapshotsList = function() { + return this.setSnapshotsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.ResponseOfferSnapshot.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseOfferSnapshot.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseOfferSnapshot.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.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.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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseOfferSnapshot.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseOfferSnapshot.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.ResponseOfferSnapshot} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseOfferSnapshot.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.tendermint.abci.ResponseOfferSnapshot.Result = { + UNKNOWN: 0, + ACCEPT: 1, + ABORT: 2, + REJECT: 3, + REJECT_FORMAT: 4, + REJECT_SENDER: 5 +}; + +/** + * optional Result result = 1; + * @return {!proto.tendermint.abci.ResponseOfferSnapshot.Result} + */ +proto.tendermint.abci.ResponseOfferSnapshot.prototype.getResult = function() { + return /** @type {!proto.tendermint.abci.ResponseOfferSnapshot.Result} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.tendermint.abci.ResponseOfferSnapshot.Result} value + * @return {!proto.tendermint.abci.ResponseOfferSnapshot} returns this + */ +proto.tendermint.abci.ResponseOfferSnapshot.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.tendermint.abci.ResponseLoadSnapshotChunk.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseLoadSnapshotChunk.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseLoadSnapshotChunk} 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) { + var f, obj = { + chunk: msg.getChunk_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.ResponseLoadSnapshotChunk} + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.ResponseLoadSnapshotChunk} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseLoadSnapshotChunk} + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.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.setChunk(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseLoadSnapshotChunk.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.ResponseLoadSnapshotChunk} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChunk_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * 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} + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.getChunk_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChunk())); +}; + + +/** + * 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 {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseLoadSnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.setChunk = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + +/** + * 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} + */ +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); +}; + + +/** + * 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 value = /** @type {!Array} */ (reader.readPackedUint32()); + msg.setRefetchChunksList(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addRejectSenders(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseApplySnapshotChunk.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.ResponseApplySnapshotChunk} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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 + ); + } +}; + + +/** + * @enum {number} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.Result = { + UNKNOWN: 0, + ACCEPT: 1, + ABORT: 2, + RETRY: 3, + RETRY_SNAPSHOT: 4, + REJECT_SNAPSHOT: 5 +}; + +/** + * optional Result result = 1; + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.getResult = function() { + return /** @type {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} value + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.setResult = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * repeated uint32 refetch_chunks = 2; + * @return {!Array} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.getRefetchChunksList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @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 {number} value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.addRefetchChunks = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.clearRefetchChunksList = function() { + return this.setRefetchChunksList([]); +}; + + +/** + * repeated string reject_senders = 3; + * @return {!Array} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.getRejectSendersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.setRejectSendersList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.addRejectSenders = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.clearRejectSendersList = function() { + return this.setRejectSendersList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.ConsensusParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ConsensusParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ConsensusParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ConsensusParams.toObject = function(includeInstance, msg) { + var f, obj = { + block: (f = msg.getBlock()) && proto.tendermint.abci.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), + version: (f = msg.getVersion()) && tendermint_types_params_pb.VersionParams.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.ConsensusParams} + */ +proto.tendermint.abci.ConsensusParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ConsensusParams; + return proto.tendermint.abci.ConsensusParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ConsensusParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ConsensusParams} + */ +proto.tendermint.abci.ConsensusParams.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.BlockParams; + reader.readMessage(value,proto.tendermint.abci.BlockParams.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 2: + var value = new tendermint_types_params_pb.EvidenceParams; + reader.readMessage(value,tendermint_types_params_pb.EvidenceParams.deserializeBinaryFromReader); + msg.setEvidence(value); + break; + case 3: + var value = new tendermint_types_params_pb.ValidatorParams; + reader.readMessage(value,tendermint_types_params_pb.ValidatorParams.deserializeBinaryFromReader); + msg.setValidator(value); + break; + case 4: + var value = new tendermint_types_params_pb.VersionParams; + reader.readMessage(value,tendermint_types_params_pb.VersionParams.deserializeBinaryFromReader); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ConsensusParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ConsensusParams.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.ConsensusParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ConsensusParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.BlockParams.serializeBinaryToWriter + ); + } + f = message.getEvidence(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_params_pb.EvidenceParams.serializeBinaryToWriter + ); + } + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 3, + f, + tendermint_types_params_pb.ValidatorParams.serializeBinaryToWriter + ); + } + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 4, + f, + tendermint_types_params_pb.VersionParams.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BlockParams block = 1; + * @return {?proto.tendermint.abci.BlockParams} + */ +proto.tendermint.abci.ConsensusParams.prototype.getBlock = function() { + return /** @type{?proto.tendermint.abci.BlockParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.BlockParams, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.BlockParams|undefined} value + * @return {!proto.tendermint.abci.ConsensusParams} returns this +*/ +proto.tendermint.abci.ConsensusParams.prototype.setBlock = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ConsensusParams} returns this + */ +proto.tendermint.abci.ConsensusParams.prototype.clearBlock = function() { + return this.setBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ConsensusParams.prototype.hasBlock = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional tendermint.types.EvidenceParams evidence = 2; + * @return {?proto.tendermint.types.EvidenceParams} + */ +proto.tendermint.abci.ConsensusParams.prototype.getEvidence = function() { + return /** @type{?proto.tendermint.types.EvidenceParams} */ ( + jspb.Message.getWrapperField(this, tendermint_types_params_pb.EvidenceParams, 2)); +}; + + +/** + * @param {?proto.tendermint.types.EvidenceParams|undefined} value + * @return {!proto.tendermint.abci.ConsensusParams} returns this +*/ +proto.tendermint.abci.ConsensusParams.prototype.setEvidence = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ConsensusParams} returns this + */ +proto.tendermint.abci.ConsensusParams.prototype.clearEvidence = function() { + return this.setEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ConsensusParams.prototype.hasEvidence = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional tendermint.types.ValidatorParams validator = 3; + * @return {?proto.tendermint.types.ValidatorParams} + */ +proto.tendermint.abci.ConsensusParams.prototype.getValidator = function() { + return /** @type{?proto.tendermint.types.ValidatorParams} */ ( + jspb.Message.getWrapperField(this, tendermint_types_params_pb.ValidatorParams, 3)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorParams|undefined} value + * @return {!proto.tendermint.abci.ConsensusParams} returns this +*/ +proto.tendermint.abci.ConsensusParams.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ConsensusParams} returns this + */ +proto.tendermint.abci.ConsensusParams.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ConsensusParams.prototype.hasValidator = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional tendermint.types.VersionParams version = 4; + * @return {?proto.tendermint.types.VersionParams} + */ +proto.tendermint.abci.ConsensusParams.prototype.getVersion = function() { + return /** @type{?proto.tendermint.types.VersionParams} */ ( + jspb.Message.getWrapperField(this, tendermint_types_params_pb.VersionParams, 4)); +}; + + +/** + * @param {?proto.tendermint.types.VersionParams|undefined} value + * @return {!proto.tendermint.abci.ConsensusParams} returns this +*/ +proto.tendermint.abci.ConsensusParams.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ConsensusParams} returns this + */ +proto.tendermint.abci.ConsensusParams.prototype.clearVersion = function() { + return this.setVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ConsensusParams.prototype.hasVersion = 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.tendermint.abci.BlockParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.BlockParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.BlockParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.BlockParams.toObject = function(includeInstance, msg) { + var f, obj = { + maxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxGas: 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.tendermint.abci.BlockParams} + */ +proto.tendermint.abci.BlockParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.BlockParams; + return proto.tendermint.abci.BlockParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.BlockParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.BlockParams} + */ +proto.tendermint.abci.BlockParams.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.setMaxBytes(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxGas(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.BlockParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.BlockParams.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.BlockParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.BlockParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxBytes(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMaxGas(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 max_bytes = 1; + * @return {number} + */ +proto.tendermint.abci.BlockParams.prototype.getMaxBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.BlockParams} returns this + */ +proto.tendermint.abci.BlockParams.prototype.setMaxBytes = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 max_gas = 2; + * @return {number} + */ +proto.tendermint.abci.BlockParams.prototype.getMaxGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.BlockParams} returns this + */ +proto.tendermint.abci.BlockParams.prototype.setMaxGas = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.LastCommitInfo.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.tendermint.abci.LastCommitInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.LastCommitInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.LastCommitInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.LastCommitInfo.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) + }; + + 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.LastCommitInfo} + */ +proto.tendermint.abci.LastCommitInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.LastCommitInfo; + return proto.tendermint.abci.LastCommitInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.LastCommitInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.LastCommitInfo} + */ +proto.tendermint.abci.LastCommitInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + 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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.LastCommitInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.LastCommitInfo.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.LastCommitInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.LastCommitInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + 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 + ); + } +}; + + +/** + * optional int32 round = 1; + * @return {number} + */ +proto.tendermint.abci.LastCommitInfo.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.LastCommitInfo} returns this + */ +proto.tendermint.abci.LastCommitInfo.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated VoteInfo votes = 2; + * @return {!Array} + */ +proto.tendermint.abci.LastCommitInfo.prototype.getVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.VoteInfo, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.LastCommitInfo} returns this +*/ +proto.tendermint.abci.LastCommitInfo.prototype.setVotesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.tendermint.abci.VoteInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.VoteInfo} + */ +proto.tendermint.abci.LastCommitInfo.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.LastCommitInfo} returns this + */ +proto.tendermint.abci.LastCommitInfo.prototype.clearVotesList = function() { + return this.setVotesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.Event.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.tendermint.abci.Event.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.Event.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Event} 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) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + attributesList: jspb.Message.toObjectList(msg.getAttributesList(), + proto.tendermint.abci.EventAttribute.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.tendermint.abci.Event} + */ +proto.tendermint.abci.Event.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.Event} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Event} + */ +proto.tendermint.abci.Event.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.setType(value); + break; + case 2: + var value = new proto.tendermint.abci.EventAttribute; + reader.readMessage(value,proto.tendermint.abci.EventAttribute.deserializeBinaryFromReader); + msg.addAttributes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Event.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.Event.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.Event} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Event.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAttributesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.tendermint.abci.EventAttribute.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.tendermint.abci.Event.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.Event} returns this + */ +proto.tendermint.abci.Event.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated EventAttribute attributes = 2; + * @return {!Array} + */ +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.Event} returns this +*/ +proto.tendermint.abci.Event.prototype.setAttributesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.tendermint.abci.EventAttribute=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.EventAttribute} + */ +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.Event} returns this + */ +proto.tendermint.abci.Event.prototype.clearAttributesList = function() { + return this.setAttributesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.EventAttribute.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.EventAttribute.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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 + */ +proto.tendermint.abci.EventAttribute.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_asB64(), + value: msg.getValue_asB64(), + index: 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.tendermint.abci.EventAttribute} + */ +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); +}; + + +/** + * 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} + */ +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 {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIndex(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.EventAttribute.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.EventAttribute.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.EventAttribute} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.EventAttribute.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.getIndex(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.EventAttribute.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.tendermint.abci.EventAttribute.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.tendermint.abci.EventAttribute.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.EventAttribute} returns this + */ +proto.tendermint.abci.EventAttribute.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes value = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.EventAttribute.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.tendermint.abci.EventAttribute.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.tendermint.abci.EventAttribute.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.EventAttribute} returns this + */ +proto.tendermint.abci.EventAttribute.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bool index = 3; + * @return {boolean} + */ +proto.tendermint.abci.EventAttribute.prototype.getIndex = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.tendermint.abci.EventAttribute} returns this + */ +proto.tendermint.abci.EventAttribute.prototype.setIndex = function(value) { + return jspb.Message.setProto3BooleanField(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.tendermint.abci.TxResult.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.TxResult.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.TxResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.TxResult.toObject = function(includeInstance, msg) { + var f, obj = { + 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) + }; + + 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.TxResult} + */ +proto.tendermint.abci.TxResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.TxResult; + return proto.tendermint.abci.TxResult.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.TxResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.TxResult} + */ +proto.tendermint.abci.TxResult.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 = /** @type {number} */ (reader.readUint32()); + msg.setIndex(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTx(value); + break; + case 4: + var value = new proto.tendermint.abci.ResponseDeliverTx; + reader.readMessage(value,proto.tendermint.abci.ResponseDeliverTx.deserializeBinaryFromReader); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.TxResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.TxResult.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.TxResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.TxResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.abci.ResponseDeliverTx.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.abci.TxResult.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.TxResult} returns this + */ +proto.tendermint.abci.TxResult.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 index = 2; + * @return {number} + */ +proto.tendermint.abci.TxResult.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.TxResult} returns this + */ +proto.tendermint.abci.TxResult.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes tx = 3; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.TxResult.prototype.getTx = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes tx = 3; + * This is a type-conversion wrapper around `getTx()` + * @return {string} + */ +proto.tendermint.abci.TxResult.prototype.getTx_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTx())); +}; + + +/** + * optional bytes tx = 3; + * 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.TxResult.prototype.getTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTx())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.TxResult} returns this + */ +proto.tendermint.abci.TxResult.prototype.setTx = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional ResponseDeliverTx result = 4; + * @return {?proto.tendermint.abci.ResponseDeliverTx} + */ +proto.tendermint.abci.TxResult.prototype.getResult = function() { + return /** @type{?proto.tendermint.abci.ResponseDeliverTx} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseDeliverTx, 4)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseDeliverTx|undefined} value + * @return {!proto.tendermint.abci.TxResult} returns this +*/ +proto.tendermint.abci.TxResult.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.TxResult} returns this + */ +proto.tendermint.abci.TxResult.prototype.clearResult = function() { + return this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.TxResult.prototype.hasResult = 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.tendermint.abci.Validator.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.Validator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Validator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Validator.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + power: 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.tendermint.abci.Validator} + */ +proto.tendermint.abci.Validator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.Validator; + return proto.tendermint.abci.Validator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.Validator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Validator} + */ +proto.tendermint.abci.Validator.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.setAddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Validator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.Validator.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.Validator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Validator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional bytes address = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.Validator.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.tendermint.abci.Validator.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.Validator.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.Validator} returns this + */ +proto.tendermint.abci.Validator.prototype.setAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional int64 power = 3; + * @return {number} + */ +proto.tendermint.abci.Validator.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Validator} returns this + */ +proto.tendermint.abci.Validator.prototype.setPower = 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.tendermint.abci.ValidatorUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ValidatorUpdate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorUpdate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ValidatorUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + pubKey: (f = msg.getPubKey()) && tendermint_crypto_keys_pb.PublicKey.toObject(includeInstance, f), + 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.tendermint.abci.ValidatorUpdate} + */ +proto.tendermint.abci.ValidatorUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ValidatorUpdate; + return proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ValidatorUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ValidatorUpdate} + */ +proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_crypto_keys_pb.PublicKey; + reader.readMessage(value,tendermint_crypto_keys_pb.PublicKey.deserializeBinaryFromReader); + msg.setPubKey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ValidatorUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ValidatorUpdate.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.ValidatorUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ValidatorUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_crypto_keys_pb.PublicKey.serializeBinaryToWriter + ); + } + f = message.getPower(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional tendermint.crypto.PublicKey pub_key = 1; + * @return {?proto.tendermint.crypto.PublicKey} + */ +proto.tendermint.abci.ValidatorUpdate.prototype.getPubKey = function() { + return /** @type{?proto.tendermint.crypto.PublicKey} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_keys_pb.PublicKey, 1)); +}; + + +/** + * @param {?proto.tendermint.crypto.PublicKey|undefined} value + * @return {!proto.tendermint.abci.ValidatorUpdate} returns this +*/ +proto.tendermint.abci.ValidatorUpdate.prototype.setPubKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ValidatorUpdate} returns this + */ +proto.tendermint.abci.ValidatorUpdate.prototype.clearPubKey = function() { + return this.setPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ValidatorUpdate.prototype.hasPubKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 power = 2; + * @return {number} + */ +proto.tendermint.abci.ValidatorUpdate.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ValidatorUpdate} returns this + */ +proto.tendermint.abci.ValidatorUpdate.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.tendermint.abci.VoteInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.VoteInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.VoteInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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) + }; + + 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.VoteInfo} + */ +proto.tendermint.abci.VoteInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.VoteInfo; + return proto.tendermint.abci.VoteInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.VoteInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.VoteInfo} + */ +proto.tendermint.abci.VoteInfo.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.Validator; + reader.readMessage(value,proto.tendermint.abci.Validator.deserializeBinaryFromReader); + msg.setValidator(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSignedLastBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.VoteInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.VoteInfo.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.VoteInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.VoteInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.Validator.serializeBinaryToWriter + ); + } + f = message.getSignedLastBlock(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional Validator validator = 1; + * @return {?proto.tendermint.abci.Validator} + */ +proto.tendermint.abci.VoteInfo.prototype.getValidator = function() { + return /** @type{?proto.tendermint.abci.Validator} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.Validator, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.Validator|undefined} value + * @return {!proto.tendermint.abci.VoteInfo} returns this +*/ +proto.tendermint.abci.VoteInfo.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.VoteInfo} returns this + */ +proto.tendermint.abci.VoteInfo.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.VoteInfo.prototype.hasValidator = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool signed_last_block = 2; + * @return {boolean} + */ +proto.tendermint.abci.VoteInfo.prototype.getSignedLastBlock = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.tendermint.abci.VoteInfo} returns this + */ +proto.tendermint.abci.VoteInfo.prototype.setSignedLastBlock = 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.tendermint.abci.Evidence.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.Evidence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Evidence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Evidence.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + validator: (f = msg.getValidator()) && proto.tendermint.abci.Validator.toObject(includeInstance, f), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + totalVotingPower: 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.tendermint.abci.Evidence} + */ +proto.tendermint.abci.Evidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.Evidence; + return proto.tendermint.abci.Evidence.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.Evidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Evidence} + */ +proto.tendermint.abci.Evidence.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.EvidenceType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = new proto.tendermint.abci.Validator; + reader.readMessage(value,proto.tendermint.abci.Validator.deserializeBinaryFromReader); + msg.setValidator(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalVotingPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Evidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.Evidence.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.Evidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Evidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.abci.Validator.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getTotalVotingPower(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional EvidenceType type = 1; + * @return {!proto.tendermint.abci.EvidenceType} + */ +proto.tendermint.abci.Evidence.prototype.getType = function() { + return /** @type {!proto.tendermint.abci.EvidenceType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.tendermint.abci.EvidenceType} value + * @return {!proto.tendermint.abci.Evidence} returns this + */ +proto.tendermint.abci.Evidence.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional Validator validator = 2; + * @return {?proto.tendermint.abci.Validator} + */ +proto.tendermint.abci.Evidence.prototype.getValidator = function() { + return /** @type{?proto.tendermint.abci.Validator} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.Validator, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.Validator|undefined} value + * @return {!proto.tendermint.abci.Evidence} returns this +*/ +proto.tendermint.abci.Evidence.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Evidence} returns this + */ +proto.tendermint.abci.Evidence.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Evidence.prototype.hasValidator = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 height = 3; + * @return {number} + */ +proto.tendermint.abci.Evidence.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Evidence} returns this + */ +proto.tendermint.abci.Evidence.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.abci.Evidence.prototype.getTime = 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.tendermint.abci.Evidence} returns this +*/ +proto.tendermint.abci.Evidence.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Evidence} returns this + */ +proto.tendermint.abci.Evidence.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Evidence.prototype.hasTime = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional int64 total_voting_power = 5; + * @return {number} + */ +proto.tendermint.abci.Evidence.prototype.getTotalVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Evidence} returns this + */ +proto.tendermint.abci.Evidence.prototype.setTotalVotingPower = 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.tendermint.abci.Snapshot.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.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.tendermint.abci.Snapshot} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.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: msg.getMetadata_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.Snapshot} + */ +proto.tendermint.abci.Snapshot.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.Snapshot; + return proto.tendermint.abci.Snapshot.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.Snapshot} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Snapshot} + */ +proto.tendermint.abci.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 = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Snapshot.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.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.tendermint.abci.Snapshot} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.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_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional uint64 height = 1; + * @return {number} + */ +proto.tendermint.abci.Snapshot.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Snapshot} returns this + */ +proto.tendermint.abci.Snapshot.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 format = 2; + * @return {number} + */ +proto.tendermint.abci.Snapshot.prototype.getFormat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Snapshot} returns this + */ +proto.tendermint.abci.Snapshot.prototype.setFormat = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 chunks = 3; + * @return {number} + */ +proto.tendermint.abci.Snapshot.prototype.getChunks = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Snapshot} returns this + */ +proto.tendermint.abci.Snapshot.prototype.setChunks = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.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.tendermint.abci.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.tendermint.abci.Snapshot.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.Snapshot} returns this + */ +proto.tendermint.abci.Snapshot.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bytes metadata = 5; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.Snapshot.prototype.getMetadata = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes metadata = 5; + * This is a type-conversion wrapper around `getMetadata()` + * @return {string} + */ +proto.tendermint.abci.Snapshot.prototype.getMetadata_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMetadata())); +}; + + +/** + * optional bytes metadata = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMetadata()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.Snapshot.prototype.getMetadata_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMetadata())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.Snapshot} returns this + */ +proto.tendermint.abci.Snapshot.prototype.setMetadata = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * @enum {number} + */ +proto.tendermint.abci.CheckTxType = { + NEW: 0, + RECHECK: 1 +}; + +/** + * @enum {number} + */ +proto.tendermint.abci.EvidenceType = { + UNKNOWN: 0, + DUPLICATE_VOTE: 1, + LIGHT_CLIENT_ATTACK: 2 +}; + +goog.object.extend(exports, proto.tendermint.abci); diff --git a/dist/src/types/proto-types/tendermint/crypto/keys_pb.js b/dist/src/types/proto-types/tendermint/crypto/keys_pb.js new file mode 100644 index 00000000..193c5d80 --- /dev/null +++ b/dist/src/types/proto-types/tendermint/crypto/keys_pb.js @@ -0,0 +1,310 @@ +// source: tendermint/crypto/keys.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.tendermint.crypto.PublicKey', null, global); +goog.exportSymbol('proto.tendermint.crypto.PublicKey.SumCase', 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.tendermint.crypto.PublicKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.crypto.PublicKey.oneofGroups_); +}; +goog.inherits(proto.tendermint.crypto.PublicKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.PublicKey.displayName = 'proto.tendermint.crypto.PublicKey'; +} + +/** + * 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.crypto.PublicKey.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.tendermint.crypto.PublicKey.SumCase = { + SUM_NOT_SET: 0, + ED25519: 1, + SECP256K1: 2 +}; + +/** + * @return {proto.tendermint.crypto.PublicKey.SumCase} + */ +proto.tendermint.crypto.PublicKey.prototype.getSumCase = function() { + return /** @type {proto.tendermint.crypto.PublicKey.SumCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.crypto.PublicKey.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.crypto.PublicKey.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.PublicKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.PublicKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.PublicKey.toObject = function(includeInstance, msg) { + var f, obj = { + ed25519: msg.getEd25519_asB64(), + secp256k1: msg.getSecp256k1_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.crypto.PublicKey} + */ +proto.tendermint.crypto.PublicKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.PublicKey; + return proto.tendermint.crypto.PublicKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.PublicKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.PublicKey} + */ +proto.tendermint.crypto.PublicKey.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.setEd25519(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSecp256k1(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.crypto.PublicKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.PublicKey.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.crypto.PublicKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.PublicKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes ed25519 = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.PublicKey.prototype.getEd25519 = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes ed25519 = 1; + * This is a type-conversion wrapper around `getEd25519()` + * @return {string} + */ +proto.tendermint.crypto.PublicKey.prototype.getEd25519_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEd25519())); +}; + + +/** + * optional bytes ed25519 = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEd25519()` + * @return {!Uint8Array} + */ +proto.tendermint.crypto.PublicKey.prototype.getEd25519_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEd25519())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.PublicKey} returns this + */ +proto.tendermint.crypto.PublicKey.prototype.setEd25519 = function(value) { + return jspb.Message.setOneofField(this, 1, proto.tendermint.crypto.PublicKey.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.tendermint.crypto.PublicKey} returns this + */ +proto.tendermint.crypto.PublicKey.prototype.clearEd25519 = function() { + return jspb.Message.setOneofField(this, 1, proto.tendermint.crypto.PublicKey.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.crypto.PublicKey.prototype.hasEd25519 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes secp256k1 = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.PublicKey.prototype.getSecp256k1 = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes secp256k1 = 2; + * This is a type-conversion wrapper around `getSecp256k1()` + * @return {string} + */ +proto.tendermint.crypto.PublicKey.prototype.getSecp256k1_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSecp256k1())); +}; + + +/** + * optional bytes secp256k1 = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSecp256k1()` + * @return {!Uint8Array} + */ +proto.tendermint.crypto.PublicKey.prototype.getSecp256k1_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSecp256k1())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.PublicKey} returns this + */ +proto.tendermint.crypto.PublicKey.prototype.setSecp256k1 = function(value) { + return jspb.Message.setOneofField(this, 2, proto.tendermint.crypto.PublicKey.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.tendermint.crypto.PublicKey} returns this + */ +proto.tendermint.crypto.PublicKey.prototype.clearSecp256k1 = function() { + return jspb.Message.setOneofField(this, 2, proto.tendermint.crypto.PublicKey.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.crypto.PublicKey.prototype.hasSecp256k1 = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.tendermint.crypto); diff --git a/dist/src/types/proto-types/tendermint/crypto/proof_pb.js b/dist/src/types/proto-types/tendermint/crypto/proof_pb.js new file mode 100644 index 00000000..b6372980 --- /dev/null +++ b/dist/src/types/proto-types/tendermint/crypto/proof_pb.js @@ -0,0 +1,1214 @@ +// source: tendermint/crypto/proof.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.tendermint.crypto.DominoOp', null, global); +goog.exportSymbol('proto.tendermint.crypto.Proof', null, global); +goog.exportSymbol('proto.tendermint.crypto.ProofOp', null, global); +goog.exportSymbol('proto.tendermint.crypto.ProofOps', null, global); +goog.exportSymbol('proto.tendermint.crypto.ValueOp', 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.tendermint.crypto.Proof = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.crypto.Proof.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.crypto.Proof, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.Proof.displayName = 'proto.tendermint.crypto.Proof'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crypto.ValueOp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.crypto.ValueOp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.ValueOp.displayName = 'proto.tendermint.crypto.ValueOp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crypto.DominoOp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.crypto.DominoOp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.DominoOp.displayName = 'proto.tendermint.crypto.DominoOp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crypto.ProofOp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.crypto.ProofOp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.ProofOp.displayName = 'proto.tendermint.crypto.ProofOp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crypto.ProofOps = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.crypto.ProofOps.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.crypto.ProofOps, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.ProofOps.displayName = 'proto.tendermint.crypto.ProofOps'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.crypto.Proof.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.tendermint.crypto.Proof.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.Proof.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.Proof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.Proof.toObject = function(includeInstance, msg) { + var f, obj = { + total: jspb.Message.getFieldWithDefault(msg, 1, 0), + index: jspb.Message.getFieldWithDefault(msg, 2, 0), + leafHash: msg.getLeafHash_asB64(), + auntsList: msg.getAuntsList_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.crypto.Proof} + */ +proto.tendermint.crypto.Proof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.Proof; + return proto.tendermint.crypto.Proof.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.Proof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.Proof} + */ +proto.tendermint.crypto.Proof.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.setTotal(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setIndex(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLeafHash(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addAunts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.crypto.Proof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.Proof.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.crypto.Proof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.Proof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotal(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getLeafHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getAuntsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 4, + f + ); + } +}; + + +/** + * optional int64 total = 1; + * @return {number} + */ +proto.tendermint.crypto.Proof.prototype.getTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.setTotal = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 index = 2; + * @return {number} + */ +proto.tendermint.crypto.Proof.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes leaf_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.Proof.prototype.getLeafHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes leaf_hash = 3; + * This is a type-conversion wrapper around `getLeafHash()` + * @return {string} + */ +proto.tendermint.crypto.Proof.prototype.getLeafHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLeafHash())); +}; + + +/** + * optional bytes leaf_hash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLeafHash()` + * @return {!Uint8Array} + */ +proto.tendermint.crypto.Proof.prototype.getLeafHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLeafHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.setLeafHash = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * repeated bytes aunts = 4; + * @return {!(Array|Array)} + */ +proto.tendermint.crypto.Proof.prototype.getAuntsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * repeated bytes aunts = 4; + * This is a type-conversion wrapper around `getAuntsList()` + * @return {!Array} + */ +proto.tendermint.crypto.Proof.prototype.getAuntsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getAuntsList())); +}; + + +/** + * repeated bytes aunts = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAuntsList()` + * @return {!Array} + */ +proto.tendermint.crypto.Proof.prototype.getAuntsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getAuntsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.setAuntsList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.addAunts = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.clearAuntsList = function() { + return this.setAuntsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.crypto.ValueOp.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.ValueOp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.ValueOp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ValueOp.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_asB64(), + proof: (f = msg.getProof()) && proto.tendermint.crypto.Proof.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.crypto.ValueOp} + */ +proto.tendermint.crypto.ValueOp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.ValueOp; + return proto.tendermint.crypto.ValueOp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.ValueOp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.ValueOp} + */ +proto.tendermint.crypto.ValueOp.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.tendermint.crypto.Proof; + reader.readMessage(value,proto.tendermint.crypto.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.crypto.ValueOp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.ValueOp.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.crypto.ValueOp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ValueOp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.crypto.Proof.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.ValueOp.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.tendermint.crypto.ValueOp.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.tendermint.crypto.ValueOp.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.ValueOp} returns this + */ +proto.tendermint.crypto.ValueOp.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional Proof proof = 2; + * @return {?proto.tendermint.crypto.Proof} + */ +proto.tendermint.crypto.ValueOp.prototype.getProof = function() { + return /** @type{?proto.tendermint.crypto.Proof} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.crypto.Proof, 2)); +}; + + +/** + * @param {?proto.tendermint.crypto.Proof|undefined} value + * @return {!proto.tendermint.crypto.ValueOp} returns this +*/ +proto.tendermint.crypto.ValueOp.prototype.setProof = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.crypto.ValueOp} returns this + */ +proto.tendermint.crypto.ValueOp.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.crypto.ValueOp.prototype.hasProof = 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.tendermint.crypto.DominoOp.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.DominoOp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.DominoOp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.DominoOp.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + input: jspb.Message.getFieldWithDefault(msg, 2, ""), + output: 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.tendermint.crypto.DominoOp} + */ +proto.tendermint.crypto.DominoOp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.DominoOp; + return proto.tendermint.crypto.DominoOp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.DominoOp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.DominoOp} + */ +proto.tendermint.crypto.DominoOp.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.setInput(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setOutput(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.crypto.DominoOp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.DominoOp.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.crypto.DominoOp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.DominoOp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getInput(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getOutput(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.tendermint.crypto.DominoOp.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.crypto.DominoOp} returns this + */ +proto.tendermint.crypto.DominoOp.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string input = 2; + * @return {string} + */ +proto.tendermint.crypto.DominoOp.prototype.getInput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.crypto.DominoOp} returns this + */ +proto.tendermint.crypto.DominoOp.prototype.setInput = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string output = 3; + * @return {string} + */ +proto.tendermint.crypto.DominoOp.prototype.getOutput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.crypto.DominoOp} returns this + */ +proto.tendermint.crypto.DominoOp.prototype.setOutput = 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.tendermint.crypto.ProofOp.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.ProofOp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.ProofOp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ProofOp.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + key: msg.getKey_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.tendermint.crypto.ProofOp} + */ +proto.tendermint.crypto.ProofOp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.ProofOp; + return proto.tendermint.crypto.ProofOp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.ProofOp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.ProofOp} + */ +proto.tendermint.crypto.ProofOp.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.setType(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(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.tendermint.crypto.ProofOp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.ProofOp.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.crypto.ProofOp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ProofOp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.tendermint.crypto.ProofOp.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.crypto.ProofOp} returns this + */ +proto.tendermint.crypto.ProofOp.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes key = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.ProofOp.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes key = 2; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.tendermint.crypto.ProofOp.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 2; + * 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.tendermint.crypto.ProofOp.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.ProofOp} returns this + */ +proto.tendermint.crypto.ProofOp.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.ProofOp.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.tendermint.crypto.ProofOp.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.tendermint.crypto.ProofOp.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.ProofOp} returns this + */ +proto.tendermint.crypto.ProofOp.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.crypto.ProofOps.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.tendermint.crypto.ProofOps.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.ProofOps.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.ProofOps} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ProofOps.toObject = function(includeInstance, msg) { + var f, obj = { + opsList: jspb.Message.toObjectList(msg.getOpsList(), + proto.tendermint.crypto.ProofOp.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.tendermint.crypto.ProofOps} + */ +proto.tendermint.crypto.ProofOps.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.ProofOps; + return proto.tendermint.crypto.ProofOps.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.ProofOps} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.ProofOps} + */ +proto.tendermint.crypto.ProofOps.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.crypto.ProofOp; + reader.readMessage(value,proto.tendermint.crypto.ProofOp.deserializeBinaryFromReader); + msg.addOps(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.crypto.ProofOps.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.ProofOps.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.crypto.ProofOps} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ProofOps.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOpsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.tendermint.crypto.ProofOp.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ProofOp ops = 1; + * @return {!Array} + */ +proto.tendermint.crypto.ProofOps.prototype.getOpsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.crypto.ProofOp, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.crypto.ProofOps} returns this +*/ +proto.tendermint.crypto.ProofOps.prototype.setOpsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.crypto.ProofOp=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.crypto.ProofOp} + */ +proto.tendermint.crypto.ProofOps.prototype.addOps = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.crypto.ProofOp, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.crypto.ProofOps} returns this + */ +proto.tendermint.crypto.ProofOps.prototype.clearOpsList = function() { + return this.setOpsList([]); +}; + + +goog.object.extend(exports, proto.tendermint.crypto); diff --git a/dist/src/types/proto-types/tendermint/libs/bits/types_pb.js b/dist/src/types/proto-types/tendermint/libs/bits/types_pb.js new file mode 100644 index 00000000..97b73715 --- /dev/null +++ b/dist/src/types/proto-types/tendermint/libs/bits/types_pb.js @@ -0,0 +1,223 @@ +// source: tendermint/libs/bits/types.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.tendermint.libs.bits.BitArray', 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.tendermint.libs.bits.BitArray = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.libs.bits.BitArray.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.libs.bits.BitArray, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.libs.bits.BitArray.displayName = 'proto.tendermint.libs.bits.BitArray'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.libs.bits.BitArray.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.tendermint.libs.bits.BitArray.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.libs.bits.BitArray.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.libs.bits.BitArray} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.libs.bits.BitArray.toObject = function(includeInstance, msg) { + var f, obj = { + bits: jspb.Message.getFieldWithDefault(msg, 1, 0), + elemsList: (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.tendermint.libs.bits.BitArray} + */ +proto.tendermint.libs.bits.BitArray.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.libs.bits.BitArray; + return proto.tendermint.libs.bits.BitArray.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.libs.bits.BitArray} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.libs.bits.BitArray} + */ +proto.tendermint.libs.bits.BitArray.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.setBits(value); + break; + case 2: + var value = /** @type {!Array} */ (reader.readPackedUint64()); + msg.setElemsList(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.libs.bits.BitArray.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.libs.bits.BitArray.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.libs.bits.BitArray} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.libs.bits.BitArray.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBits(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getElemsList(); + if (f.length > 0) { + writer.writePackedUint64( + 2, + f + ); + } +}; + + +/** + * optional int64 bits = 1; + * @return {number} + */ +proto.tendermint.libs.bits.BitArray.prototype.getBits = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.libs.bits.BitArray} returns this + */ +proto.tendermint.libs.bits.BitArray.prototype.setBits = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated uint64 elems = 2; + * @return {!Array} + */ +proto.tendermint.libs.bits.BitArray.prototype.getElemsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.libs.bits.BitArray} returns this + */ +proto.tendermint.libs.bits.BitArray.prototype.setElemsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.tendermint.libs.bits.BitArray} returns this + */ +proto.tendermint.libs.bits.BitArray.prototype.addElems = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.libs.bits.BitArray} returns this + */ +proto.tendermint.libs.bits.BitArray.prototype.clearElemsList = function() { + return this.setElemsList([]); +}; + + +goog.object.extend(exports, proto.tendermint.libs.bits); diff --git a/dist/src/types/proto-types/tendermint/p2p/types_pb.js b/dist/src/types/proto-types/tendermint/p2p/types_pb.js new file mode 100644 index 00000000..6bf3b414 --- /dev/null +++ b/dist/src/types/proto-types/tendermint/p2p/types_pb.js @@ -0,0 +1,1051 @@ +// source: tendermint/p2p/types.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.tendermint.p2p.DefaultNodeInfo', null, global); +goog.exportSymbol('proto.tendermint.p2p.DefaultNodeInfoOther', null, global); +goog.exportSymbol('proto.tendermint.p2p.NetAddress', null, global); +goog.exportSymbol('proto.tendermint.p2p.ProtocolVersion', 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.tendermint.p2p.NetAddress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.NetAddress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.NetAddress.displayName = 'proto.tendermint.p2p.NetAddress'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.p2p.ProtocolVersion = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.ProtocolVersion, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.ProtocolVersion.displayName = 'proto.tendermint.p2p.ProtocolVersion'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.p2p.DefaultNodeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.DefaultNodeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.DefaultNodeInfo.displayName = 'proto.tendermint.p2p.DefaultNodeInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.p2p.DefaultNodeInfoOther = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.DefaultNodeInfoOther, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.DefaultNodeInfoOther.displayName = 'proto.tendermint.p2p.DefaultNodeInfoOther'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.p2p.NetAddress.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.NetAddress.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.p2p.NetAddress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.NetAddress.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + ip: jspb.Message.getFieldWithDefault(msg, 2, ""), + port: 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.tendermint.p2p.NetAddress} + */ +proto.tendermint.p2p.NetAddress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.NetAddress; + return proto.tendermint.p2p.NetAddress.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.NetAddress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.NetAddress} + */ +proto.tendermint.p2p.NetAddress.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setIp(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPort(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.NetAddress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.NetAddress.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.p2p.NetAddress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.NetAddress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIp(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPort(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.tendermint.p2p.NetAddress.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.NetAddress} returns this + */ +proto.tendermint.p2p.NetAddress.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string ip = 2; + * @return {string} + */ +proto.tendermint.p2p.NetAddress.prototype.getIp = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.NetAddress} returns this + */ +proto.tendermint.p2p.NetAddress.prototype.setIp = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint32 port = 3; + * @return {number} + */ +proto.tendermint.p2p.NetAddress.prototype.getPort = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.p2p.NetAddress} returns this + */ +proto.tendermint.p2p.NetAddress.prototype.setPort = 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.tendermint.p2p.ProtocolVersion.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.ProtocolVersion.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.p2p.ProtocolVersion} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.ProtocolVersion.toObject = function(includeInstance, msg) { + var f, obj = { + p2p: jspb.Message.getFieldWithDefault(msg, 1, 0), + block: jspb.Message.getFieldWithDefault(msg, 2, 0), + app: 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.tendermint.p2p.ProtocolVersion} + */ +proto.tendermint.p2p.ProtocolVersion.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.ProtocolVersion; + return proto.tendermint.p2p.ProtocolVersion.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.ProtocolVersion} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.ProtocolVersion} + */ +proto.tendermint.p2p.ProtocolVersion.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.setP2p(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlock(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setApp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.ProtocolVersion.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.ProtocolVersion.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.p2p.ProtocolVersion} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.ProtocolVersion.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getP2p(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getBlock(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getApp(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional uint64 p2p = 1; + * @return {number} + */ +proto.tendermint.p2p.ProtocolVersion.prototype.getP2p = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.p2p.ProtocolVersion} returns this + */ +proto.tendermint.p2p.ProtocolVersion.prototype.setP2p = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 block = 2; + * @return {number} + */ +proto.tendermint.p2p.ProtocolVersion.prototype.getBlock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.p2p.ProtocolVersion} returns this + */ +proto.tendermint.p2p.ProtocolVersion.prototype.setBlock = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 app = 3; + * @return {number} + */ +proto.tendermint.p2p.ProtocolVersion.prototype.getApp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.p2p.ProtocolVersion} returns this + */ +proto.tendermint.p2p.ProtocolVersion.prototype.setApp = 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.tendermint.p2p.DefaultNodeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.DefaultNodeInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.p2p.DefaultNodeInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.DefaultNodeInfo.toObject = function(includeInstance, msg) { + var f, obj = { + protocolVersion: (f = msg.getProtocolVersion()) && proto.tendermint.p2p.ProtocolVersion.toObject(includeInstance, f), + defaultNodeId: jspb.Message.getFieldWithDefault(msg, 2, ""), + listenAddr: jspb.Message.getFieldWithDefault(msg, 3, ""), + network: jspb.Message.getFieldWithDefault(msg, 4, ""), + version: jspb.Message.getFieldWithDefault(msg, 5, ""), + channels: msg.getChannels_asB64(), + moniker: jspb.Message.getFieldWithDefault(msg, 7, ""), + other: (f = msg.getOther()) && proto.tendermint.p2p.DefaultNodeInfoOther.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.p2p.DefaultNodeInfo} + */ +proto.tendermint.p2p.DefaultNodeInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.DefaultNodeInfo; + return proto.tendermint.p2p.DefaultNodeInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.DefaultNodeInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.DefaultNodeInfo} + */ +proto.tendermint.p2p.DefaultNodeInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.p2p.ProtocolVersion; + reader.readMessage(value,proto.tendermint.p2p.ProtocolVersion.deserializeBinaryFromReader); + msg.setProtocolVersion(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDefaultNodeId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setListenAddr(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setNetwork(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChannels(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setMoniker(value); + break; + case 8: + var value = new proto.tendermint.p2p.DefaultNodeInfoOther; + reader.readMessage(value,proto.tendermint.p2p.DefaultNodeInfoOther.deserializeBinaryFromReader); + msg.setOther(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.DefaultNodeInfo.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.p2p.DefaultNodeInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.DefaultNodeInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProtocolVersion(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.p2p.ProtocolVersion.serializeBinaryToWriter + ); + } + f = message.getDefaultNodeId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getListenAddr(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getNetwork(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getChannels_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getMoniker(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getOther(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.tendermint.p2p.DefaultNodeInfoOther.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ProtocolVersion protocol_version = 1; + * @return {?proto.tendermint.p2p.ProtocolVersion} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getProtocolVersion = function() { + return /** @type{?proto.tendermint.p2p.ProtocolVersion} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.p2p.ProtocolVersion, 1)); +}; + + +/** + * @param {?proto.tendermint.p2p.ProtocolVersion|undefined} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this +*/ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setProtocolVersion = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.clearProtocolVersion = function() { + return this.setProtocolVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.hasProtocolVersion = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string default_node_id = 2; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getDefaultNodeId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setDefaultNodeId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string listen_addr = 3; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getListenAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setListenAddr = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string network = 4; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getNetwork = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setNetwork = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string version = 5; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional bytes channels = 6; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getChannels = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes channels = 6; + * This is a type-conversion wrapper around `getChannels()` + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getChannels_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChannels())); +}; + + +/** + * optional bytes channels = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChannels()` + * @return {!Uint8Array} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getChannels_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChannels())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setChannels = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional string moniker = 7; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getMoniker = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setMoniker = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional DefaultNodeInfoOther other = 8; + * @return {?proto.tendermint.p2p.DefaultNodeInfoOther} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getOther = function() { + return /** @type{?proto.tendermint.p2p.DefaultNodeInfoOther} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.p2p.DefaultNodeInfoOther, 8)); +}; + + +/** + * @param {?proto.tendermint.p2p.DefaultNodeInfoOther|undefined} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this +*/ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setOther = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.clearOther = function() { + return this.setOther(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.hasOther = function() { + return jspb.Message.getField(this, 8) != 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.tendermint.p2p.DefaultNodeInfoOther.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.DefaultNodeInfoOther.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.p2p.DefaultNodeInfoOther} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.DefaultNodeInfoOther.toObject = function(includeInstance, msg) { + var f, obj = { + txIndex: jspb.Message.getFieldWithDefault(msg, 1, ""), + rpcAddress: 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.tendermint.p2p.DefaultNodeInfoOther} + */ +proto.tendermint.p2p.DefaultNodeInfoOther.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.DefaultNodeInfoOther; + return proto.tendermint.p2p.DefaultNodeInfoOther.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.DefaultNodeInfoOther} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.DefaultNodeInfoOther} + */ +proto.tendermint.p2p.DefaultNodeInfoOther.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.setTxIndex(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRpcAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.DefaultNodeInfoOther.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.DefaultNodeInfoOther.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.p2p.DefaultNodeInfoOther} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.DefaultNodeInfoOther.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxIndex(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRpcAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string tx_index = 1; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfoOther.prototype.getTxIndex = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfoOther} returns this + */ +proto.tendermint.p2p.DefaultNodeInfoOther.prototype.setTxIndex = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string rpc_address = 2; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfoOther.prototype.getRpcAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfoOther} returns this + */ +proto.tendermint.p2p.DefaultNodeInfoOther.prototype.setRpcAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.tendermint.p2p); diff --git a/dist/src/types/proto-types/tendermint/types/block_pb.js b/dist/src/types/proto-types/tendermint/types/block_pb.js new file mode 100644 index 00000000..049328cc --- /dev/null +++ b/dist/src/types/proto-types/tendermint/types/block_pb.js @@ -0,0 +1,347 @@ +// source: tendermint/types/block.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 tendermint_types_types_pb = require('../../tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_types_pb); +var tendermint_types_evidence_pb = require('../../tendermint/types/evidence_pb.js'); +goog.object.extend(proto, tendermint_types_evidence_pb); +goog.exportSymbol('proto.tendermint.types.Block', 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.tendermint.types.Block = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Block, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Block.displayName = 'proto.tendermint.types.Block'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.Block.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Block.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Block} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Block.toObject = function(includeInstance, msg) { + var f, obj = { + header: (f = msg.getHeader()) && tendermint_types_types_pb.Header.toObject(includeInstance, f), + data: (f = msg.getData()) && tendermint_types_types_pb.Data.toObject(includeInstance, f), + evidence: (f = msg.getEvidence()) && tendermint_types_evidence_pb.EvidenceList.toObject(includeInstance, f), + lastCommit: (f = msg.getLastCommit()) && tendermint_types_types_pb.Commit.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.types.Block} + */ +proto.tendermint.types.Block.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Block; + return proto.tendermint.types.Block.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Block} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Block} + */ +proto.tendermint.types.Block.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.Header; + reader.readMessage(value,tendermint_types_types_pb.Header.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 2: + var value = new tendermint_types_types_pb.Data; + reader.readMessage(value,tendermint_types_types_pb.Data.deserializeBinaryFromReader); + msg.setData(value); + break; + case 3: + var value = new tendermint_types_evidence_pb.EvidenceList; + reader.readMessage(value,tendermint_types_evidence_pb.EvidenceList.deserializeBinaryFromReader); + msg.setEvidence(value); + break; + case 4: + var value = new tendermint_types_types_pb.Commit; + reader.readMessage(value,tendermint_types_types_pb.Commit.deserializeBinaryFromReader); + msg.setLastCommit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Block.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Block.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.Block} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Block.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.Header.serializeBinaryToWriter + ); + } + f = message.getData(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_types_pb.Data.serializeBinaryToWriter + ); + } + f = message.getEvidence(); + if (f != null) { + writer.writeMessage( + 3, + f, + tendermint_types_evidence_pb.EvidenceList.serializeBinaryToWriter + ); + } + f = message.getLastCommit(); + if (f != null) { + writer.writeMessage( + 4, + f, + tendermint_types_types_pb.Commit.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Header header = 1; + * @return {?proto.tendermint.types.Header} + */ +proto.tendermint.types.Block.prototype.getHeader = function() { + return /** @type{?proto.tendermint.types.Header} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Header, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Header|undefined} value + * @return {!proto.tendermint.types.Block} returns this +*/ +proto.tendermint.types.Block.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Block} returns this + */ +proto.tendermint.types.Block.prototype.clearHeader = function() { + return this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Block.prototype.hasHeader = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Data data = 2; + * @return {?proto.tendermint.types.Data} + */ +proto.tendermint.types.Block.prototype.getData = function() { + return /** @type{?proto.tendermint.types.Data} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Data, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Data|undefined} value + * @return {!proto.tendermint.types.Block} returns this +*/ +proto.tendermint.types.Block.prototype.setData = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Block} returns this + */ +proto.tendermint.types.Block.prototype.clearData = function() { + return this.setData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Block.prototype.hasData = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional EvidenceList evidence = 3; + * @return {?proto.tendermint.types.EvidenceList} + */ +proto.tendermint.types.Block.prototype.getEvidence = function() { + return /** @type{?proto.tendermint.types.EvidenceList} */ ( + jspb.Message.getWrapperField(this, tendermint_types_evidence_pb.EvidenceList, 3)); +}; + + +/** + * @param {?proto.tendermint.types.EvidenceList|undefined} value + * @return {!proto.tendermint.types.Block} returns this +*/ +proto.tendermint.types.Block.prototype.setEvidence = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Block} returns this + */ +proto.tendermint.types.Block.prototype.clearEvidence = function() { + return this.setEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Block.prototype.hasEvidence = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Commit last_commit = 4; + * @return {?proto.tendermint.types.Commit} + */ +proto.tendermint.types.Block.prototype.getLastCommit = function() { + return /** @type{?proto.tendermint.types.Commit} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Commit, 4)); +}; + + +/** + * @param {?proto.tendermint.types.Commit|undefined} value + * @return {!proto.tendermint.types.Block} returns this +*/ +proto.tendermint.types.Block.prototype.setLastCommit = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Block} returns this + */ +proto.tendermint.types.Block.prototype.clearLastCommit = function() { + return this.setLastCommit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Block.prototype.hasLastCommit = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +goog.object.extend(exports, proto.tendermint.types); diff --git a/dist/src/types/proto-types/tendermint/types/evidence_pb.js b/dist/src/types/proto-types/tendermint/types/evidence_pb.js new file mode 100644 index 00000000..df2fadb9 --- /dev/null +++ b/dist/src/types/proto-types/tendermint/types/evidence_pb.js @@ -0,0 +1,1135 @@ +// source: tendermint/types/evidence.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var tendermint_types_types_pb = require('../../tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_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.DuplicateVoteEvidence', null, global); +goog.exportSymbol('proto.tendermint.types.Evidence', null, global); +goog.exportSymbol('proto.tendermint.types.Evidence.SumCase', null, global); +goog.exportSymbol('proto.tendermint.types.EvidenceList', null, global); +goog.exportSymbol('proto.tendermint.types.LightClientAttackEvidence', 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.tendermint.types.Evidence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.types.Evidence.oneofGroups_); +}; +goog.inherits(proto.tendermint.types.Evidence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Evidence.displayName = 'proto.tendermint.types.Evidence'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.DuplicateVoteEvidence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.DuplicateVoteEvidence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.DuplicateVoteEvidence.displayName = 'proto.tendermint.types.DuplicateVoteEvidence'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.LightClientAttackEvidence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.LightClientAttackEvidence.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.LightClientAttackEvidence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.LightClientAttackEvidence.displayName = 'proto.tendermint.types.LightClientAttackEvidence'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.EvidenceList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.EvidenceList.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.EvidenceList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.EvidenceList.displayName = 'proto.tendermint.types.EvidenceList'; +} + +/** + * 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.types.Evidence.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.tendermint.types.Evidence.SumCase = { + SUM_NOT_SET: 0, + DUPLICATE_VOTE_EVIDENCE: 1, + LIGHT_CLIENT_ATTACK_EVIDENCE: 2 +}; + +/** + * @return {proto.tendermint.types.Evidence.SumCase} + */ +proto.tendermint.types.Evidence.prototype.getSumCase = function() { + return /** @type {proto.tendermint.types.Evidence.SumCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.types.Evidence.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.types.Evidence.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Evidence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Evidence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Evidence.toObject = function(includeInstance, msg) { + var f, obj = { + duplicateVoteEvidence: (f = msg.getDuplicateVoteEvidence()) && proto.tendermint.types.DuplicateVoteEvidence.toObject(includeInstance, f), + lightClientAttackEvidence: (f = msg.getLightClientAttackEvidence()) && proto.tendermint.types.LightClientAttackEvidence.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.types.Evidence} + */ +proto.tendermint.types.Evidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Evidence; + return proto.tendermint.types.Evidence.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Evidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Evidence} + */ +proto.tendermint.types.Evidence.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.DuplicateVoteEvidence; + reader.readMessage(value,proto.tendermint.types.DuplicateVoteEvidence.deserializeBinaryFromReader); + msg.setDuplicateVoteEvidence(value); + break; + case 2: + var value = new proto.tendermint.types.LightClientAttackEvidence; + reader.readMessage(value,proto.tendermint.types.LightClientAttackEvidence.deserializeBinaryFromReader); + msg.setLightClientAttackEvidence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Evidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Evidence.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.Evidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Evidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDuplicateVoteEvidence(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.types.DuplicateVoteEvidence.serializeBinaryToWriter + ); + } + f = message.getLightClientAttackEvidence(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.types.LightClientAttackEvidence.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DuplicateVoteEvidence duplicate_vote_evidence = 1; + * @return {?proto.tendermint.types.DuplicateVoteEvidence} + */ +proto.tendermint.types.Evidence.prototype.getDuplicateVoteEvidence = function() { + return /** @type{?proto.tendermint.types.DuplicateVoteEvidence} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.DuplicateVoteEvidence, 1)); +}; + + +/** + * @param {?proto.tendermint.types.DuplicateVoteEvidence|undefined} value + * @return {!proto.tendermint.types.Evidence} returns this +*/ +proto.tendermint.types.Evidence.prototype.setDuplicateVoteEvidence = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.tendermint.types.Evidence.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Evidence} returns this + */ +proto.tendermint.types.Evidence.prototype.clearDuplicateVoteEvidence = function() { + return this.setDuplicateVoteEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Evidence.prototype.hasDuplicateVoteEvidence = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional LightClientAttackEvidence light_client_attack_evidence = 2; + * @return {?proto.tendermint.types.LightClientAttackEvidence} + */ +proto.tendermint.types.Evidence.prototype.getLightClientAttackEvidence = function() { + return /** @type{?proto.tendermint.types.LightClientAttackEvidence} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.LightClientAttackEvidence, 2)); +}; + + +/** + * @param {?proto.tendermint.types.LightClientAttackEvidence|undefined} value + * @return {!proto.tendermint.types.Evidence} returns this +*/ +proto.tendermint.types.Evidence.prototype.setLightClientAttackEvidence = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.tendermint.types.Evidence.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Evidence} returns this + */ +proto.tendermint.types.Evidence.prototype.clearLightClientAttackEvidence = function() { + return this.setLightClientAttackEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Evidence.prototype.hasLightClientAttackEvidence = 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.tendermint.types.DuplicateVoteEvidence.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.DuplicateVoteEvidence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.DuplicateVoteEvidence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.DuplicateVoteEvidence.toObject = function(includeInstance, msg) { + var f, obj = { + voteA: (f = msg.getVoteA()) && tendermint_types_types_pb.Vote.toObject(includeInstance, f), + voteB: (f = msg.getVoteB()) && tendermint_types_types_pb.Vote.toObject(includeInstance, f), + totalVotingPower: jspb.Message.getFieldWithDefault(msg, 3, 0), + validatorPower: jspb.Message.getFieldWithDefault(msg, 4, 0), + timestamp: (f = msg.getTimestamp()) && 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.tendermint.types.DuplicateVoteEvidence} + */ +proto.tendermint.types.DuplicateVoteEvidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.DuplicateVoteEvidence; + return proto.tendermint.types.DuplicateVoteEvidence.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.DuplicateVoteEvidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.DuplicateVoteEvidence} + */ +proto.tendermint.types.DuplicateVoteEvidence.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.Vote; + reader.readMessage(value,tendermint_types_types_pb.Vote.deserializeBinaryFromReader); + msg.setVoteA(value); + break; + case 2: + var value = new tendermint_types_types_pb.Vote; + reader.readMessage(value,tendermint_types_types_pb.Vote.deserializeBinaryFromReader); + msg.setVoteB(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalVotingPower(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setValidatorPower(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.DuplicateVoteEvidence.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.DuplicateVoteEvidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.DuplicateVoteEvidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVoteA(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.Vote.serializeBinaryToWriter + ); + } + f = message.getVoteB(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_types_pb.Vote.serializeBinaryToWriter + ); + } + f = message.getTotalVotingPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getValidatorPower(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Vote vote_a = 1; + * @return {?proto.tendermint.types.Vote} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.getVoteA = function() { + return /** @type{?proto.tendermint.types.Vote} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Vote, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Vote|undefined} value + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this +*/ +proto.tendermint.types.DuplicateVoteEvidence.prototype.setVoteA = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.clearVoteA = function() { + return this.setVoteA(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.hasVoteA = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Vote vote_b = 2; + * @return {?proto.tendermint.types.Vote} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.getVoteB = function() { + return /** @type{?proto.tendermint.types.Vote} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Vote, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Vote|undefined} value + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this +*/ +proto.tendermint.types.DuplicateVoteEvidence.prototype.setVoteB = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.clearVoteB = function() { + return this.setVoteB(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.hasVoteB = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 total_voting_power = 3; + * @return {number} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.getTotalVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.setTotalVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 validator_power = 4; + * @return {number} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.getValidatorPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.setValidatorPower = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.getTimestamp = 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.tendermint.types.DuplicateVoteEvidence} returns this +*/ +proto.tendermint.types.DuplicateVoteEvidence.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.LightClientAttackEvidence.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.tendermint.types.LightClientAttackEvidence.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.LightClientAttackEvidence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.LightClientAttackEvidence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.LightClientAttackEvidence.toObject = function(includeInstance, msg) { + var f, obj = { + conflictingBlock: (f = msg.getConflictingBlock()) && tendermint_types_types_pb.LightBlock.toObject(includeInstance, f), + commonHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + byzantineValidatorsList: jspb.Message.toObjectList(msg.getByzantineValidatorsList(), + tendermint_types_validator_pb.Validator.toObject, includeInstance), + totalVotingPower: jspb.Message.getFieldWithDefault(msg, 4, 0), + timestamp: (f = msg.getTimestamp()) && 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.tendermint.types.LightClientAttackEvidence} + */ +proto.tendermint.types.LightClientAttackEvidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.LightClientAttackEvidence; + return proto.tendermint.types.LightClientAttackEvidence.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.LightClientAttackEvidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.LightClientAttackEvidence} + */ +proto.tendermint.types.LightClientAttackEvidence.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.LightBlock; + reader.readMessage(value,tendermint_types_types_pb.LightBlock.deserializeBinaryFromReader); + msg.setConflictingBlock(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCommonHeight(value); + break; + case 3: + var value = new tendermint_types_validator_pb.Validator; + reader.readMessage(value,tendermint_types_validator_pb.Validator.deserializeBinaryFromReader); + msg.addByzantineValidators(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalVotingPower(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.LightClientAttackEvidence.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.LightClientAttackEvidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.LightClientAttackEvidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConflictingBlock(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.LightBlock.serializeBinaryToWriter + ); + } + f = message.getCommonHeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getByzantineValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + tendermint_types_validator_pb.Validator.serializeBinaryToWriter + ); + } + f = message.getTotalVotingPower(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional LightBlock conflicting_block = 1; + * @return {?proto.tendermint.types.LightBlock} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.getConflictingBlock = function() { + return /** @type{?proto.tendermint.types.LightBlock} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.LightBlock, 1)); +}; + + +/** + * @param {?proto.tendermint.types.LightBlock|undefined} value + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this +*/ +proto.tendermint.types.LightClientAttackEvidence.prototype.setConflictingBlock = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.clearConflictingBlock = function() { + return this.setConflictingBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.hasConflictingBlock = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 common_height = 2; + * @return {number} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.getCommonHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.setCommonHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated Validator byzantine_validators = 3; + * @return {!Array} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.getByzantineValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, tendermint_types_validator_pb.Validator, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this +*/ +proto.tendermint.types.LightClientAttackEvidence.prototype.setByzantineValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.tendermint.types.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.types.Validator} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.addByzantineValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.tendermint.types.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.clearByzantineValidatorsList = function() { + return this.setByzantineValidatorsList([]); +}; + + +/** + * optional int64 total_voting_power = 4; + * @return {number} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.getTotalVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.setTotalVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.getTimestamp = 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.tendermint.types.LightClientAttackEvidence} returns this +*/ +proto.tendermint.types.LightClientAttackEvidence.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.EvidenceList.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.tendermint.types.EvidenceList.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.EvidenceList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.EvidenceList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.EvidenceList.toObject = function(includeInstance, msg) { + var f, obj = { + evidenceList: jspb.Message.toObjectList(msg.getEvidenceList(), + proto.tendermint.types.Evidence.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.tendermint.types.EvidenceList} + */ +proto.tendermint.types.EvidenceList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.EvidenceList; + return proto.tendermint.types.EvidenceList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.EvidenceList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.EvidenceList} + */ +proto.tendermint.types.EvidenceList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.Evidence; + reader.readMessage(value,proto.tendermint.types.Evidence.deserializeBinaryFromReader); + msg.addEvidence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.EvidenceList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.EvidenceList.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.EvidenceList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.EvidenceList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEvidenceList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.tendermint.types.Evidence.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Evidence evidence = 1; + * @return {!Array} + */ +proto.tendermint.types.EvidenceList.prototype.getEvidenceList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.types.Evidence, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.types.EvidenceList} returns this +*/ +proto.tendermint.types.EvidenceList.prototype.setEvidenceList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.types.Evidence=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.types.Evidence} + */ +proto.tendermint.types.EvidenceList.prototype.addEvidence = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.types.Evidence, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.types.EvidenceList} returns this + */ +proto.tendermint.types.EvidenceList.prototype.clearEvidenceList = function() { + return this.setEvidenceList([]); +}; + + +goog.object.extend(exports, proto.tendermint.types); diff --git a/dist/src/types/proto-types/tendermint/types/params_pb.js b/dist/src/types/proto-types/tendermint/types/params_pb.js new file mode 100644 index 00000000..1828b8d2 --- /dev/null +++ b/dist/src/types/proto-types/tendermint/types/params_pb.js @@ -0,0 +1,1302 @@ +// source: tendermint/types/params.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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.BlockParams', null, global); +goog.exportSymbol('proto.tendermint.types.ConsensusParams', null, global); +goog.exportSymbol('proto.tendermint.types.EvidenceParams', null, global); +goog.exportSymbol('proto.tendermint.types.HashedParams', null, global); +goog.exportSymbol('proto.tendermint.types.ValidatorParams', null, global); +goog.exportSymbol('proto.tendermint.types.VersionParams', 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.tendermint.types.ConsensusParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.ConsensusParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.ConsensusParams.displayName = 'proto.tendermint.types.ConsensusParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.BlockParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.BlockParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.BlockParams.displayName = 'proto.tendermint.types.BlockParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.EvidenceParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.EvidenceParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.EvidenceParams.displayName = 'proto.tendermint.types.EvidenceParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.ValidatorParams.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.ValidatorParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.ValidatorParams.displayName = 'proto.tendermint.types.ValidatorParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.VersionParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.VersionParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.VersionParams.displayName = 'proto.tendermint.types.VersionParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.HashedParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.HashedParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.HashedParams.displayName = 'proto.tendermint.types.HashedParams'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.ConsensusParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.ConsensusParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ConsensusParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ConsensusParams.toObject = function(includeInstance, msg) { + var f, obj = { + 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) + }; + + 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.ConsensusParams} + */ +proto.tendermint.types.ConsensusParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.ConsensusParams; + return proto.tendermint.types.ConsensusParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.ConsensusParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.ConsensusParams} + */ +proto.tendermint.types.ConsensusParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.BlockParams; + reader.readMessage(value,proto.tendermint.types.BlockParams.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 2: + var value = new proto.tendermint.types.EvidenceParams; + reader.readMessage(value,proto.tendermint.types.EvidenceParams.deserializeBinaryFromReader); + msg.setEvidence(value); + break; + case 3: + var value = new proto.tendermint.types.ValidatorParams; + reader.readMessage(value,proto.tendermint.types.ValidatorParams.deserializeBinaryFromReader); + msg.setValidator(value); + break; + case 4: + var value = new proto.tendermint.types.VersionParams; + reader.readMessage(value,proto.tendermint.types.VersionParams.deserializeBinaryFromReader); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.ConsensusParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.ConsensusParams.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.ConsensusParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ConsensusParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.types.BlockParams.serializeBinaryToWriter + ); + } + f = message.getEvidence(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.types.EvidenceParams.serializeBinaryToWriter + ); + } + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.types.ValidatorParams.serializeBinaryToWriter + ); + } + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.types.VersionParams.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BlockParams block = 1; + * @return {?proto.tendermint.types.BlockParams} + */ +proto.tendermint.types.ConsensusParams.prototype.getBlock = function() { + return /** @type{?proto.tendermint.types.BlockParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.BlockParams, 1)); +}; + + +/** + * @param {?proto.tendermint.types.BlockParams|undefined} value + * @return {!proto.tendermint.types.ConsensusParams} returns this +*/ +proto.tendermint.types.ConsensusParams.prototype.setBlock = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ConsensusParams} returns this + */ +proto.tendermint.types.ConsensusParams.prototype.clearBlock = function() { + return this.setBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ConsensusParams.prototype.hasBlock = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional EvidenceParams evidence = 2; + * @return {?proto.tendermint.types.EvidenceParams} + */ +proto.tendermint.types.ConsensusParams.prototype.getEvidence = function() { + return /** @type{?proto.tendermint.types.EvidenceParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.EvidenceParams, 2)); +}; + + +/** + * @param {?proto.tendermint.types.EvidenceParams|undefined} value + * @return {!proto.tendermint.types.ConsensusParams} returns this +*/ +proto.tendermint.types.ConsensusParams.prototype.setEvidence = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ConsensusParams} returns this + */ +proto.tendermint.types.ConsensusParams.prototype.clearEvidence = function() { + return this.setEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ConsensusParams.prototype.hasEvidence = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ValidatorParams validator = 3; + * @return {?proto.tendermint.types.ValidatorParams} + */ +proto.tendermint.types.ConsensusParams.prototype.getValidator = function() { + return /** @type{?proto.tendermint.types.ValidatorParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.ValidatorParams, 3)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorParams|undefined} value + * @return {!proto.tendermint.types.ConsensusParams} returns this +*/ +proto.tendermint.types.ConsensusParams.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ConsensusParams} returns this + */ +proto.tendermint.types.ConsensusParams.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ConsensusParams.prototype.hasValidator = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional VersionParams version = 4; + * @return {?proto.tendermint.types.VersionParams} + */ +proto.tendermint.types.ConsensusParams.prototype.getVersion = function() { + return /** @type{?proto.tendermint.types.VersionParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.VersionParams, 4)); +}; + + +/** + * @param {?proto.tendermint.types.VersionParams|undefined} value + * @return {!proto.tendermint.types.ConsensusParams} returns this +*/ +proto.tendermint.types.ConsensusParams.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ConsensusParams} returns this + */ +proto.tendermint.types.ConsensusParams.prototype.clearVersion = function() { + return this.setVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ConsensusParams.prototype.hasVersion = 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.tendermint.types.BlockParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.BlockParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.BlockParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockParams.toObject = function(includeInstance, msg) { + var f, obj = { + maxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxGas: jspb.Message.getFieldWithDefault(msg, 2, 0), + timeIotaMs: 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.tendermint.types.BlockParams} + */ +proto.tendermint.types.BlockParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.BlockParams; + return proto.tendermint.types.BlockParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.BlockParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.BlockParams} + */ +proto.tendermint.types.BlockParams.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.setMaxBytes(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxGas(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeIotaMs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.BlockParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.BlockParams.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.BlockParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxBytes(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMaxGas(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getTimeIotaMs(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional int64 max_bytes = 1; + * @return {number} + */ +proto.tendermint.types.BlockParams.prototype.getMaxBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.BlockParams} returns this + */ +proto.tendermint.types.BlockParams.prototype.setMaxBytes = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 max_gas = 2; + * @return {number} + */ +proto.tendermint.types.BlockParams.prototype.getMaxGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.BlockParams} returns this + */ +proto.tendermint.types.BlockParams.prototype.setMaxGas = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 time_iota_ms = 3; + * @return {number} + */ +proto.tendermint.types.BlockParams.prototype.getTimeIotaMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.BlockParams} returns this + */ +proto.tendermint.types.BlockParams.prototype.setTimeIotaMs = 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.tendermint.types.EvidenceParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.EvidenceParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.EvidenceParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.EvidenceParams.toObject = function(includeInstance, msg) { + var f, obj = { + maxAgeNumBlocks: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxAgeDuration: (f = msg.getMaxAgeDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + maxBytes: 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.tendermint.types.EvidenceParams} + */ +proto.tendermint.types.EvidenceParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.EvidenceParams; + return proto.tendermint.types.EvidenceParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.EvidenceParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.EvidenceParams} + */ +proto.tendermint.types.EvidenceParams.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.setMaxAgeNumBlocks(value); + break; + case 2: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setMaxAgeDuration(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxBytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.EvidenceParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.EvidenceParams.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.EvidenceParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.EvidenceParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxAgeNumBlocks(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMaxAgeDuration(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getMaxBytes(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional int64 max_age_num_blocks = 1; + * @return {number} + */ +proto.tendermint.types.EvidenceParams.prototype.getMaxAgeNumBlocks = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.EvidenceParams} returns this + */ +proto.tendermint.types.EvidenceParams.prototype.setMaxAgeNumBlocks = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Duration max_age_duration = 2; + * @return {?proto.google.protobuf.Duration} + */ +proto.tendermint.types.EvidenceParams.prototype.getMaxAgeDuration = 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.tendermint.types.EvidenceParams} returns this +*/ +proto.tendermint.types.EvidenceParams.prototype.setMaxAgeDuration = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.EvidenceParams} returns this + */ +proto.tendermint.types.EvidenceParams.prototype.clearMaxAgeDuration = function() { + return this.setMaxAgeDuration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.EvidenceParams.prototype.hasMaxAgeDuration = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 max_bytes = 3; + * @return {number} + */ +proto.tendermint.types.EvidenceParams.prototype.getMaxBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.EvidenceParams} returns this + */ +proto.tendermint.types.EvidenceParams.prototype.setMaxBytes = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.ValidatorParams.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.tendermint.types.ValidatorParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.ValidatorParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ValidatorParams.toObject = function(includeInstance, msg) { + var f, obj = { + pubKeyTypesList: (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.tendermint.types.ValidatorParams} + */ +proto.tendermint.types.ValidatorParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.ValidatorParams; + return proto.tendermint.types.ValidatorParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.ValidatorParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.ValidatorParams} + */ +proto.tendermint.types.ValidatorParams.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.addPubKeyTypes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.ValidatorParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.ValidatorParams.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.ValidatorParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ValidatorParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKeyTypesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string pub_key_types = 1; + * @return {!Array} + */ +proto.tendermint.types.ValidatorParams.prototype.getPubKeyTypesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.types.ValidatorParams} returns this + */ +proto.tendermint.types.ValidatorParams.prototype.setPubKeyTypesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.tendermint.types.ValidatorParams} returns this + */ +proto.tendermint.types.ValidatorParams.prototype.addPubKeyTypes = 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.types.ValidatorParams} returns this + */ +proto.tendermint.types.ValidatorParams.prototype.clearPubKeyTypesList = function() { + return this.setPubKeyTypesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.VersionParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.VersionParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.VersionParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.VersionParams.toObject = function(includeInstance, msg) { + var f, obj = { + appVersion: 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.VersionParams} + */ +proto.tendermint.types.VersionParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.VersionParams; + return proto.tendermint.types.VersionParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.VersionParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.VersionParams} + */ +proto.tendermint.types.VersionParams.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.setAppVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.VersionParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.VersionParams.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.VersionParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.VersionParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAppVersion(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 app_version = 1; + * @return {number} + */ +proto.tendermint.types.VersionParams.prototype.getAppVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.VersionParams} returns this + */ +proto.tendermint.types.VersionParams.prototype.setAppVersion = 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.types.HashedParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.HashedParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.HashedParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.HashedParams.toObject = function(includeInstance, msg) { + var f, obj = { + blockMaxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), + blockMaxGas: 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.tendermint.types.HashedParams} + */ +proto.tendermint.types.HashedParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.HashedParams; + return proto.tendermint.types.HashedParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.HashedParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.HashedParams} + */ +proto.tendermint.types.HashedParams.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.setBlockMaxBytes(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBlockMaxGas(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.HashedParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.HashedParams.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.HashedParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.HashedParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockMaxBytes(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getBlockMaxGas(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 block_max_bytes = 1; + * @return {number} + */ +proto.tendermint.types.HashedParams.prototype.getBlockMaxBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.HashedParams} returns this + */ +proto.tendermint.types.HashedParams.prototype.setBlockMaxBytes = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 block_max_gas = 2; + * @return {number} + */ +proto.tendermint.types.HashedParams.prototype.getBlockMaxGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.HashedParams} returns this + */ +proto.tendermint.types.HashedParams.prototype.setBlockMaxGas = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.tendermint.types); diff --git a/dist/src/types/proto-types/tendermint/types/types_pb.js b/dist/src/types/proto-types/tendermint/types/types_pb.js new file mode 100644 index 00000000..24dbc0b4 --- /dev/null +++ b/dist/src/types/proto-types/tendermint/types/types_pb.js @@ -0,0 +1,4227 @@ +// source: tendermint/types/types.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var tendermint_crypto_proof_pb = require('../../tendermint/crypto/proof_pb.js'); +goog.object.extend(proto, tendermint_crypto_proof_pb); +var tendermint_version_types_pb = require('../../tendermint/version/types_pb.js'); +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.Header', null, global); +goog.exportSymbol('proto.tendermint.types.LightBlock', null, global); +goog.exportSymbol('proto.tendermint.types.Part', null, global); +goog.exportSymbol('proto.tendermint.types.PartSetHeader', null, global); +goog.exportSymbol('proto.tendermint.types.Proposal', null, global); +goog.exportSymbol('proto.tendermint.types.SignedHeader', null, global); +goog.exportSymbol('proto.tendermint.types.SignedMsgType', null, global); +goog.exportSymbol('proto.tendermint.types.TxProof', null, global); +goog.exportSymbol('proto.tendermint.types.Vote', 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.tendermint.types.PartSetHeader = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.PartSetHeader, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.PartSetHeader.displayName = 'proto.tendermint.types.PartSetHeader'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Part = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Part, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Part.displayName = 'proto.tendermint.types.Part'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.BlockID = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.BlockID, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.BlockID.displayName = 'proto.tendermint.types.BlockID'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Header = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Header, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Header.displayName = 'proto.tendermint.types.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.tendermint.types.Data = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.Data.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.Data, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Data.displayName = 'proto.tendermint.types.Data'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Vote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Vote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Vote.displayName = 'proto.tendermint.types.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.tendermint.types.Commit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.Commit.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.Commit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Commit.displayName = 'proto.tendermint.types.Commit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.CommitSig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.CommitSig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + 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.Proposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Proposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Proposal.displayName = 'proto.tendermint.types.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.tendermint.types.SignedHeader = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.SignedHeader, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.SignedHeader.displayName = 'proto.tendermint.types.SignedHeader'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.LightBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.LightBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.LightBlock.displayName = 'proto.tendermint.types.LightBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.BlockMeta = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.BlockMeta, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.BlockMeta.displayName = 'proto.tendermint.types.BlockMeta'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.TxProof = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.TxProof, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.TxProof.displayName = 'proto.tendermint.types.TxProof'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.PartSetHeader.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.PartSetHeader.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.PartSetHeader} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.PartSetHeader.toObject = function(includeInstance, msg) { + var f, obj = { + total: jspb.Message.getFieldWithDefault(msg, 1, 0), + hash: msg.getHash_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.PartSetHeader} + */ +proto.tendermint.types.PartSetHeader.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.PartSetHeader; + return proto.tendermint.types.PartSetHeader.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.PartSetHeader} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.PartSetHeader} + */ +proto.tendermint.types.PartSetHeader.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.setTotal(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.PartSetHeader.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.PartSetHeader.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.PartSetHeader} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.PartSetHeader.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotal(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional uint32 total = 1; + * @return {number} + */ +proto.tendermint.types.PartSetHeader.prototype.getTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.PartSetHeader} returns this + */ +proto.tendermint.types.PartSetHeader.prototype.setTotal = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.PartSetHeader.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes hash = 2; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.tendermint.types.PartSetHeader.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 2; + * 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.types.PartSetHeader.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.PartSetHeader} returns this + */ +proto.tendermint.types.PartSetHeader.prototype.setHash = 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.tendermint.types.Part.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Part.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Part} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Part.toObject = function(includeInstance, msg) { + var f, obj = { + index: jspb.Message.getFieldWithDefault(msg, 1, 0), + bytes: msg.getBytes_asB64(), + proof: (f = msg.getProof()) && tendermint_crypto_proof_pb.Proof.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.types.Part} + */ +proto.tendermint.types.Part.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Part; + return proto.tendermint.types.Part.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Part} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Part} + */ +proto.tendermint.types.Part.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.setBytes(value); + break; + case 3: + var value = new tendermint_crypto_proof_pb.Proof; + reader.readMessage(value,tendermint_crypto_proof_pb.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Part.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Part.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.Part} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Part.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIndex(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 3, + f, + tendermint_crypto_proof_pb.Proof.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint32 index = 1; + * @return {number} + */ +proto.tendermint.types.Part.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Part} returns this + */ +proto.tendermint.types.Part.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes bytes = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Part.prototype.getBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes bytes = 2; + * This is a type-conversion wrapper around `getBytes()` + * @return {string} + */ +proto.tendermint.types.Part.prototype.getBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBytes())); +}; + + +/** + * optional bytes bytes = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBytes()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Part.prototype.getBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Part} returns this + */ +proto.tendermint.types.Part.prototype.setBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional tendermint.crypto.Proof proof = 3; + * @return {?proto.tendermint.crypto.Proof} + */ +proto.tendermint.types.Part.prototype.getProof = function() { + return /** @type{?proto.tendermint.crypto.Proof} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_proof_pb.Proof, 3)); +}; + + +/** + * @param {?proto.tendermint.crypto.Proof|undefined} value + * @return {!proto.tendermint.types.Part} returns this +*/ +proto.tendermint.types.Part.prototype.setProof = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Part} returns this + */ +proto.tendermint.types.Part.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Part.prototype.hasProof = 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.tendermint.types.BlockID.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.BlockID.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.BlockID} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockID.toObject = function(includeInstance, msg) { + var f, obj = { + hash: msg.getHash_asB64(), + partSetHeader: (f = msg.getPartSetHeader()) && proto.tendermint.types.PartSetHeader.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.types.BlockID} + */ +proto.tendermint.types.BlockID.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.BlockID; + return proto.tendermint.types.BlockID.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.BlockID} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.BlockID} + */ +proto.tendermint.types.BlockID.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.setHash(value); + break; + case 2: + var value = new proto.tendermint.types.PartSetHeader; + reader.readMessage(value,proto.tendermint.types.PartSetHeader.deserializeBinaryFromReader); + msg.setPartSetHeader(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.BlockID.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.BlockID.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.BlockID} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockID.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPartSetHeader(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.types.PartSetHeader.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.BlockID.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.types.BlockID.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.types.BlockID.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.BlockID} returns this + */ +proto.tendermint.types.BlockID.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional PartSetHeader part_set_header = 2; + * @return {?proto.tendermint.types.PartSetHeader} + */ +proto.tendermint.types.BlockID.prototype.getPartSetHeader = function() { + return /** @type{?proto.tendermint.types.PartSetHeader} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.PartSetHeader, 2)); +}; + + +/** + * @param {?proto.tendermint.types.PartSetHeader|undefined} value + * @return {!proto.tendermint.types.BlockID} returns this +*/ +proto.tendermint.types.BlockID.prototype.setPartSetHeader = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.BlockID} returns this + */ +proto.tendermint.types.BlockID.prototype.clearPartSetHeader = function() { + return this.setPartSetHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.BlockID.prototype.hasPartSetHeader = 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.tendermint.types.Header.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.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.tendermint.types.Header} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Header.toObject = function(includeInstance, msg) { + var f, obj = { + version: (f = msg.getVersion()) && tendermint_version_types_pb.Consensus.toObject(includeInstance, f), + chainId: jspb.Message.getFieldWithDefault(msg, 2, ""), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + lastBlockId: (f = msg.getLastBlockId()) && proto.tendermint.types.BlockID.toObject(includeInstance, f), + lastCommitHash: msg.getLastCommitHash_asB64(), + dataHash: msg.getDataHash_asB64(), + validatorsHash: msg.getValidatorsHash_asB64(), + nextValidatorsHash: msg.getNextValidatorsHash_asB64(), + consensusHash: msg.getConsensusHash_asB64(), + appHash: msg.getAppHash_asB64(), + lastResultsHash: msg.getLastResultsHash_asB64(), + evidenceHash: msg.getEvidenceHash_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.types.Header} + */ +proto.tendermint.types.Header.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Header; + return proto.tendermint.types.Header.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Header} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Header} + */ +proto.tendermint.types.Header.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_version_types_pb.Consensus; + reader.readMessage(value,tendermint_version_types_pb.Consensus.deserializeBinaryFromReader); + msg.setVersion(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 5: + var value = new proto.tendermint.types.BlockID; + reader.readMessage(value,proto.tendermint.types.BlockID.deserializeBinaryFromReader); + msg.setLastBlockId(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastCommitHash(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDataHash(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValidatorsHash(value); + break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNextValidatorsHash(value); + break; + case 10: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setConsensusHash(value); + break; + case 11: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAppHash(value); + break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastResultsHash(value); + break; + case 13: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEvidenceHash(value); + break; + case 14: + 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.types.Header.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.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.tendermint.types.Header} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Header.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_version_types_pb.Consensus.serializeBinaryToWriter + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getLastBlockId(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.tendermint.types.BlockID.serializeBinaryToWriter + ); + } + f = message.getLastCommitHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getDataHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getValidatorsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } + f = message.getNextValidatorsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 9, + f + ); + } + f = message.getConsensusHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 10, + f + ); + } + f = message.getAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 11, + f + ); + } + f = message.getLastResultsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 12, + f + ); + } + f = message.getEvidenceHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 13, + f + ); + } + f = message.getProposerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 14, + f + ); + } +}; + + +/** + * optional tendermint.version.Consensus version = 1; + * @return {?proto.tendermint.version.Consensus} + */ +proto.tendermint.types.Header.prototype.getVersion = function() { + return /** @type{?proto.tendermint.version.Consensus} */ ( + jspb.Message.getWrapperField(this, tendermint_version_types_pb.Consensus, 1)); +}; + + +/** + * @param {?proto.tendermint.version.Consensus|undefined} value + * @return {!proto.tendermint.types.Header} returns this +*/ +proto.tendermint.types.Header.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.clearVersion = function() { + return this.setVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Header.prototype.hasVersion = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string chain_id = 2; + * @return {string} + */ +proto.tendermint.types.Header.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 height = 3; + * @return {number} + */ +proto.tendermint.types.Header.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.Header.prototype.getTime = 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.tendermint.types.Header} returns this +*/ +proto.tendermint.types.Header.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Header.prototype.hasTime = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional BlockID last_block_id = 5; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.types.Header.prototype.getLastBlockId = 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.Header} returns this +*/ +proto.tendermint.types.Header.prototype.setLastBlockId = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.clearLastBlockId = function() { + return this.setLastBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Header.prototype.hasLastBlockId = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes last_commit_hash = 6; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getLastCommitHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes last_commit_hash = 6; + * This is a type-conversion wrapper around `getLastCommitHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getLastCommitHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastCommitHash())); +}; + + +/** + * optional bytes last_commit_hash = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastCommitHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getLastCommitHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastCommitHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setLastCommitHash = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional bytes data_hash = 7; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getDataHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes data_hash = 7; + * This is a type-conversion wrapper around `getDataHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getDataHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDataHash())); +}; + + +/** + * optional bytes data_hash = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDataHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getDataHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDataHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setDataHash = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional bytes validators_hash = 8; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getValidatorsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes validators_hash = 8; + * This is a type-conversion wrapper around `getValidatorsHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getValidatorsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValidatorsHash())); +}; + + +/** + * optional bytes validators_hash = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValidatorsHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getValidatorsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValidatorsHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setValidatorsHash = function(value) { + return jspb.Message.setProto3BytesField(this, 8, value); +}; + + +/** + * optional bytes next_validators_hash = 9; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getNextValidatorsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * optional bytes next_validators_hash = 9; + * This is a type-conversion wrapper around `getNextValidatorsHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getNextValidatorsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNextValidatorsHash())); +}; + + +/** + * optional bytes next_validators_hash = 9; + * 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.types.Header.prototype.getNextValidatorsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNextValidatorsHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setNextValidatorsHash = function(value) { + return jspb.Message.setProto3BytesField(this, 9, value); +}; + + +/** + * optional bytes consensus_hash = 10; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getConsensusHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * optional bytes consensus_hash = 10; + * This is a type-conversion wrapper around `getConsensusHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getConsensusHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getConsensusHash())); +}; + + +/** + * optional bytes consensus_hash = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getConsensusHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getConsensusHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getConsensusHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setConsensusHash = function(value) { + return jspb.Message.setProto3BytesField(this, 10, value); +}; + + +/** + * optional bytes app_hash = 11; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getAppHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * optional bytes app_hash = 11; + * This is a type-conversion wrapper around `getAppHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppHash())); +}; + + +/** + * optional bytes app_hash = 11; + * 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.types.Header.prototype.getAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setAppHash = function(value) { + return jspb.Message.setProto3BytesField(this, 11, value); +}; + + +/** + * optional bytes last_results_hash = 12; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getLastResultsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * optional bytes last_results_hash = 12; + * This is a type-conversion wrapper around `getLastResultsHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getLastResultsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastResultsHash())); +}; + + +/** + * optional bytes last_results_hash = 12; + * 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.tendermint.types.Header.prototype.getLastResultsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastResultsHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setLastResultsHash = function(value) { + return jspb.Message.setProto3BytesField(this, 12, value); +}; + + +/** + * optional bytes evidence_hash = 13; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getEvidenceHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * optional bytes evidence_hash = 13; + * This is a type-conversion wrapper around `getEvidenceHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getEvidenceHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEvidenceHash())); +}; + + +/** + * optional bytes evidence_hash = 13; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEvidenceHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getEvidenceHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEvidenceHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setEvidenceHash = function(value) { + return jspb.Message.setProto3BytesField(this, 13, value); +}; + + +/** + * optional bytes proposer_address = 14; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getProposerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** + * optional bytes proposer_address = 14; + * This is a type-conversion wrapper around `getProposerAddress()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getProposerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProposerAddress())); +}; + + +/** + * optional bytes proposer_address = 14; + * 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.types.Header.prototype.getProposerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProposerAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setProposerAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 14, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.Data.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.tendermint.types.Data.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Data.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Data} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Data.toObject = function(includeInstance, msg) { + var f, obj = { + txsList: msg.getTxsList_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.Data} + */ +proto.tendermint.types.Data.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Data; + return proto.tendermint.types.Data.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Data} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Data} + */ +proto.tendermint.types.Data.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Data.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Data.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.Data} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Data.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes txs = 1; + * @return {!(Array|Array)} + */ +proto.tendermint.types.Data.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.types.Data.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.types.Data.prototype.getTxsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getTxsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.tendermint.types.Data} returns this + */ +proto.tendermint.types.Data.prototype.setTxsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.tendermint.types.Data} returns this + */ +proto.tendermint.types.Data.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.types.Data} returns this + */ +proto.tendermint.types.Data.prototype.clearTxsList = function() { + return this.setTxsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.Vote.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.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.tendermint.types.Vote} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Vote.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), + blockId: (f = msg.getBlockId()) && proto.tendermint.types.BlockID.toObject(includeInstance, f), + 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() + }; + + 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.Vote} + */ +proto.tendermint.types.Vote.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Vote; + return proto.tendermint.types.Vote.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Vote} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Vote} + */ +proto.tendermint.types.Vote.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 = new proto.tendermint.types.BlockID; + reader.readMessage(value,proto.tendermint.types.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValidatorAddress(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt32()); + msg.setValidatorIndex(value); + break; + case 8: + 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.Vote.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.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.tendermint.types.Vote} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Vote.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.getBlockId(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.types.BlockID.serializeBinaryToWriter + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getValidatorAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getValidatorIndex(); + if (f !== 0) { + writer.writeInt32( + 7, + f + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } +}; + + +/** + * optional SignedMsgType type = 1; + * @return {!proto.tendermint.types.SignedMsgType} + */ +proto.tendermint.types.Vote.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.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional int64 height = 2; + * @return {number} + */ +proto.tendermint.types.Vote.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 round = 3; + * @return {number} + */ +proto.tendermint.types.Vote.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional BlockID block_id = 4; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.types.Vote.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.BlockID, 4)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.tendermint.types.Vote} returns this +*/ +proto.tendermint.types.Vote.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Vote.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.Vote.prototype.getTimestamp = 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.tendermint.types.Vote} returns this +*/ +proto.tendermint.types.Vote.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Vote.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes validator_address = 6; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Vote.prototype.getValidatorAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes validator_address = 6; + * This is a type-conversion wrapper around `getValidatorAddress()` + * @return {string} + */ +proto.tendermint.types.Vote.prototype.getValidatorAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValidatorAddress())); +}; + + +/** + * optional bytes validator_address = 6; + * 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.Vote.prototype.getValidatorAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValidatorAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional int32 validator_index = 7; + * @return {number} + */ +proto.tendermint.types.Vote.prototype.getValidatorIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setValidatorIndex = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional bytes signature = 8; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Vote.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes signature = 8; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.tendermint.types.Vote.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 8; + * 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.Vote.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 8, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.Commit.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.tendermint.types.Commit.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Commit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Commit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Commit.toObject = function(includeInstance, msg) { + var f, obj = { + 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), + signaturesList: jspb.Message.toObjectList(msg.getSignaturesList(), + proto.tendermint.types.CommitSig.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.tendermint.types.Commit} + */ +proto.tendermint.types.Commit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Commit; + return proto.tendermint.types.Commit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Commit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Commit} + */ +proto.tendermint.types.Commit.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 = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 3: + var value = new proto.tendermint.types.BlockID; + reader.readMessage(value,proto.tendermint.types.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 4: + var value = new proto.tendermint.types.CommitSig; + reader.readMessage(value,proto.tendermint.types.CommitSig.deserializeBinaryFromReader); + msg.addSignatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Commit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Commit.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.Commit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Commit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.types.BlockID.serializeBinaryToWriter + ); + } + f = message.getSignaturesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.tendermint.types.CommitSig.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.types.Commit.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Commit} returns this + */ +proto.tendermint.types.Commit.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 round = 2; + * @return {number} + */ +proto.tendermint.types.Commit.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Commit} returns this + */ +proto.tendermint.types.Commit.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional BlockID block_id = 3; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.types.Commit.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.BlockID, 3)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.tendermint.types.Commit} returns this +*/ +proto.tendermint.types.Commit.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Commit} returns this + */ +proto.tendermint.types.Commit.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Commit.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated CommitSig signatures = 4; + * @return {!Array} + */ +proto.tendermint.types.Commit.prototype.getSignaturesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.types.CommitSig, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.types.Commit} returns this +*/ +proto.tendermint.types.Commit.prototype.setSignaturesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.tendermint.types.CommitSig=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.types.CommitSig} + */ +proto.tendermint.types.Commit.prototype.addSignatures = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.tendermint.types.CommitSig, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.types.Commit} returns this + */ +proto.tendermint.types.Commit.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.tendermint.types.CommitSig.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.CommitSig.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.CommitSig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.CommitSig.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() + }; + + 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.CommitSig} + */ +proto.tendermint.types.CommitSig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.CommitSig; + return proto.tendermint.types.CommitSig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.CommitSig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.CommitSig} + */ +proto.tendermint.types.CommitSig.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.CommitSig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.CommitSig.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.CommitSig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.CommitSig.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 + ); + } +}; + + +/** + * optional BlockIDFlag block_id_flag = 1; + * @return {!proto.tendermint.types.BlockIDFlag} + */ +proto.tendermint.types.CommitSig.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.CommitSig} returns this + */ +proto.tendermint.types.CommitSig.prototype.setBlockIdFlag = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional bytes validator_address = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.CommitSig.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.CommitSig.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.CommitSig.prototype.getValidatorAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValidatorAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.CommitSig} returns this + */ +proto.tendermint.types.CommitSig.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.CommitSig.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.CommitSig} returns this +*/ +proto.tendermint.types.CommitSig.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.CommitSig} returns this + */ +proto.tendermint.types.CommitSig.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.CommitSig.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes signature = 4; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.CommitSig.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.CommitSig.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.CommitSig.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.CommitSig} returns this + */ +proto.tendermint.types.CommitSig.prototype.setSignature = 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.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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Proposal.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.Proposal.prototype.getTimestamp = 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.types.Proposal} returns this +*/ +proto.tendermint.types.Proposal.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Proposal.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes signature = 7; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Proposal.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.tendermint.types.Proposal.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.tendermint.types.Proposal.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.setSignature = 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.tendermint.types.SignedHeader.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.SignedHeader.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.SignedHeader} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.SignedHeader.toObject = function(includeInstance, msg) { + var f, obj = { + header: (f = msg.getHeader()) && proto.tendermint.types.Header.toObject(includeInstance, f), + commit: (f = msg.getCommit()) && proto.tendermint.types.Commit.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.types.SignedHeader} + */ +proto.tendermint.types.SignedHeader.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.SignedHeader; + return proto.tendermint.types.SignedHeader.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.SignedHeader} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.SignedHeader} + */ +proto.tendermint.types.SignedHeader.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.Header; + reader.readMessage(value,proto.tendermint.types.Header.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 2: + var value = new proto.tendermint.types.Commit; + reader.readMessage(value,proto.tendermint.types.Commit.deserializeBinaryFromReader); + msg.setCommit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.SignedHeader.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.SignedHeader.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.SignedHeader} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.SignedHeader.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.types.Header.serializeBinaryToWriter + ); + } + f = message.getCommit(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.types.Commit.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Header header = 1; + * @return {?proto.tendermint.types.Header} + */ +proto.tendermint.types.SignedHeader.prototype.getHeader = function() { + return /** @type{?proto.tendermint.types.Header} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.Header, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Header|undefined} value + * @return {!proto.tendermint.types.SignedHeader} returns this +*/ +proto.tendermint.types.SignedHeader.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.SignedHeader} returns this + */ +proto.tendermint.types.SignedHeader.prototype.clearHeader = function() { + return this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.SignedHeader.prototype.hasHeader = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Commit commit = 2; + * @return {?proto.tendermint.types.Commit} + */ +proto.tendermint.types.SignedHeader.prototype.getCommit = function() { + return /** @type{?proto.tendermint.types.Commit} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.Commit, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Commit|undefined} value + * @return {!proto.tendermint.types.SignedHeader} returns this +*/ +proto.tendermint.types.SignedHeader.prototype.setCommit = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.SignedHeader} returns this + */ +proto.tendermint.types.SignedHeader.prototype.clearCommit = function() { + return this.setCommit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.SignedHeader.prototype.hasCommit = 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.tendermint.types.LightBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.LightBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.LightBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.LightBlock.toObject = function(includeInstance, msg) { + var f, obj = { + signedHeader: (f = msg.getSignedHeader()) && proto.tendermint.types.SignedHeader.toObject(includeInstance, f), + validatorSet: (f = msg.getValidatorSet()) && tendermint_types_validator_pb.ValidatorSet.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.types.LightBlock} + */ +proto.tendermint.types.LightBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.LightBlock; + return proto.tendermint.types.LightBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.LightBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.LightBlock} + */ +proto.tendermint.types.LightBlock.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.SignedHeader; + reader.readMessage(value,proto.tendermint.types.SignedHeader.deserializeBinaryFromReader); + msg.setSignedHeader(value); + break; + case 2: + var value = new tendermint_types_validator_pb.ValidatorSet; + reader.readMessage(value,tendermint_types_validator_pb.ValidatorSet.deserializeBinaryFromReader); + msg.setValidatorSet(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.LightBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.LightBlock.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.LightBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.LightBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignedHeader(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.types.SignedHeader.serializeBinaryToWriter + ); + } + f = message.getValidatorSet(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_validator_pb.ValidatorSet.serializeBinaryToWriter + ); + } +}; + + +/** + * optional SignedHeader signed_header = 1; + * @return {?proto.tendermint.types.SignedHeader} + */ +proto.tendermint.types.LightBlock.prototype.getSignedHeader = function() { + return /** @type{?proto.tendermint.types.SignedHeader} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.SignedHeader, 1)); +}; + + +/** + * @param {?proto.tendermint.types.SignedHeader|undefined} value + * @return {!proto.tendermint.types.LightBlock} returns this +*/ +proto.tendermint.types.LightBlock.prototype.setSignedHeader = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.LightBlock} returns this + */ +proto.tendermint.types.LightBlock.prototype.clearSignedHeader = function() { + return this.setSignedHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.LightBlock.prototype.hasSignedHeader = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ValidatorSet validator_set = 2; + * @return {?proto.tendermint.types.ValidatorSet} + */ +proto.tendermint.types.LightBlock.prototype.getValidatorSet = function() { + return /** @type{?proto.tendermint.types.ValidatorSet} */ ( + jspb.Message.getWrapperField(this, tendermint_types_validator_pb.ValidatorSet, 2)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorSet|undefined} value + * @return {!proto.tendermint.types.LightBlock} returns this +*/ +proto.tendermint.types.LightBlock.prototype.setValidatorSet = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.LightBlock} returns this + */ +proto.tendermint.types.LightBlock.prototype.clearValidatorSet = function() { + return this.setValidatorSet(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.LightBlock.prototype.hasValidatorSet = 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.tendermint.types.BlockMeta.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.BlockMeta.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.BlockMeta} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockMeta.toObject = function(includeInstance, msg) { + var f, obj = { + blockId: (f = msg.getBlockId()) && proto.tendermint.types.BlockID.toObject(includeInstance, f), + blockSize: jspb.Message.getFieldWithDefault(msg, 2, 0), + header: (f = msg.getHeader()) && proto.tendermint.types.Header.toObject(includeInstance, f), + numTxs: 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.tendermint.types.BlockMeta} + */ +proto.tendermint.types.BlockMeta.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.BlockMeta; + return proto.tendermint.types.BlockMeta.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.BlockMeta} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.BlockMeta} + */ +proto.tendermint.types.BlockMeta.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.BlockID; + reader.readMessage(value,proto.tendermint.types.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBlockSize(value); + break; + case 3: + var value = new proto.tendermint.types.Header; + reader.readMessage(value,proto.tendermint.types.Header.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNumTxs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.BlockMeta.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.BlockMeta.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.BlockMeta} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockMeta.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.types.BlockID.serializeBinaryToWriter + ); + } + f = message.getBlockSize(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.types.Header.serializeBinaryToWriter + ); + } + f = message.getNumTxs(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional BlockID block_id = 1; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.types.BlockMeta.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.BlockID, 1)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.tendermint.types.BlockMeta} returns this +*/ +proto.tendermint.types.BlockMeta.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.BlockMeta} returns this + */ +proto.tendermint.types.BlockMeta.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.BlockMeta.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 block_size = 2; + * @return {number} + */ +proto.tendermint.types.BlockMeta.prototype.getBlockSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.BlockMeta} returns this + */ +proto.tendermint.types.BlockMeta.prototype.setBlockSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional Header header = 3; + * @return {?proto.tendermint.types.Header} + */ +proto.tendermint.types.BlockMeta.prototype.getHeader = function() { + return /** @type{?proto.tendermint.types.Header} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.Header, 3)); +}; + + +/** + * @param {?proto.tendermint.types.Header|undefined} value + * @return {!proto.tendermint.types.BlockMeta} returns this +*/ +proto.tendermint.types.BlockMeta.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.BlockMeta} returns this + */ +proto.tendermint.types.BlockMeta.prototype.clearHeader = function() { + return this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.BlockMeta.prototype.hasHeader = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional int64 num_txs = 4; + * @return {number} + */ +proto.tendermint.types.BlockMeta.prototype.getNumTxs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.BlockMeta} returns this + */ +proto.tendermint.types.BlockMeta.prototype.setNumTxs = 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.tendermint.types.TxProof.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.TxProof.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.TxProof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.TxProof.toObject = function(includeInstance, msg) { + var f, obj = { + rootHash: msg.getRootHash_asB64(), + data: msg.getData_asB64(), + proof: (f = msg.getProof()) && tendermint_crypto_proof_pb.Proof.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.types.TxProof} + */ +proto.tendermint.types.TxProof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.TxProof; + return proto.tendermint.types.TxProof.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.TxProof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.TxProof} + */ +proto.tendermint.types.TxProof.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.setRootHash(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = new tendermint_crypto_proof_pb.Proof; + reader.readMessage(value,tendermint_crypto_proof_pb.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.TxProof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.TxProof.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.TxProof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.TxProof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRootHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 3, + f, + tendermint_crypto_proof_pb.Proof.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes root_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.TxProof.prototype.getRootHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes root_hash = 1; + * This is a type-conversion wrapper around `getRootHash()` + * @return {string} + */ +proto.tendermint.types.TxProof.prototype.getRootHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRootHash())); +}; + + +/** + * optional bytes root_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRootHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.TxProof.prototype.getRootHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRootHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.TxProof} returns this + */ +proto.tendermint.types.TxProof.prototype.setRootHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.TxProof.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.types.TxProof.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.types.TxProof.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.TxProof} returns this + */ +proto.tendermint.types.TxProof.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional tendermint.crypto.Proof proof = 3; + * @return {?proto.tendermint.crypto.Proof} + */ +proto.tendermint.types.TxProof.prototype.getProof = function() { + return /** @type{?proto.tendermint.crypto.Proof} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_proof_pb.Proof, 3)); +}; + + +/** + * @param {?proto.tendermint.crypto.Proof|undefined} value + * @return {!proto.tendermint.types.TxProof} returns this +*/ +proto.tendermint.types.TxProof.prototype.setProof = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.TxProof} returns this + */ +proto.tendermint.types.TxProof.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.TxProof.prototype.hasProof = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * @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} + */ +proto.tendermint.types.SignedMsgType = { + SIGNED_MSG_TYPE_UNKNOWN: 0, + SIGNED_MSG_TYPE_PREVOTE: 1, + SIGNED_MSG_TYPE_PRECOMMIT: 2, + SIGNED_MSG_TYPE_PROPOSAL: 32 +}; + +goog.object.extend(exports, proto.tendermint.types); diff --git a/dist/src/types/proto-types/tendermint/types/validator_pb.js b/dist/src/types/proto-types/tendermint/types/validator_pb.js new file mode 100644 index 00000000..1ea065d3 --- /dev/null +++ b/dist/src/types/proto-types/tendermint/types/validator_pb.js @@ -0,0 +1,772 @@ +// source: tendermint/types/validator.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 tendermint_crypto_keys_pb = require('../../tendermint/crypto/keys_pb.js'); +goog.object.extend(proto, tendermint_crypto_keys_pb); +goog.exportSymbol('proto.tendermint.types.SimpleValidator', null, global); +goog.exportSymbol('proto.tendermint.types.Validator', null, global); +goog.exportSymbol('proto.tendermint.types.ValidatorSet', 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.tendermint.types.ValidatorSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.ValidatorSet.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.ValidatorSet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.ValidatorSet.displayName = 'proto.tendermint.types.ValidatorSet'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Validator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Validator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Validator.displayName = 'proto.tendermint.types.Validator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.SimpleValidator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.SimpleValidator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.SimpleValidator.displayName = 'proto.tendermint.types.SimpleValidator'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.ValidatorSet.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.tendermint.types.ValidatorSet.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.ValidatorSet.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorSet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ValidatorSet.toObject = function(includeInstance, msg) { + var f, obj = { + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + proto.tendermint.types.Validator.toObject, includeInstance), + proposer: (f = msg.getProposer()) && proto.tendermint.types.Validator.toObject(includeInstance, f), + totalVotingPower: 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.tendermint.types.ValidatorSet} + */ +proto.tendermint.types.ValidatorSet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.ValidatorSet; + return proto.tendermint.types.ValidatorSet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.ValidatorSet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.ValidatorSet} + */ +proto.tendermint.types.ValidatorSet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.Validator; + reader.readMessage(value,proto.tendermint.types.Validator.deserializeBinaryFromReader); + msg.addValidators(value); + break; + case 2: + var value = new proto.tendermint.types.Validator; + reader.readMessage(value,proto.tendermint.types.Validator.deserializeBinaryFromReader); + msg.setProposer(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalVotingPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.ValidatorSet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.ValidatorSet.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.ValidatorSet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ValidatorSet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.tendermint.types.Validator.serializeBinaryToWriter + ); + } + f = message.getProposer(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.types.Validator.serializeBinaryToWriter + ); + } + f = message.getTotalVotingPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * repeated Validator validators = 1; + * @return {!Array} + */ +proto.tendermint.types.ValidatorSet.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.types.Validator, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.types.ValidatorSet} returns this +*/ +proto.tendermint.types.ValidatorSet.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.types.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.types.Validator} + */ +proto.tendermint.types.ValidatorSet.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.types.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.types.ValidatorSet} returns this + */ +proto.tendermint.types.ValidatorSet.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional Validator proposer = 2; + * @return {?proto.tendermint.types.Validator} + */ +proto.tendermint.types.ValidatorSet.prototype.getProposer = function() { + return /** @type{?proto.tendermint.types.Validator} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.Validator, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Validator|undefined} value + * @return {!proto.tendermint.types.ValidatorSet} returns this +*/ +proto.tendermint.types.ValidatorSet.prototype.setProposer = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ValidatorSet} returns this + */ +proto.tendermint.types.ValidatorSet.prototype.clearProposer = function() { + return this.setProposer(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ValidatorSet.prototype.hasProposer = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 total_voting_power = 3; + * @return {number} + */ +proto.tendermint.types.ValidatorSet.prototype.getTotalVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.ValidatorSet} returns this + */ +proto.tendermint.types.ValidatorSet.prototype.setTotalVotingPower = 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.tendermint.types.Validator.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Validator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Validator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Validator.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + pubKey: (f = msg.getPubKey()) && tendermint_crypto_keys_pb.PublicKey.toObject(includeInstance, f), + votingPower: jspb.Message.getFieldWithDefault(msg, 3, 0), + proposerPriority: 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.tendermint.types.Validator} + */ +proto.tendermint.types.Validator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Validator; + return proto.tendermint.types.Validator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Validator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Validator} + */ +proto.tendermint.types.Validator.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.setAddress(value); + break; + case 2: + var value = new tendermint_crypto_keys_pb.PublicKey; + reader.readMessage(value,tendermint_crypto_keys_pb.PublicKey.deserializeBinaryFromReader); + msg.setPubKey(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setVotingPower(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setProposerPriority(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Validator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Validator.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.Validator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Validator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPubKey(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_crypto_keys_pb.PublicKey.serializeBinaryToWriter + ); + } + f = message.getVotingPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getProposerPriority(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional bytes address = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Validator.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.tendermint.types.Validator.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Validator.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Validator} returns this + */ +proto.tendermint.types.Validator.prototype.setAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional tendermint.crypto.PublicKey pub_key = 2; + * @return {?proto.tendermint.crypto.PublicKey} + */ +proto.tendermint.types.Validator.prototype.getPubKey = function() { + return /** @type{?proto.tendermint.crypto.PublicKey} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_keys_pb.PublicKey, 2)); +}; + + +/** + * @param {?proto.tendermint.crypto.PublicKey|undefined} value + * @return {!proto.tendermint.types.Validator} returns this +*/ +proto.tendermint.types.Validator.prototype.setPubKey = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Validator} returns this + */ +proto.tendermint.types.Validator.prototype.clearPubKey = function() { + return this.setPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Validator.prototype.hasPubKey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 voting_power = 3; + * @return {number} + */ +proto.tendermint.types.Validator.prototype.getVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Validator} returns this + */ +proto.tendermint.types.Validator.prototype.setVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 proposer_priority = 4; + * @return {number} + */ +proto.tendermint.types.Validator.prototype.getProposerPriority = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Validator} returns this + */ +proto.tendermint.types.Validator.prototype.setProposerPriority = 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.tendermint.types.SimpleValidator.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.SimpleValidator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.SimpleValidator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.SimpleValidator.toObject = function(includeInstance, msg) { + var f, obj = { + pubKey: (f = msg.getPubKey()) && tendermint_crypto_keys_pb.PublicKey.toObject(includeInstance, f), + 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.tendermint.types.SimpleValidator} + */ +proto.tendermint.types.SimpleValidator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.SimpleValidator; + return proto.tendermint.types.SimpleValidator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.SimpleValidator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.SimpleValidator} + */ +proto.tendermint.types.SimpleValidator.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_crypto_keys_pb.PublicKey; + reader.readMessage(value,tendermint_crypto_keys_pb.PublicKey.deserializeBinaryFromReader); + msg.setPubKey(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.tendermint.types.SimpleValidator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.SimpleValidator.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.SimpleValidator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.SimpleValidator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_crypto_keys_pb.PublicKey.serializeBinaryToWriter + ); + } + f = message.getVotingPower(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional tendermint.crypto.PublicKey pub_key = 1; + * @return {?proto.tendermint.crypto.PublicKey} + */ +proto.tendermint.types.SimpleValidator.prototype.getPubKey = function() { + return /** @type{?proto.tendermint.crypto.PublicKey} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_keys_pb.PublicKey, 1)); +}; + + +/** + * @param {?proto.tendermint.crypto.PublicKey|undefined} value + * @return {!proto.tendermint.types.SimpleValidator} returns this +*/ +proto.tendermint.types.SimpleValidator.prototype.setPubKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.SimpleValidator} returns this + */ +proto.tendermint.types.SimpleValidator.prototype.clearPubKey = function() { + return this.setPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.SimpleValidator.prototype.hasPubKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 voting_power = 2; + * @return {number} + */ +proto.tendermint.types.SimpleValidator.prototype.getVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.SimpleValidator} returns this + */ +proto.tendermint.types.SimpleValidator.prototype.setVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.tendermint.types); diff --git a/dist/src/types/proto-types/tendermint/version/types_pb.js b/dist/src/types/proto-types/tendermint/version/types_pb.js new file mode 100644 index 00000000..9fad1a49 --- /dev/null +++ b/dist/src/types/proto-types/tendermint/version/types_pb.js @@ -0,0 +1,381 @@ +// source: tendermint/version/types.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.tendermint.version.App', null, global); +goog.exportSymbol('proto.tendermint.version.Consensus', 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.tendermint.version.App = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.version.App, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.version.App.displayName = 'proto.tendermint.version.App'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.version.Consensus = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.version.Consensus, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.version.Consensus.displayName = 'proto.tendermint.version.Consensus'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.version.App.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.version.App.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.version.App} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.version.App.toObject = function(includeInstance, msg) { + var f, obj = { + protocol: jspb.Message.getFieldWithDefault(msg, 1, 0), + software: 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.tendermint.version.App} + */ +proto.tendermint.version.App.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.version.App; + return proto.tendermint.version.App.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.version.App} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.version.App} + */ +proto.tendermint.version.App.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.setProtocol(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSoftware(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.version.App.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.version.App.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.version.App} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.version.App.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProtocol(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSoftware(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint64 protocol = 1; + * @return {number} + */ +proto.tendermint.version.App.prototype.getProtocol = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.version.App} returns this + */ +proto.tendermint.version.App.prototype.setProtocol = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string software = 2; + * @return {string} + */ +proto.tendermint.version.App.prototype.getSoftware = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.version.App} returns this + */ +proto.tendermint.version.App.prototype.setSoftware = 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.tendermint.version.Consensus.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.version.Consensus.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.version.Consensus} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.version.Consensus.toObject = function(includeInstance, msg) { + var f, obj = { + block: jspb.Message.getFieldWithDefault(msg, 1, 0), + app: 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.tendermint.version.Consensus} + */ +proto.tendermint.version.Consensus.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.version.Consensus; + return proto.tendermint.version.Consensus.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.version.Consensus} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.version.Consensus} + */ +proto.tendermint.version.Consensus.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.setBlock(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setApp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.version.Consensus.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.version.Consensus.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.version.Consensus} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.version.Consensus.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlock(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getApp(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 block = 1; + * @return {number} + */ +proto.tendermint.version.Consensus.prototype.getBlock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.version.Consensus} returns this + */ +proto.tendermint.version.Consensus.prototype.setBlock = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 app = 2; + * @return {number} + */ +proto.tendermint.version.Consensus.prototype.getApp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.version.Consensus} returns this + */ +proto.tendermint.version.Consensus.prototype.setApp = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.tendermint.version); diff --git a/dist/src/types/proto.d.ts b/dist/src/types/proto.d.ts new file mode 100644 index 00000000..276c07b8 --- /dev/null +++ b/dist/src/types/proto.d.ts @@ -0,0 +1,47 @@ +/***************TX*****************/ +export declare const bank_tx_pb: any; +export declare const crisis_tx_pb: any; +export declare const distribution_tx_pb: any; +export declare const evidence_tx_pb: any; +export declare const gov_tx_pb: any; +export declare const slashing_tx_pb: any; +export declare const staking_tx_pb: any; +export declare const tx_tx_pb: any; +export declare const vesting_tx_pb: any; +export declare const coinswap_tx_pb: any; +export declare const htlc_tx_pb: any; +export declare const nft_tx_pb: any; +export declare const oracle_tx_pb: any; +export declare const random_tx_pb: any; +export declare const record_tx_pb: any; +export declare const service_tx_pb: any; +export declare const token_tx_pb: any; +/***************QUERY***************/ +export declare const base_query_pagination_pb: any; +export declare const auth_query_pb: any; +export declare const bank_query_pb: any; +export declare const distribution_query_pb: any; +export declare const evidence_query_pb: any; +export declare const gov_query_pb: any; +export declare const mint_query_pb: any; +export declare const params_query_pb: any; +export declare const slashing_query_pb: any; +export declare const staking_query_pb: any; +export declare const upgrade_query_pb: any; +export declare const coinswap_query_pb: any; +export declare const htlc_query_pb: any; +export declare const nft_query_pb: any; +export declare const oracle_query_pb: any; +export declare const random_query_pb: any; +export declare const record_query_pb: any; +export declare const service_query_pb: any; +export declare const token_query_pb: any; +/***************MODULES***************/ +export declare const auth_auth_pb: any; +export declare const crypto_secp256k1_keys_pb: any; +export declare const crypto_ed25519_keys_pb: any; +export declare const crypto_sm2_keys_pb: any; +export declare const base_coin_pb: any; +export declare const signing_signing_pb: any; +export declare const token_token_pb: any; +export declare const any_pb: any; diff --git a/dist/src/types/proto.js b/dist/src/types/proto.js new file mode 100644 index 00000000..9b1eea34 --- /dev/null +++ b/dist/src/types/proto.js @@ -0,0 +1,194 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.any_pb = exports.token_token_pb = exports.signing_signing_pb = exports.base_coin_pb = exports.crypto_sm2_keys_pb = exports.crypto_ed25519_keys_pb = exports.crypto_secp256k1_keys_pb = exports.auth_auth_pb = exports.token_query_pb = exports.service_query_pb = exports.record_query_pb = exports.random_query_pb = exports.oracle_query_pb = exports.nft_query_pb = exports.htlc_query_pb = exports.coinswap_query_pb = exports.upgrade_query_pb = exports.staking_query_pb = exports.slashing_query_pb = exports.params_query_pb = exports.mint_query_pb = exports.gov_query_pb = exports.evidence_query_pb = exports.distribution_query_pb = exports.bank_query_pb = exports.auth_query_pb = exports.base_query_pagination_pb = exports.token_tx_pb = exports.service_tx_pb = exports.record_tx_pb = exports.random_tx_pb = exports.oracle_tx_pb = exports.nft_tx_pb = exports.htlc_tx_pb = exports.coinswap_tx_pb = exports.vesting_tx_pb = exports.tx_tx_pb = exports.staking_tx_pb = exports.slashing_tx_pb = exports.gov_tx_pb = exports.evidence_tx_pb = exports.distribution_tx_pb = exports.crisis_tx_pb = exports.bank_tx_pb = void 0; + +/***************TX*****************/ +//cosmos tx +var bank_tx_pb = require('./proto-types/cosmos/bank/v1beta1/tx_pb'); + +exports.bank_tx_pb = bank_tx_pb; + +var crisis_tx_pb = require('./proto-types/cosmos/crisis/v1beta1/tx_pb'); + +exports.crisis_tx_pb = crisis_tx_pb; + +var distribution_tx_pb = require('./proto-types/cosmos/distribution/v1beta1/tx_pb'); + +exports.distribution_tx_pb = distribution_tx_pb; + +var evidence_tx_pb = require('./proto-types/cosmos/evidence/v1beta1/tx_pb'); + +exports.evidence_tx_pb = evidence_tx_pb; + +var gov_tx_pb = require('./proto-types/cosmos/gov/v1beta1/tx_pb'); + +exports.gov_tx_pb = gov_tx_pb; + +var slashing_tx_pb = require('./proto-types/cosmos/slashing/v1beta1/tx_pb'); + +exports.slashing_tx_pb = slashing_tx_pb; + +var staking_tx_pb = require('./proto-types/cosmos/staking/v1beta1/tx_pb'); + +exports.staking_tx_pb = staking_tx_pb; + +var tx_tx_pb = require('./proto-types/cosmos/tx/v1beta1/tx_pb'); + +exports.tx_tx_pb = tx_tx_pb; + +var vesting_tx_pb = require('./proto-types/cosmos/vesting/v1beta1/tx_pb'); //irismod tx + + +exports.vesting_tx_pb = vesting_tx_pb; + +var coinswap_tx_pb = require('./proto-types/irismod/coinswap/tx_pb'); + +exports.coinswap_tx_pb = coinswap_tx_pb; + +var htlc_tx_pb = require('./proto-types/irismod/htlc/tx_pb'); + +exports.htlc_tx_pb = htlc_tx_pb; + +var nft_tx_pb = require('./proto-types/irismod/nft/tx_pb'); + +exports.nft_tx_pb = nft_tx_pb; + +var oracle_tx_pb = require('./proto-types/irismod/oracle/tx_pb'); + +exports.oracle_tx_pb = oracle_tx_pb; + +var random_tx_pb = require('./proto-types/irismod/random/tx_pb'); + +exports.random_tx_pb = random_tx_pb; + +var record_tx_pb = require('./proto-types/irismod/record/tx_pb'); + +exports.record_tx_pb = record_tx_pb; + +var service_tx_pb = require('./proto-types/irismod/service/tx_pb'); + +exports.service_tx_pb = service_tx_pb; + +var token_tx_pb = require('./proto-types/irismod/token/tx_pb'); +/***************QUERY***************/ + + +exports.token_tx_pb = token_tx_pb; + +var base_query_pagination_pb = require('./proto-types/cosmos/base/query/v1beta1/pagination_pb'); //cosmos query + + +exports.base_query_pagination_pb = base_query_pagination_pb; + +var auth_query_pb = require('./proto-types/cosmos/auth/v1beta1/query_pb'); + +exports.auth_query_pb = auth_query_pb; + +var bank_query_pb = require('./proto-types/cosmos/bank/v1beta1/query_pb'); + +exports.bank_query_pb = bank_query_pb; + +var distribution_query_pb = require('./proto-types/cosmos/distribution/v1beta1/query_pb'); + +exports.distribution_query_pb = distribution_query_pb; + +var evidence_query_pb = require('./proto-types/cosmos/evidence/v1beta1/query_pb'); + +exports.evidence_query_pb = evidence_query_pb; + +var gov_query_pb = require('./proto-types/cosmos/gov/v1beta1/query_pb'); + +exports.gov_query_pb = gov_query_pb; + +var mint_query_pb = require('./proto-types/cosmos/mint/v1beta1/query_pb'); + +exports.mint_query_pb = mint_query_pb; + +var params_query_pb = require('./proto-types/cosmos/params/v1beta1/query_pb'); + +exports.params_query_pb = params_query_pb; + +var slashing_query_pb = require('./proto-types/cosmos/slashing/v1beta1/query_pb'); + +exports.slashing_query_pb = slashing_query_pb; + +var staking_query_pb = require('./proto-types/cosmos/staking/v1beta1/query_pb'); + +exports.staking_query_pb = staking_query_pb; + +var upgrade_query_pb = require('./proto-types/cosmos/upgrade/v1beta1/query_pb'); //irismod query + + +exports.upgrade_query_pb = upgrade_query_pb; + +var coinswap_query_pb = require('./proto-types/irismod/coinswap/query_pb'); + +exports.coinswap_query_pb = coinswap_query_pb; + +var htlc_query_pb = require('./proto-types/irismod/htlc/query_pb'); + +exports.htlc_query_pb = htlc_query_pb; + +var nft_query_pb = require('./proto-types/irismod/nft/query_pb'); + +exports.nft_query_pb = nft_query_pb; + +var oracle_query_pb = require('./proto-types/irismod/oracle/query_pb'); + +exports.oracle_query_pb = oracle_query_pb; + +var random_query_pb = require('./proto-types/irismod/random/query_pb'); + +exports.random_query_pb = random_query_pb; + +var record_query_pb = require('./proto-types/irismod/record/query_pb'); + +exports.record_query_pb = record_query_pb; + +var service_query_pb = require('./proto-types/irismod/service/query_pb'); + +exports.service_query_pb = service_query_pb; + +var token_query_pb = require('./proto-types/irismod/token/query_pb'); +/***************MODULES***************/ +//cosmos module + + +exports.token_query_pb = token_query_pb; + +var auth_auth_pb = require('./proto-types/cosmos/auth/v1beta1/auth_pb'); + +exports.auth_auth_pb = auth_auth_pb; + +var crypto_secp256k1_keys_pb = require('./proto-types/cosmos/crypto/secp256k1/keys_pb'); + +exports.crypto_secp256k1_keys_pb = crypto_secp256k1_keys_pb; + +var crypto_ed25519_keys_pb = require('./proto-types/cosmos/crypto/ed25519/keys_pb'); + +exports.crypto_ed25519_keys_pb = crypto_ed25519_keys_pb; + +var crypto_sm2_keys_pb = require('./proto-types/cosmos/crypto/sm2/keys_pb'); + +exports.crypto_sm2_keys_pb = crypto_sm2_keys_pb; + +var base_coin_pb = require('./proto-types/cosmos/base/v1beta1/coin_pb'); + +exports.base_coin_pb = base_coin_pb; + +var signing_signing_pb = require('./proto-types/cosmos/tx/signing/v1beta1/signing_pb'); //irimod module + + +exports.signing_signing_pb = signing_signing_pb; + +var token_token_pb = require('./proto-types/irismod/token/token_pb'); //any + + +exports.token_token_pb = token_token_pb; + +var any_pb = require('./proto-types/google/protobuf/any_pb'); + +exports.any_pb = any_pb; \ No newline at end of file diff --git a/dist/src/types/protoTx.d.ts b/dist/src/types/protoTx.d.ts new file mode 100644 index 00000000..e3ea93f2 --- /dev/null +++ b/dist/src/types/protoTx.d.ts @@ -0,0 +1,64 @@ +import * as types from '../types'; +export declare class ProtoTx { + txData: any; + body: any; + authInfo: any; + signatures: string[]; + constructor(properties?: { + msgs: types.Msg[]; + memo: string; + stdFee: types.StdFee; + chain_id: string; + account_number?: string; + sequence?: string; + publicKey?: string | types.Pubkey; + }, protoTxModel?: any); + static newStdTxFromProtoTxModel(protoTxModel: any): types.ProtoTx; + /** + * add signature + * @param {[string]} signature base64 + */ + addSignature(signature: string): void; + /** + * add public key + * @param {[string]} bech32/hex or object. if string, default Secp256k1 + * @param {optional [number]} sequence + */ + setPubKey(pubkey: string | types.Pubkey, sequence?: string): void; + /** + * Get SignDoc for signature + * @returns SignDoc protobuf.Tx.SignDoc + */ + getSignDoc(account_number?: string, chain_id?: string): any; + /** + * TxRaw is a variant of Tx that pins the signer's exact binary representation + of body and auth_info. This is used for signing, broadcasting and + verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and + the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used + as the transaction ID. + * @returns TxRaw protobuf.Tx.TxRaw + */ + getTxRaw(): any; + /** + * has PubKey + * @returns true/false + */ + hasPubKey(): boolean; + /** + * Used for RPC send transactions + * You can commit the data directly to RPC + * @returns base64 string + */ + getData(): Uint8Array; + /** + * get Tx Hash + * @returns tx hash + */ + getTxHash(): string; + getProtoModel(): any; + /** + * get tx content + * @returns tx info + */ + getDisplayContent(): object; +} diff --git a/dist/src/types/protoTx.js b/dist/src/types/protoTx.js new file mode 100644 index 00000000..d80043f8 --- /dev/null +++ b/dist/src/types/protoTx.js @@ -0,0 +1,222 @@ +'use strict'; + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.ProtoTx = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _helper = require("../helper"); + +var types = _interopRequireWildcard(require("../types")); + +var _errors = require("../errors"); + +var _protobuf = require("../modules/protobuf"); + +var Sha256 = require('sha256'); + +var ProtoTx = /*#__PURE__*/function () { + function ProtoTx(properties, protoTxModel) { + (0, _classCallCheck2["default"])(this, ProtoTx); + (0, _defineProperty2["default"])(this, "txData", void 0); + (0, _defineProperty2["default"])(this, "body", void 0); + (0, _defineProperty2["default"])(this, "authInfo", void 0); + (0, _defineProperty2["default"])(this, "signatures", []); + + if (!properties && !protoTxModel) { + throw new _errors.SdkError("there must be one properties or protoTxModel", _errors.CODES.Internal); + } + + if (properties) { + var msgs = properties.msgs, + memo = properties.memo, + stdFee = properties.stdFee, + account_number = properties.account_number, + chain_id = properties.chain_id, + sequence = properties.sequence, + publicKey = properties.publicKey; + this.txData = properties; + this.body = _helper.TxModelCreator.createBodyModel(msgs, memo, 0); + this.authInfo = _helper.TxModelCreator.createAuthInfoModel(stdFee, sequence, publicKey); + } else if (protoTxModel) { + if (protoTxModel.hasBody() && protoTxModel.hasAuthInfo()) { + this.txData = {}; + this.body = protoTxModel.getBody(); + this.authInfo = protoTxModel.getAuthInfo(); + this.signatures = protoTxModel.getSignaturesList(); + } + } + } + + (0, _createClass2["default"])(ProtoTx, [{ + key: "addSignature", + + /** + * add signature + * @param {[string]} signature base64 + */ + value: function addSignature(signature) { + if (!signature || !signature.length) { + throw new _errors.SdkError("signature is empty", _errors.CODES.NoSignatures); + } + + this.signatures.push(signature); + } + /** + * add public key + * @param {[string]} bech32/hex or object. if string, default Secp256k1 + * @param {optional [number]} sequence + */ + + }, { + key: "setPubKey", + value: function setPubKey(pubkey, sequence) { + sequence = sequence || this.txData.sequence; + + if (!sequence) { + throw new _errors.SdkError("sequence is empty", _errors.CODES.InvalidSequence); + } + + var signerInfo = _helper.TxModelCreator.createSignerInfoModel(sequence, pubkey); + + this.authInfo.addSignerInfos(signerInfo); + } + /** + * Get SignDoc for signature + * @returns SignDoc protobuf.Tx.SignDoc + */ + + }, { + key: "getSignDoc", + value: function getSignDoc(account_number, chain_id) { + if (!this.hasPubKey()) { + throw new _errors.SdkError("please set pubKey", _errors.CODES.InvalidPubkey); + } + + if (!account_number && !this.txData.account_number) { + throw new _errors.SdkError("account_number is empty", _errors.CODES.IncorrectAccountSequence); + } + + if (!chain_id && !this.txData.chain_id) { + throw new _errors.SdkError("chain_id is empty", _errors.CODES.InvalidChainId); + } + + var signDoc = new types.tx_tx_pb.SignDoc(); + signDoc.setBodyBytes(this.body.serializeBinary()); + signDoc.setAuthInfoBytes(this.authInfo.serializeBinary()); + signDoc.setAccountNumber(String(account_number || this.txData.account_number)); + signDoc.setChainId(chain_id || this.txData.chain_id); + return signDoc; + } + /** + * TxRaw is a variant of Tx that pins the signer's exact binary representation + of body and auth_info. This is used for signing, broadcasting and + verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and + the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used + as the transaction ID. + * @returns TxRaw protobuf.Tx.TxRaw + */ + + }, { + key: "getTxRaw", + value: function getTxRaw() { + if (!this.hasPubKey()) { + throw new _errors.SdkError("please set pubKey", _errors.CODES.InvalidPubkey); + } + + if (!this.signatures || !this.signatures.length) { + throw new _errors.SdkError("please sign tx", _errors.CODES.NoSignatures); + } + + var txRaw = new types.tx_tx_pb.TxRaw(); + txRaw.setBodyBytes(this.body.serializeBinary()); + txRaw.setAuthInfoBytes(this.authInfo.serializeBinary()); + this.signatures.forEach(function (signature) { + txRaw.addSignatures(signature); + }); + return txRaw; + } + /** + * has PubKey + * @returns true/false + */ + + }, { + key: "hasPubKey", + value: function hasPubKey() { + return this.authInfo.getSignerInfosList().length > 0; + } + /** + * Used for RPC send transactions + * You can commit the data directly to RPC + * @returns base64 string + */ + + }, { + key: "getData", + value: function getData() { + var tx = new types.tx_tx_pb.Tx(); + tx.setBody(this.body); + tx.setAuthInfo(this.authInfo); + this.signatures.forEach(function (signature) { + tx.addSignatures(signature); + }); + return tx.serializeBinary(); + } + /** + * get Tx Hash + * @returns tx hash + */ + + }, { + key: "getTxHash", + value: function getTxHash() { + var txRaw = this.getTxRaw(); + var txHash = (Sha256(txRaw.serializeBinary()) || '').toUpperCase(); + return txHash; + } + }, { + key: "getProtoModel", + value: function getProtoModel() { + var tx = new types.tx_tx_pb.Tx(); + tx.setBody(this.body); + tx.setAuthInfo(this.authInfo); + this.signatures.forEach(function (signature) { + tx.addSignatures(signature); + }); + return tx; + } + /** + * get tx content + * @returns tx info + */ + + }, { + key: "getDisplayContent", + value: function getDisplayContent() { + return new _protobuf.Protobuf({}).deserializeTx(Buffer.from(this.getData()).toString('base64')); + } + }], [{ + key: "newStdTxFromProtoTxModel", + value: function newStdTxFromProtoTxModel(protoTxModel) { + if (!protoTxModel.hasBody() || !protoTxModel.hasAuthInfo()) { + throw new _errors.SdkError("Proto Tx Model is invalid", _errors.CODES.TxParseError); + } + + return new ProtoTx(undefined, protoTxModel); + } + }]); + return ProtoTx; +}(); + +exports.ProtoTx = ProtoTx; \ No newline at end of file diff --git a/dist/src/types/query-builder.js b/dist/src/types/query-builder.js index c1f1551f..eca3334b 100644 --- a/dist/src/types/query-builder.js +++ b/dist/src/types/query-builder.js @@ -1,93 +1,151 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const errors_1 = require("../errors"); -const is = require("is_js"); -class Condition { - constructor(key) { - this.key = key; - this.value = ''; - this.op = ''; + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.EventAction = exports.EventKey = exports.EventQueryBuilder = exports.Condition = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _errors = require("../errors"); + +var is = _interopRequireWildcard(require("is_js")); + +var Condition = /*#__PURE__*/function () { + function Condition(key) { + (0, _classCallCheck2["default"])(this, Condition); + (0, _defineProperty2["default"])(this, "key", void 0); + (0, _defineProperty2["default"])(this, "value", void 0); + (0, _defineProperty2["default"])(this, "op", void 0); + this.key = key; + this.value = ''; + this.op = ''; + } + + (0, _createClass2["default"])(Condition, [{ + key: "lte", + value: function lte(value) { + return this.fill(value, '<='); } - lte(value) { - return this.fill(value, '<='); + }, { + key: "gte", + value: function gte(value) { + return this.fill(value, '>='); } - gte(value) { - return this.fill(value, '>='); + }, { + key: "le", + value: function le(value) { + return this.fill(value, '<'); } - le(value) { - return this.fill(value, '<'); + }, { + key: "ge", + value: function ge(value) { + return this.fill(value, '>'); } - ge(value) { - return this.fill(value, '>'); + }, { + key: "eq", + value: function eq(value) { + return this.fill(value, '='); } - eq(value) { - return this.fill(value, '='); + }, { + key: "contains", + value: function contains(value) { + return this.fill(value, 'CONTAINS'); } - contains(value) { - return this.fill(value, 'CONTAINS'); + }, { + key: "toString", + value: function toString() { + if (is.empty(this.key) || is.empty(this.value) || is.empty(this.op)) { + throw new _errors.SdkError('invalid condition', _errors.CODES.Internal); + } + + return this.key + this.op + "'" + this.value + "'"; } - toString() { - if (is.empty(this.key) || is.empty(this.value) || is.empty(this.op)) { - throw new errors_1.SdkError('invalid condition'); - } - return this.key + this.op + "'" + this.value + "'"; - } - fill(value, op) { - this.value = value; - this.op = op; - return this; + }, { + key: "fill", + value: function fill(value, op) { + this.value = value; + this.op = op; + return this; } -} -exports.Condition = Condition; + }]); + return Condition; +}(); /** * A builder for building event query strings */ -class EventQueryBuilder { - constructor() { - this.conditions = new Array(); - } + + +exports.Condition = Condition; + +var EventQueryBuilder = /*#__PURE__*/function () { + function EventQueryBuilder() { + (0, _classCallCheck2["default"])(this, EventQueryBuilder); + (0, _defineProperty2["default"])(this, "conditions", new Array()); + } + + (0, _createClass2["default"])(EventQueryBuilder, [{ + key: "addCondition", + /** * Add a query condition * @param eventKey * @param value * @returns The builder itself */ - addCondition(condition) { - this.conditions.push(condition); - return this; + value: function addCondition(condition) { + this.conditions.push(condition); + return this; } /** * Convert the current builder to the query string * @returns The query string */ - build() { - let query = ''; - this.conditions.forEach((c, index) => { - if (index > 0) { - query += ' AND '; - } - query += c.toString(); - }); - return query; + + }, { + key: "build", + value: function build() { + var query = ''; + this.conditions.forEach(function (c, index) { + if (index > 0) { + query += ' AND '; + } + + query += c.toString(); + }); + return query; } -} + }]); + return EventQueryBuilder; +}(); + exports.EventQueryBuilder = EventQueryBuilder; var EventKey; +exports.EventKey = EventKey; + (function (EventKey) { - EventKey["Type"] = "tm.event"; - EventKey["Action"] = "action"; - EventKey["Sender"] = "sender"; - EventKey["Recipient"] = "recipient"; - EventKey["DestinationValidator"] = "destination-validator"; - EventKey["RequestID"] = "request-id"; - // TODO: more -})(EventKey = exports.EventKey || (exports.EventKey = {})); + EventKey["Type"] = "tm.event"; + EventKey["Action"] = "action"; + EventKey["Sender"] = "sender"; + EventKey["Recipient"] = "recipient"; + EventKey["DestinationValidator"] = "destination-validator"; + EventKey["RequestID"] = "request-id"; +})(EventKey || (exports.EventKey = EventKey = {})); + var EventAction; +exports.EventAction = EventAction; + (function (EventAction) { - EventAction["Send"] = "send"; - EventAction["Burn"] = "burn"; - EventAction["SetMemoRegexp"] = "set-memo-regexp"; - EventAction["EditValidator"] = "edit_validator"; - // TODO: more -})(EventAction = exports.EventAction || (exports.EventAction = {})); -//# sourceMappingURL=query-builder.js.map \ No newline at end of file + EventAction["Send"] = "send"; + EventAction["Burn"] = "burn"; + EventAction["SetMemoRegexp"] = "set-memo-regexp"; + EventAction["EditValidator"] = "edit_validator"; +})(EventAction || (exports.EventAction = EventAction = {})); \ No newline at end of file diff --git a/dist/src/types/query-builder.js.map b/dist/src/types/query-builder.js.map deleted file mode 100644 index bed4ee9c..00000000 --- a/dist/src/types/query-builder.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"query-builder.js","sourceRoot":"","sources":["../../../src/types/query-builder.ts"],"names":[],"mappings":";;AAAA,sCAAqC;AACrC,4BAA4B;AAE5B,MAAa,SAAS;IAKpB,YAAY,GAAa;QACvB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAED,GAAG,CAAC,KAAa;QACf,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,GAAG,CAAC,KAAa;QACf,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,EAAE,CAAC,KAAa;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,EAAE,CAAC,KAAa;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,EAAE,CAAC,KAAa;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,QAAQ,CAAC,KAAa;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IACtC,CAAC;IAED,QAAQ;QACN,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;YACnE,MAAM,IAAI,iBAAQ,CAAC,mBAAmB,CAAC,CAAC;SACzC;QACD,OAAO,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;IACrD,CAAC;IAEO,IAAI,CAAC,KAAa,EAAE,EAAU;QACpC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA/CD,8BA+CC;AAED;;GAEG;AACH,MAAa,iBAAiB;IAA9B;QACU,eAAU,GAAG,IAAI,KAAK,EAAa,CAAC;IA2B9C,CAAC;IAzBC;;;;;OAKG;IACH,YAAY,CAAC,SAAoB;QAC/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;OAGG;IACH,KAAK;QACH,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;YACnC,IAAI,KAAK,GAAG,CAAC,EAAE;gBACb,KAAK,IAAI,OAAO,CAAC;aAClB;YACD,KAAK,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA5BD,8CA4BC;AAED,IAAY,QAQX;AARD,WAAY,QAAQ;IAClB,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;IACjB,mCAAuB,CAAA;IACvB,0DAA8C,CAAA;IAC9C,oCAAwB,CAAA;IACxB,aAAa;AACf,CAAC,EARW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAQnB;AAED,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,4BAAa,CAAA;IACb,gDAAiC,CAAA;IACjC,+CAAgC,CAAA;IAChC,aAAa;AACf,CAAC,EANW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAMtB"} \ No newline at end of file diff --git a/dist/src/types/random.d.ts b/dist/src/types/random.d.ts index b8ce3d74..37e6f4a3 100644 --- a/dist/src/types/random.d.ts +++ b/dist/src/types/random.d.ts @@ -16,8 +16,7 @@ export interface RandomRequest { * Msg struct for requesting a random number * @hidden */ -export declare class MsgRequestRand implements Msg { - type: string; +export declare class MsgRequestRand extends Msg { value: { consumer: string; 'block-interval': number; diff --git a/dist/src/types/random.js b/dist/src/types/random.js index 2ea0e4ec..8808c814 100644 --- a/dist/src/types/random.js +++ b/dist/src/types/random.js @@ -1,20 +1,61 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.MsgRequestRand = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); + +var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); + +var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); + +var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _types = require("./types"); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + /** * Msg struct for requesting a random number * @hidden */ -class MsgRequestRand { - constructor(consumer, blockInterval) { - this.type = 'irishub/slashing/MsgUnjail'; - this.value = { - consumer, - 'block-interval': blockInterval, - }; +var MsgRequestRand = /*#__PURE__*/function (_Msg) { + (0, _inherits2["default"])(MsgRequestRand, _Msg); + + var _super = _createSuper(MsgRequestRand); + + function MsgRequestRand(consumer, blockInterval) { + var _this; + + (0, _classCallCheck2["default"])(this, MsgRequestRand); + _this = _super.call(this, 'irishub/slashing/MsgUnjail'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "value", void 0); + _this.value = { + consumer: consumer, + 'block-interval': blockInterval + }; + return _this; + } + + (0, _createClass2["default"])(MsgRequestRand, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; } - getSignBytes() { - return this; - } -} -exports.MsgRequestRand = MsgRequestRand; -//# sourceMappingURL=random.js.map \ No newline at end of file + }]); + return MsgRequestRand; +}(_types.Msg); + +exports.MsgRequestRand = MsgRequestRand; \ No newline at end of file diff --git a/dist/src/types/random.js.map b/dist/src/types/random.js.map deleted file mode 100644 index 28f065bd..00000000 --- a/dist/src/types/random.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"random.js","sourceRoot":"","sources":["../../../src/types/random.ts"],"names":[],"mappings":";;AAiBA;;;GAGG;AACH,MAAa,cAAc;IAOzB,YAAY,QAAgB,EAAE,aAAqB;QACjD,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC;QACzC,IAAI,CAAC,KAAK,GAAG;YACX,QAAQ;YACR,gBAAgB,EAAE,aAAa;SAChC,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlBD,wCAkBC"} \ No newline at end of file diff --git a/dist/src/types/result-broadcast-tx.d.ts b/dist/src/types/result-broadcast-tx.d.ts deleted file mode 100644 index a94afae6..00000000 --- a/dist/src/types/result-broadcast-tx.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** BroadcastTx Result, compatible with `Sync` and `Async` */ -export interface ResultBroadcastTxAsync { - code: number; - data: string; - log: string; - hash: string; -} -/** BroadcastTx Result */ -export interface ResultBroadcastTx { - hash: string; - check_tx?: ResultTx; - deliver_tx?: ResultTx; - height?: number; -} -/** BroadcastTx inner result */ -export interface ResultTx { - code: number; - data: string; - log: string; - gas_used: number; - gas_wanted: number; - info: string; - tags: string[]; -} -export declare function newResultBroadcastTx(hash: string, check_tx?: ResultTx, deliver_tx?: ResultTx, height?: number): ResultBroadcastTx; diff --git a/dist/src/types/result-broadcast-tx.js b/dist/src/types/result-broadcast-tx.js deleted file mode 100644 index 1aaae231..00000000 --- a/dist/src/types/result-broadcast-tx.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -// Generated by https://quicktype.io -Object.defineProperty(exports, "__esModule", { value: true }); -function newResultBroadcastTx(hash, check_tx, deliver_tx, height) { - return { - hash: hash, - check_tx: check_tx, - deliver_tx: deliver_tx, - height: height, - }; -} -exports.newResultBroadcastTx = newResultBroadcastTx; -//# sourceMappingURL=result-broadcast-tx.js.map \ No newline at end of file diff --git a/dist/src/types/result-broadcast-tx.js.map b/dist/src/types/result-broadcast-tx.js.map deleted file mode 100644 index 273fb458..00000000 --- a/dist/src/types/result-broadcast-tx.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"result-broadcast-tx.js","sourceRoot":"","sources":["../../../src/types/result-broadcast-tx.ts"],"names":[],"mappings":";AAAA,oCAAoC;;AA6BpC,SAAgB,oBAAoB,CAClC,IAAY,EACZ,QAAmB,EACnB,UAAqB,EACrB,MAAe;IAEf,OAAO;QACL,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE,UAAU;QACtB,MAAM,EAAE,MAAM;KACf,CAAC;AACJ,CAAC;AAZD,oDAYC"} \ No newline at end of file diff --git a/dist/src/types/service.d.ts b/dist/src/types/service.d.ts index abe30315..18b59045 100644 --- a/dist/src/types/service.d.ts +++ b/dist/src/types/service.d.ts @@ -62,8 +62,7 @@ export interface ServiceFee { * Msg struct for creating a new service definition * @hidden */ -export declare class MsgDefineService implements Msg { - type: string; +export declare class MsgDefineService extends Msg { value: { name: string; description?: string; @@ -86,8 +85,7 @@ export declare class MsgDefineService implements Msg { * Msg struct for binding a service definition * @hidden */ -export declare class MsgBindService implements Msg { - type: string; +export declare class MsgBindService extends Msg { value: { service_name: string; provider: string; @@ -106,8 +104,7 @@ export declare class MsgBindService implements Msg { * Msg struct for updating a service binding * @hidden */ -export declare class MsgUpdateServiceBinding implements Msg { - type: string; +export declare class MsgUpdateServiceBinding extends Msg { value: { service_name: string; provider: string; @@ -126,8 +123,7 @@ export declare class MsgUpdateServiceBinding implements Msg { * Msg struct for disabling a service binding * @hidden */ -export declare class MsgDisableServiceBinding implements Msg { - type: string; +export declare class MsgDisableServiceBinding extends Msg { value: { service_name: string; provider: string; @@ -139,8 +135,7 @@ export declare class MsgDisableServiceBinding implements Msg { * Msg struct for enabling a service binding * @hidden */ -export declare class MsgEnableServiceBinding implements Msg { - type: string; +export declare class MsgEnableServiceBinding extends Msg { value: { service_name: string; provider: string; @@ -152,8 +147,7 @@ export declare class MsgEnableServiceBinding implements Msg { * Msg struct for invoking a service * @hidden */ -export declare class MsgRequestService implements Msg { - type: string; +export declare class MsgRequestService extends Msg { value: { service_name: string; providers: string[]; @@ -183,8 +177,7 @@ export declare class MsgRequestService implements Msg { /** * @hidden */ -export declare class MsgSetServiceWithdrawAddress implements Msg { - type: string; +export declare class MsgSetServiceWithdrawAddress extends Msg { value: { provider: string; withdraw_address: string; @@ -196,8 +189,7 @@ export declare class MsgSetServiceWithdrawAddress implements Msg { * Msg struct for refunding deposit from a service binding * @hidden */ -export declare class MsgRefundServiceDeposit implements Msg { - type: string; +export declare class MsgRefundServiceDeposit extends Msg { value: { service_name: string; provider: string; @@ -209,8 +201,7 @@ export declare class MsgRefundServiceDeposit implements Msg { * Msg struct for resuming a request context * @hidden */ -export declare class MsgStartRequestContext implements Msg { - type: string; +export declare class MsgStartRequestContext extends Msg { value: { request_context_id: string; consumer: string; @@ -222,8 +213,7 @@ export declare class MsgStartRequestContext implements Msg { * Msg struct for pausing a request context * @hidden */ -export declare class MsgPauseRequestContext implements Msg { - type: string; +export declare class MsgPauseRequestContext extends Msg { value: { request_context_id: string; consumer: string; @@ -235,8 +225,7 @@ export declare class MsgPauseRequestContext implements Msg { * Msg struct for killing a request context * @hidden */ -export declare class MsgKillRequestContext implements Msg { - type: string; +export declare class MsgKillRequestContext extends Msg { value: { request_context_id: string; consumer: string; @@ -248,8 +237,7 @@ export declare class MsgKillRequestContext implements Msg { * Msg struct for invoking a service * @hidden */ -export declare class MsgUpdateRequestContext implements Msg { - type: string; +export declare class MsgUpdateRequestContext extends Msg { value: { request_context_id: string; providers: string[]; @@ -274,8 +262,7 @@ export declare class MsgUpdateRequestContext implements Msg { * Msg struct for withdrawing the fees earned by the provider * @hidden */ -export declare class MsgWithdrawEarnedFees implements Msg { - type: string; +export declare class MsgWithdrawEarnedFees extends Msg { value: { provider: string; }; @@ -286,8 +273,7 @@ export declare class MsgWithdrawEarnedFees implements Msg { * Msg struct for withdrawing the service tax * @hidden */ -export declare class MsgWithdrawTax implements Msg { - type: string; +export declare class MsgWithdrawTax extends Msg { value: { trustee: string; dest_address: string; diff --git a/dist/src/types/service.js b/dist/src/types/service.js index bef4f911..b4d6b47b 100644 --- a/dist/src/types/service.js +++ b/dist/src/types/service.js @@ -1,225 +1,487 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.MsgWithdrawTax = exports.MsgWithdrawEarnedFees = exports.MsgUpdateRequestContext = exports.MsgKillRequestContext = exports.MsgPauseRequestContext = exports.MsgStartRequestContext = exports.MsgRefundServiceDeposit = exports.MsgSetServiceWithdrawAddress = exports.MsgRequestService = exports.MsgEnableServiceBinding = exports.MsgDisableServiceBinding = exports.MsgUpdateServiceBinding = exports.MsgBindService = exports.MsgDefineService = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); + +var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); + +var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); + +var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _types = require("./types"); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + /** * Msg struct for creating a new service definition * @hidden */ -class MsgDefineService { - constructor(definition) { - this.type = 'irishub/service/MsgDefineService'; - this.value = definition; +var MsgDefineService = /*#__PURE__*/function (_Msg) { + (0, _inherits2["default"])(MsgDefineService, _Msg); + + var _super = _createSuper(MsgDefineService); + + function MsgDefineService(definition) { + var _this; + + (0, _classCallCheck2["default"])(this, MsgDefineService); + _this = _super.call(this, 'irishub/service/MsgDefineService'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "value", void 0); + _this.value = definition; + return _this; + } + + (0, _createClass2["default"])(MsgDefineService, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; } - getSignBytes() { - return this; - } -} -exports.MsgDefineService = MsgDefineService; + }]); + return MsgDefineService; +}(_types.Msg); /** * Msg struct for binding a service definition * @hidden */ -class MsgBindService { - constructor(binding) { - this.type = 'irishub/service/MsgBindService'; - this.value = binding; - } - getSignBytes() { - return this; + + +exports.MsgDefineService = MsgDefineService; + +var MsgBindService = /*#__PURE__*/function (_Msg2) { + (0, _inherits2["default"])(MsgBindService, _Msg2); + + var _super2 = _createSuper(MsgBindService); + + function MsgBindService(binding) { + var _this2; + + (0, _classCallCheck2["default"])(this, MsgBindService); + _this2 = _super2.call(this, 'irishub/service/MsgBindService'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "value", void 0); + _this2.value = binding; + return _this2; + } + + (0, _createClass2["default"])(MsgBindService, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; } -} -exports.MsgBindService = MsgBindService; + }]); + return MsgBindService; +}(_types.Msg); /** * Msg struct for updating a service binding * @hidden */ -class MsgUpdateServiceBinding { - constructor(binding) { - this.type = 'irishub/service/MsgUpdateServiceBinding'; - this.value = binding; - } - getSignBytes() { - return this; + + +exports.MsgBindService = MsgBindService; + +var MsgUpdateServiceBinding = /*#__PURE__*/function (_Msg3) { + (0, _inherits2["default"])(MsgUpdateServiceBinding, _Msg3); + + var _super3 = _createSuper(MsgUpdateServiceBinding); + + function MsgUpdateServiceBinding(binding) { + var _this3; + + (0, _classCallCheck2["default"])(this, MsgUpdateServiceBinding); + _this3 = _super3.call(this, 'irishub/service/MsgUpdateServiceBinding'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this3), "value", void 0); + _this3.value = binding; + return _this3; + } + + (0, _createClass2["default"])(MsgUpdateServiceBinding, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; } -} -exports.MsgUpdateServiceBinding = MsgUpdateServiceBinding; + }]); + return MsgUpdateServiceBinding; +}(_types.Msg); /** * Msg struct for disabling a service binding * @hidden */ -class MsgDisableServiceBinding { - constructor(serviceName, provider) { - this.type = 'irishub/service/MsgDisableService'; - this.value = { - service_name: serviceName, - provider, - }; - } - getSignBytes() { - return this; + + +exports.MsgUpdateServiceBinding = MsgUpdateServiceBinding; + +var MsgDisableServiceBinding = /*#__PURE__*/function (_Msg4) { + (0, _inherits2["default"])(MsgDisableServiceBinding, _Msg4); + + var _super4 = _createSuper(MsgDisableServiceBinding); + + function MsgDisableServiceBinding(serviceName, provider) { + var _this4; + + (0, _classCallCheck2["default"])(this, MsgDisableServiceBinding); + _this4 = _super4.call(this, 'irishub/service/MsgDisableService'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this4), "value", void 0); + _this4.value = { + service_name: serviceName, + provider: provider + }; + return _this4; + } + + (0, _createClass2["default"])(MsgDisableServiceBinding, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; } -} -exports.MsgDisableServiceBinding = MsgDisableServiceBinding; + }]); + return MsgDisableServiceBinding; +}(_types.Msg); /** * Msg struct for enabling a service binding * @hidden */ -class MsgEnableServiceBinding { - constructor(serviceName, provider) { - this.type = 'irishub/service/MsgEnableService'; - this.value = { - service_name: serviceName, - provider, - }; - } - getSignBytes() { - return this; + + +exports.MsgDisableServiceBinding = MsgDisableServiceBinding; + +var MsgEnableServiceBinding = /*#__PURE__*/function (_Msg5) { + (0, _inherits2["default"])(MsgEnableServiceBinding, _Msg5); + + var _super5 = _createSuper(MsgEnableServiceBinding); + + function MsgEnableServiceBinding(serviceName, provider) { + var _this5; + + (0, _classCallCheck2["default"])(this, MsgEnableServiceBinding); + _this5 = _super5.call(this, 'irishub/service/MsgEnableService'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this5), "value", void 0); + _this5.value = { + service_name: serviceName, + provider: provider + }; + return _this5; + } + + (0, _createClass2["default"])(MsgEnableServiceBinding, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; } -} -exports.MsgEnableServiceBinding = MsgEnableServiceBinding; + }]); + return MsgEnableServiceBinding; +}(_types.Msg); /** * Msg struct for invoking a service * @hidden */ -class MsgRequestService { - constructor(request) { - this.type = 'irishub/service/MsgRequestService'; - this.value = request; - } - getSignBytes() { - return this; + + +exports.MsgEnableServiceBinding = MsgEnableServiceBinding; + +var MsgRequestService = /*#__PURE__*/function (_Msg6) { + (0, _inherits2["default"])(MsgRequestService, _Msg6); + + var _super6 = _createSuper(MsgRequestService); + + function MsgRequestService(request) { + var _this6; + + (0, _classCallCheck2["default"])(this, MsgRequestService); + _this6 = _super6.call(this, 'irishub/service/MsgRequestService'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this6), "value", void 0); + _this6.value = request; + return _this6; + } + + (0, _createClass2["default"])(MsgRequestService, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; } -} -exports.MsgRequestService = MsgRequestService; + }]); + return MsgRequestService; +}(_types.Msg); /** * @hidden */ -class MsgSetServiceWithdrawAddress { - constructor(provider, withdrawAddress) { - this.type = 'irishub/service/MsgSetWithdrawAddress'; - this.value = { - provider, - withdraw_address: withdrawAddress, - }; - } - getSignBytes() { - return this; + + +exports.MsgRequestService = MsgRequestService; + +var MsgSetServiceWithdrawAddress = /*#__PURE__*/function (_Msg7) { + (0, _inherits2["default"])(MsgSetServiceWithdrawAddress, _Msg7); + + var _super7 = _createSuper(MsgSetServiceWithdrawAddress); + + function MsgSetServiceWithdrawAddress(provider, withdrawAddress) { + var _this7; + + (0, _classCallCheck2["default"])(this, MsgSetServiceWithdrawAddress); + _this7 = _super7.call(this, 'irishub/service/MsgSetWithdrawAddress'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this7), "value", void 0); + _this7.value = { + provider: provider, + withdraw_address: withdrawAddress + }; + return _this7; + } + + (0, _createClass2["default"])(MsgSetServiceWithdrawAddress, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; } -} -exports.MsgSetServiceWithdrawAddress = MsgSetServiceWithdrawAddress; + }]); + return MsgSetServiceWithdrawAddress; +}(_types.Msg); /** * Msg struct for refunding deposit from a service binding * @hidden */ -class MsgRefundServiceDeposit { - constructor(serviceName, provider) { - this.type = 'irishub/service/MsgRefundServiceDeposit'; - this.value = { - service_name: serviceName, - provider, - }; - } - getSignBytes() { - return this; + + +exports.MsgSetServiceWithdrawAddress = MsgSetServiceWithdrawAddress; + +var MsgRefundServiceDeposit = /*#__PURE__*/function (_Msg8) { + (0, _inherits2["default"])(MsgRefundServiceDeposit, _Msg8); + + var _super8 = _createSuper(MsgRefundServiceDeposit); + + function MsgRefundServiceDeposit(serviceName, provider) { + var _this8; + + (0, _classCallCheck2["default"])(this, MsgRefundServiceDeposit); + _this8 = _super8.call(this, 'irishub/service/MsgRefundServiceDeposit'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this8), "value", void 0); + _this8.value = { + service_name: serviceName, + provider: provider + }; + return _this8; + } + + (0, _createClass2["default"])(MsgRefundServiceDeposit, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; } -} -exports.MsgRefundServiceDeposit = MsgRefundServiceDeposit; + }]); + return MsgRefundServiceDeposit; +}(_types.Msg); /** * Msg struct for resuming a request context * @hidden */ -class MsgStartRequestContext { - constructor(requestContextID, consumer) { - this.type = 'irishub/service/MsgStartRequestContext'; - this.value = { - request_context_id: requestContextID, - consumer, - }; - } - getSignBytes() { - return this; + + +exports.MsgRefundServiceDeposit = MsgRefundServiceDeposit; + +var MsgStartRequestContext = /*#__PURE__*/function (_Msg9) { + (0, _inherits2["default"])(MsgStartRequestContext, _Msg9); + + var _super9 = _createSuper(MsgStartRequestContext); + + function MsgStartRequestContext(requestContextID, consumer) { + var _this9; + + (0, _classCallCheck2["default"])(this, MsgStartRequestContext); + _this9 = _super9.call(this, 'irishub/service/MsgStartRequestContext'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this9), "value", void 0); + _this9.value = { + request_context_id: requestContextID, + consumer: consumer + }; + return _this9; + } + + (0, _createClass2["default"])(MsgStartRequestContext, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; } -} -exports.MsgStartRequestContext = MsgStartRequestContext; + }]); + return MsgStartRequestContext; +}(_types.Msg); /** * Msg struct for pausing a request context * @hidden */ -class MsgPauseRequestContext { - constructor(requestContextID, consumer) { - this.type = 'irishub/service/MsgPauseRequestContext'; - this.value = { - request_context_id: requestContextID, - consumer, - }; - } - getSignBytes() { - return this; + + +exports.MsgStartRequestContext = MsgStartRequestContext; + +var MsgPauseRequestContext = /*#__PURE__*/function (_Msg10) { + (0, _inherits2["default"])(MsgPauseRequestContext, _Msg10); + + var _super10 = _createSuper(MsgPauseRequestContext); + + function MsgPauseRequestContext(requestContextID, consumer) { + var _this10; + + (0, _classCallCheck2["default"])(this, MsgPauseRequestContext); + _this10 = _super10.call(this, 'irishub/service/MsgPauseRequestContext'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this10), "value", void 0); + _this10.value = { + request_context_id: requestContextID, + consumer: consumer + }; + return _this10; + } + + (0, _createClass2["default"])(MsgPauseRequestContext, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; } -} -exports.MsgPauseRequestContext = MsgPauseRequestContext; + }]); + return MsgPauseRequestContext; +}(_types.Msg); /** * Msg struct for killing a request context * @hidden */ -class MsgKillRequestContext { - constructor(requestContextID, consumer) { - this.type = 'irishub/service/MsgKillRequestContext'; - this.value = { - request_context_id: requestContextID, - consumer, - }; - } - getSignBytes() { - return this; + + +exports.MsgPauseRequestContext = MsgPauseRequestContext; + +var MsgKillRequestContext = /*#__PURE__*/function (_Msg11) { + (0, _inherits2["default"])(MsgKillRequestContext, _Msg11); + + var _super11 = _createSuper(MsgKillRequestContext); + + function MsgKillRequestContext(requestContextID, consumer) { + var _this11; + + (0, _classCallCheck2["default"])(this, MsgKillRequestContext); + _this11 = _super11.call(this, 'irishub/service/MsgKillRequestContext'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this11), "value", void 0); + _this11.value = { + request_context_id: requestContextID, + consumer: consumer + }; + return _this11; + } + + (0, _createClass2["default"])(MsgKillRequestContext, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; } -} -exports.MsgKillRequestContext = MsgKillRequestContext; + }]); + return MsgKillRequestContext; +}(_types.Msg); /** * Msg struct for invoking a service * @hidden */ -class MsgUpdateRequestContext { - constructor(request) { - this.type = 'irishub/service/MsgUpdateRequestContext'; - this.value = request; - } - getSignBytes() { - return this; + + +exports.MsgKillRequestContext = MsgKillRequestContext; + +var MsgUpdateRequestContext = /*#__PURE__*/function (_Msg12) { + (0, _inherits2["default"])(MsgUpdateRequestContext, _Msg12); + + var _super12 = _createSuper(MsgUpdateRequestContext); + + function MsgUpdateRequestContext(request) { + var _this12; + + (0, _classCallCheck2["default"])(this, MsgUpdateRequestContext); + _this12 = _super12.call(this, 'irishub/service/MsgUpdateRequestContext'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this12), "value", void 0); + _this12.value = request; + return _this12; + } + + (0, _createClass2["default"])(MsgUpdateRequestContext, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; } -} -exports.MsgUpdateRequestContext = MsgUpdateRequestContext; + }]); + return MsgUpdateRequestContext; +}(_types.Msg); /** * Msg struct for withdrawing the fees earned by the provider * @hidden */ -class MsgWithdrawEarnedFees { - constructor(provider) { - this.type = 'irishub/service/MsgWithdrawEarnedFees'; - this.value = { - provider, - }; - } - getSignBytes() { - return this; + + +exports.MsgUpdateRequestContext = MsgUpdateRequestContext; + +var MsgWithdrawEarnedFees = /*#__PURE__*/function (_Msg13) { + (0, _inherits2["default"])(MsgWithdrawEarnedFees, _Msg13); + + var _super13 = _createSuper(MsgWithdrawEarnedFees); + + function MsgWithdrawEarnedFees(provider) { + var _this13; + + (0, _classCallCheck2["default"])(this, MsgWithdrawEarnedFees); + _this13 = _super13.call(this, 'irishub/service/MsgWithdrawEarnedFees'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this13), "value", void 0); + _this13.value = { + provider: provider + }; + return _this13; + } + + (0, _createClass2["default"])(MsgWithdrawEarnedFees, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; } -} -exports.MsgWithdrawEarnedFees = MsgWithdrawEarnedFees; + }]); + return MsgWithdrawEarnedFees; +}(_types.Msg); /** * Msg struct for withdrawing the service tax * @hidden */ -class MsgWithdrawTax { - constructor(trustee, destAddress, amount) { - this.type = 'irishub/service/MsgWithdrawTax'; - this.value = { - trustee, - dest_address: destAddress, - amount, - }; - } - getSignBytes() { - return this; + + +exports.MsgWithdrawEarnedFees = MsgWithdrawEarnedFees; + +var MsgWithdrawTax = /*#__PURE__*/function (_Msg14) { + (0, _inherits2["default"])(MsgWithdrawTax, _Msg14); + + var _super14 = _createSuper(MsgWithdrawTax); + + function MsgWithdrawTax(trustee, destAddress, amount) { + var _this14; + + (0, _classCallCheck2["default"])(this, MsgWithdrawTax); + _this14 = _super14.call(this, 'irishub/service/MsgWithdrawTax'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this14), "value", void 0); + _this14.value = { + trustee: trustee, + dest_address: destAddress, + amount: amount + }; + return _this14; + } + + (0, _createClass2["default"])(MsgWithdrawTax, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this; } -} -exports.MsgWithdrawTax = MsgWithdrawTax; -//# sourceMappingURL=service.js.map \ No newline at end of file + }]); + return MsgWithdrawTax; +}(_types.Msg); + +exports.MsgWithdrawTax = MsgWithdrawTax; \ No newline at end of file diff --git a/dist/src/types/service.js.map b/dist/src/types/service.js.map deleted file mode 100644 index fc934e03..00000000 --- a/dist/src/types/service.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/types/service.ts"],"names":[],"mappings":";;AAmEA;;;GAGG;AACH,MAAa,gBAAgB;IAW3B,YAAY,UAOX;QACC,IAAI,CAAC,IAAI,GAAG,kCAAkC,CAAC;QAC/C,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC;IAC1B,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA1BD,4CA0BC;AAED;;;GAGG;AACH,MAAa,cAAc;IASzB,YAAY,OAKX;QACC,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAC;QAC7C,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;IACvB,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAtBD,wCAsBC;AAED;;;GAGG;AACH,MAAa,uBAAuB;IASlC,YAAY,OAKX;QACC,IAAI,CAAC,IAAI,GAAG,yCAAyC,CAAC;QACtD,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;IACvB,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAtBD,0DAsBC;AAED;;;GAGG;AACH,MAAa,wBAAwB;IAOnC,YAAY,WAAmB,EAAE,QAAgB;QAC/C,IAAI,CAAC,IAAI,GAAG,mCAAmC,CAAC;QAChD,IAAI,CAAC,KAAK,GAAG;YACX,YAAY,EAAE,WAAW;YACzB,QAAQ;SACT,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlBD,4DAkBC;AAED;;;GAGG;AACH,MAAa,uBAAuB;IAOlC,YAAY,WAAmB,EAAE,QAAgB;QAC/C,IAAI,CAAC,IAAI,GAAG,kCAAkC,CAAC;QAC/C,IAAI,CAAC,KAAK,GAAG;YACX,YAAY,EAAE,WAAW;YACzB,QAAQ;SACT,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlBD,0DAkBC;AAED;;;GAGG;AACH,MAAa,iBAAiB;IAe5B,YAAY,OAWX;QACC,IAAI,CAAC,IAAI,GAAG,mCAAmC,CAAC;QAChD,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;IACvB,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlCD,8CAkCC;AAED;;GAEG;AACH,MAAa,4BAA4B;IAOvC,YAAY,QAAgB,EAAE,eAAuB;QACnD,IAAI,CAAC,IAAI,GAAG,uCAAuC,CAAC;QACpD,IAAI,CAAC,KAAK,GAAG;YACX,QAAQ;YACR,gBAAgB,EAAE,eAAe;SAClC,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlBD,oEAkBC;AAED;;;GAGG;AACH,MAAa,uBAAuB;IAOlC,YAAY,WAAmB,EAAE,QAAgB;QAC/C,IAAI,CAAC,IAAI,GAAG,yCAAyC,CAAC;QACtD,IAAI,CAAC,KAAK,GAAG;YACX,YAAY,EAAE,WAAW;YACzB,QAAQ;SACT,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlBD,0DAkBC;AAED;;;GAGG;AACH,MAAa,sBAAsB;IAOjC,YAAY,gBAAwB,EAAE,QAAgB;QACpD,IAAI,CAAC,IAAI,GAAG,wCAAwC,CAAC;QACrD,IAAI,CAAC,KAAK,GAAG;YACX,kBAAkB,EAAE,gBAAgB;YACpC,QAAQ;SACT,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlBD,wDAkBC;AAED;;;GAGG;AACH,MAAa,sBAAsB;IAOjC,YAAY,gBAAwB,EAAE,QAAgB;QACpD,IAAI,CAAC,IAAI,GAAG,wCAAwC,CAAC;QACrD,IAAI,CAAC,KAAK,GAAG;YACX,kBAAkB,EAAE,gBAAgB;YACpC,QAAQ;SACT,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlBD,wDAkBC;AAED;;;GAGG;AACH,MAAa,qBAAqB;IAOhC,YAAY,gBAAwB,EAAE,QAAgB;QACpD,IAAI,CAAC,IAAI,GAAG,uCAAuC,CAAC;QACpD,IAAI,CAAC,KAAK,GAAG;YACX,kBAAkB,EAAE,gBAAgB;YACpC,QAAQ;SACT,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlBD,sDAkBC;AAED;;;GAGG;AACH,MAAa,uBAAuB;IAYlC,YAAY,OAQX;QACC,IAAI,CAAC,IAAI,GAAG,yCAAyC,CAAC;QACtD,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;IACvB,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA5BD,0DA4BC;AAED;;;GAGG;AACH,MAAa,qBAAqB;IAMhC,YAAY,QAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,uCAAuC,CAAC;QACpD,IAAI,CAAC,KAAK,GAAG;YACX,QAAQ;SACT,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAhBD,sDAgBC;AAED;;;GAGG;AACH,MAAa,cAAc;IAQzB,YAAY,OAAe,EAAE,WAAmB,EAAE,MAAc;QAC9D,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAC;QAC7C,IAAI,CAAC,KAAK,GAAG;YACX,OAAO;YACP,YAAY,EAAE,WAAW;YACzB,MAAM;SACP,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AApBD,wCAoBC"} \ No newline at end of file diff --git a/dist/src/types/slashing.d.ts b/dist/src/types/slashing.d.ts index 2b18fe6e..76c4a04d 100644 --- a/dist/src/types/slashing.d.ts +++ b/dist/src/types/slashing.d.ts @@ -41,8 +41,7 @@ export interface SlashingParams { * Msg struct for unjailing jailed validator * @hidden */ -export declare class MsgUnjail implements Msg { - type: string; +export declare class MsgUnjail extends Msg { value: { address: string; }; @@ -52,9 +51,9 @@ export declare class MsgUnjail implements Msg { /** Defines the signing info for a validator */ export interface ValidatorSigningInfo { address: string; - start_height: string; - index_offset: string; - jailed_until: string; + startHeight: string; + indexOffset: string; + jailedUntil: string; tombstoned: boolean; - missed_blocks_counter: string; + missedBlocksCounter: string; } diff --git a/dist/src/types/slashing.js b/dist/src/types/slashing.js index 23f94e6b..4bc07b81 100644 --- a/dist/src/types/slashing.js +++ b/dist/src/types/slashing.js @@ -1,19 +1,62 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.MsgUnjail = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); + +var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); + +var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); + +var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _types = require("./types"); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + /** * Msg struct for unjailing jailed validator * @hidden */ -class MsgUnjail { - constructor(address) { - this.type = 'irishub/slashing/MsgUnjail'; - this.value = { - address, - }; +var MsgUnjail = /*#__PURE__*/function (_Msg) { + (0, _inherits2["default"])(MsgUnjail, _Msg); + + var _super = _createSuper(MsgUnjail); + + function MsgUnjail(address) { + var _this; + + (0, _classCallCheck2["default"])(this, MsgUnjail); + _this = _super.call(this, 'irishub/slashing/MsgUnjail'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "value", void 0); + _this.value = { + address: address + }; + return _this; + } + + (0, _createClass2["default"])(MsgUnjail, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this.value; } - getSignBytes() { - return this.value; - } -} -exports.MsgUnjail = MsgUnjail; -//# sourceMappingURL=slashing.js.map \ No newline at end of file + }]); + return MsgUnjail; +}(_types.Msg); +/** Defines the signing info for a validator */ + + +exports.MsgUnjail = MsgUnjail; \ No newline at end of file diff --git a/dist/src/types/slashing.js.map b/dist/src/types/slashing.js.map deleted file mode 100644 index 2d5090f2..00000000 --- a/dist/src/types/slashing.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"slashing.js","sourceRoot":"","sources":["../../../src/types/slashing.ts"],"names":[],"mappings":";;AAyCA;;;GAGG;AACH,MAAa,SAAS;IAMpB,YAAY,OAAe;QACzB,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC;QACzC,IAAI,CAAC,KAAK,GAAG;YACX,OAAO;SACR,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AAhBD,8BAgBC"} \ No newline at end of file diff --git a/dist/src/types/stake.d.ts b/dist/src/types/stake.d.ts deleted file mode 100644 index f08818d1..00000000 --- a/dist/src/types/stake.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Coin, Msg } from './types'; -export interface Validator { - operator_address: string; - consensus_pubkey: string; - jailed: boolean; - status: number; - tokens: string; - delegator_shares: string; - description: ValidatorDescription; - bond_height: string; - unbonding_height: string; - unbonding_time: string; - commission: Commission; -} -export interface Commission { - rate: string; - max_rate: string; - max_change_rate: string; - update_time: string; -} -export interface ValidatorDescription { - moniker: string; - identity: string; - website: string; - details: string; -} -export interface StakePool { - loose_tokens: string; - bonded_tokens: string; -} -export interface StakeParams { - unbonding_time: string; - max_validators: number; -} -export interface Delegation { - delegator_addr: string; - validator_addr: string; - shares: string; - height: string; -} -export interface UnbondingDelegation { - tx_hash: string; - delegator_addr: string; - validator_addr: string; - creation_height: string; - min_time: string; - initial_balance: Coin; - balance: Coin; -} -export interface Redelegation { - delegator_addr: string; - validator_src_addr: string; - validator_dst_addr: string; - creation_height: string; - min_time: string; - initial_balance: Coin; - balance: Coin; - shares_src: string; - shares_dst: string; -} -export declare class MsgDelegate implements Msg { - type: string; - value: { - delegator_addr: string; - validator_addr: string; - delegation: Coin; - }; - constructor(delegatorAddr: string, validatorAddr: string, delegation: Coin); - getSignBytes(): object; -} -export declare class MsgUndelegate implements Msg { - type: string; - value: { - delegator_addr: string; - validator_addr: string; - shares_amount: string; - }; - constructor(delegatorAddr: string, validatorAddr: string, sharesAmount: string); - getSignBytes(): object; -} -export declare class MsgRedelegate implements Msg { - type: string; - value: { - delegator_addr: string; - validator_src_addr: string; - validator_dst_addr: string; - shares_amount: string; - }; - constructor(delegatorAddr: string, validatorSrcAddr: string, validatorDstAddr: string, sharesAmount: string); - getSignBytes(): object; -} diff --git a/dist/src/types/stake.js b/dist/src/types/stake.js deleted file mode 100644 index 5bff9823..00000000 --- a/dist/src/types/stake.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -class MsgDelegate { - constructor(delegatorAddr, validatorAddr, delegation) { - this.type = 'irishub/stake/MsgDelegate'; - this.value = { - delegator_addr: delegatorAddr, - validator_addr: validatorAddr, - delegation: delegation, - }; - } - getSignBytes() { - return this; - } -} -exports.MsgDelegate = MsgDelegate; -class MsgUndelegate { - constructor(delegatorAddr, validatorAddr, sharesAmount) { - this.type = 'irishub/stake/BeginUnbonding'; - this.value = { - delegator_addr: delegatorAddr, - validator_addr: validatorAddr, - shares_amount: sharesAmount, - }; - } - getSignBytes() { - return this.value; - } -} -exports.MsgUndelegate = MsgUndelegate; -class MsgRedelegate { - constructor(delegatorAddr, validatorSrcAddr, validatorDstAddr, sharesAmount) { - this.type = 'irishub/stake/BeginRedelegate'; - this.value = { - delegator_addr: delegatorAddr, - validator_src_addr: validatorSrcAddr, - validator_dst_addr: validatorDstAddr, - shares_amount: sharesAmount, - }; - } - getSignBytes() { - return { - delegator_addr: this.value.delegator_addr, - validator_src_addr: this.value.validator_src_addr, - validator_dst_addr: this.value.validator_dst_addr, - shares: this.value.shares_amount, - }; - } -} -exports.MsgRedelegate = MsgRedelegate; -//# sourceMappingURL=stake.js.map \ No newline at end of file diff --git a/dist/src/types/stake.js.map b/dist/src/types/stake.js.map deleted file mode 100644 index a492cdfa..00000000 --- a/dist/src/types/stake.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"stake.js","sourceRoot":"","sources":["../../../src/types/stake.ts"],"names":[],"mappings":";;AAqEA,MAAa,WAAW;IAQtB,YAAY,aAAqB,EAAE,aAAqB,EAAE,UAAgB;QACxE,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG;YACX,cAAc,EAAE,aAAa;YAC7B,cAAc,EAAE,aAAa;YAC7B,UAAU,EAAE,UAAU;SACvB,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AApBD,kCAoBC;AAED,MAAa,aAAa;IAQxB,YACE,aAAqB,EACrB,aAAqB,EACrB,YAAoB;QAEpB,IAAI,CAAC,IAAI,GAAG,8BAA8B,CAAC;QAC3C,IAAI,CAAC,KAAK,GAAG;YACX,cAAc,EAAE,aAAa;YAC7B,cAAc,EAAE,aAAa;YAC7B,aAAa,EAAE,YAAY;SAC5B,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AAxBD,sCAwBC;AAED,MAAa,aAAa;IASxB,YACE,aAAqB,EACrB,gBAAwB,EACxB,gBAAwB,EACxB,YAAoB;QAEpB,IAAI,CAAC,IAAI,GAAG,+BAA+B,CAAC;QAC5C,IAAI,CAAC,KAAK,GAAG;YACX,cAAc,EAAE,aAAa;YAC7B,kBAAkB,EAAE,gBAAgB;YACpC,kBAAkB,EAAE,gBAAgB;YACpC,aAAa,EAAE,YAAY;SAC5B,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO;YACL,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc;YACzC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,kBAAkB;YACjD,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,kBAAkB;YACjD,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa;SACjC,CAAC;IACJ,CAAC;CACF;AAhCD,sCAgCC"} \ No newline at end of file diff --git a/dist/src/types/staking.d.ts b/dist/src/types/staking.d.ts index 21811376..48168415 100644 --- a/dist/src/types/staking.d.ts +++ b/dist/src/types/staking.d.ts @@ -74,55 +74,87 @@ export interface Redelegation { shares_src: string; shares_dst: string; } +/** + * param struct for delegate tx + */ +export interface DelegateTxParam { + delegator_address: string; + validator_address: string; + amount: Coin; +} +/** + * param struct for undelegate tx + */ +export interface UndelegateTxParam { + delegator_address: string; + validator_address: string; + amount: Coin; +} +/** + * param struct for redelegate tx + */ +export interface RedelegateTxParam { + delegator_address: string; + validator_src_address: string; + validator_dst_address: string; + amount: Coin; +} /** * Msg struct for delegating to a validator * @hidden */ -export declare class MsgDelegate implements Msg { - type: string; - value: { - delegator_addr: string; - validator_addr: string; - delegation: Coin; - }; - constructor(delegatorAddr: string, validatorAddr: string, delegation: Coin); - getSignBytes(): object; +export declare class MsgDelegate extends Msg { + value: DelegateTxParam; + constructor(msg: DelegateTxParam); + static getModelClass(): any; + getModel(): any; + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean; } /** * Msg struct for undelegating from a validator * @hidden */ -export declare class MsgUndelegate implements Msg { - type: string; - value: { - delegator_addr: string; - validator_addr: string; - shares_amount: string; - }; - constructor(delegatorAddr: string, validatorAddr: string, sharesAmount: string); - getSignBytes(): object; +export declare class MsgUndelegate extends Msg { + value: UndelegateTxParam; + constructor(msg: UndelegateTxParam); + static getModelClass(): any; + getModel(): any; + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean; } /** * Msg struct for redelegating illiquid tokens from one validator to another * @hidden */ -export declare class MsgRedelegate implements Msg { - type: string; - value: { - delegator_addr: string; - validator_src_addr: string; - validator_dst_addr: string; - shares_amount: string; - }; - constructor(delegatorAddr: string, validatorSrcAddr: string, validatorDstAddr: string, sharesAmount: string); - getSignBytes(): object; +export declare class MsgRedelegate extends Msg { + value: RedelegateTxParam; + constructor(msg: RedelegateTxParam); + static getModelClass(): any; + getModel(): any; + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean; } /** * Msg struct for updating validator informations * @hidden */ -export declare class MsgEditValidator implements Msg { - type: string; +export declare class MsgEditValidator extends Msg { value: { Description: ValidatorDescription; address: string; diff --git a/dist/src/types/staking.js b/dist/src/types/staking.js index 5cb2b02d..af24446d 100644 --- a/dist/src/types/staking.js +++ b/dist/src/types/staking.js @@ -1,81 +1,250 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.MsgEditValidator = exports.MsgRedelegate = exports.MsgUndelegate = exports.MsgDelegate = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); + +var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); + +var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); + +var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _types = require("./types"); + +var _helper = require("../helper"); + +var pbs = _interopRequireWildcard(require("./proto")); + +var is = _interopRequireWildcard(require("is_js")); + +var _errors = require("../errors"); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + /** * Msg struct for delegating to a validator * @hidden */ -class MsgDelegate { - constructor(delegatorAddr, validatorAddr, delegation) { - this.type = 'irishub/stake/MsgDelegate'; - this.value = { - delegator_addr: delegatorAddr, - validator_addr: validatorAddr, - delegation: delegation, - }; +var MsgDelegate = /*#__PURE__*/function (_Msg) { + (0, _inherits2["default"])(MsgDelegate, _Msg); + + var _super = _createSuper(MsgDelegate); + + function MsgDelegate(msg) { + var _this; + + (0, _classCallCheck2["default"])(this, MsgDelegate); + _this = _super.call(this, _types.TxType.MsgDelegate); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "value", void 0); + _this.value = msg; + return _this; + } + + (0, _createClass2["default"])(MsgDelegate, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())(); + msg.setDelegatorAddress(this.value.delegator_address).setValidatorAddress(this.value.validator_address).setAmount(_helper.TxModelCreator.createCoinModel(this.value.amount.denom, this.value.amount.amount)); + return msg; } - getSignBytes() { - return this; + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + + }, { + key: "validate", + value: function validate() { + if (is.undefined(this.value.delegator_address)) { + throw new _errors.SdkError("delegator address can not be empty"); + } + + if (is.undefined(this.value.validator_address)) { + throw new _errors.SdkError("validator address can not be empty"); + } + + return true; } -} -exports.MsgDelegate = MsgDelegate; + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.staking_tx_pb.MsgDelegate; + } + }]); + return MsgDelegate; +}(_types.Msg); /** * Msg struct for undelegating from a validator * @hidden */ -class MsgUndelegate { - constructor(delegatorAddr, validatorAddr, sharesAmount) { - this.type = 'irishub/stake/BeginUnbonding'; - this.value = { - delegator_addr: delegatorAddr, - validator_addr: validatorAddr, - shares_amount: sharesAmount, - }; + + +exports.MsgDelegate = MsgDelegate; + +var MsgUndelegate = /*#__PURE__*/function (_Msg2) { + (0, _inherits2["default"])(MsgUndelegate, _Msg2); + + var _super2 = _createSuper(MsgUndelegate); + + function MsgUndelegate(msg) { + var _this2; + + (0, _classCallCheck2["default"])(this, MsgUndelegate); + _this2 = _super2.call(this, _types.TxType.MsgUndelegate); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "value", void 0); + _this2.value = msg; + return _this2; + } + + (0, _createClass2["default"])(MsgUndelegate, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())(); + msg.setDelegatorAddress(this.value.delegator_address).setValidatorAddress(this.value.validator_address).setAmount(_helper.TxModelCreator.createCoinModel(this.value.amount.denom, this.value.amount.amount)); + return msg; } - getSignBytes() { - return this.value; + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + + }, { + key: "validate", + value: function validate() { + if (is.undefined(this.value.delegator_address)) { + throw new _errors.SdkError("delegator address can not be empty"); + } + + if (is.undefined(this.value.validator_address)) { + throw new _errors.SdkError("validator address can not be empty"); + } + + return true; } -} -exports.MsgUndelegate = MsgUndelegate; + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.staking_tx_pb.MsgUndelegate; + } + }]); + return MsgUndelegate; +}(_types.Msg); /** * Msg struct for redelegating illiquid tokens from one validator to another * @hidden */ -class MsgRedelegate { - constructor(delegatorAddr, validatorSrcAddr, validatorDstAddr, sharesAmount) { - this.type = 'irishub/stake/BeginRedelegate'; - this.value = { - delegator_addr: delegatorAddr, - validator_src_addr: validatorSrcAddr, - validator_dst_addr: validatorDstAddr, - shares_amount: sharesAmount, - }; + + +exports.MsgUndelegate = MsgUndelegate; + +var MsgRedelegate = /*#__PURE__*/function (_Msg3) { + (0, _inherits2["default"])(MsgRedelegate, _Msg3); + + var _super3 = _createSuper(MsgRedelegate); + + function MsgRedelegate(msg) { + var _this3; + + (0, _classCallCheck2["default"])(this, MsgRedelegate); + _this3 = _super3.call(this, _types.TxType.MsgBeginRedelegate); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this3), "value", void 0); + _this3.value = msg; + return _this3; + } + + (0, _createClass2["default"])(MsgRedelegate, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())(); + msg.setDelegatorAddress(this.value.delegator_address).setValidatorSrcAddress(this.value.validator_src_address).setValidatorDstAddress(this.value.validator_dst_address).setAmount(_helper.TxModelCreator.createCoinModel(this.value.amount.denom, this.value.amount.amount)); + return msg; } - getSignBytes() { - return { - delegator_addr: this.value.delegator_addr, - validator_src_addr: this.value.validator_src_addr, - validator_dst_addr: this.value.validator_dst_addr, - shares: this.value.shares_amount, - }; + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + + }, { + key: "validate", + value: function validate() { + if (is.undefined(this.value.delegator_address)) { + throw new _errors.SdkError("delegator address can not be empty"); + } + + if (is.undefined(this.value.validator_src_address)) { + throw new _errors.SdkError("source validator address can not be empty"); + } + + if (is.undefined(this.value.validator_dst_address)) { + throw new _errors.SdkError("destination validator address can not be empty"); + } + + return true; } -} -exports.MsgRedelegate = MsgRedelegate; + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.staking_tx_pb.MsgBeginRedelegate; + } + }]); + return MsgRedelegate; +}(_types.Msg); /** * Msg struct for updating validator informations * @hidden */ -class MsgEditValidator { - constructor(description, address, commissionRate) { - this.type = 'irishub/stake/MsgEditValidator'; - this.value = { - Description: description, - address, - commission_rate: commissionRate, - }; - } - getSignBytes() { - return this.value; + + +exports.MsgRedelegate = MsgRedelegate; + +var MsgEditValidator = /*#__PURE__*/function (_Msg4) { + (0, _inherits2["default"])(MsgEditValidator, _Msg4); + + var _super4 = _createSuper(MsgEditValidator); + + function MsgEditValidator(description, address, commissionRate) { + var _this4; + + (0, _classCallCheck2["default"])(this, MsgEditValidator); + _this4 = _super4.call(this, 'irishub/stake/MsgEditValidator'); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this4), "value", void 0); + _this4.value = { + Description: description, + address: address, + commission_rate: commissionRate + }; + return _this4; + } + + (0, _createClass2["default"])(MsgEditValidator, [{ + key: "getSignBytes", + value: function getSignBytes() { + return this.value; } -} -exports.MsgEditValidator = MsgEditValidator; -//# sourceMappingURL=staking.js.map \ No newline at end of file + }]); + return MsgEditValidator; +}(_types.Msg); + +exports.MsgEditValidator = MsgEditValidator; \ No newline at end of file diff --git a/dist/src/types/staking.js.map b/dist/src/types/staking.js.map deleted file mode 100644 index 87ff7d4b..00000000 --- a/dist/src/types/staking.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"staking.js","sourceRoot":"","sources":["../../../src/types/staking.ts"],"names":[],"mappings":";;AAqFA;;;GAGG;AACH,MAAa,WAAW;IAQtB,YAAY,aAAqB,EAAE,aAAqB,EAAE,UAAgB;QACxE,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG;YACX,cAAc,EAAE,aAAa;YAC7B,cAAc,EAAE,aAAa;YAC7B,UAAU,EAAE,UAAU;SACvB,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AApBD,kCAoBC;AAED;;;GAGG;AACH,MAAa,aAAa;IAQxB,YACE,aAAqB,EACrB,aAAqB,EACrB,YAAoB;QAEpB,IAAI,CAAC,IAAI,GAAG,8BAA8B,CAAC;QAC3C,IAAI,CAAC,KAAK,GAAG;YACX,cAAc,EAAE,aAAa;YAC7B,cAAc,EAAE,aAAa;YAC7B,aAAa,EAAE,YAAY;SAC5B,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AAxBD,sCAwBC;AAED;;;GAGG;AACH,MAAa,aAAa;IASxB,YACE,aAAqB,EACrB,gBAAwB,EACxB,gBAAwB,EACxB,YAAoB;QAEpB,IAAI,CAAC,IAAI,GAAG,+BAA+B,CAAC;QAC5C,IAAI,CAAC,KAAK,GAAG;YACX,cAAc,EAAE,aAAa;YAC7B,kBAAkB,EAAE,gBAAgB;YACpC,kBAAkB,EAAE,gBAAgB;YACpC,aAAa,EAAE,YAAY;SAC5B,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO;YACL,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc;YACzC,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,kBAAkB;YACjD,kBAAkB,EAAE,IAAI,CAAC,KAAK,CAAC,kBAAkB;YACjD,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa;SACjC,CAAC;IACJ,CAAC;CACF;AAhCD,sCAgCC;AAED;;;GAGG;AACH,MAAa,gBAAgB;IAQ3B,YACE,WAAiC,EACjC,OAAe,EACf,cAAsB;QAEtB,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAC;QAC7C,IAAI,CAAC,KAAK,GAAG;YACX,WAAW,EAAE,WAAW;YACxB,OAAO;YACP,eAAe,EAAE,cAAc;SAChC,CAAC;IACJ,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AAxBD,4CAwBC"} \ No newline at end of file diff --git a/dist/src/types/token.d.ts b/dist/src/types/token.d.ts new file mode 100644 index 00000000..f856a8b0 --- /dev/null +++ b/dist/src/types/token.d.ts @@ -0,0 +1,124 @@ +import { Coin, Msg } from './types'; +export interface Token { + symbol: string; + name: string; + scale: number; + min_unit: string; + initial_supply: number; + max_supply: number; + mintable: boolean; + owner: string; +} +export interface TokenFees { + exist: boolean; + issue_fee: Coin; + mint_fee: Coin; +} +/** + * param struct for issue token tx + */ +export interface IssueTokenTxParam { + symbol: string; + name: string; + min_unit: string; + owner: string; + scale?: number; + initial_supply?: number; + max_supply?: number; + mintable?: boolean; +} +/** + * param struct for mint token tx + */ +export interface MintTokenTxParam { + symbol: string; + amount: number; + owner: string; + to?: string; +} +/** + * param struct for edit token tx + */ +export interface EditTokenTxParam { + symbol: string; + owner: string; + name?: string; + max_supply?: number; + mintable?: string; +} +/** + * param struct for transfer token owner tx + */ +export interface TransferTokenOwnerTxParam { + symbol: string; + src_owner: string; + dst_owner: string; +} +/** + * Msg struct for issue token + * @hidden + */ +export declare class MsgIssueToken extends Msg { + value: IssueTokenTxParam; + constructor(msg: IssueTokenTxParam); + static getModelClass(): any; + getModel(): any; + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean; +} +/** + * Msg struct for edit token + * @hidden + */ +export declare class MsgEditToken extends Msg { + value: EditTokenTxParam; + constructor(msg: EditTokenTxParam); + static getModelClass(): any; + getModel(): any; + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean; +} +/** + * Msg struct for mint token + * @hidden + */ +export declare class MsgMintToken extends Msg { + value: MintTokenTxParam; + constructor(msg: MintTokenTxParam); + static getModelClass(): any; + getModel(): any; + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean; +} +/** + * Msg struct for transfer token owner + * @hidden + */ +export declare class MsgTransferTokenOwner extends Msg { + value: TransferTokenOwnerTxParam; + constructor(msg: TransferTokenOwnerTxParam); + static getModelClass(): any; + getModel(): any; + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean; +} diff --git a/dist/src/types/token.js b/dist/src/types/token.js new file mode 100644 index 00000000..78bc1e19 --- /dev/null +++ b/dist/src/types/token.js @@ -0,0 +1,318 @@ +"use strict"; + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.MsgTransferTokenOwner = exports.MsgMintToken = exports.MsgEditToken = exports.MsgIssueToken = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); + +var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); + +var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); + +var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _types = require("./types"); + +var is = _interopRequireWildcard(require("is_js")); + +var pbs = _interopRequireWildcard(require("./proto")); + +var _errors = require("../errors"); + +var _constants = require("./constants"); + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } + +/** + * Msg struct for issue token + * @hidden + */ +var MsgIssueToken = /*#__PURE__*/function (_Msg) { + (0, _inherits2["default"])(MsgIssueToken, _Msg); + + var _super = _createSuper(MsgIssueToken); + + function MsgIssueToken(msg) { + var _this; + + (0, _classCallCheck2["default"])(this, MsgIssueToken); + _this = _super.call(this, _types.TxType.MsgIssueToken); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "value", void 0); + _this.value = msg; + return _this; + } + + (0, _createClass2["default"])(MsgIssueToken, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())().setSymbol(this.value.symbol).setName(this.value.name).setMinUnit(this.value.min_unit).setOwner(this.value.owner); + + if (is.not.undefined(this.value.scale)) { + msg.setScale(this.value.scale); + } + + if (is.not.undefined(this.value.initial_supply)) { + msg.setInitialSupply(this.value.initial_supply); + } + + if (is.not.undefined(this.value.max_supply)) { + msg.setMaxSupply(this.value.max_supply); + } + + if (is.not.undefined(this.value.mintable)) { + msg.setMintable(this.value.mintable); + } + + return msg; + } + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + + }, { + key: "validate", + value: function validate() { + if (is.undefined(this.value.symbol)) { + throw new _errors.SdkError("token symbol can not be empty"); + } + + if (is.undefined(this.value.name)) { + throw new _errors.SdkError("name can not be empty"); + } + + if (is.undefined(this.value.min_unit)) { + throw new _errors.SdkError("min unit can not be empty"); + } + + if (is.undefined(this.value.owner)) { + throw new _errors.SdkError("owner can not be empty"); + } + + return true; + } + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.token_tx_pb.MsgIssueToken; + } + }]); + return MsgIssueToken; +}(_types.Msg); +/** + * Msg struct for edit token + * @hidden + */ + + +exports.MsgIssueToken = MsgIssueToken; + +var MsgEditToken = /*#__PURE__*/function (_Msg2) { + (0, _inherits2["default"])(MsgEditToken, _Msg2); + + var _super2 = _createSuper(MsgEditToken); + + function MsgEditToken(msg) { + var _this2; + + (0, _classCallCheck2["default"])(this, MsgEditToken); + _this2 = _super2.call(this, _types.TxType.MsgEditToken); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this2), "value", void 0); + _this2.value = msg; + return _this2; + } + + (0, _createClass2["default"])(MsgEditToken, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())().setSymbol(this.value.symbol).setOwner(this.value.owner); + + if (is.not.undefined(this.value.name)) { + msg.setName(this.value.name); + } + + if (is.not.undefined(this.value.max_supply)) { + msg.setMaxSupply(this.value.max_supply); + } + + if (is.not.undefined(this.value.mintable)) { + msg.setMintable(this.value.mintable); + } else { + msg.setMintable(_constants.doNotModify); + } + + return msg; + } + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + + }, { + key: "validate", + value: function validate() { + if (is.undefined(this.value.symbol)) { + throw new _errors.SdkError("token symbol can not be empty"); + } + + if (is.undefined(this.value.owner)) { + throw new _errors.SdkError("owner can not be empty"); + } + + return true; + } + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.token_tx_pb.MsgEditToken; + } + }]); + return MsgEditToken; +}(_types.Msg); +/** + * Msg struct for mint token + * @hidden + */ + + +exports.MsgEditToken = MsgEditToken; + +var MsgMintToken = /*#__PURE__*/function (_Msg3) { + (0, _inherits2["default"])(MsgMintToken, _Msg3); + + var _super3 = _createSuper(MsgMintToken); + + function MsgMintToken(msg) { + var _this3; + + (0, _classCallCheck2["default"])(this, MsgMintToken); + _this3 = _super3.call(this, _types.TxType.MsgMintToken); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this3), "value", void 0); + _this3.value = msg; + return _this3; + } + + (0, _createClass2["default"])(MsgMintToken, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())().setSymbol(this.value.symbol).setAmount(this.value.amount).setOwner(this.value.owner); + + if (is.not.undefined(this.value.to)) { + msg.setTo(this.value.to); + } + + return msg; + } + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + + }, { + key: "validate", + value: function validate() { + if (is.undefined(this.value.symbol)) { + throw new _errors.SdkError("token symbol can not be empty"); + } + + if (is.undefined(this.value.amount)) { + throw new _errors.SdkError("amount of token minted can not be empty"); + } + + if (is.undefined(this.value.owner)) { + throw new _errors.SdkError("owner can not be empty"); + } + + return true; + } + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.token_tx_pb.MsgMintToken; + } + }]); + return MsgMintToken; +}(_types.Msg); +/** + * Msg struct for transfer token owner + * @hidden + */ + + +exports.MsgMintToken = MsgMintToken; + +var MsgTransferTokenOwner = /*#__PURE__*/function (_Msg4) { + (0, _inherits2["default"])(MsgTransferTokenOwner, _Msg4); + + var _super4 = _createSuper(MsgTransferTokenOwner); + + function MsgTransferTokenOwner(msg) { + var _this4; + + (0, _classCallCheck2["default"])(this, MsgTransferTokenOwner); + _this4 = _super4.call(this, _types.TxType.MsgTransferTokenOwner); + (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this4), "value", void 0); + _this4.value = msg; + return _this4; + } + + (0, _createClass2["default"])(MsgTransferTokenOwner, [{ + key: "getModel", + value: function getModel() { + var msg = new (this.constructor.getModelClass())().setSymbol(this.value.symbol).setSrcOwner(this.value.src_owner).setDstOwner(this.value.dst_owner); + return msg; + } + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + + }, { + key: "validate", + value: function validate() { + if (is.undefined(this.value.symbol)) { + throw new _errors.SdkError("token symbol can not be empty"); + } + + if (is.undefined(this.value.src_owner)) { + throw new _errors.SdkError("source owner can not be empty"); + } + + if (is.undefined(this.value.dst_owner)) { + throw new _errors.SdkError("destination owner can not be empty"); + } + + return true; + } + }], [{ + key: "getModelClass", + value: function getModelClass() { + return pbs.token_tx_pb.MsgTransferTokenOwner; + } + }]); + return MsgTransferTokenOwner; +}(_types.Msg); + +exports.MsgTransferTokenOwner = MsgTransferTokenOwner; \ No newline at end of file diff --git a/dist/src/types/tx.js b/dist/src/types/tx.js index ab1e2853..9a390c31 100644 --- a/dist/src/types/tx.js +++ b/dist/src/types/tx.js @@ -1,3 +1 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=tx.js.map \ No newline at end of file +"use strict"; \ No newline at end of file diff --git a/dist/src/types/tx.js.map b/dist/src/types/tx.js.map deleted file mode 100644 index f9136011..00000000 --- a/dist/src/types/tx.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tx.js","sourceRoot":"","sources":["../../../src/types/tx.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/src/types/types.d.ts b/dist/src/types/types.d.ts index 4c71ab96..54291799 100644 --- a/dist/src/types/types.d.ts +++ b/dist/src/types/types.d.ts @@ -2,11 +2,42 @@ * Base Msg * @hidden */ -export interface Msg { +export declare class Msg { type: string; value: any; - getSignBytes?(): object; - marshal?(): Msg; + constructor(type: string); + static getModelClass(): any; + getModel(): any; + pack(): any; + /** + * unpack protobuf tx message + * @type {[type]} + * returns protobuf message instance + */ + unpack(msgValue: string): any; +} +export declare enum TxType { + MsgSend = "cosmos.bank.v1beta1.MsgSend", + MsgMultiSend = "cosmos.bank.v1beta1.MsgMultiSend", + MsgDelegate = "cosmos.staking.v1beta1.MsgDelegate", + MsgUndelegate = "cosmos.staking.v1beta1.MsgUndelegate", + MsgBeginRedelegate = "cosmos.staking.v1beta1.MsgBeginRedelegate", + MsgWithdrawDelegatorReward = "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", + MsgSetWithdrawAddress = "cosmos.distribution.v1beta1.MsgSetWithdrawAddress", + MsgWithdrawValidatorCommission = "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", + MsgFundCommunityPool = "cosmos.distribution.v1beta1.MsgFundCommunityPool", + MsgAddLiquidity = "irismod.coinswap.MsgAddLiquidity", + MsgRemoveLiquidity = "irismod.coinswap.MsgRemoveLiquidity", + MsgSwapOrder = "irismod.coinswap.MsgSwapOrder", + MsgIssueDenom = "irismod.nft.MsgIssueDenom", + MsgTransferNFT = "irismod.nft.MsgTransferNFT", + MsgEditNFT = "irismod.nft.MsgEditNFT", + MsgMintNFT = "irismod.nft.MsgMintNFT", + MsgBurnNFT = "irismod.nft.MsgBurnNFT", + MsgIssueToken = "irismod.token.MsgIssueToken", + MsgEditToken = "irismod.token.MsgEditToken", + MsgMintToken = "irismod.token.MsgMintToken", + MsgTransferTokenOwner = "irismod.token.MsgTransferTokenOwner" } /** * Base Tx @@ -50,9 +81,18 @@ export interface JsonRpcError { * @hidden */ export interface Pubkey { - type: string; + type: PubkeyType; value: string; } +/** + * Base Pubkey Type + * @hidden + */ +export declare enum PubkeyType { + secp256k1 = "secp256k1", + ed25519 = "ed25519", + sm2 = "sm2" +} /** Tag struct */ export interface Tag { key: string; diff --git a/dist/src/types/types.js b/dist/src/types/types.js index 11e638d1..78d6b48c 100644 --- a/dist/src/types/types.js +++ b/dist/src/types/types.js @@ -1,3 +1,119 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=types.js.map \ No newline at end of file + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.PubkeyType = exports.TxType = exports.Msg = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _helper = require("../helper"); + +var _errors = require("../errors"); + +/** + * Base Msg + * @hidden + */ +var Msg = /*#__PURE__*/function () { + function Msg(type) { + (0, _classCallCheck2["default"])(this, Msg); + (0, _defineProperty2["default"])(this, "type", void 0); + (0, _defineProperty2["default"])(this, "value", void 0); + this.type = type; + } + + (0, _createClass2["default"])(Msg, [{ + key: "getModel", + value: function getModel() { + throw new _errors.SdkError("not implement", _errors.CODES.Internal); + } + }, { + key: "pack", + value: function pack() { + var msg = this.getModel(); + return _helper.TxModelCreator.createAnyModel(this.type, msg.serializeBinary()); + } + /** + * unpack protobuf tx message + * @type {[type]} + * returns protobuf message instance + */ + + }, { + key: "unpack", + value: function unpack(msgValue) { + if (!msgValue) { + throw new _errors.SdkError("msgValue can not be empty", _errors.CODES.Internal); + } + + var msg = this.constructor.getModelClass().deserializeBinary(Buffer.from(msgValue, 'base64')); + + if (msg) { + return msg; + } else { + throw new _errors.SdkError("unpack message fail", _errors.CODES.FailedUnpackingProtobufMessagFromAny); + } + } + }], [{ + key: "getModelClass", + value: function getModelClass() { + throw new _errors.SdkError("not implement", _errors.CODES.Internal); + } + }]); + return Msg; +}(); + +exports.Msg = Msg; +var TxType; +/** + * Base Tx + * @hidden + */ + +exports.TxType = TxType; + +(function (TxType) { + TxType["MsgSend"] = "cosmos.bank.v1beta1.MsgSend"; + TxType["MsgMultiSend"] = "cosmos.bank.v1beta1.MsgMultiSend"; + TxType["MsgDelegate"] = "cosmos.staking.v1beta1.MsgDelegate"; + TxType["MsgUndelegate"] = "cosmos.staking.v1beta1.MsgUndelegate"; + TxType["MsgBeginRedelegate"] = "cosmos.staking.v1beta1.MsgBeginRedelegate"; + TxType["MsgWithdrawDelegatorReward"] = "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"; + TxType["MsgSetWithdrawAddress"] = "cosmos.distribution.v1beta1.MsgSetWithdrawAddress"; + TxType["MsgWithdrawValidatorCommission"] = "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission"; + TxType["MsgFundCommunityPool"] = "cosmos.distribution.v1beta1.MsgFundCommunityPool"; + TxType["MsgAddLiquidity"] = "irismod.coinswap.MsgAddLiquidity"; + TxType["MsgRemoveLiquidity"] = "irismod.coinswap.MsgRemoveLiquidity"; + TxType["MsgSwapOrder"] = "irismod.coinswap.MsgSwapOrder"; + TxType["MsgIssueDenom"] = "irismod.nft.MsgIssueDenom"; + TxType["MsgTransferNFT"] = "irismod.nft.MsgTransferNFT"; + TxType["MsgEditNFT"] = "irismod.nft.MsgEditNFT"; + TxType["MsgMintNFT"] = "irismod.nft.MsgMintNFT"; + TxType["MsgBurnNFT"] = "irismod.nft.MsgBurnNFT"; + TxType["MsgIssueToken"] = "irismod.token.MsgIssueToken"; + TxType["MsgEditToken"] = "irismod.token.MsgEditToken"; + TxType["MsgMintToken"] = "irismod.token.MsgMintToken"; + TxType["MsgTransferTokenOwner"] = "irismod.token.MsgTransferTokenOwner"; +})(TxType || (exports.TxType = TxType = {})); + +/** + * Base Pubkey Type + * @hidden + */ +var PubkeyType; +/** Tag struct */ + +exports.PubkeyType = PubkeyType; + +(function (PubkeyType) { + PubkeyType["secp256k1"] = "secp256k1"; + PubkeyType["ed25519"] = "ed25519"; + PubkeyType["sm2"] = "sm2"; +})(PubkeyType || (exports.PubkeyType = PubkeyType = {})); \ No newline at end of file diff --git a/dist/src/types/types.js.map b/dist/src/types/types.js.map deleted file mode 100644 index ec2c1842..00000000 --- a/dist/src/types/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/types/types.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/src/types/validator.js b/dist/src/types/validator.js index 5a0e095c..9a390c31 100644 --- a/dist/src/types/validator.js +++ b/dist/src/types/validator.js @@ -1,3 +1 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=validator.js.map \ No newline at end of file +"use strict"; \ No newline at end of file diff --git a/dist/src/types/validator.js.map b/dist/src/types/validator.js.map deleted file mode 100644 index d577887e..00000000 --- a/dist/src/types/validator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"validator.js","sourceRoot":"","sources":["../../../src/types/validator.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/src/utils/address.js b/dist/src/utils/address.js index 21d1265c..21f341a4 100644 --- a/dist/src/utils/address.js +++ b/dist/src/utils/address.js @@ -1,19 +1,41 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("./utils"); -const crypto_1 = require("./crypto"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.AddressUtils = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _utils = require("./utils"); + +var _crypto = require("./crypto"); + /** * Utilities for address operations */ -class AddressUtils { +var AddressUtils = /*#__PURE__*/function () { + function AddressUtils() { + (0, _classCallCheck2["default"])(this, AddressUtils); + } + + (0, _createClass2["default"])(AddressUtils, null, [{ + key: "getAddrHexFromBech32", + /** * Convert bech32 address to hex string * @param addr Bech32 address * @returns Hex address */ - static getAddrHexFromBech32(addr) { - return utils_1.Utils.ab2hexstring(crypto_1.Crypto.decodeAddress(addr)); + value: function getAddrHexFromBech32(addr) { + return _utils.Utils.ab2hexstring(_crypto.Crypto.decodeAddress(addr)); } -} -exports.AddressUtils = AddressUtils; -//# sourceMappingURL=address.js.map \ No newline at end of file + }]); + return AddressUtils; +}(); + +exports.AddressUtils = AddressUtils; \ No newline at end of file diff --git a/dist/src/utils/address.js.map b/dist/src/utils/address.js.map deleted file mode 100644 index 8167c4c5..00000000 --- a/dist/src/utils/address.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"address.js","sourceRoot":"","sources":["../../../src/utils/address.ts"],"names":[],"mappings":";;AAAA,mCAAgC;AAChC,qCAAkC;AAElC;;GAEG;AACH,MAAa,YAAY;IAEvB;;;;OAIG;IACH,MAAM,CAAC,oBAAoB,CAAC,IAAY;QACtC,OAAO,aAAK,CAAC,YAAY,CAAC,eAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IACxD,CAAC;CACF;AAVD,oCAUC"} \ No newline at end of file diff --git a/dist/src/utils/crypto.d.ts b/dist/src/utils/crypto.d.ts index bd771dff..1ab5f9d0 100644 --- a/dist/src/utils/crypto.d.ts +++ b/dist/src/utils/crypto.d.ts @@ -9,9 +9,7 @@ export declare class Crypto { static PRIVKEY_LEN: number; static MNEMONIC_LEN: number; static DECODED_ADDRESS_LEN: number; - static CURVE: string; static HDPATH: string; - static ec: any; /** * Decodes an address in bech32 format. * @param address The bech32 address to decode @@ -27,12 +25,12 @@ export declare class Crypto { static checkAddress(address: string, hrp: string): boolean; /** * Encodes an address from input data bytes. - * @param pubkey The public key to encode + * @param pubkeyHash The public key to encode * @param hrp The address prefix * @param type The output type (default: hex) * @returns Bech32 address */ - static encodeAddress(pubkey: string, hrp?: string, type?: string): any; + static encodeAddress(pubkeyHash: string, hrp?: string, type?: string): any; /** * ConvertAndEncode converts from a base64 encoded byte array to bach32 encoded byte string and then to bech32 * @param hrp The address prefix @@ -59,30 +57,26 @@ export declare class Crypto { */ static generateRandomArray(length: number): ArrayBuffer; /** - * Gets the pubkey hexstring - * @param publicKey Encoded public key - * @returns Public key hexstring - */ - static getPublicKey(publicKey: string): string; - /** - * Calculates the public key from a given private key. + * Calculates the full public key from a given private key. * @param privateKeyHex The private key hexstring - * @returns Public key hexstring + * @param type Pubkey Type + * @returns Public key {type:type, value:hexstring} */ - static getPublicKeyFromPrivateKey(privateKeyHex: string): string; + static getFullPublicKeyFromPrivateKey(privateKeyHex: string, type?: types.PubkeyType): types.Pubkey; /** - * Calculates the Secp256k1 public key from a given private key. + * Calculates the public key from a given private key. * @param privateKeyHex The private key hexstring - * @returns Tendermint public key + * @param type Pubkey Type + * @returns Public key {type:type, value:hexstring} */ - static getPublicKeySecp256k1FromPrivateKey(privateKeyHex: string): types.Pubkey; + static getPublicKeyFromPrivateKey(privateKeyHex: string, type?: types.PubkeyType): types.Pubkey; /** - * PubKey performs the point-scalar multiplication from the privKey on the - * generator point to get the pubkey. - * @param privateKey - * @returns Public key hexstring + * [marshalPubKey description] + * @param {[type]} pubKey:{type: types.PubkeyType, value:base64String} Tendermint public key + * @param {[type]} lengthPrefixed:boolean length prefixed + * @return {[type]} pubKey hexString public key with amino prefix */ - static generatePubKey(privateKey: Buffer): string; + static aminoMarshalPubKey(pubKey: types.Pubkey, lengthPrefixed?: boolean): string; /** * Gets an address from a public key hex. * @param publicKeyHex The public key hexstring @@ -90,21 +84,15 @@ export declare class Crypto { * * @returns The address */ - static getAddressFromPublicKey(publicKeyHex: string, prefix: string): string; + static getAddressFromPublicKey(publicKey: string | types.Pubkey, prefix: string): string; /** * Gets an address from a private key. * @param privateKeyHex The private key hexstring * @param prefix Bech32 prefix + * @param type Pubkey Type * @returns The address */ - static getAddressFromPrivateKey(privateKeyHex: string, prefix: string): string; - /** - * Generates a signature (64 byte ) for a transaction based on given private key. - * @param signBytesHex Unsigned transaction sign bytes hexstring. - * @param privateKey The private key. - * @returns Signature. Does not include tx. - */ - static generateSignature(signBytesHex: string, privateKey: string | Buffer): Buffer; + static getAddressFromPrivateKey(privateKeyHex: string, prefix: string, type?: types.PubkeyType): string; /** * Verifies a signature (64 byte ) given the sign bytes and public key. * @param sigHex The signature hexstring. @@ -112,7 +100,14 @@ export declare class Crypto { * @param publicKeyHex The public key. * @returns Signature. Does not include tx. */ - static verifySignature(sigHex: string, signBytesHex: string, publicKeyHex: string): string; + /** + * Generates a signature (base64 string) for a signDocSerialize based on given private key. + * @param signDocSerialize from protobuf and tx. + * @param privateKey The private key. + * @param type Pubkey Type. + * @returns Signature. Does not include tx. + */ + static generateSignature(signDocSerialize: Uint8Array, private_key: string, type?: types.PubkeyType): string; /** * Generates a keystore object (web3 secret storage format) given a private key to store and a password. * @param privateKeyHex The private key hexstring. @@ -149,13 +144,13 @@ export declare class Crypto { * @param password A passphrase for generating the salt, according to bip39 * @returns hexstring */ - static getPrivateKeyFromMnemonic(mnemonic: string, derive?: boolean, index?: number, password?: string): string; + static getPrivateKeyFromMnemonic(mnemonic: string, index?: number, derive?: boolean, password?: string): string; /** * Generate Tx hash from stdTx - * @param tx - * @throws if the tx is invlid of unsupported tx type + * @param protobuf tx :base64 string + * @throws tx hash */ - static generateTxHash(tx: types.Tx): string; + static generateTxHash(tx: string): string; /** * Copy from https://github.com/sipa/bech32/blob/master/ref/javascript/segwit_addr.js */ diff --git a/dist/src/utils/crypto.js b/dist/src/utils/crypto.js index d33b32f0..1e93d592 100644 --- a/dist/src/utils/crypto.js +++ b/dist/src/utils/crypto.js @@ -1,30 +1,73 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const csprng = require("secure-random"); -const bech32 = require("bech32"); -const cryp = require("crypto-browserify"); -const uuid = require("uuid"); -const is = require("is_js"); -const bip32 = require("bip32"); -const bip39 = require("bip39"); -const elliptic_1 = require("elliptic"); -const ecc = require("tiny-secp256k1"); -const utils_1 = require("./utils"); -const errors_1 = require("../errors"); -const amino_js_1 = require("@irisnet/amino-js"); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Crypto = void 0; + +var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var csprng = _interopRequireWildcard(require("secure-random")); + +var bech32 = _interopRequireWildcard(require("bech32")); + +var cryp = _interopRequireWildcard(require("crypto-browserify")); + +var uuid = _interopRequireWildcard(require("uuid")); + +var is = _interopRequireWildcard(require("is_js")); + +var bip32 = _interopRequireWildcard(require("bip32")); + +var bip39 = _interopRequireWildcard(require("bip39")); + +var _elliptic = require("elliptic"); + +var _utils = require("./utils"); + +var types = _interopRequireWildcard(require("../types")); + +var _errors = require("../errors"); + +var Sha256 = require('sha256'); + +var Secp256k1 = require('secp256k1'); + +var SM2 = require('sm-crypto').sm2; /** * Crypto Utils * @hidden */ -class Crypto { + + +var Crypto = /*#__PURE__*/function () { + function Crypto() { + (0, _classCallCheck2["default"])(this, Crypto); + } + + (0, _createClass2["default"])(Crypto, null, [{ + key: "decodeAddress", + // secp256k1 privkey is 32 bytes + //hdpath + /** * Decodes an address in bech32 format. * @param address The bech32 address to decode * @returns The decoded address buffer */ - static decodeAddress(address) { - const decodeAddress = bech32.decode(address); - return Buffer.from(bech32.fromWords(decodeAddress.words)); + value: function decodeAddress(address) { + var decodeAddress = bech32.decode(address); + return Buffer.from(bech32.fromWords(decodeAddress.words)); } /** * Checks whether an address is valid. @@ -32,33 +75,42 @@ class Crypto { * @param hrp The prefix to check for the bech32 address * @returns true if the address is valid */ - static checkAddress(address, hrp) { - try { - if (!address.startsWith(hrp)) { - return false; - } - const decodedAddress = bech32.decode(address); - const decodedAddressLength = Crypto.decodeAddress(address).length; - if (decodedAddressLength === Crypto.DECODED_ADDRESS_LEN && - decodedAddress.prefix === hrp) { - return true; - } - return false; + + }, { + key: "checkAddress", + value: function checkAddress(address, hrp) { + try { + if (!address.startsWith(hrp)) { + return false; } - catch (err) { - return false; + + var decodedAddress = bech32.decode(address); + var decodedAddressLength = Crypto.decodeAddress(address).length; + + if (decodedAddressLength === Crypto.DECODED_ADDRESS_LEN && decodedAddress.prefix === hrp) { + return true; } + + return false; + } catch (err) { + return false; + } } /** * Encodes an address from input data bytes. - * @param pubkey The public key to encode + * @param pubkeyHash The public key to encode * @param hrp The address prefix * @param type The output type (default: hex) * @returns Bech32 address */ - static encodeAddress(pubkey, hrp = 'iaa', type = 'hex') { - const words = bech32.toWords(Buffer.from(pubkey, type)); - return bech32.encode(hrp, words); + + }, { + key: "encodeAddress", + value: function encodeAddress(pubkeyHash) { + var hrp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'iaa'; + var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'hex'; + var words = bech32.toWords(Buffer.from(pubkeyHash, type)); + return bech32.encode(hrp, words); } /** * ConvertAndEncode converts from a base64 encoded byte array to bach32 encoded byte string and then to bech32 @@ -66,83 +118,166 @@ class Crypto { * @param data Base64 encoded byte array * @returns Bech32 address */ - static convertAndEncode(hrp, data) { - const converted = Crypto.convertBits(data, 8, 5, true); - return bech32.encode(hrp, converted); + + }, { + key: "convertAndEncode", + value: function convertAndEncode(hrp, data) { + var converted = Crypto.convertBits(data, 8, 5, true); + return bech32.encode(hrp, converted); } /** * DecodeAndConvert decodes a bech32 encoded string and converts to base64 encoded bytes * @param address Bech32 address * @returns Base64 encoded bytes */ - static decodeAndConvert(address) { - const decodeAddress = bech32.decode(address); - return Crypto.convertBits(decodeAddress.words, 5, 8, false); + + }, { + key: "decodeAndConvert", + value: function decodeAndConvert(address) { + var decodeAddress = bech32.decode(address); + return Crypto.convertBits(decodeAddress.words, 5, 8, false); } /** * Generates 32 bytes of random entropy * @param len The output length (default: 32 bytes) * @returns An entropy bytes hexstring */ - static generatePrivateKey(len = Crypto.PRIVKEY_LEN) { - return utils_1.Utils.ab2hexstring(csprng(len)); + + }, { + key: "generatePrivateKey", + value: function generatePrivateKey() { + var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Crypto.PRIVKEY_LEN; + return _utils.Utils.ab2hexstring(csprng(len)); } /** * Generates an arrayBuffer filled with random bits. * @param length The length of buffer. * @returns A random array buffer */ - static generateRandomArray(length) { - return csprng(length); + + }, { + key: "generateRandomArray", + value: function generateRandomArray(length) { + return csprng(length); } /** - * Gets the pubkey hexstring - * @param publicKey Encoded public key - * @returns Public key hexstring - */ - static getPublicKey(publicKey) { - const keyPair = Crypto.ec.keyFromPublic(publicKey, 'hex'); - return keyPair.getPublic(); - } - /** - * Calculates the public key from a given private key. + * Calculates the full public key from a given private key. * @param privateKeyHex The private key hexstring - * @returns Public key hexstring + * @param type Pubkey Type + * @returns Public key {type:type, value:hexstring} */ - static getPublicKeyFromPrivateKey(privateKeyHex) { - if (!privateKeyHex || privateKeyHex.length !== Crypto.PRIVKEY_LEN * 2) { - throw new errors_1.SdkError('invalid privateKey'); - } - const curve = new elliptic_1.ec(Crypto.CURVE); - const keypair = curve.keyFromPrivate(privateKeyHex, 'hex'); - const unencodedPubKey = keypair.getPublic().encode('hex'); - return unencodedPubKey; + + }, { + key: "getFullPublicKeyFromPrivateKey", + value: function getFullPublicKeyFromPrivateKey(privateKeyHex) { + var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : types.PubkeyType.secp256k1; + + if (!privateKeyHex || privateKeyHex.length !== Crypto.PRIVKEY_LEN * 2) { + throw new _errors.SdkError('invalid privateKey', _errors.CODES.KeyNotFound); + } + + var pubKey = ''; + + switch (type) { + case types.PubkeyType.ed25519: + throw new _errors.SdkError("not implement", _errors.CODES.Panic); + + case types.PubkeyType.sm2: + pubKey = SM2.getPublicKeyFromPrivateKey(privateKeyHex); + break; + + case types.PubkeyType.secp256k1: + default: + var secp256k1pubkey = new _elliptic.ec('secp256k1').keyFromPrivate(privateKeyHex, 'hex').getPublic(); + pubKey = secp256k1pubkey.encode('hex'); + break; + } + + return { + type: type, + value: pubKey + }; } /** - * Calculates the Secp256k1 public key from a given private key. + * Calculates the public key from a given private key. * @param privateKeyHex The private key hexstring - * @returns Tendermint public key + * @param type Pubkey Type + * @returns Public key {type:type, value:hexstring} */ - static getPublicKeySecp256k1FromPrivateKey(privateKeyHex) { - const publicKeyHex = Crypto.getPublicKeyFromPrivateKey(privateKeyHex); - const pubKey = Crypto.ec.keyFromPublic(publicKeyHex, 'hex'); - const pubPoint = pubKey.getPublic(); - const compressed = pubPoint.encodeCompressed(); - return { - type: 'tendermint/PubKeySecp256k1', - value: Buffer.from(compressed).toString('base64'), - }; + + }, { + key: "getPublicKeyFromPrivateKey", + value: function getPublicKeyFromPrivateKey(privateKeyHex) { + var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : types.PubkeyType.secp256k1; + + if (!privateKeyHex || privateKeyHex.length !== Crypto.PRIVKEY_LEN * 2) { + throw new _errors.SdkError('invalid privateKey', _errors.CODES.KeyNotFound); + } + + var pubKey = ''; + + switch (type) { + case types.PubkeyType.ed25519: + throw new _errors.SdkError("not implement", _errors.CODES.Panic); + + case types.PubkeyType.sm2: + pubKey = SM2.getPublicKeyFromPrivateKey(privateKeyHex, 'compress'); + break; + + case types.PubkeyType.secp256k1: + default: + var secp256k1pubkey = new _elliptic.ec('secp256k1').keyFromPrivate(privateKeyHex, 'hex').getPublic(); + pubKey = Buffer.from(secp256k1pubkey.encodeCompressed()).toString('hex'); + break; + } + + return { + type: type, + value: pubKey + }; } /** - * PubKey performs the point-scalar multiplication from the privKey on the - * generator point to get the pubkey. - * @param privateKey - * @returns Public key hexstring + * [marshalPubKey description] + * @param {[type]} pubKey:{type: types.PubkeyType, value:base64String} Tendermint public key + * @param {[type]} lengthPrefixed:boolean length prefixed + * @return {[type]} pubKey hexString public key with amino prefix */ - static generatePubKey(privateKey) { - const curve = new elliptic_1.ec(Crypto.CURVE); - const keypair = curve.keyFromPrivate(privateKey); - return keypair.getPublic(); + + }, { + key: "aminoMarshalPubKey", + value: function aminoMarshalPubKey(pubKey, lengthPrefixed) { + var type = pubKey.type, + value = pubKey.value; + var pubKeyType = ''; + + switch (type) { + case types.PubkeyType.secp256k1: + pubKeyType = 'tendermint/PubKeySecp256k1'; + break; + + case types.PubkeyType.ed25519: + pubKeyType = 'tendermint/PubKeyEd25519'; + break; + + case types.PubkeyType.sm2: + pubKeyType = 'tendermint/PubKeySm2'; + break; + + default: + pubKeyType = type; + break; + } + + var pk = _utils.Utils.getAminoPrefix(pubKeyType); + + pk = pk.concat(Buffer.from(value, 'base64').length); + pk = pk.concat(Array.from(Buffer.from(value, 'base64'))); + + if (lengthPrefixed) { + pk = [pk.length].concat((0, _toConsumableArray2["default"])(pk)); + } + + return Buffer.from(pk).toString('hex'); } /** * Gets an address from a public key hex. @@ -151,35 +286,49 @@ class Crypto { * * @returns The address */ - static getAddressFromPublicKey(publicKeyHex, prefix) { - const pubKey = Crypto.ec.keyFromPublic(publicKeyHex, 'hex'); - const pubPoint = pubKey.getPublic(); - const compressed = pubPoint.encodeCompressed(); - const hexed = utils_1.Utils.ab2hexstring(compressed); - const hash = utils_1.Utils.sha256ripemd160(hexed); // https://git.io/fAn8N - const address = Crypto.encodeAddress(hash, prefix); - return address; + + }, { + key: "getAddressFromPublicKey", + value: function getAddressFromPublicKey(publicKey, prefix) { + if (typeof publicKey == 'string') { + publicKey = { + type: types.PubkeyType.secp256k1, + value: publicKey + }; + } + + var hash = ''; + + switch (publicKey.type) { + case types.PubkeyType.ed25519: + throw new _errors.SdkError("not implement", _errors.CODES.Panic); + + case types.PubkeyType.sm2: + hash = _utils.Utils.sha256(publicKey.value).substr(0, 40); + break; + + case types.PubkeyType.secp256k1: + default: + hash = _utils.Utils.sha256ripemd160(publicKey.value); + break; + } + + return Crypto.encodeAddress(hash, prefix); + ; } /** * Gets an address from a private key. * @param privateKeyHex The private key hexstring * @param prefix Bech32 prefix + * @param type Pubkey Type * @returns The address */ - static getAddressFromPrivateKey(privateKeyHex, prefix) { - return Crypto.getAddressFromPublicKey(Crypto.getPublicKeyFromPrivateKey(privateKeyHex), prefix); - } - /** - * Generates a signature (64 byte ) for a transaction based on given private key. - * @param signBytesHex Unsigned transaction sign bytes hexstring. - * @param privateKey The private key. - * @returns Signature. Does not include tx. - */ - static generateSignature(signBytesHex, privateKey) { - const msgHash = utils_1.Utils.sha256(signBytesHex); - const msgHashHex = Buffer.from(msgHash, 'hex'); - const signature = ecc.sign(msgHashHex, Buffer.from(privateKey.toString(), 'hex')); // enc ignored if buffer - return signature; + + }, { + key: "getAddressFromPrivateKey", + value: function getAddressFromPrivateKey(privateKeyHex, prefix) { + var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : types.PubkeyType.secp256k1; + return Crypto.getAddressFromPublicKey(Crypto.getPublicKeyFromPrivateKey(privateKeyHex, type), prefix); } /** * Verifies a signature (64 byte ) given the sign bytes and public key. @@ -188,14 +337,61 @@ class Crypto { * @param publicKeyHex The public key. * @returns Signature. Does not include tx. */ - static verifySignature(sigHex, signBytesHex, publicKeyHex) { - const publicKey = Buffer.from(publicKeyHex, 'hex'); - if (!ecc.isPoint(publicKey)) { - throw new errors_1.SdkError('Invalid public key provided'); - } - const msgHash = utils_1.Utils.sha256(signBytesHex); - const msgHashHex = Buffer.from(msgHash, 'hex'); - return ecc.verify(msgHashHex, publicKey, Buffer.from(sigHex, 'hex')); + // static verifySignature( + // sigHex: string, + // signBytesHex: string, + // publicKeyHex: string + // ): string { + // const publicKey = Buffer.from(publicKeyHex, 'hex'); + // if (!ecc.isPoint(publicKey)) { + // throw new SdkError('Invalid public key provided'); + // } + // const msgHash = Utils.sha256(signBytesHex); + // const msgHashHex = Buffer.from(msgHash, 'hex'); + // return ecc.verify(msgHashHex, publicKey, Buffer.from(sigHex, 'hex')); + // } + + /** + * Generates a signature (base64 string) for a signDocSerialize based on given private key. + * @param signDocSerialize from protobuf and tx. + * @param privateKey The private key. + * @param type Pubkey Type. + * @returns Signature. Does not include tx. + */ + + }, { + key: "generateSignature", + value: function generateSignature(signDocSerialize, private_key) { + var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : types.PubkeyType.secp256k1; + var signature = ''; + + switch (type) { + case types.PubkeyType.ed25519: + throw new _errors.SdkError("not implement", _errors.CODES.Panic); + + case types.PubkeyType.sm2: + var sm2Sig = SM2.doSignature(Buffer.from(signDocSerialize), private_key, { + hash: true + }); + signature = Buffer.from(sm2Sig, 'hex').toString('base64'); + break; + + case types.PubkeyType.secp256k1: + default: + var msghash = Buffer.from(Sha256(signDocSerialize, { + asBytes: true + })); + var prikeyArr = Buffer.from(private_key, 'hex'); + var Secp256k1Sig = Secp256k1.sign(msghash, prikeyArr); + signature = Secp256k1Sig.signature.toString('base64'); + break; + } + + if (!signature) { + throw Error(' generate Signature error '); + } + + return signature; } /** * Generates a keystore object (web3 secret storage format) given a private key to store and a password. @@ -205,45 +401,48 @@ class Crypto { * @param iterations Number of iterations. Defaults to 262144 * @returns The keystore object. */ - static generateKeyStore(privateKeyHex, password, prefix, iterations = 262144) { - const salt = cryp.randomBytes(32); - const iv = cryp.randomBytes(16); - const cipherAlg = 'aes-128-ctr'; - const kdf = 'pbkdf2'; - const kdfparams = { - dklen: 32, - salt: salt.toString('hex'), - c: iterations, - prf: 'hmac-sha256', - }; - const derivedKey = cryp.pbkdf2Sync(Buffer.from(password), salt, kdfparams.c, kdfparams.dklen, 'sha256'); - const cipher = cryp.createCipheriv(cipherAlg, derivedKey.slice(0, 16), iv); - if (!cipher) { - throw new errors_1.SdkError('Unsupported cipher'); + + }, { + key: "generateKeyStore", + value: function generateKeyStore(privateKeyHex, password, prefix) { + var iterations = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 262144; + var salt = cryp.randomBytes(32); + var iv = cryp.randomBytes(16); + var cipherAlg = 'aes-128-ctr'; + var kdf = 'pbkdf2'; + var kdfparams = { + dklen: 32, + salt: salt.toString('hex'), + c: iterations, + prf: 'hmac-sha256' + }; + var derivedKey = cryp.pbkdf2Sync(Buffer.from(password), salt, kdfparams.c, kdfparams.dklen, 'sha256'); + var cipher = cryp.createCipheriv(cipherAlg, derivedKey.slice(0, 16), iv); + + if (!cipher) { + throw new _errors.SdkError('Unsupported cipher', _errors.CODES.Internal); + } + + var ciphertext = Buffer.concat([cipher.update(Buffer.from(privateKeyHex, 'hex')), cipher["final"]()]); + var bufferValue = Buffer.concat([derivedKey.slice(16, 32), ciphertext]); + return { + version: 1, + id: uuid.v4({ + random: cryp.randomBytes(16) + }), + address: Crypto.getAddressFromPrivateKey(privateKeyHex, prefix), + crypto: { + ciphertext: ciphertext.toString('hex'), + cipherparams: { + iv: iv.toString('hex') + }, + cipher: cipherAlg, + kdf: kdf, + kdfparams: kdfparams, + // mac must use sha3 according to web3 secret storage spec + mac: _utils.Utils.sha3(bufferValue.toString('hex')) } - const ciphertext = Buffer.concat([ - cipher.update(Buffer.from(privateKeyHex, 'hex')), - cipher.final(), - ]); - const bufferValue = Buffer.concat([derivedKey.slice(16, 32), ciphertext]); - return { - version: 1, - id: uuid.v4({ - random: cryp.randomBytes(16), - }), - address: Crypto.getAddressFromPrivateKey(privateKeyHex, prefix), - crypto: { - ciphertext: ciphertext.toString('hex'), - cipherparams: { - iv: iv.toString('hex'), - }, - cipher: cipherAlg, - kdf, - kdfparams, - // mac must use sha3 according to web3 secret storage spec - mac: utils_1.Utils.sha3(bufferValue.toString('hex')), - }, - }; + }; } /** * Gets a private key from a keystore given its password. @@ -251,45 +450,61 @@ class Crypto { * @param password The password. * @returns The private key */ - static getPrivateKeyFromKeyStore(keystore, password) { - if (!is.string(password)) { - throw new errors_1.SdkError('No password given.'); - } - const json = is.object(keystore) - ? keystore - : JSON.parse(keystore.toString()); - const kdfparams = json.crypto.kdfparams; - if (kdfparams.prf !== 'hmac-sha256') { - throw new errors_1.SdkError('Unsupported parameters to PBKDF2'); + + }, { + key: "getPrivateKeyFromKeyStore", + value: function getPrivateKeyFromKeyStore(keystore, password) { + if (!is.string(password)) { + throw new _errors.SdkError('No password given.', _errors.CODES.InvalidPassword); + } + + var json = is.object(keystore) ? keystore : JSON.parse(keystore.toString()); + var kdfparams = json.crypto.kdfparams; + + if (kdfparams.prf !== 'hmac-sha256') { + throw new _errors.SdkError('Unsupported parameters to PBKDF2', _errors.CODES.Internal); + } + + var derivedKey = cryp.pbkdf2Sync(Buffer.from(password), Buffer.from(kdfparams.salt, 'hex'), kdfparams.c, kdfparams.dklen, 'sha256'); + var ciphertext = Buffer.from(json.crypto.ciphertext, 'hex'); + var bufferValue = Buffer.concat([derivedKey.slice(16, 32), ciphertext]); // try sha3 (new / ethereum keystore) mac first + + var mac = _utils.Utils.sha3(bufferValue.toString('hex')); + + if (mac !== json.crypto.mac) { + // the legacy (sha256) mac is next to be checked. pre-testnet keystores used a sha256 digest for the mac. + // the sha256 mac was not compatible with ethereum keystores, so it was changed to sha3 for mainnet. + var macLegacy = _utils.Utils.sha256(bufferValue.toString('hex')); + + if (macLegacy !== json.crypto.mac) { + throw new _errors.SdkError('Keystore mac check failed (sha3 & sha256) wrong password?', _errors.CODES.Internal); } - const derivedKey = cryp.pbkdf2Sync(Buffer.from(password), Buffer.from(kdfparams.salt, 'hex'), kdfparams.c, kdfparams.dklen, 'sha256'); - const ciphertext = Buffer.from(json.crypto.ciphertext, 'hex'); - const bufferValue = Buffer.concat([derivedKey.slice(16, 32), ciphertext]); - // try sha3 (new / ethereum keystore) mac first - const mac = utils_1.Utils.sha3(bufferValue.toString('hex')); - if (mac !== json.crypto.mac) { - // the legacy (sha256) mac is next to be checked. pre-testnet keystores used a sha256 digest for the mac. - // the sha256 mac was not compatible with ethereum keystores, so it was changed to sha3 for mainnet. - const macLegacy = utils_1.Utils.sha256(bufferValue.toString('hex')); - if (macLegacy !== json.crypto.mac) { - throw new errors_1.SdkError('Keystore mac check failed (sha3 & sha256) wrong password?'); - } - } - const decipher = cryp.createDecipheriv(json.crypto.cipher, derivedKey.slice(0, 16), Buffer.from(json.crypto.cipherparams.iv, 'hex')); - const privateKey = Buffer.concat([ - decipher.update(ciphertext), - decipher.final(), - ]).toString('hex'); - return privateKey; + } + + var decipher = cryp.createDecipheriv(json.crypto.cipher, derivedKey.slice(0, 16), Buffer.from(json.crypto.cipherparams.iv, 'hex')); + var privateKey = Buffer.concat([decipher.update(ciphertext), decipher["final"]()]).toString('hex'); + return privateKey; } /** * Generates mnemonic phrase words using random entropy. * * @returns Mnemonic */ - static generateMnemonic() { - return bip39.generateMnemonic(Crypto.MNEMONIC_LEN); + + }, { + key: "generateMnemonic", + value: function generateMnemonic() { + return bip39.generateMnemonic(Crypto.MNEMONIC_LEN); } + /** + * Validates mnemonic phrase words. + * @param mnemonic The mnemonic phrase words + * @returns Validation result + */ + + }, { + key: "getPrivateKeyFromMnemonic", + /** * Gets a private key from mnemonic words. * @param mnemonic The mnemonic phrase words @@ -298,74 +513,102 @@ class Crypto { * @param password A passphrase for generating the salt, according to bip39 * @returns hexstring */ - static getPrivateKeyFromMnemonic(mnemonic, derive = true, index = 0, password = '') { - if (!bip39.validateMnemonic(mnemonic)) { - throw new errors_1.SdkError('wrong mnemonic format'); + value: function getPrivateKeyFromMnemonic(mnemonic) { + var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var derive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + var password = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ''; + + if (!bip39.validateMnemonic(mnemonic)) { + throw new _errors.SdkError('wrong mnemonic format', _errors.CODES.InvalidMnemonic); + } + + var seed = bip39.mnemonicToSeedSync(mnemonic, password); + + if (derive) { + var master = bip32.fromSeed(seed); + var child = master.derivePath(Crypto.HDPATH + index); + + if (typeof child === 'undefined' || typeof child.privateKey === 'undefined') { + throw new _errors.SdkError('error getting private key from mnemonic', _errors.CODES.DerivePrivateKeyError); } - const seed = bip39.mnemonicToSeedSync(mnemonic, password); - if (derive) { - const master = bip32.fromSeed(seed); - const child = master.derivePath(Crypto.HDPATH + index); - if (typeof child === 'undefined' || - typeof child.privateKey === 'undefined') { - throw new errors_1.SdkError('error getting private key from mnemonic'); - } - return child.privateKey.toString('hex'); - } - return seed.toString('hex'); + + return child.privateKey.toString('hex'); + } + + return seed.toString('hex'); } /** * Generate Tx hash from stdTx - * @param tx - * @throws if the tx is invlid of unsupported tx type + * @param protobuf tx :base64 string + * @throws tx hash */ - static generateTxHash(tx) { - return utils_1.Utils.sha256(utils_1.Utils.ab2hexstring(amino_js_1.marshalTx(tx))).toUpperCase(); + + }, { + key: "generateTxHash", + value: function generateTxHash(tx) { + if (!tx || typeof tx != 'string') { + throw new _errors.SdkError('invalid tx', _errors.CODES.TxParseError); + } + + var tx_pb = types.tx_tx_pb.Tx.deserializeBinary(tx); + + if (!tx_pb) { + throw new _errors.SdkError('deserialize tx err', _errors.CODES.TxParseError); + } + + var txRaw = new types.tx_tx_pb.TxRaw(); + txRaw.setBodyBytes(tx_pb.getBody().serializeBinary()); + txRaw.setAuthInfoBytes(tx_pb.getAuthInfo().serializeBinary()); + tx_pb.getSignaturesList().forEach(function (signature) { + txRaw.addSignatures(signature); + }); + return (Sha256(txRaw.serializeBinary()) || '').toUpperCase(); } /** * Copy from https://github.com/sipa/bech32/blob/master/ref/javascript/segwit_addr.js */ - static convertBits(data, frombits, tobits, pad) { - let acc = 0; - let bits = 0; - let ret = []; - let maxv = (1 << tobits) - 1; - for (let p = 0; p < data.length; ++p) { - let value = data[p]; - if (value < 0 || value >> frombits !== 0) { - return []; - } - acc = (acc << frombits) | value; - bits += frombits; - while (bits >= tobits) { - bits -= tobits; - ret.push((acc >> bits) & maxv); - } + + }, { + key: "convertBits", + value: function convertBits(data, frombits, tobits, pad) { + var acc = 0; + var bits = 0; + var ret = []; + var maxv = (1 << tobits) - 1; + + for (var p = 0; p < data.length; ++p) { + var value = data[p]; + + if (value < 0 || value >> frombits !== 0) { + return []; } - if (pad) { - if (bits > 0) { - ret.push((acc << (tobits - bits)) & maxv); - } + + acc = acc << frombits | value; + bits += frombits; + + while (bits >= tobits) { + bits -= tobits; + ret.push(acc >> bits & maxv); } - else if (bits >= frombits || (acc << (tobits - bits)) & maxv) { - return []; + } + + if (pad) { + if (bits > 0) { + ret.push(acc << tobits - bits & maxv); } - return ret; + } else if (bits >= frombits || acc << tobits - bits & maxv) { + return []; + } + + return ret; } -} + }]); + return Crypto; +}(); + exports.Crypto = Crypto; -// secp256k1 privkey is 32 bytes -Crypto.PRIVKEY_LEN = 32; -Crypto.MNEMONIC_LEN = 256; -Crypto.DECODED_ADDRESS_LEN = 20; -Crypto.CURVE = 'secp256k1'; -//hdpath -Crypto.HDPATH = "44'/118'/0'/0/"; -Crypto.ec = new elliptic_1.ec(Crypto.CURVE); -/** - * Validates mnemonic phrase words. - * @param mnemonic The mnemonic phrase words - * @returns Validation result - */ -Crypto.validateMnemonic = bip39.validateMnemonic; -//# sourceMappingURL=crypto.js.map \ No newline at end of file +(0, _defineProperty2["default"])(Crypto, "PRIVKEY_LEN", 32); +(0, _defineProperty2["default"])(Crypto, "MNEMONIC_LEN", 256); +(0, _defineProperty2["default"])(Crypto, "DECODED_ADDRESS_LEN", 20); +(0, _defineProperty2["default"])(Crypto, "HDPATH", "44'/118'/0'/0/"); +(0, _defineProperty2["default"])(Crypto, "validateMnemonic", bip39.validateMnemonic); \ No newline at end of file diff --git a/dist/src/utils/crypto.js.map b/dist/src/utils/crypto.js.map deleted file mode 100644 index c176e82b..00000000 --- a/dist/src/utils/crypto.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../../src/utils/crypto.ts"],"names":[],"mappings":";;AAAA,wCAAwC;AACxC,iCAAiC;AACjC,0CAA0C;AAC1C,6BAA6B;AAC7B,4BAA4B;AAC5B,+BAA+B;AAC/B,+BAA+B;AAC/B,uCAAoC;AACpC,sCAAsC;AACtC,mCAAgC;AAEhC,sCAAqC;AACrC,gDAA8C;AAE9C;;;GAGG;AACH,MAAa,MAAM;IAYjB;;;;OAIG;IACH,MAAM,CAAC,aAAa,CAAC,OAAe;QAClC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC7C,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CAAC,OAAe,EAAE,GAAW;QAC9C,IAAI;YACF,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;gBAC5B,OAAO,KAAK,CAAC;aACd;YAED,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC9C,MAAM,oBAAoB,GAAG,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC;YAClE,IACE,oBAAoB,KAAK,MAAM,CAAC,mBAAmB;gBACnD,cAAc,CAAC,MAAM,KAAK,GAAG,EAC7B;gBACA,OAAO,IAAI,CAAC;aACb;YAED,OAAO,KAAK,CAAC;SACd;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,KAAK,CAAC;SACd;IACH,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,aAAa,CAAC,MAAc,EAAE,GAAG,GAAG,KAAK,EAAE,IAAI,GAAG,KAAK;QAC5D,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;QACxD,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,gBAAgB,CAAC,GAAW,EAAE,IAAgB;QACnD,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;QACvD,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IACvC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAe;QACrC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC7C,OAAO,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;IAC9D,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,MAAc,MAAM,CAAC,WAAW;QACxD,OAAO,aAAK,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACzC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,mBAAmB,CAAC,MAAc;QACvC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,SAAiB;QACnC,MAAM,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC,aAAa,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAC1D,OAAO,OAAO,CAAC,SAAS,EAAE,CAAC;IAC7B,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,0BAA0B,CAAC,aAAqB;QACrD,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,MAAM,KAAK,MAAM,CAAC,WAAW,GAAG,CAAC,EAAE;YACrE,MAAM,IAAI,iBAAQ,CAAC,oBAAoB,CAAC,CAAC;SAC1C;QACD,MAAM,KAAK,GAAG,IAAI,aAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACnC,MAAM,OAAO,GAAG,KAAK,CAAC,cAAc,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;QAC3D,MAAM,eAAe,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC1D,OAAO,eAAe,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,mCAAmC,CACxC,aAAqB;QAErB,MAAM,YAAY,GAAG,MAAM,CAAC,0BAA0B,CAAC,aAAa,CAAC,CAAC;QACtE,MAAM,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,aAAa,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAC5D,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QACpC,MAAM,UAAU,GAAG,QAAQ,CAAC,gBAAgB,EAAE,CAAC;QAC/C,OAAO;YACL,IAAI,EAAE,4BAA4B;YAClC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;SAClD,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAC,UAAkB;QACtC,MAAM,KAAK,GAAG,IAAI,aAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACnC,MAAM,OAAO,GAAG,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QACjD,OAAO,OAAO,CAAC,SAAS,EAAE,CAAC;IAC7B,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,uBAAuB,CAAC,YAAoB,EAAE,MAAc;QACjE,MAAM,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,aAAa,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAC5D,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QACpC,MAAM,UAAU,GAAG,QAAQ,CAAC,gBAAgB,EAAE,CAAC;QAC/C,MAAM,KAAK,GAAG,aAAK,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAC7C,MAAM,IAAI,GAAG,aAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,uBAAuB;QAClE,MAAM,OAAO,GAAG,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,wBAAwB,CAC7B,aAAqB,EACrB,MAAc;QAEd,OAAO,MAAM,CAAC,uBAAuB,CACnC,MAAM,CAAC,0BAA0B,CAAC,aAAa,CAAC,EAChD,MAAM,CACP,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,iBAAiB,CACtB,YAAoB,EACpB,UAA2B;QAE3B,MAAM,OAAO,GAAG,aAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAC3C,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC/C,MAAM,SAAS,GAAG,GAAG,CAAC,IAAI,CACxB,UAAU,EACV,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAC1C,CAAC,CAAC,wBAAwB;QAC3B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,eAAe,CACpB,MAAc,EACd,YAAoB,EACpB,YAAoB;QAEpB,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACnD,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;YAC3B,MAAM,IAAI,iBAAQ,CAAC,6BAA6B,CAAC,CAAC;SACnD;QACD,MAAM,OAAO,GAAG,aAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAC3C,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC/C,OAAO,GAAG,CAAC,MAAM,CAAC,UAAU,EAAE,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;IACvE,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,gBAAgB,CACrB,aAAqB,EACrB,QAAgB,EAChB,MAAc,EACd,aAAqB,MAAM;QAE3B,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAClC,MAAM,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAChC,MAAM,SAAS,GAAG,aAAa,CAAC;QAEhC,MAAM,GAAG,GAAG,QAAQ,CAAC;QACrB,MAAM,SAAS,GAAG;YAChB,KAAK,EAAE,EAAE;YACT,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;YAC1B,CAAC,EAAE,UAAU;YACb,GAAG,EAAE,aAAa;SACnB,CAAC;QAEF,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAChC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EACrB,IAAI,EACJ,SAAS,CAAC,CAAC,EACX,SAAS,CAAC,KAAK,EACf,QAAQ,CACT,CAAC;QACF,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAC3E,IAAI,CAAC,MAAM,EAAE;YACX,MAAM,IAAI,iBAAQ,CAAC,oBAAoB,CAAC,CAAC;SAC1C;QAED,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;YAC/B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;YAChD,MAAM,CAAC,KAAK,EAAE;SACf,CAAC,CAAC;QACH,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC;QAE1E,OAAO;YACL,OAAO,EAAE,CAAC;YACV,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC;gBACV,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;aAC7B,CAAC;YACF,OAAO,EAAE,MAAM,CAAC,wBAAwB,CAAC,aAAa,EAAE,MAAM,CAAC;YAC/D,MAAM,EAAE;gBACN,UAAU,EAAE,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC;gBACtC,YAAY,EAAE;oBACZ,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;iBACvB;gBACD,MAAM,EAAE,SAAS;gBACjB,GAAG;gBACH,SAAS;gBACT,0DAA0D;gBAC1D,GAAG,EAAE,aAAK,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;aAC7C;SACF,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,yBAAyB,CAC9B,QAAyB,EACzB,QAAgB;QAEhB,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE;YACxB,MAAM,IAAI,iBAAQ,CAAC,oBAAoB,CAAC,CAAC;SAC1C;QAED,MAAM,IAAI,GAAG,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC;YAC9B,CAAC,CAAC,QAAQ;YACV,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;QACpC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;QAExC,IAAI,SAAS,CAAC,GAAG,KAAK,aAAa,EAAE;YACnC,MAAM,IAAI,iBAAQ,CAAC,kCAAkC,CAAC,CAAC;SACxD;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAChC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EACrB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,EAClC,SAAS,CAAC,CAAC,EACX,SAAS,CAAC,KAAK,EACf,QAAQ,CACT,CAAC;QACF,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;QAC9D,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC;QAE1E,+CAA+C;QAC/C,MAAM,GAAG,GAAG,aAAK,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QACpD,IAAI,GAAG,KAAK,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;YAC3B,yGAAyG;YACzG,oGAAoG;YACpG,MAAM,SAAS,GAAG,aAAK,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;YAC5D,IAAI,SAAS,KAAK,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;gBACjC,MAAM,IAAI,iBAAQ,CAChB,2DAA2D,CAC5D,CAAC;aACH;SACF;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CACpC,IAAI,CAAC,MAAM,CAAC,MAAM,EAClB,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EACvB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,EAAE,KAAK,CAAC,CAChD,CAAC;QACF,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;YAC/B,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC;YAC3B,QAAQ,CAAC,KAAK,EAAE;SACjB,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAEnB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,gBAAgB;QACrB,OAAO,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACrD,CAAC;IASD;;;;;;;OAOG;IACH,MAAM,CAAC,yBAAyB,CAC9B,QAAgB,EAChB,MAAM,GAAG,IAAI,EACb,KAAK,GAAG,CAAC,EACT,QAAQ,GAAG,EAAE;QAEb,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,QAAQ,CAAC,EAAE;YACrC,MAAM,IAAI,iBAAQ,CAAC,uBAAuB,CAAC,CAAC;SAC7C;QACD,MAAM,IAAI,GAAG,KAAK,CAAC,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC1D,IAAI,MAAM,EAAE;YACV,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACpC,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;YACvD,IACE,OAAO,KAAK,KAAK,WAAW;gBAC5B,OAAO,KAAK,CAAC,UAAU,KAAK,WAAW,EACvC;gBACA,MAAM,IAAI,iBAAQ,CAAC,yCAAyC,CAAC,CAAC;aAC/D;YACD,OAAO,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SACzC;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,cAAc,CAAC,EAAyB;QAC7C,OAAO,aAAK,CAAC,MAAM,CAAC,aAAK,CAAC,YAAY,CAAC,oBAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IACvE,CAAC;IAED;;OAEG;IACK,MAAM,CAAC,WAAW,CACxB,IAAgB,EAChB,QAAgB,EAChB,MAAc,EACd,GAAY;QAEZ,IAAI,GAAG,GAAG,CAAC,CAAC;QACZ,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,IAAI,GAAG,GAAG,EAAE,CAAC;QACb,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;YACpC,IAAI,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACpB,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,QAAQ,KAAK,CAAC,EAAE;gBACxC,OAAO,EAAE,CAAC;aACX;YACD,GAAG,GAAG,CAAC,GAAG,IAAI,QAAQ,CAAC,GAAG,KAAK,CAAC;YAChC,IAAI,IAAI,QAAQ,CAAC;YACjB,OAAO,IAAI,IAAI,MAAM,EAAE;gBACrB,IAAI,IAAI,MAAM,CAAC;gBACf,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;aAChC;SACF;QACD,IAAI,GAAG,EAAE;YACP,IAAI,IAAI,GAAG,CAAC,EAAE;gBACZ,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;aAC3C;SACF;aAAM,IAAI,IAAI,IAAI,QAAQ,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,EAAE;YAC9D,OAAO,EAAE,CAAC;SACX;QACD,OAAO,GAAG,CAAC;IACb,CAAC;;AAzbH,wBA0bC;AAzbC,gCAAgC;AACzB,kBAAW,GAAG,EAAE,CAAC;AACjB,mBAAY,GAAG,GAAG,CAAC;AACnB,0BAAmB,GAAG,EAAE,CAAC;AACzB,YAAK,GAAG,WAAW,CAAC;AAE3B,QAAQ;AACD,aAAM,GAAG,gBAAgB,CAAC;AAE1B,SAAE,GAAG,IAAI,aAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AA8VjC;;;;GAIG;AACI,uBAAgB,GAAG,KAAK,CAAC,gBAAgB,CAAC"} \ No newline at end of file diff --git a/dist/src/utils/index.js b/dist/src/utils/index.js index a6da9da5..a1a59bef 100644 --- a/dist/src/utils/index.js +++ b/dist/src/utils/index.js @@ -1,10 +1,57 @@ "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -Object.defineProperty(exports, "__esModule", { value: true }); -__export(require("./address")); -__export(require("./utils")); -__export(require("./crypto")); -__export(require("./store-keys")); -//# sourceMappingURL=index.js.map \ No newline at end of file + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _address = require("./address"); + +Object.keys(_address).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _address[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _address[key]; + } + }); +}); + +var _utils = require("./utils"); + +Object.keys(_utils).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _utils[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _utils[key]; + } + }); +}); + +var _crypto = require("./crypto"); + +Object.keys(_crypto).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _crypto[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _crypto[key]; + } + }); +}); + +var _storeKeys = require("./store-keys"); + +Object.keys(_storeKeys).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (key in exports && exports[key] === _storeKeys[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _storeKeys[key]; + } + }); +}); \ No newline at end of file diff --git a/dist/src/utils/index.js.map b/dist/src/utils/index.js.map deleted file mode 100644 index aa7d27e5..00000000 --- a/dist/src/utils/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;AAAA,+BAA0B;AAC1B,6BAAwB;AACxB,8BAAyB;AACzB,kCAA6B"} \ No newline at end of file diff --git a/dist/src/utils/store-keys.js b/dist/src/utils/store-keys.js index d4e83385..3aa18127 100644 --- a/dist/src/utils/store-keys.js +++ b/dist/src/utils/store-keys.js @@ -1,29 +1,57 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("./utils"); -const crypto_1 = require("./crypto"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.StoreKeys = void 0; + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); + +var _utils = require("./utils"); + +var _crypto = require("./crypto"); + /** * @hidden */ -class StoreKeys { +var StoreKeys = /*#__PURE__*/function () { + function StoreKeys() { + (0, _classCallCheck2["default"])(this, StoreKeys); + } + + (0, _createClass2["default"])(StoreKeys, null, [{ + key: "getAccountStoreKey", + /** * Turn an address to key used to get it from the account store * @param address Bech32 address * @returns Base64 encoded byte array */ - static getAccountStoreKey(address) { - const bytes = crypto_1.Crypto.decodeAndConvert(address); - return Uint8Array.from(StoreKeys.addressStoreKeyPrefix.concat(bytes)); + value: function getAccountStoreKey(address) { + var bytes = _crypto.Crypto.decodeAndConvert(address); + + return Uint8Array.from(StoreKeys.addressStoreKeyPrefix.concat(bytes)); } - static getSigningInfoKey(address) { - const bytes = crypto_1.Crypto.decodeAndConvert(address); - return Uint8Array.from(StoreKeys.validatorSigninginfoKey.concat(bytes)); + }, { + key: "getSigningInfoKey", + value: function getSigningInfoKey(address) { + var bytes = _crypto.Crypto.decodeAndConvert(address); + + return Uint8Array.from(StoreKeys.validatorSigninginfoKey.concat(bytes)); } -} + }]); + return StoreKeys; +}(); + exports.StoreKeys = StoreKeys; -StoreKeys.addressStoreKeyPrefix = utils_1.Utils.str2ba('account:'); -StoreKeys.globalAccountNumberKey = utils_1.Utils.str2ba('globalAccountNumber'); -StoreKeys.totalLoosenTokenKey = utils_1.Utils.str2ba('totalLoosenToken'); -StoreKeys.totalSupplyKeyPrefix = utils_1.Utils.str2ba('totalSupply:'); -StoreKeys.validatorSigninginfoKey = [0x01]; -//# sourceMappingURL=store-keys.js.map \ No newline at end of file +(0, _defineProperty2["default"])(StoreKeys, "addressStoreKeyPrefix", _utils.Utils.str2ba('account:')); +(0, _defineProperty2["default"])(StoreKeys, "globalAccountNumberKey", _utils.Utils.str2ba('globalAccountNumber')); +(0, _defineProperty2["default"])(StoreKeys, "totalLoosenTokenKey", _utils.Utils.str2ba('totalLoosenToken')); +(0, _defineProperty2["default"])(StoreKeys, "totalSupplyKeyPrefix", _utils.Utils.str2ba('totalSupply:')); +(0, _defineProperty2["default"])(StoreKeys, "validatorSigninginfoKey", [0x01]); \ No newline at end of file diff --git a/dist/src/utils/store-keys.js.map b/dist/src/utils/store-keys.js.map deleted file mode 100644 index 32c1aa63..00000000 --- a/dist/src/utils/store-keys.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"store-keys.js","sourceRoot":"","sources":["../../../src/utils/store-keys.ts"],"names":[],"mappings":";;AAAA,mCAAgC;AAChC,qCAAkC;AAElC;;GAEG;AACH,MAAa,SAAS;IAMpB;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,OAAe;QACvC,MAAM,KAAK,GAAG,eAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC/C,OAAO,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,qBAAqB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,MAAM,CAAC,iBAAiB,CAAC,OAAe;QACtC,MAAM,KAAK,GAAG,eAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC/C,OAAO,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,uBAAuB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC1E,CAAC;;AAnBH,8BAoBC;AAnBQ,+BAAqB,GAAG,aAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACjD,gCAAsB,GAAG,aAAK,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAC7D,6BAAmB,GAAG,aAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;AACvD,8BAAoB,GAAG,aAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AACpD,iCAAuB,GAAG,CAAC,IAAI,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/src/utils/utils.d.ts b/dist/src/utils/utils.d.ts index a85a7cd2..7fa9c061 100644 --- a/dist/src/utils/utils.d.ts +++ b/dist/src/utils/utils.d.ts @@ -103,9 +103,16 @@ export declare class Utils { static sha3(hex: string): string; static sortObject(obj: any): any; static base64ToString(b64: string): string; + static bytesToBase64(bytes: Uint8Array): string; /** * Decode base64 encoded tags * @param tags */ static decodeTags(tags: types.Tag[]): types.Tag[]; + /** + * get amino prefix from public key encode type. + * @param public key encode type + * @returns UintArray + */ + static getAminoPrefix(prefix: string): Uint8Array; } diff --git a/dist/src/utils/utils.js b/dist/src/utils/utils.js index 2e8623b1..93de9604 100644 --- a/dist/src/utils/utils.js +++ b/dist/src/utils/utils.js @@ -1,90 +1,143 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const hexEncoding = require("crypto-js/enc-hex"); -const SHA3 = require("crypto-js/sha3"); -const SHA256 = require("crypto-js/sha256"); -const RIPEMD160 = require("crypto-js/ripemd160"); -const is = require("is_js"); -const errors_1 = require("../errors"); + +var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); + +var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.Utils = void 0; + +var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")); + +var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); + +var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); + +var hexEncoding = _interopRequireWildcard(require("crypto-js/enc-hex")); + +var SHA3 = _interopRequireWildcard(require("crypto-js/sha3")); + +var SHA256 = _interopRequireWildcard(require("crypto-js/sha256")); + +var RIPEMD160 = _interopRequireWildcard(require("crypto-js/ripemd160")); + +var is = _interopRequireWildcard(require("is_js")); + +var _errors = require("../errors"); + /** * IRISHub SDK JS Utils * @hidden */ -class Utils { +var Utils = /*#__PURE__*/function () { + function Utils() { + (0, _classCallCheck2["default"])(this, Utils); + } + + (0, _createClass2["default"])(Utils, null, [{ + key: "str2ab", + /** * String to ArrayBuffer * @param str ASCII string * @returns Uint8Array */ - static str2ab(str) { - if (typeof str !== 'string') { - throw new errors_1.SdkError('str2ab expects a string'); - } - const result = new Uint8Array(str.length); - for (let i = 0, strLen = str.length; i < strLen; i++) { - result[i] = str.charCodeAt(i); - } - return result; + value: function str2ab(str) { + if (typeof str !== 'string') { + throw new _errors.SdkError('str2ab expects a string', _errors.CODES.Internal); + } + + var result = new Uint8Array(str.length); + + for (var i = 0, strLen = str.length; i < strLen; i++) { + result[i] = str.charCodeAt(i); + } + + return result; } /** * String to Byte Array * @param str ASCII string * @returns Uint8Array */ - static str2ba(str) { - if (typeof str !== 'string') { - throw new errors_1.SdkError('str2ba expects a string'); - } - const result = []; - for (let i = 0, strLen = str.length; i < strLen; i++) { - result[i] = str.charCodeAt(i); - } - return result; + + }, { + key: "str2ba", + value: function str2ba(str) { + if (typeof str !== 'string') { + throw new _errors.SdkError('str2ba expects a string', _errors.CODES.Internal); + } + + var result = []; + + for (var i = 0, strLen = str.length; i < strLen; i++) { + result[i] = str.charCodeAt(i); + } + + return result; } /** * ArrayBuffer to String * @param arr Uint8Array * @returns HEX string */ - static ab2hexstring(arr) { - if (typeof arr !== 'object') { - throw new errors_1.SdkError('ab2hexstring expects an array'); - } - let result = ''; - for (let i = 0; i < arr.length; i++) { - let str = arr[i].toString(16); - str = str.length === 0 ? '00' : str.length === 1 ? '0' + str : str; - result += str; - } - return result; + + }, { + key: "ab2hexstring", + value: function ab2hexstring(arr) { + if ((0, _typeof2["default"])(arr) !== 'object') { + throw new _errors.SdkError('ab2hexstring expects an array', _errors.CODES.Internal); + } + + var result = ''; + + for (var i = 0; i < arr.length; i++) { + var str = arr[i].toString(16); + str = str.length === 0 ? '00' : str.length === 1 ? '0' + str : str; + result += str; + } + + return result; } /** * String to Hex String * @param str ASCII string * @returns HEX string */ - static str2hexstring(str) { - return Utils.ab2hexstring(Utils.str2ab(str)); + + }, { + key: "str2hexstring", + value: function str2hexstring(str) { + return Utils.ab2hexstring(Utils.str2ab(str)); } /** * Object to Hex String * @param obj Json Object * @returns HEX string */ - static obj2hexstring(obj) { - return Utils.str2hexstring(JSON.stringify(obj)); + + }, { + key: "obj2hexstring", + value: function obj2hexstring(obj) { + return Utils.str2hexstring(JSON.stringify(obj)); } /** * Convert an integer to big endian hex and add leading zeros * @param num The number to be converted * @returns HEX string */ - static int2hex(num) { - if (typeof num !== 'number') { - throw new errors_1.SdkError('int2hex expects a number'); - } - const h = num.toString(16); - return h.length % 2 ? '0' + h : h; + + }, { + key: "int2hex", + value: function int2hex(num) { + if (typeof num !== 'number') { + throw new _errors.SdkError('int2hex expects a number', _errors.CODES.Internal); + } + + var h = num.toString(16); + return h.length % 2 ? '0' + h : h; } /** * Converts a number to a big endian hexstring of a suitable size, optionally little endian @@ -93,62 +146,68 @@ class Utils { * @param littleEndian Encode the hex in little endian form * @returns HEX string */ - static num2hexstring(num, size = 1, littleEndian = false) { - if (typeof num !== 'number') - throw new errors_1.SdkError('num must be numeric'); - if (num < 0) - throw new RangeError('num is unsigned (>= 0)'); - if (size % 1 !== 0) - throw new errors_1.SdkError('size must be a whole integer'); - if (!Number.isSafeInteger(num)) { - throw new RangeError(`num (${num}) must be a safe integer`); - } - size = size * 2; - let hexstring = num.toString(16); - hexstring = - hexstring.length % size === 0 - ? hexstring - : ('0'.repeat(size) + hexstring).substring(hexstring.length); - if (littleEndian) - hexstring = Utils.reverseHex(hexstring); - return hexstring; + + }, { + key: "num2hexstring", + value: function num2hexstring(num) { + var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; + var littleEndian = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + if (typeof num !== 'number') throw new _errors.SdkError('num must be numeric'); + if (num < 0) throw new RangeError('num is unsigned (>= 0)'); + if (size % 1 !== 0) throw new _errors.SdkError('size must be a whole integer'); + + if (!Number.isSafeInteger(num)) { + throw new RangeError("num (".concat(num, ") must be a safe integer")); + } + + size = size * 2; + var hexstring = num.toString(16); + hexstring = hexstring.length % size === 0 ? hexstring : ('0'.repeat(size) + hexstring).substring(hexstring.length); + if (littleEndian) hexstring = Utils.reverseHex(hexstring); + return hexstring; } /** * Converts a number to a variable length Int. Used for array length header * @param num Number to convert * @returns HEX string of the variable Int. */ - static num2VarInt(num) { - if (num < 0xfd) { - return Utils.num2hexstring(num); - } - else if (num <= 0xffff) { - // uint16 - return 'fd' + Utils.num2hexstring(num, 2, true); - } - else if (num <= 0xffffffff) { - // uint32 - return 'fe' + Utils.num2hexstring(num, 4, true); - } - else { - // uint64 - return 'ff' + Utils.num2hexstring(num, 8, true); - } + + }, { + key: "num2VarInt", + value: function num2VarInt(num) { + if (num < 0xfd) { + return Utils.num2hexstring(num); + } else if (num <= 0xffff) { + // uint16 + return 'fd' + Utils.num2hexstring(num, 2, true); + } else if (num <= 0xffffffff) { + // uint32 + return 'fe' + Utils.num2hexstring(num, 4, true); + } else { + // uint64 + return 'ff' + Utils.num2hexstring(num, 8, true); + } } /** * Reverses an array. Accepts arrayBuffer. * @param arr Array to reverse * @returns Reversed array */ - static reverseArray(arr) { - if (typeof arr !== 'object' || !arr.length) { - throw new errors_1.SdkError('reverseArray expects an array'); - } - const result = new Uint8Array(arr.length); - for (let i = 0; i < arr.length; i++) { - result[i] = arr[arr.length - 1 - i]; - } - return result; + + }, { + key: "reverseArray", + value: function reverseArray(arr) { + if ((0, _typeof2["default"])(arr) !== 'object' || !arr.length) { + throw new _errors.SdkError('reverseArray expects an array', _errors.CODES.Internal); + } + + var result = new Uint8Array(arr.length); + + for (var i = 0; i < arr.length; i++) { + result[i] = arr[arr.length - 1 - i]; + } + + return result; } /** * Reverses a HEX string, treating 2 chars as a byte. @@ -157,13 +216,18 @@ class Utils { * @param hex HEX string * @returns HEX string reversed in 2s. */ - static reverseHex(hex) { - Utils.ensureHex(hex); - let out = ''; - for (let i = hex.length - 2; i >= 0; i -= 2) { - out += hex.substr(i, 2); - } - return out; + + }, { + key: "reverseHex", + value: function reverseHex(hex) { + Utils.ensureHex(hex); + var out = ''; + + for (var i = hex.length - 2; i >= 0; i -= 2) { + out += hex.substr(i, 2); + } + + return out; } /** * Checks if input is a hexstring. Empty string is considered a hexstring. @@ -174,104 +238,161 @@ class Utils { * @param str * @returns {boolean} */ - static isHex(str) { - try { - const hexRegex = /^([0-9A-Fa-f]{2})*$/; - return hexRegex.test(str); - } - catch (err) { - return false; - } + + }, { + key: "isHex", + value: function isHex(str) { + try { + var hexRegex = /^([0-9A-Fa-f]{2})*$/; + return hexRegex.test(str); + } catch (err) { + return false; + } } /** * Throws an error if input is not hexstring. * @param str */ - static ensureHex(str) { - if (!Utils.isHex(str)) { - throw new errors_1.SdkError(`Expected a hexstring but got ${str}`); - } + + }, { + key: "ensureHex", + value: function ensureHex(str) { + if (!Utils.isHex(str)) { + throw new _errors.SdkError("Expected a hexstring but got ".concat(str), _errors.CODES.Internal); + } } /** * Computes a SHA256 followed by a RIPEMD160. * @param hex Message to hash * @returns Hash output */ - static sha256ripemd160(hex) { - if (typeof hex !== 'string') { - throw new errors_1.SdkError('sha256ripemd160 expects a string'); - } - if (hex.length % 2 !== 0) { - throw new errors_1.SdkError(`invalid hex string length: ${hex}`); - } - const hexEncoded = hexEncoding.parse(hex); - const programSha256 = SHA256(hexEncoded); - return RIPEMD160(programSha256).toString(); + + }, { + key: "sha256ripemd160", + value: function sha256ripemd160(hex) { + if (typeof hex !== 'string') { + throw new _errors.SdkError('sha256ripemd160 expects a string', _errors.CODES.Internal); + } + + if (hex.length % 2 !== 0) { + throw new _errors.SdkError("invalid hex string length: ".concat(hex), _errors.CODES.Internal); + } + + var hexEncoded = typeof hexEncoding === 'function' ? hexEncoding.parse(hex) : hexEncoding["default"].parse(hex); + var programSha256 = typeof SHA256 === 'function' ? SHA256(hexEncoded) : SHA256["default"](hexEncoded); + return typeof RIPEMD160 === 'function' ? RIPEMD160(programSha256).toString() : RIPEMD160["default"](programSha256).toString(); } /** * Computes a single SHA256 digest. * @param hex Message to hash * @returns Hash output */ - static sha256(hex) { - if (typeof hex !== 'string') { - throw new errors_1.SdkError('sha256 expects a hex string'); - } - if (hex.length % 2 !== 0) { - throw new errors_1.SdkError(`invalid hex string length: ${hex}`); - } - const hexEncoded = hexEncoding.parse(hex); - return SHA256(hexEncoded).toString(); + + }, { + key: "sha256", + value: function sha256(hex) { + if (typeof hex !== 'string') { + throw new _errors.SdkError('sha256 expects a hex string', _errors.CODES.Internal); + } + + if (hex.length % 2 !== 0) { + throw new _errors.SdkError("invalid hex string length: ".concat(hex), _errors.CODES.Internal); + } + + var hexEncoded = typeof hexEncoding === 'function' ? hexEncoding.parse(hex) : hexEncoding["default"].parse(hex); + return typeof SHA256 === 'function' ? SHA256(hexEncoded).toString() : SHA256["default"](hexEncoded).toString(); } /** * Computes a single SHA3 (Keccak) digest. * @param hex Message to hash * @returns Hash output */ - static sha3(hex) { - if (typeof hex !== 'string') { - throw new errors_1.SdkError('sha3 expects a hex string'); - } - if (hex.length % 2 !== 0) { - throw new errors_1.SdkError(`invalid hex string length: ${hex}`); - } - const hexEncoded = hexEncoding.parse(hex); - return SHA3(hexEncoded).toString(); + + }, { + key: "sha3", + value: function sha3(hex) { + if (typeof hex !== 'string') { + throw new _errors.SdkError('sha3 expects a hex string', _errors.CODES.Internal); + } + + if (hex.length % 2 !== 0) { + throw new _errors.SdkError("invalid hex string length: ".concat(hex), _errors.CODES.Internal); + } + + var hexEncoded = typeof hexEncoding === 'function' ? hexEncoding.parse(hex) : hexEncoding["default"].parse(hex); + return typeof SHA3 === 'function' ? SHA3(hexEncoded).toString() : SHA3["default"](hexEncoded).toString(); } - static sortObject(obj) { - if (obj === null) - return null; - if (is.not.object(obj)) - return obj; - if (is.array(obj)) - return obj.map(Utils.sortObject); - const sortedKeys = Object.keys(obj).sort(); - const result = {}; - sortedKeys.forEach(key => { - result[key] = Utils.sortObject(obj[key]); - }); - return result; + }, { + key: "sortObject", + value: function sortObject(obj) { + if (obj === null) return null; + if (is.not.object(obj)) return obj; + if (is.array(obj)) return obj.map(Utils.sortObject); + var sortedKeys = Object.keys(obj).sort(); + var result = {}; + sortedKeys.forEach(function (key) { + result[key] = Utils.sortObject(obj[key]); + }); + return result; + } + }, { + key: "base64ToString", + value: function base64ToString(b64) { + return Buffer.from(b64, 'base64').toString(); } - static base64ToString(b64) { - return Buffer.from(b64, 'base64').toString(); + }, { + key: "bytesToBase64", + value: function bytesToBase64(bytes) { + return Buffer.from(bytes).toString('base64'); } /** * Decode base64 encoded tags * @param tags */ - static decodeTags(tags) { - const decodedTags = []; - if (!tags || tags.length === 0) { - return decodedTags; - } - tags.forEach((tag) => { - decodedTags.push({ - key: Utils.base64ToString(tag.key), - value: Utils.base64ToString(tag.value), - }); - }); + + }, { + key: "decodeTags", + value: function decodeTags(tags) { + var decodedTags = []; + + if (!tags || tags.length === 0) { return decodedTags; + } + + tags.forEach(function (tag) { + decodedTags.push({ + key: Utils.base64ToString(tag.key), + value: Utils.base64ToString(tag.value) + }); + }); + return decodedTags; + } + /** + * get amino prefix from public key encode type. + * @param public key encode type + * @returns UintArray + */ + + }, { + key: "getAminoPrefix", + value: function getAminoPrefix(prefix) { + var b = Array.from(Buffer.from((typeof SHA256 === 'function' ? SHA256 : SHA256["default"])(prefix).toString(), 'hex')); + + while (b[0] === 0) { + b = b.slice(1); + } + + b = b.slice(3); + + while (b[0] === 0) { + b = b.slice(1); + } + + b = b.slice(0, 4); + return b; } -} -exports.Utils = Utils; -//# sourceMappingURL=utils.js.map \ No newline at end of file + }]); + return Utils; +}(); + +exports.Utils = Utils; \ No newline at end of file diff --git a/dist/src/utils/utils.js.map b/dist/src/utils/utils.js.map deleted file mode 100644 index 6b362a41..00000000 --- a/dist/src/utils/utils.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/utils/utils.ts"],"names":[],"mappings":";;AAAA,iDAAiD;AACjD,uCAAuC;AACvC,2CAA2C;AAC3C,iDAAiD;AACjD,4BAA4B;AAC5B,sCAAqC;AAGrC;;;GAGG;AACH,MAAa,KAAK;IAChB;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,GAAW;QACvB,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;YAC3B,MAAM,IAAI,iBAAQ,CAAC,yBAAyB,CAAC,CAAC;SAC/C;QACD,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;YACpD,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;SAC/B;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,GAAW;QACvB,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;YAC3B,MAAM,IAAI,iBAAQ,CAAC,yBAAyB,CAAC,CAAC;SAC/C;QACD,MAAM,MAAM,GAAG,EAAE,CAAC;QAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;YACpD,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;SAC/B;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,GAAe;QACjC,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;YAC3B,MAAM,IAAI,iBAAQ,CAAC,+BAA+B,CAAC,CAAC;SACrD;QACD,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACnC,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YAC9B,GAAG,GAAG,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;YACnE,MAAM,IAAI,GAAG,CAAC;SACf;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,aAAa,CAAC,GAAW;QAC9B,OAAO,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/C,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,aAAa,CAAC,GAAW;QAC9B,OAAO,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;IAClD,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,GAAW;QACxB,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;YAC3B,MAAM,IAAI,iBAAQ,CAAC,0BAA0B,CAAC,CAAC;SAChD;QACD,MAAM,CAAC,GAAG,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC3B,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,aAAa,CAAC,GAAW,EAAE,IAAI,GAAG,CAAC,EAAE,YAAY,GAAG,KAAK;QAC9D,IAAI,OAAO,GAAG,KAAK,QAAQ;YAAE,MAAM,IAAI,iBAAQ,CAAC,qBAAqB,CAAC,CAAC;QACvE,IAAI,GAAG,GAAG,CAAC;YAAE,MAAM,IAAI,UAAU,CAAC,wBAAwB,CAAC,CAAC;QAC5D,IAAI,IAAI,GAAG,CAAC,KAAK,CAAC;YAAE,MAAM,IAAI,iBAAQ,CAAC,8BAA8B,CAAC,CAAC;QACvE,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE;YAC9B,MAAM,IAAI,UAAU,CAAC,QAAQ,GAAG,0BAA0B,CAAC,CAAC;SAC7D;QACD,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC;QAChB,IAAI,SAAS,GAAG,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACjC,SAAS;YACP,SAAS,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC;gBAC3B,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACjE,IAAI,YAAY;YAAE,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QAC1D,OAAO,SAAS,CAAC;IACnB,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,GAAW;QAC3B,IAAI,GAAG,GAAG,IAAI,EAAE;YACd,OAAO,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;SACjC;aAAM,IAAI,GAAG,IAAI,MAAM,EAAE;YACxB,SAAS;YACT,OAAO,IAAI,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;SACjD;aAAM,IAAI,GAAG,IAAI,UAAU,EAAE;YAC5B,SAAS;YACT,OAAO,IAAI,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;SACjD;aAAM;YACL,SAAS;YACT,OAAO,IAAI,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;SACjD;IACH,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,GAAe;QACjC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE;YAC1C,MAAM,IAAI,iBAAQ,CAAC,+BAA+B,CAAC,CAAC;SACrD;QACD,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACnC,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;SACrC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,UAAU,CAAC,GAAW;QAC3B,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;QACrB,IAAI,GAAG,GAAG,EAAE,CAAC;QACb,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE;YAC3C,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACzB;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,KAAK,CAAC,GAAW;QACtB,IAAI;YACF,MAAM,QAAQ,GAAG,qBAAqB,CAAC;YACvC,OAAO,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC3B;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,KAAK,CAAC;SACd;IACH,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,SAAS,CAAC,GAAW;QAC1B,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACrB,MAAM,IAAI,iBAAQ,CAAC,gCAAgC,GAAG,EAAE,CAAC,CAAC;SAC3D;IACH,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,eAAe,CAAC,GAAW;QAChC,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;YAC3B,MAAM,IAAI,iBAAQ,CAAC,kCAAkC,CAAC,CAAC;SACxD;QACD,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;YACxB,MAAM,IAAI,iBAAQ,CAAC,8BAA8B,GAAG,EAAE,CAAC,CAAC;SACzD;QACD,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC1C,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;QACzC,OAAO,SAAS,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,MAAM,CAAC,GAAW;QACvB,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;YAC3B,MAAM,IAAI,iBAAQ,CAAC,6BAA6B,CAAC,CAAC;SACnD;QACD,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;YACxB,MAAM,IAAI,iBAAQ,CAAC,8BAA8B,GAAG,EAAE,CAAC,CAAC;SACzD;QACD,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC1C,OAAO,MAAM,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE,CAAC;IACvC,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,IAAI,CAAC,GAAW;QACrB,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;YAC3B,MAAM,IAAI,iBAAQ,CAAC,2BAA2B,CAAC,CAAC;SACjD;QACD,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,EAAE;YACxB,MAAM,IAAI,iBAAQ,CAAC,8BAA8B,GAAG,EAAE,CAAC,CAAC;SACzD;QACD,MAAM,UAAU,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE,CAAC;IACrC,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,GAAQ;QACxB,IAAI,GAAG,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QAC9B,IAAI,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC;YAAE,OAAO,GAAG,CAAC;QACnC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC;YAAE,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACpD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QAC3C,MAAM,MAAM,GAAyB,EAAE,CAAC;QACxC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACvB,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,GAAW;QAC/B,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,IAAiB;QACjC,MAAM,WAAW,GAAgB,EAAE,CAAC;QAEpC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;YAC9B,OAAO,WAAW,CAAC;SACpB;QAED,IAAI,CAAC,OAAO,CAAC,CAAC,GAAc,EAAE,EAAE;YAC9B,WAAW,CAAC,IAAI,CAAC;gBACf,GAAG,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC;gBAClC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC;aACvC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,OAAO,WAAW,CAAC;IACrB,CAAC;CACF;AA/QD,sBA+QC"} \ No newline at end of file diff --git a/dist/test/asset.test.d.ts b/dist/test/asset.test.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/dist/test/asset.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dist/test/asset.test.js b/dist/test/asset.test.js deleted file mode 100644 index dec9fa40..00000000 --- a/dist/test/asset.test.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const basetest_1 = require("./basetest"); -const timeout = 10000; -describe('Asset Tests', () => { - test('query token', () => __awaiter(void 0, void 0, void 0, function* () { - try { - console.log(yield basetest_1.BaseTest.getClient().asset.queryToken('iris')); - } - catch (error) { - console.log(JSON.stringify(error)); - } - }), timeout); - test('query tokens', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .asset.queryTokens() - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }), timeout); - test('query fees', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .asset.queryFees('testcoin') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }), timeout); -}); -//# sourceMappingURL=asset.test.js.map \ No newline at end of file diff --git a/dist/test/asset.test.js.map b/dist/test/asset.test.js.map deleted file mode 100644 index 032bdf8c..00000000 --- a/dist/test/asset.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"asset.test.js","sourceRoot":"","sources":["../../test/asset.test.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,yCAAsC;AAEtC,MAAM,OAAO,GAAG,KAAK,CAAC;AAEtB,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,IAAI,CACF,aAAa,EACb,GAAS,EAAE;QACT,IAAI;YACF,OAAO,CAAC,GAAG,CAAC,MAAM,mBAAQ,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;SAClE;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;SACpC;IACH,CAAC,CAAA,EACD,OAAO,CACR,CAAC;IACF,IAAI,CACF,cAAc,EACd,GAAS,EAAE;QACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;aACvB,KAAK,CAAC,WAAW,EAAE;aACnB,IAAI,CAAC,GAAG,CAAC,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC;aACD,KAAK,CAAC,KAAK,CAAC,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;IACF,IAAI,CACF,YAAY,EACZ,GAAS,EAAE;QACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;aACvB,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC;aAC3B,IAAI,CAAC,GAAG,CAAC,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC;aACD,KAAK,CAAC,KAAK,CAAC,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/test/bank.test.d.ts b/dist/test/bank.test.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/dist/test/bank.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dist/test/bank.test.js b/dist/test/bank.test.js deleted file mode 100644 index cb723559..00000000 --- a/dist/test/bank.test.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const basetest_1 = require("./basetest"); -const timeout = 10000; -describe('Bank Tests', () => { - describe('Send', () => { - test('send coins', () => __awaiter(void 0, void 0, void 0, function* () { - const amount = [ - { - denom: 'iris-atto', - amount: '1000000000000000000', - }, - ]; - yield basetest_1.BaseTest.getClient() - .bank.send('faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7', amount, basetest_1.BaseTest.baseTx) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }), timeout); - }); - describe('Burn', () => { - test('burn coins', () => __awaiter(void 0, void 0, void 0, function* () { - const amount = [ - { - denom: 'iris-atto', - amount: '1000000000000000000', - }, - ]; - yield basetest_1.BaseTest.getClient() - .bank.burn(amount, basetest_1.BaseTest.baseTx) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }), timeout); - }); - describe('Set Memo Regexp', () => { - test('set memo regexp', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .bank.setMemoRegexp('test*', basetest_1.BaseTest.baseTx) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }), timeout); - }); - describe('Query Token Stats', () => { - test('query single token stats', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .bank.queryTokenStats('iris') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }), timeout); - test('query all token stats', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .bank.queryTokenStats() - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }), timeout); - }); -}); -//# sourceMappingURL=bank.test.js.map \ No newline at end of file diff --git a/dist/test/bank.test.js.map b/dist/test/bank.test.js.map deleted file mode 100644 index a21b3c53..00000000 --- a/dist/test/bank.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bank.test.js","sourceRoot":"","sources":["../../test/bank.test.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,yCAAsC;AAEtC,MAAM,OAAO,GAAG,KAAK,CAAC;AAEtB,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;QACpB,IAAI,CACF,YAAY,EACZ,GAAS,EAAE;YACT,MAAM,MAAM,GAAiB;gBAC3B;oBACE,KAAK,EAAE,WAAW;oBAClB,MAAM,EAAE,qBAAqB;iBAC9B;aACF,CAAC;YAEF,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,IAAI,CAAC,IAAI,CACR,4CAA4C,EAC5C,MAAM,EACN,mBAAQ,CAAC,MAAM,CAChB;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;QACpB,IAAI,CACF,YAAY,EACZ,GAAS,EAAE;YACT,MAAM,MAAM,GAAiB;gBAC3B;oBACE,KAAK,EAAE,WAAW;oBAClB,MAAM,EAAE,qBAAqB;iBAC9B;aACF,CAAC;YAEF,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,mBAAQ,CAAC,MAAM,CAAC;iBAClC,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;QAC/B,IAAI,CACF,iBAAiB,EACjB,GAAS,EAAE;YACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,mBAAQ,CAAC,MAAM,CAAC;iBAC5C,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;QACjC,IAAI,CACF,0BAA0B,EAC1B,GAAS,EAAE;YACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;iBAC5B,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;QAEF,IAAI,CACF,uBAAuB,EACvB,GAAS,EAAE;YACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,IAAI,CAAC,eAAe,EAAE;iBACtB,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/test/basetest.d.ts b/dist/test/basetest.d.ts deleted file mode 100644 index 8b382a01..00000000 --- a/dist/test/basetest.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import * as iris from '../src'; -import * as types from '../src/types'; -import { Client } from '../src/client'; -export declare class Consts { - static timeout: number; - static keyName: string; - static keyPassword: string; -} -/** Test KeyDAO */ -export declare class TestKeyDAO implements iris.KeyDAO { - keyMap: { - [key: string]: types.Key; - }; - write(name: string, key: types.Key): void; - read(name: string): types.Key; - delete(name: string): void; -} -export declare class BaseTest { - static baseTx: types.BaseTx; - static getClient(): Client; -} diff --git a/dist/test/basetest.js b/dist/test/basetest.js deleted file mode 100644 index a34cd003..00000000 --- a/dist/test/basetest.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const iris = require("../src"); -const types = require("../src/types"); -class Consts { -} -exports.Consts = Consts; -Consts.timeout = 10000; -Consts.keyName = 'name'; -Consts.keyPassword = 'password'; -/** Test KeyDAO */ -class TestKeyDAO { - constructor() { - this.keyMap = {}; - } - write(name, key) { - this.keyMap[name] = key; - } - read(name) { - return this.keyMap[name]; - } - delete(name) { - delete this.keyMap[name]; - } -} -exports.TestKeyDAO = TestKeyDAO; -class BaseTest { - static getClient() { - const client = iris - .newClient({ - node: 'http://localhost:26657', - network: iris.Network.Testnet, - chainId: 'test', - gas: '100000', - }) - .withKeyDAO(new TestKeyDAO()) - .withRpcConfig({ timeout: Consts.timeout }); - client.keys.recover(Consts.keyName, Consts.keyPassword, 'balcony reopen dumb battle smile crisp snake truth expose bird thank peasant best opera faint scorpion debate skill ethics fossil dinner village news logic'); - return client; - } -} -exports.BaseTest = BaseTest; -BaseTest.baseTx = { - from: Consts.keyName, - password: Consts.keyPassword, - mode: types.BroadcastMode.Commit, -}; -//# sourceMappingURL=basetest.js.map \ No newline at end of file diff --git a/dist/test/basetest.js.map b/dist/test/basetest.js.map deleted file mode 100644 index 8a26de65..00000000 --- a/dist/test/basetest.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"basetest.js","sourceRoot":"","sources":["../../test/basetest.ts"],"names":[],"mappings":";;AAAA,+BAA+B;AAC/B,sCAAsC;AAGtC,MAAa,MAAM;;AAAnB,wBAIC;AAHQ,cAAO,GAAG,KAAK,CAAC;AAChB,cAAO,GAAG,MAAM,CAAC;AACjB,kBAAW,GAAG,UAAU,CAAC;AAGlC,kBAAkB;AAClB,MAAa,UAAU;IAAvB;QACE,WAAM,GAAiC,EAAE,CAAC;IAU5C,CAAC;IATC,KAAK,CAAC,IAAY,EAAE,GAAc;QAChC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC;IAC1B,CAAC;IACD,IAAI,CAAC,IAAY;QACf,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IACD,MAAM,CAAC,IAAY;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;CACF;AAXD,gCAWC;AAED,MAAa,QAAQ;IAOnB,MAAM,CAAC,SAAS;QACd,MAAM,MAAM,GAAG,IAAI;aAChB,SAAS,CAAC;YACT,IAAI,EAAE,wBAAwB;YAC9B,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO;YAC7B,OAAO,EAAE,MAAM;YACf,GAAG,EAAE,QAAQ;SACd,CAAC;aACD,UAAU,CAAC,IAAI,UAAU,EAAE,CAAC;aAC5B,aAAa,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAE9C,MAAM,CAAC,IAAI,CAAC,OAAO,CACjB,MAAM,CAAC,OAAO,EACd,MAAM,CAAC,WAAW,EAClB,6JAA6J,CAC9J,CAAC;QAEF,OAAO,MAAM,CAAC;IAChB,CAAC;;AAzBH,4BA0BC;AAzBQ,eAAM,GAAiB;IAC5B,IAAI,EAAE,MAAM,CAAC,OAAO;IACpB,QAAQ,EAAE,MAAM,CAAC,WAAW;IAC5B,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,MAAM;CACjC,CAAC"} \ No newline at end of file diff --git a/dist/test/crypto.test.d.ts b/dist/test/crypto.test.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/dist/test/crypto.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dist/test/crypto.test.js b/dist/test/crypto.test.js deleted file mode 100644 index 069e82f2..00000000 --- a/dist/test/crypto.test.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../src/utils"); -test('Crypto', () => __awaiter(void 0, void 0, void 0, function* () { - // Generates mnemonic - const mnemonic = utils_1.Crypto.generateMnemonic(); - expect(mnemonic.split(' ').length).toBe(24); - // Gets a private key from mnemonic words. - const privKey = utils_1.Crypto.getPrivateKeyFromMnemonic(mnemonic); - // Calculates the public key from a given private key. - const pubKey = utils_1.Crypto.getPublicKeyFromPrivateKey(privKey); - // Gets an address from a public key hex. - const address = utils_1.Crypto.getAddressFromPublicKey(pubKey, 'iaa'); - expect(address.substring(0, 3)).toBe('iaa'); - // Generate keystore - const keystore = utils_1.Crypto.generateKeyStore(privKey, 'password', 'iaa'); - expect(JSON.parse(JSON.stringify(keystore)).address).toBe(address); - // Get private key from keystore - const privKey1 = utils_1.Crypto.getPrivateKeyFromKeyStore(keystore, 'password'); - expect(privKey1).toBe(privKey); - console.log(utils_1.Crypto.encodeAddress('2F36E18CF00DA1568F72AAFD98D94C8D472022C7', 'fca')); - console.log(Buffer.from('bXbzqbOidvLADyfR/cLVm2o6L9vcpPh+PF6O8m2sOQ4=', 'hex')); - // TODO -})); -//# sourceMappingURL=crypto.test.js.map \ No newline at end of file diff --git a/dist/test/crypto.test.js.map b/dist/test/crypto.test.js.map deleted file mode 100644 index 4018e56e..00000000 --- a/dist/test/crypto.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"crypto.test.js","sourceRoot":"","sources":["../../test/crypto.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,wCAAsC;AAEtC,IAAI,CAAC,QAAQ,EAAE,GAAS,EAAE;IACxB,qBAAqB;IACrB,MAAM,QAAQ,GAAG,cAAM,CAAC,gBAAgB,EAAE,CAAC;IAC3C,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAE5C,0CAA0C;IAC1C,MAAM,OAAO,GAAG,cAAM,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IAE3D,sDAAsD;IACtD,MAAM,MAAM,GAAG,cAAM,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC;IAE1D,yCAAyC;IACzC,MAAM,OAAO,GAAG,cAAM,CAAC,uBAAuB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC9D,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAE5C,oBAAoB;IACpB,MAAM,QAAQ,GAAG,cAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IACrE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAEnE,gCAAgC;IAChC,MAAM,QAAQ,GAAG,cAAM,CAAC,yBAAyB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IACxE,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAE/B,OAAO,CAAC,GAAG,CAAC,cAAM,CAAC,aAAa,CAAC,0CAA0C,EAAE,KAAK,CAAC,CAAC,CAAC;IAErF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,8CAA8C,EAAE,KAAK,CAAC,CAAC,CAAC;IAChF,OAAO;AACT,CAAC,CAAA,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/test/distribution.test.d.ts b/dist/test/distribution.test.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/dist/test/distribution.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dist/test/distribution.test.js b/dist/test/distribution.test.js deleted file mode 100644 index 07202743..00000000 --- a/dist/test/distribution.test.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const basetest_1 = require("./basetest"); -describe('Distribution Tests', () => { - describe('Query Rewards', () => { - test('query rewards', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient().distribution - .queryRewards('faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); - describe('Set Withdraw Address', () => { - test('set withdraw address', () => __awaiter(void 0, void 0, void 0, function* () { - const amount = [ - { - denom: 'iris-atto', - amount: '1000000000000000000', - }, - ]; - yield basetest_1.BaseTest.getClient().distribution - .setWithdrawAddr('faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7', basetest_1.BaseTest.baseTx) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); - describe('Withdraw Rewards', () => { - test('withdraw delegation rewards from a specified validator', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .distribution.withdrawRewards(basetest_1.BaseTest.baseTx, 'fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('withdraw all delegation rewards', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .distribution.withdrawRewards(basetest_1.BaseTest.baseTx) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('withdraw all rewards (delegation and validator commission)', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .distribution.withdrawRewards(basetest_1.BaseTest.baseTx, 'fva1gwr3espfjtz9su9x40p635dgfvm4ph9v048een', true) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); -}); -//# sourceMappingURL=distribution.test.js.map \ No newline at end of file diff --git a/dist/test/distribution.test.js.map b/dist/test/distribution.test.js.map deleted file mode 100644 index 1e0fa818..00000000 --- a/dist/test/distribution.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"distribution.test.js","sourceRoot":"","sources":["../../test/distribution.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,yCAAsC;AAGtC,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC7B,IAAI,CACF,eAAe,EACf,GAAS,EAAE;YACT,MAAM,mBAAQ,CAAC,SAAS,EAAE,CAAC,YAAY;iBACpC,YAAY,CAAC,4CAA4C,CAAC;iBAC1D,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;QACpC,IAAI,CACF,sBAAsB,EACtB,GAAS,EAAE;YACT,MAAM,MAAM,GAAiB;gBAC3B;oBACE,KAAK,EAAE,WAAW;oBAClB,MAAM,EAAE,qBAAqB;iBAC9B;aACF,CAAC;YAEF,MAAM,mBAAQ,CAAC,SAAS,EAAE,CAAC,YAAY;iBACpC,eAAe,CAAC,4CAA4C,EAAE,mBAAQ,CAAC,MAAM,CAAC;iBAC9E,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAChC,IAAI,CACF,wDAAwD,EACxD,GAAS,EAAE;YAET,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,YAAY,CAAC,eAAe,CAC3B,mBAAQ,CAAC,MAAM,EACf,4CAA4C,CAC7C;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CACF,CAAC;QAEF,IAAI,CACF,iCAAiC,EACjC,GAAS,EAAE;YACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,YAAY,CAAC,eAAe,CAAC,mBAAQ,CAAC,MAAM,CAAC;iBAC7C,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CACF,CAAC;QAEF,IAAI,CACF,4DAA4D,EAC5D,GAAS,EAAE;YACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,YAAY,CAAC,eAAe,CAC3B,mBAAQ,CAAC,MAAM,EACf,4CAA4C,EAC5C,IAAI,CACL;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/test/gov.test.d.ts b/dist/test/gov.test.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/dist/test/gov.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dist/test/gov.test.js b/dist/test/gov.test.js deleted file mode 100644 index 09179fd5..00000000 --- a/dist/test/gov.test.js +++ /dev/null @@ -1,168 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const basetest_1 = require("./basetest"); -const types = require("../src/types"); -describe('Gov Tests', () => { - describe('Query', () => { - test('query proposal', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient().gov - .queryProposal(164) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query proposals', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient().gov - .queryProposals({ - limit: 1, - }) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query vote', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient().gov - .queryVote(1, 'faa1rug6dlx3rugu50ha0a35at6fwv2sss9l9amknx') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query votes', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient().gov - .queryVotes(2) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query deposit', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient().gov - .queryDeposit(260, 'faa1rug6dlx3rugu50ha0a35at6fwv2sss9l9amknx') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query deposits', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient().gov - .queryDeposits(260) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query tally', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient().gov - .queryTally(260) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); - const initDeposit = [ - { - denom: 'iris-atto', - amount: '1000000000000000000000', - }, - ]; - describe('Submit ParameterChange Proposal', () => { - test('submitParameterChangeProposal', () => __awaiter(void 0, void 0, void 0, function* () { - const params = [ - { - subspace: 'slashing', - key: 'MaxEvidenceAge', - value: '51840', - }, - ]; - yield basetest_1.BaseTest.getClient() - .gov.submitParameterChangeProposal('Title', 'Desc', initDeposit, params, basetest_1.BaseTest.baseTx) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); - describe('Submit PlainText Proposal', () => { - test('submitPlainTextProposal', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient().gov - .submitPlainTextProposal('Title', 'Desc', initDeposit, basetest_1.BaseTest.baseTx) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); - describe('Submit CommunityTaxUsag Proposal', () => { - test('submitCommunityTaxUsageProposal', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .gov.submitCommunityTaxUsageProposal('Title', 'Desc', initDeposit, types.CommunityTaxUsageType.Distribute, 'faa1rug6dlx3rugu50ha0a35at6fwv2sss9l9amknx', 0.5, basetest_1.BaseTest.baseTx) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); - describe('Deposit', () => { - test('deposit', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .gov.deposit(1, [ - { - denom: 'iris-atto', - amount: '1000000000000000000000', - }, - ], basetest_1.BaseTest.baseTx) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); - describe('Vote', () => { - test('vote', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient().gov - .vote(1, types.VoteOption.Yes, basetest_1.BaseTest.baseTx) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); -}); -//# sourceMappingURL=gov.test.js.map \ No newline at end of file diff --git a/dist/test/gov.test.js.map b/dist/test/gov.test.js.map deleted file mode 100644 index 1c3b454c..00000000 --- a/dist/test/gov.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"gov.test.js","sourceRoot":"","sources":["../../test/gov.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,yCAAsC;AACtC,sCAAsC;AAEtC,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;QACrB,IAAI,CAAC,gBAAgB,EAAE,GAAS,EAAE;YAChC,MAAM,mBAAQ,CAAC,SAAS,EAAE,CAAC,GAAG;iBAC3B,aAAa,CAAC,GAAG,CAAC;iBAClB,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QACH,IAAI,CAAC,iBAAiB,EAAE,GAAS,EAAE;YACjC,MAAM,mBAAQ,CAAC,SAAS,EAAE,CAAC,GAAG;iBAC3B,cAAc,CAAC;gBACd,KAAK,EAAE,CAAC;aACT,CAAC;iBACD,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QACH,IAAI,CAAC,YAAY,EAAE,GAAS,EAAE;YAC5B,MAAM,mBAAQ,CAAC,SAAS,EAAE,CAAC,GAAG;iBAC3B,SAAS,CAAC,CAAC,EAAE,4CAA4C,CAAC;iBAC1D,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,EAAE,GAAS,EAAE;YAC7B,MAAM,mBAAQ,CAAC,SAAS,EAAE,CAAC,GAAG;iBAC3B,UAAU,CAAC,CAAC,CAAC;iBACb,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QACH,IAAI,CAAC,eAAe,EAAE,GAAS,EAAE;YAC/B,MAAM,mBAAQ,CAAC,SAAS,EAAE,CAAC,GAAG;iBAC3B,YAAY,CAAC,GAAG,EAAE,4CAA4C,CAAC;iBAC/D,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QACH,IAAI,CAAC,gBAAgB,EAAE,GAAS,EAAE;YAChC,MAAM,mBAAQ,CAAC,SAAS,EAAE,CAAC,GAAG;iBAC3B,aAAa,CAAC,GAAG,CAAC;iBAClB,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QACH,IAAI,CAAC,aAAa,EAAE,GAAS,EAAE;YAC7B,MAAM,mBAAQ,CAAC,SAAS,EAAE,CAAC,GAAG;iBAC3B,UAAU,CAAC,GAAG,CAAC;iBACf,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,MAAM,WAAW,GAAiB;QAChC;YACE,KAAK,EAAE,WAAW;YAClB,MAAM,EAAE,wBAAwB;SACjC;KACF,CAAC;IACF,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;QAC/C,IAAI,CACF,+BAA+B,EAC/B,GAAS,EAAE;YACT,MAAM,MAAM,GAA4B;gBACtC;oBACE,QAAQ,EAAE,UAAU;oBACpB,GAAG,EAAE,gBAAgB;oBACrB,KAAK,EAAE,OAAO;iBACf;aACF,CAAC;YACF,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,GAAG,CAAC,6BAA6B,CAChC,OAAO,EACP,MAAM,EACN,WAAW,EACX,MAAM,EACN,mBAAQ,CAAC,MAAM,CAChB;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;QACzC,IAAI,CACF,yBAAyB,EACzB,GAAS,EAAE;YACT,MAAM,mBAAQ,CAAC,SAAS,EAAE,CAAC,GAAG;iBAC3B,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,mBAAQ,CAAC,MAAM,CAAC;iBACtE,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAChD,IAAI,CACF,iCAAiC,EACjC,GAAS,EAAE;YACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,GAAG,CAAC,+BAA+B,CAClC,OAAO,EACP,MAAM,EACN,WAAW,EACX,KAAK,CAAC,qBAAqB,CAAC,UAAU,EACtC,4CAA4C,EAC5C,GAAG,EACH,mBAAQ,CAAC,MAAM,CAChB;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;QACvB,IAAI,CACF,SAAS,EACT,GAAS,EAAE;YACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,GAAG,CAAC,OAAO,CACV,CAAC,EACD;gBACE;oBACE,KAAK,EAAE,WAAW;oBAClB,MAAM,EAAE,wBAAwB;iBACjC;aACF,EACD,mBAAQ,CAAC,MAAM,CAChB;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;QACpB,IAAI,CACF,MAAM,EACN,GAAS,EAAE;YACT,MAAM,mBAAQ,CAAC,SAAS,EAAE,CAAC,GAAG;iBAC3B,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,mBAAQ,CAAC,MAAM,CAAC;iBAC9C,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/test/index.test.d.ts b/dist/test/index.test.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/dist/test/index.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dist/test/index.test.js b/dist/test/index.test.js deleted file mode 100644 index 41e81e35..00000000 --- a/dist/test/index.test.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const iris = require("../src"); -test('Init Client', () => { - const node = 'localhost:26657'; - const client = iris.newClient({ node }); - expect(client.config.chainId).toBe('irishub'); - expect(client.config.fee).toBe('600000000000000000'); - expect(client.config.gas).toBe('100000'); - expect(client.config.network).toBe(iris.Network.Mainnet); - expect(client.config.node).toBe(node); - const chainId = 'test'; - const fee = { amount: '0.3', denom: 'iris' }; - const gas = '50000'; - const network = iris.Network.Testnet; - client - .withChainId(chainId) - .withFee(fee) - .withGas(gas) - .withNetwork(network); - expect(client.config.chainId).toBe(chainId); - expect(client.config.fee).toBe(fee); - expect(client.config.gas).toBe(gas); - expect(client.config.network).toBe(network); - expect(client.config.node).toBe(node); -}); -//# sourceMappingURL=index.test.js.map \ No newline at end of file diff --git a/dist/test/index.test.js.map b/dist/test/index.test.js.map deleted file mode 100644 index 93a1c45f..00000000 --- a/dist/test/index.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../test/index.test.ts"],"names":[],"mappings":";;AAAA,+BAA+B;AAE/B,IAAI,CAAC,aAAa,EAAE,GAAG,EAAE;IACvB,MAAM,IAAI,GAAG,iBAAiB,CAAC;IAE/B,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IACxC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC9C,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACrD,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACzD,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEtC,MAAM,OAAO,GAAG,MAAM,CAAC;IACvB,MAAM,GAAG,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC7C,MAAM,GAAG,GAAG,OAAO,CAAC;IACpB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAErC,MAAM;SACH,WAAW,CAAC,OAAO,CAAC;SACpB,OAAO,CAAC,GAAG,CAAC;SACZ,OAAO,CAAC,GAAG,CAAC;SACZ,WAAW,CAAC,OAAO,CAAC,CAAC;IACxB,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxC,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/test/jest.setup.d.ts b/dist/test/jest.setup.d.ts deleted file mode 100644 index 71038c8e..00000000 --- a/dist/test/jest.setup.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare global { - namespace jest { - const t = "123"; - } -} -export {}; diff --git a/dist/test/jest.setup.js b/dist/test/jest.setup.js deleted file mode 100644 index 67c07fbe..00000000 --- a/dist/test/jest.setup.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=jest.setup.js.map \ No newline at end of file diff --git a/dist/test/jest.setup.js.map b/dist/test/jest.setup.js.map deleted file mode 100644 index 74f8a595..00000000 --- a/dist/test/jest.setup.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jest.setup.js","sourceRoot":"","sources":["../../test/jest.setup.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/test/keys.test.d.ts b/dist/test/keys.test.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/dist/test/keys.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dist/test/keys.test.js b/dist/test/keys.test.js deleted file mode 100644 index fea975c1..00000000 --- a/dist/test/keys.test.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const basetest_1 = require("./basetest"); -test('Keys', () => { - const password = basetest_1.Consts.keyPassword; - const client = basetest_1.BaseTest.getClient(); - // Create a new key - const addedKey = client.keys.add('name1', password); - expect(addedKey.address.substring(0, 3)).toBe('faa'); - expect(addedKey.mnemonic.split(' ').length).toBe(24); - // Recover a key - const recoveredKeyAddr = client.keys.recover('name2', password, addedKey.mnemonic); - expect(recoveredKeyAddr).toBe(addedKey.address); - // Export keystore of a key - const keystore = client.keys.export('name1', password, password); - const keystoreObj = JSON.parse(keystore.toString()); - expect(keystoreObj.address).toBe(addedKey.address); - // Import a keystore - const importedKeyAddr = client.keys.import('name3', password, keystore); - expect(importedKeyAddr).toBe(addedKey.address); - // Show address of a key - const showAddr = client.keys.show('name1'); - expect(showAddr).toBe(addedKey.address); - // Delete a key - client.keys.delete('name1', password); - expect(() => { - client.keys.show('name1'); - }).toThrow("Key with name 'name1' not found"); -}); -//# sourceMappingURL=keys.test.js.map \ No newline at end of file diff --git a/dist/test/keys.test.js.map b/dist/test/keys.test.js.map deleted file mode 100644 index deba8037..00000000 --- a/dist/test/keys.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"keys.test.js","sourceRoot":"","sources":["../../test/keys.test.ts"],"names":[],"mappings":";;AAAA,yCAA8C;AAE9C,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;IAChB,MAAM,QAAQ,GAAG,iBAAM,CAAC,WAAW,CAAC;IACpC,MAAM,MAAM,GAAG,mBAAQ,CAAC,SAAS,EAAE,CAAC;IAEpC,mBAAmB;IACnB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACpD,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrD,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAErD,gBAAgB;IAChB,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAC1C,OAAO,EACP,QAAQ,EACR,QAAQ,CAAC,QAAQ,CAClB,CAAC;IACF,MAAM,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAEhD,2BAA2B;IAC3B,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACjE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;IACpD,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAEnD,oBAAoB;IACpB,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACxE,MAAM,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAE/C,wBAAwB;IACxB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAExC,eAAe;IACf,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACtC,MAAM,CAAC,GAAG,EAAE;QACV,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC,CAAC,CAAC,OAAO,CAAC,iCAAiC,CAAC,CAAC;AAChD,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/test/my.test.d.ts b/dist/test/my.test.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/dist/test/my.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dist/test/my.test.js b/dist/test/my.test.js deleted file mode 100644 index cfc24d34..00000000 --- a/dist/test/my.test.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; -// import * as iris from '../src'; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const basetest_1 = require("./basetest"); -test('test client', () => __awaiter(void 0, void 0, void 0, function* () { - // Init Client - // const client = iris.newClient({ - // node: 'http://localhost:26657', - // network: iris.Network.Testnet, - // chainId: 'test', - // }); - // client.eventListener.connect(); - // client.eventListener.subscribeNewBlock((err, data) => { - // console.log(JSON.stringify(data)); - // }); - // await timeout(100000); - // // eventListener.disconnect(); - // await timeout(5000000); - // const bytes = Crypto.decodeAndConvert( - // 'fcp1zcjduepq0yn2e94aq07uvlzu65jtknyp9an68w5jlngrmxyhhvwdgykm3z5q0uwxg2' - // ); - // console.log(bytes); - // const bech = Uint8Array.from(bytes); - // const pk = unmarshalPubKey(bech, false); - basetest_1.BaseTest.getClient().slashing.querySigningInfo('fca1f46x0s36d5ajjqjurt3znhqfdulyf7zlazpj8n').then(res => console.log(res)).catch(err => console.log(err)); - yield timeout(5000); -}), 10000000); -function timeout(ms) { - return new Promise(resolve => { - setTimeout(resolve, ms); - }); -} -// const WebSocket = require('ws'); -// test('Crypto', async () => { -// const eventListener: any = {}; -// const subscriptions = {}; -// const ws = new WebSocket('wss://echo.websocket.org/', { -// origin: 'https://websocket.org', -// }); -// ws.on('open', function open() { -// console.log('connected'); -// // Initialize subscriptions on connected -// eventListener.subscribeAll(subscriptions); -// setTimeout(() => { -// // ws.send("call health"); -// }, 5000); -// }); -// ws.on('close', function close() { -// console.log('disconnected'); -// }); -// ws.on('message', function incoming(data: any) { -// }); -// await timeout(1000000); -// }, 1000000); -// function timeout(ms: number) { -// return new Promise(resolve => { -// setTimeout(resolve, ms); -// }); -// } -//# sourceMappingURL=my.test.js.map \ No newline at end of file diff --git a/dist/test/my.test.js.map b/dist/test/my.test.js.map deleted file mode 100644 index 5e9a4a29..00000000 --- a/dist/test/my.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"my.test.js","sourceRoot":"","sources":["../../test/my.test.ts"],"names":[],"mappings":";AAAA,kCAAkC;;;;;;;;;;;AA2GlC,yCAAsC;AAEtC,IAAI,CAAC,aAAa,EAAE,GAAS,EAAE;IAC7B,cAAc;IACd,kCAAkC;IAClC,oCAAoC;IACpC,mCAAmC;IACnC,qBAAqB;IACrB,MAAM;IAEN,kCAAkC;IAClC,0DAA0D;IAC1D,uCAAuC;IACvC,MAAM;IACN,yBAAyB;IACzB,iCAAiC;IACjC,0BAA0B;IAE1B,yCAAyC;IACzC,6EAA6E;IAC7E,KAAK;IACL,sBAAsB;IACtB,uCAAuC;IAEvC,2CAA2C;IAE3C,mBAAQ,CAAC,SAAS,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAC5C,4CAA4C,CAC7C,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/D,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC,CAAA,EAAE,QAAQ,CAAC,CAAC;AAEb,SAAS,OAAO,CAAC,EAAU;IACzB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AAED,mCAAmC;AACnC,+BAA+B;AAC/B,mCAAmC;AACnC,8BAA8B;AAE9B,4DAA4D;AAC5D,uCAAuC;AACvC,QAAQ;AAER,oCAAoC;AACpC,gCAAgC;AAChC,+CAA+C;AAC/C,iDAAiD;AACjD,yBAAyB;AACzB,mCAAmC;AACnC,gBAAgB;AAChB,QAAQ;AAER,sCAAsC;AACtC,mCAAmC;AACnC,QAAQ;AAER,oDAAoD;AAEpD,QAAQ;AAER,4BAA4B;AAC5B,eAAe;AAEf,iCAAiC;AACjC,oCAAoC;AACpC,+BAA+B;AAC/B,QAAQ;AACR,IAAI"} \ No newline at end of file diff --git a/dist/test/slashing.test.d.ts b/dist/test/slashing.test.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/dist/test/slashing.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dist/test/slashing.test.js b/dist/test/slashing.test.js deleted file mode 100644 index b5074127..00000000 --- a/dist/test/slashing.test.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const basetest_1 = require("./basetest"); -describe('Slashing Tests', () => { - // Not supported - // describe('Query Params', () => { - // test( - // 'query params', - // async () => { - // await client.slashing - // .queryParams() - // .then(res => { - // console.log(JSON.stringify(res)); - // }) - // .catch(error => { - // console.log(error); - // }); - // }, - // timeout - // ); - // }); - describe('Query Signing Info', () => { - test('query signing info', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .slashing.querySigningInfo('fca1f46x0s36d5ajjqjurt3znhqfdulyf7zlazpj8n') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); - describe('Unjail', () => { - test('unjail', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .slashing.unjail(basetest_1.BaseTest.baseTx) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); -}); -//# sourceMappingURL=slashing.test.js.map \ No newline at end of file diff --git a/dist/test/slashing.test.js.map b/dist/test/slashing.test.js.map deleted file mode 100644 index 4f9f7986..00000000 --- a/dist/test/slashing.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"slashing.test.js","sourceRoot":"","sources":["../../test/slashing.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,yCAAsC;AACtC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,gBAAgB;IAChB,mCAAmC;IACnC,UAAU;IACV,sBAAsB;IACtB,oBAAoB;IACpB,8BAA8B;IAC9B,yBAAyB;IACzB,yBAAyB;IACzB,8CAA8C;IAC9C,aAAa;IACb,4BAA4B;IAC5B,gCAAgC;IAChC,cAAc;IACd,SAAS;IACT,cAAc;IACd,OAAO;IACP,MAAM;IAEN,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;QAClC,IAAI,CAAC,oBAAoB,EAAE,GAAS,EAAE;YACpC,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,QAAQ,CAAC,gBAAgB,CAAC,4CAA4C,CAAC;iBACvE,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;QACtB,IAAI,CAAC,QAAQ,EAAE,GAAS,EAAE;YACxB,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,QAAQ,CAAC,MAAM,CACd,mBAAQ,CAAC,MAAM,CAChB;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/test/staking.test.d.ts b/dist/test/staking.test.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/dist/test/staking.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dist/test/staking.test.js b/dist/test/staking.test.js deleted file mode 100644 index 991574c3..00000000 --- a/dist/test/staking.test.js +++ /dev/null @@ -1,183 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const basetest_1 = require("./basetest"); -describe('Staking Tests', () => { - describe('Query', () => { - test('query delegation', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .staking.queryDelegation('faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7', 'fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query delegations of a delegator', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .staking.queryDelegations('faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query unbonding delegation', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .staking.queryUnbondingDelegation('faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7', 'fva1gwr3espfjtz9su9x40p635dgfvm4ph9v048een') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query unbonding delegations of a delegator', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .staking.queryUnbondingDelegations('faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query redelegation', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .staking.queryRedelegation('faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7', 'fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e', 'fva1gwr3espfjtz9su9x40p635dgfvm4ph9v048een') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query redelegations of a delegator', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .staking.queryRedelegations('faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query delegations to a validator', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .staking.queryDelegationsTo('fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query unbonding delegations from a validator', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .staking.queryUnbondingDelegationsFrom('fva1gwr3espfjtz9su9x40p635dgfvm4ph9v048een') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query redelegations from a validator', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .staking.queryRedelegationsFrom('fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query a validator', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .staking.queryValidator('fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query all validators', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .staking.queryValidators(1) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query pool', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .staking.queryPool() - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - test('query params', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .staking.queryParams() - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); - describe('Delegate', () => { - test('delegate', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .staking.delegate('fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e', { denom: 'iris-atto', amount: '5000000000000000000' }, basetest_1.BaseTest.baseTx) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); - describe('Unbond', () => { - test('unbond', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .staking.undelegate('fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e', '100000000000000000', basetest_1.BaseTest.baseTx) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); - describe('Redelegate', () => { - test('redelegate', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .staking.redelegate('fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e', 'fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e', '10000000000000000', basetest_1.BaseTest.baseTx) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); -}); -//# sourceMappingURL=staking.test.js.map \ No newline at end of file diff --git a/dist/test/staking.test.js.map b/dist/test/staking.test.js.map deleted file mode 100644 index f9bbe839..00000000 --- a/dist/test/staking.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"staking.test.js","sourceRoot":"","sources":["../../test/staking.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,yCAAsC;AAGtC,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;QACrB,IAAI,CAAC,kBAAkB,EAAE,GAAS,EAAE;YAClC,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,OAAO,CAAC,eAAe,CACtB,4CAA4C,EAC5C,4CAA4C,CAC7C;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QACH,IAAI,CAAC,kCAAkC,EAAE,GAAS,EAAE;YAClD,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,OAAO,CAAC,gBAAgB,CAAC,4CAA4C,CAAC;iBACtE,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QACH,IAAI,CAAC,4BAA4B,EAAE,GAAS,EAAE;YAC5C,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,OAAO,CAAC,wBAAwB,CAC/B,4CAA4C,EAC5C,4CAA4C,CAC7C;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QACH,IAAI,CAAC,4CAA4C,EAAE,GAAS,EAAE;YAC5D,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,OAAO,CAAC,yBAAyB,CAChC,4CAA4C,CAC7C;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QACH,IAAI,CAAC,oBAAoB,EAAE,GAAS,EAAE;YACpC,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,OAAO,CAAC,iBAAiB,CACxB,4CAA4C,EAC5C,4CAA4C,EAC5C,4CAA4C,CAC7C;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QACH,IAAI,CAAC,oCAAoC,EAAE,GAAS,EAAE;YACpD,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,OAAO,CAAC,kBAAkB,CACzB,4CAA4C,CAC7C;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QACH,IAAI,CAAC,kCAAkC,EAAE,GAAS,EAAE;YAClD,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,OAAO,CAAC,kBAAkB,CACzB,4CAA4C,CAC7C;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QAEH,IAAI,CAAC,8CAA8C,EAAE,GAAS,EAAE;YAC9D,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,OAAO,CAAC,6BAA6B,CACpC,4CAA4C,CAC7C;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QAEH,IAAI,CAAC,sCAAsC,EAAE,GAAS,EAAE;YACtD,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,OAAO,CAAC,sBAAsB,CAC7B,4CAA4C,CAC7C;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QAEH,IAAI,CAAC,mBAAmB,EAAE,GAAS,EAAE;YACnC,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,OAAO,CAAC,cAAc,CAAC,4CAA4C,CAAC;iBACpE,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QAEH,IAAI,CAAC,sBAAsB,EAAE,GAAS,EAAE;YACtC,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;iBAC1B,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QAEH,IAAI,CAAC,YAAY,EAAE,GAAS,EAAE;YAC5B,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,OAAO,CAAC,SAAS,EAAE;iBACnB,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QAEH,IAAI,CAAC,cAAc,EAAE,GAAS,EAAE;YAC9B,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,OAAO,CAAC,WAAW,EAAE;iBACrB,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;QACxB,IAAI,CAAC,UAAU,EAAE,GAAS,EAAE;YAC1B,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,OAAO,CAAC,QAAQ,CACf,4CAA4C,EAC5C,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,qBAAqB,EAAE,EACrD,mBAAQ,CAAC,MAAM,CAChB;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;QACtB,IAAI,CAAC,QAAQ,EAAE,GAAS,EAAE;YACxB,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,OAAO,CAAC,UAAU,CACjB,4CAA4C,EAC5C,oBAAoB,EACpB,mBAAQ,CAAC,MAAM,CAChB;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;QAC1B,IAAI,CAAC,YAAY,EAAE,GAAS,EAAE;YAC5B,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,OAAO,CAAC,UAAU,CACjB,4CAA4C,EAC5C,4CAA4C,EAC5C,mBAAmB,EACnB,mBAAQ,CAAC,MAAM,CAChB;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/test/tendermint.test.d.ts b/dist/test/tendermint.test.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/dist/test/tendermint.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dist/test/tendermint.test.js b/dist/test/tendermint.test.js deleted file mode 100644 index bbba126d..00000000 --- a/dist/test/tendermint.test.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const basetest_1 = require("./basetest"); -const types = require("../src/types"); -const timeout = 10000; -describe('Tendermint Tests', () => { - test('query latest block', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .tendermint.queryBlock() - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }), timeout); - test('query block by height', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .tendermint.queryBlock(2) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }), timeout); - test('query latest block result', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .tendermint.queryBlockResult() - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }), timeout); - test('query block result by height', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .tendermint.queryBlockResult(10996) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }), timeout); - test('query tx by hash', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .tendermint.queryTx('0D0B65520771CE6F74267230B30C14F64EE732751EDA79547FCA881841BA5E51') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }), timeout); - test('query latest validators', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .tendermint.queryValidators() - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }), timeout); - test('query validators by height', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .tendermint.queryValidators(2) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }), timeout); - test('search txs', () => __awaiter(void 0, void 0, void 0, function* () { - const condition = new types.EventQueryBuilder().addCondition(new types.Condition(types.EventKey.Action).eq(types.EventAction.Send)); - yield basetest_1.BaseTest.getClient() - .tendermint.searchTxs(condition) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }), timeout); -}); -//# sourceMappingURL=tendermint.test.js.map \ No newline at end of file diff --git a/dist/test/tendermint.test.js.map b/dist/test/tendermint.test.js.map deleted file mode 100644 index 12b4d59c..00000000 --- a/dist/test/tendermint.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tendermint.test.js","sourceRoot":"","sources":["../../test/tendermint.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,yCAAsC;AACtC,sCAAsC;AAEtC,MAAM,OAAO,GAAG,KAAK,CAAC;AAEtB,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,IAAI,CACF,oBAAoB,EACpB,GAAS,EAAE;QACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;aACvB,UAAU,CAAC,UAAU,EAAE;aACvB,IAAI,CAAC,GAAG,CAAC,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC;aACD,KAAK,CAAC,KAAK,CAAC,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;IACF,IAAI,CACF,uBAAuB,EACvB,GAAS,EAAE;QACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;aACvB,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;aACxB,IAAI,CAAC,GAAG,CAAC,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC;aACD,KAAK,CAAC,KAAK,CAAC,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;IACF,IAAI,CACF,2BAA2B,EAC3B,GAAS,EAAE;QACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;aACvB,UAAU,CAAC,gBAAgB,EAAE;aAC7B,IAAI,CAAC,GAAG,CAAC,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC;aACD,KAAK,CAAC,KAAK,CAAC,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;IACF,IAAI,CACF,8BAA8B,EAC9B,GAAS,EAAE;QACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;aACvB,UAAU,CAAC,gBAAgB,CAAC,KAAK,CAAC;aAClC,IAAI,CAAC,GAAG,CAAC,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC;aACD,KAAK,CAAC,KAAK,CAAC,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;IACF,IAAI,CACF,kBAAkB,EAClB,GAAS,EAAE;QACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;aACvB,UAAU,CAAC,OAAO,CACjB,kEAAkE,CACnE;aACA,IAAI,CAAC,GAAG,CAAC,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC;aACD,KAAK,CAAC,KAAK,CAAC,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;IACF,IAAI,CACF,yBAAyB,EACzB,GAAS,EAAE;QACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;aACvB,UAAU,CAAC,eAAe,EAAE;aAC5B,IAAI,CAAC,GAAG,CAAC,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC;aACD,KAAK,CAAC,KAAK,CAAC,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;IACF,IAAI,CACF,4BAA4B,EAC5B,GAAS,EAAE;QACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;aACvB,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC;aAC7B,IAAI,CAAC,GAAG,CAAC,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC;aACD,KAAK,CAAC,KAAK,CAAC,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;IACF,IAAI,CACF,YAAY,EACZ,GAAS,EAAE;QACT,MAAM,SAAS,GAAG,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC,YAAY,CAC1D,IAAI,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CACtE,CAAC;QACF,MAAM,mBAAQ,CAAC,SAAS,EAAE;aACvB,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC;aAC/B,IAAI,CAAC,GAAG,CAAC,EAAE;YACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC;aACD,KAAK,CAAC,KAAK,CAAC,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/test/tx.test.d.ts b/dist/test/tx.test.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/dist/test/tx.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dist/test/tx.test.js b/dist/test/tx.test.js deleted file mode 100644 index e35763f3..00000000 --- a/dist/test/tx.test.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const basetest_1 = require("./basetest"); -const types = require("../src/types"); -describe('Tx Tests', () => { - const unsignedTx = { - type: 'irishub/bank/StdTx', - value: { - msg: [ - { - type: 'irishub/bank/Send', - value: { - inputs: [ - { - address: 'faa1gwr3espfjtz9su9x40p635dgfvm4ph9v6ydky5', - coins: [{ denom: 'iris-atto', amount: '1000000000000000000' }], - }, - ], - outputs: [ - { - address: 'faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7', - coins: [{ denom: 'iris-atto', amount: '1000000000000000000' }], - }, - ], - }, - }, - ], - fee: { - amount: [{ denom: 'iris-atto', amount: '600000000000000000' }], - gas: '100000', - }, - signatures: [], - memo: '', - }, - }; - let signedTx; - describe('Signing', () => { - test('sign tx online', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .tx.sign(unsignedTx, basetest_1.BaseTest.baseTx.from, basetest_1.BaseTest.baseTx.password) - .then(res => { - console.log(JSON.stringify(res)); - signedTx = res; - }) - .catch(error => { - console.log(error); - }); - })); - test('sign tx offline', () => __awaiter(void 0, void 0, void 0, function* () { - unsignedTx.value.signatures = [ - { - account_number: signedTx.value.signatures[0].account_number, - sequence: signedTx.value.signatures[0].sequence, - }, - ]; - console.log(JSON.stringify(unsignedTx)); - yield basetest_1.BaseTest.getClient() - .tx.sign(unsignedTx, basetest_1.BaseTest.baseTx.from, basetest_1.BaseTest.baseTx.password, true) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); - describe('Broadcast', () => { - test('broadcast tx', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .tx.broadcast(signedTx, types.BroadcastMode.Commit) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - })); - }); -}); -//# sourceMappingURL=tx.test.js.map \ No newline at end of file diff --git a/dist/test/tx.test.js.map b/dist/test/tx.test.js.map deleted file mode 100644 index b6ea88a1..00000000 --- a/dist/test/tx.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"tx.test.js","sourceRoot":"","sources":["../../test/tx.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,yCAAsC;AACtC,sCAAsC;AAEtC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,MAAM,UAAU,GAA0B;QACxC,IAAI,EAAE,oBAAoB;QAC1B,KAAK,EAAE;YACL,GAAG,EAAE;gBACH;oBACE,IAAI,EAAE,mBAAmB;oBACzB,KAAK,EAAE;wBACL,MAAM,EAAE;4BACN;gCACE,OAAO,EAAE,4CAA4C;gCACrD,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,qBAAqB,EAAE,CAAC;6BAC/D;yBACF;wBACD,OAAO,EAAE;4BACP;gCACE,OAAO,EAAE,4CAA4C;gCACrD,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,qBAAqB,EAAE,CAAC;6BAC/D;yBACF;qBACF;iBACF;aACF;YACD,GAAG,EAAE;gBACH,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,oBAAoB,EAAE,CAAC;gBAC9D,GAAG,EAAE,QAAQ;aACd;YACD,UAAU,EAAE,EAAE;YACd,IAAI,EAAE,EAAE;SACT;KACF,CAAC;IAEF,IAAI,QAA+B,CAAC;IAEpC,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;QACvB,IAAI,CAAC,gBAAgB,EAAE,GAAS,EAAE;YAChC,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,mBAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,mBAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC;iBACnE,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;gBACjC,QAAQ,GAAG,GAAG,CAAC;YACjB,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;QAEH,IAAI,CAAC,iBAAiB,EAAE,GAAS,EAAE;YACjC,UAAU,CAAC,KAAK,CAAC,UAAU,GAAG;gBAC5B;oBACE,cAAc,EAAE,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,cAAc;oBAC3D,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ;iBAChD;aACF,CAAC;YACF,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;YACxC,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,EAAE,CAAC,IAAI,CACN,UAAU,EACV,mBAAQ,CAAC,MAAM,CAAC,IAAI,EACpB,mBAAQ,CAAC,MAAM,CAAC,QAAQ,EACxB,IAAI,CACL;iBACA,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;QACzB,IAAI,CAAC,cAAc,EAAE,GAAS,EAAE;YAC9B,MAAM,mBAAQ,CAAC,SAAS,EAAE;iBACvB,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC;iBAClD,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;YACnC,CAAC,CAAC;iBACD,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/test/utils.test.d.ts b/dist/test/utils.test.d.ts deleted file mode 100644 index cb0ff5c3..00000000 --- a/dist/test/utils.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/dist/test/utils.test.js b/dist/test/utils.test.js deleted file mode 100644 index 2ad3b156..00000000 --- a/dist/test/utils.test.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const basetest_1 = require("./basetest"); -const timeout = 10000; -describe('Utils Tests', () => { - test('to min coin', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .utils.toMinCoin({ - denom: 'iris', - amount: '1', - }) - .then(coin => { - console.log(JSON.stringify(coin)); - }) - .catch(err => { - console.log(JSON.stringify(err)); - }); - }), timeout); - test('to main coin', () => __awaiter(void 0, void 0, void 0, function* () { - yield basetest_1.BaseTest.getClient() - .utils.toMainCoin({ - denom: 'iris-atto', - amount: '1111111111111111111', - }) - .then(coin => { - console.log(JSON.stringify(coin)); - }) - .catch(err => { - console.log(JSON.stringify(err)); - }); - }), timeout); -}); -//# sourceMappingURL=utils.test.js.map \ No newline at end of file diff --git a/dist/test/utils.test.js.map b/dist/test/utils.test.js.map deleted file mode 100644 index fdfef416..00000000 --- a/dist/test/utils.test.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utils.test.js","sourceRoot":"","sources":["../../test/utils.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,yCAAsC;AAEtC,MAAM,OAAO,GAAG,KAAK,CAAC;AAEtB,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,IAAI,CACF,aAAa,EACb,GAAS,EAAE;QACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;aACvB,KAAK,CAAC,SAAS,CAAC;YACf,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,GAAG;SACZ,CAAC;aACD,IAAI,CAAC,IAAI,CAAC,EAAE;YACX,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QACpC,CAAC,CAAC;aACD,KAAK,CAAC,GAAG,CAAC,EAAE;YACX,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;IACF,IAAI,CACF,cAAc,EACd,GAAS,EAAE;QACT,MAAM,mBAAQ,CAAC,SAAS,EAAE;aACvB,KAAK,CAAC,UAAU,CAAC;YAChB,KAAK,EAAE,WAAW;YAClB,MAAM,EAAE,qBAAqB;SAC9B,CAAC;aACD,IAAI,CAAC,IAAI,CAAC,EAAE;YACX,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QACpC,CAAC,CAAC;aACD,KAAK,CAAC,GAAG,CAAC,EAAE;YACX,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACP,CAAC,CAAA,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 00000000..1b967b25 --- /dev/null +++ b/index.js @@ -0,0 +1,9 @@ +// let node = false; +// try { +// node = (Object.prototype.toString.call(global.process) === '[object process]'); +// } +// catch (e) { +// } + +module.exports = require('./dist/src'); +// module.exports = require('./dist/web'); diff --git a/index.ts b/index.ts new file mode 100644 index 00000000..8420b109 --- /dev/null +++ b/index.ts @@ -0,0 +1 @@ +export * from './src'; diff --git a/package.json b/package.json index 3d73258f..652c25cf 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,20 @@ "name": "@irisnet/irishub-sdk", "version": "0.0.1", "description": "IRISHub JavaScript SDK", - "main": "dist/src/index", - "typings": "dist/src/index", - "types": "dist/src/index.d.ts", + "main": "index.js", + "typings": "src/index.ts", + "types": "./dist/src", "files": [ - "dist/src" + "dist", + "dist/*", + "src/**/*.{ts,js}", + "types/**/*.ts", + "index.js", + "LICENSE", + "package.json", + "README.md", + "tsconfig.json", + "yarn.lock" ], "license": "Apache-2.0", "keywords": [ @@ -20,27 +29,33 @@ "test": "yarn run node && jest -i --config jest.config.js && sh test/scripts/clean.sh", "check": "gts check", "clean": "gts clean", - "compile": "tsc -p .", + "build": "rm -rf dist/* && tsc --emitDeclarationOnly && babel --extensions '.ts' src -d dist/src && cp LICENSE dist/ && cp README.md dist/ && cp package.json dist/ && cp -rf src/types/proto-types dist/src/types/proto-types", "fix": "gts fix", "docs": "npx typedoc && docker build -t irisnet/docs-irishub-sdk-js .", - "prepare": "yarn run compile", - "pretest": "yarn run compile", - "posttest": "yarn run check" + "proto-gen": "sh ./scripts/protocgen.sh" }, "devDependencies": { - "@babel/core": "^7.7.5", + "@babel/cli": "^7.0.0", + "@babel/core": "^7.0.0", + "@babel/plugin-proposal-class-properties": "^7.8.3", + "@babel/plugin-transform-runtime": "^7.9.0", "@babel/preset-env": "^7.7.6", + "@babel/preset-typescript": "^7.9.0", "@types/jest": "^25.1.4", "@types/node": "^10.0.3", + "babel-loader": "^8.1.0", + "eslint": "^6.8.0", + "eslint-loader": "^4.0.0", "gts": "^1.1.2", "jest": "^25.1.0", "ts-jest": "^25.2.1", + "ts-loader": "^6.2.2", "tslint": "^6.1.0", "typedoc": "^0.16.9", "typescript": "^3.8.3" }, "dependencies": { - "@irisnet/amino-js": "https://github.com/irisnet/amino-js", + "@babel/runtime": "^7.0.0", "@types/mathjs": "^6.0.4", "@types/ws": "^7.2.2", "axios": "^0.19.0", @@ -50,12 +65,17 @@ "crypto-browserify": "^3.12.0", "crypto-js": "^3.1.9-1", "events": "^3.1.0", + "google-protobuf": "3.13.0", + "grpc-web": "^1.2.1", + "uuid": "^3.3.2", "is_js": "^0.9.0", "isomorphic-ws": "^4.0.1", "mathjs": "^6.6.1", "ndjson": "^1.5.0", "pumpify": "^2.0.1", "secp256k1": "^3.7.1", - "secure-random": "^1.1.2" + "secure-random": "^1.1.2", + "sha256": "^0.2.0", + "sm-crypto": "git+https://github.com/bianjieai/sm-crypto-js.git#main" } } diff --git a/prettier.config.js b/prettier.config.js index a425d3f7..76d5593d 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -1,4 +1,4 @@ module.exports = { singleQuote: true, - trailingComma: 'es5', + trailingComma: 'es6', }; diff --git a/proto/cosmos/auth/v1beta1/auth.proto b/proto/cosmos/auth/v1beta1/auth.proto new file mode 100644 index 00000000..72e1d9ec --- /dev/null +++ b/proto/cosmos/auth/v1beta1/auth.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; +package cosmos.auth.v1beta1; + +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; + +// BaseAccount defines a base account type. It contains all the necessary fields +// for basic account functionality. Any custom account type should extend this +// type for additional functionality (e.g. vesting). +message BaseAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.equal) = false; + + option (cosmos_proto.implements_interface) = "AccountI"; + + string address = 1; + google.protobuf.Any pub_key = 2 + [(gogoproto.jsontag) = "public_key,omitempty", (gogoproto.moretags) = "yaml:\"public_key\""]; + uint64 account_number = 3 [(gogoproto.moretags) = "yaml:\"account_number\""]; + uint64 sequence = 4; +} + +// ModuleAccount defines an account for modules that holds coins on a pool. +message ModuleAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (cosmos_proto.implements_interface) = "ModuleAccountI"; + + BaseAccount base_account = 1 [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; + string name = 2; + repeated string permissions = 3; +} + +// Params defines the parameters for the auth module. +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + uint64 max_memo_characters = 1 [(gogoproto.moretags) = "yaml:\"max_memo_characters\""]; + uint64 tx_sig_limit = 2 [(gogoproto.moretags) = "yaml:\"tx_sig_limit\""]; + uint64 tx_size_cost_per_byte = 3 [(gogoproto.moretags) = "yaml:\"tx_size_cost_per_byte\""]; + uint64 sig_verify_cost_ed25519 = 4 + [(gogoproto.customname) = "SigVerifyCostED25519", (gogoproto.moretags) = "yaml:\"sig_verify_cost_ed25519\""]; + uint64 sig_verify_cost_secp256k1 = 5 + [(gogoproto.customname) = "SigVerifyCostSecp256k1", (gogoproto.moretags) = "yaml:\"sig_verify_cost_secp256k1\""]; +} diff --git a/proto/cosmos/auth/v1beta1/genesis.proto b/proto/cosmos/auth/v1beta1/genesis.proto new file mode 100644 index 00000000..c88b94ee --- /dev/null +++ b/proto/cosmos/auth/v1beta1/genesis.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package cosmos.auth.v1beta1; + +import "google/protobuf/any.proto"; +import "gogoproto/gogo.proto"; +import "cosmos/auth/v1beta1/auth.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; + +// GenesisState defines the auth module's genesis state. +message GenesisState { + // params defines all the paramaters of the module. + Params params = 1 [(gogoproto.nullable) = false]; + + // accounts are the accounts present at genesis. + repeated google.protobuf.Any accounts = 2; +} diff --git a/proto/cosmos/auth/v1beta1/query.proto b/proto/cosmos/auth/v1beta1/query.proto new file mode 100644 index 00000000..a8857926 --- /dev/null +++ b/proto/cosmos/auth/v1beta1/query.proto @@ -0,0 +1,47 @@ +syntax = "proto3"; +package cosmos.auth.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "google/api/annotations.proto"; +import "cosmos/auth/v1beta1/auth.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; + +// Query defines the gRPC querier service. +service Query { + // Account returns account details based on address. + rpc Account(QueryAccountRequest) returns (QueryAccountResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}"; + } + + // Params queries all parameters. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/auth/v1beta1/params"; + } +} + +// QueryAccountRequest is the request type for the Query/Account RPC method. +message QueryAccountRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // address defines the address to query for. + string address = 1; +} + +// QueryAccountResponse is the response type for the Query/Account RPC method. +message QueryAccountResponse { + // account defines the account of the corresponding address. + google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/bank/v1beta1/bank.proto b/proto/cosmos/bank/v1beta1/bank.proto new file mode 100644 index 00000000..5a938336 --- /dev/null +++ b/proto/cosmos/bank/v1beta1/bank.proto @@ -0,0 +1,85 @@ +syntax = "proto3"; +package cosmos.bank.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; + +// Params defines the parameters for the bank module. +message Params { + option (gogoproto.goproto_stringer) = false; + repeated SendEnabled send_enabled = 1 [(gogoproto.moretags) = "yaml:\"send_enabled,omitempty\""]; + bool default_send_enabled = 2 [(gogoproto.moretags) = "yaml:\"default_send_enabled,omitempty\""]; +} + +// SendEnabled maps coin denom to a send_enabled status (whether a denom is +// sendable). +message SendEnabled { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + string denom = 1; + bool enabled = 2; +} + +// Input models transaction input. +message Input { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string address = 1; + repeated cosmos.base.v1beta1.Coin coins = 2 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// Output models transaction outputs. +message Output { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string address = 1; + repeated cosmos.base.v1beta1.Coin coins = 2 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// Supply represents a struct that passively keeps track of the total supply +// amounts in the network. +message Supply { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/exported.SupplyI"; + + repeated cosmos.base.v1beta1.Coin total = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// DenomUnit represents a struct that describes a given +// denomination unit of the basic token. +message DenomUnit { + // denom represents the string name of the given denom unit (e.g uatom). + string denom = 1; + // exponent represents power of 10 exponent that one must + // raise the base_denom to in order to equal the given DenomUnit's denom + // 1 denom = 1^exponent base_denom + // (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with + // exponent = 6, thus: 1 atom = 10^6 uatom). + uint32 exponent = 2; + // aliases is a list of string aliases for the given denom + repeated string aliases = 3; +} + +// Metadata represents a struct that describes +// a basic token. +message Metadata { + string description = 1; + // denom_units represents the list of DenomUnit's for a given coin + repeated DenomUnit denom_units = 2; + // base represents the base denom (should be the DenomUnit with exponent = 0). + string base = 3; + // display indicates the suggested denom that should be + // displayed in clients. + string display = 4; +} diff --git a/proto/cosmos/bank/v1beta1/genesis.proto b/proto/cosmos/bank/v1beta1/genesis.proto new file mode 100644 index 00000000..25c80a38 --- /dev/null +++ b/proto/cosmos/bank/v1beta1/genesis.proto @@ -0,0 +1,38 @@ +syntax = "proto3"; +package cosmos.bank.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/bank/v1beta1/bank.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; + +// GenesisState defines the bank module's genesis state. +message GenesisState { + // params defines all the paramaters of the module. + Params params = 1 [(gogoproto.nullable) = false]; + + // balances is an array containing the balances of all the accounts. + repeated Balance balances = 2 [(gogoproto.nullable) = false]; + + // supply represents the total supply. + repeated cosmos.base.v1beta1.Coin supply = 3 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; + + // denom_metadata defines the metadata of the differents coins. + repeated Metadata denom_metadata = 4 [(gogoproto.moretags) = "yaml:\"denom_metadata\"", (gogoproto.nullable) = false]; +} + +// Balance defines an account address and balance pair used in the bank module's +// genesis state. +message Balance { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // address is the address of the balance holder. + string address = 1; + + // coins defines the different coins this balance holds. + repeated cosmos.base.v1beta1.Coin coins = 2 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/bank/v1beta1/query.proto b/proto/cosmos/bank/v1beta1/query.proto new file mode 100644 index 00000000..8f8cfe12 --- /dev/null +++ b/proto/cosmos/bank/v1beta1/query.proto @@ -0,0 +1,111 @@ +syntax = "proto3"; +package cosmos.bank.v1beta1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/bank/v1beta1/bank.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; + +// Query defines the gRPC querier service. +service Query { + // Balance queries the balance of a single coin for a single account. + rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) { + option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}/{denom}"; + } + + // AllBalances queries the balance of all coins for a single account. + rpc AllBalances(QueryAllBalancesRequest) returns (QueryAllBalancesResponse) { + option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}"; + } + + // TotalSupply queries the total supply of all coins. + rpc TotalSupply(QueryTotalSupplyRequest) returns (QueryTotalSupplyResponse) { + option (google.api.http).get = "/cosmos/bank/v1beta1/supply"; + } + + // SupplyOf queries the supply of a single coin. + rpc SupplyOf(QuerySupplyOfRequest) returns (QuerySupplyOfResponse) { + option (google.api.http).get = "/cosmos/bank/v1beta1/supply/{denom}"; + } + + // Params queries the parameters of x/bank module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/bank/v1beta1/params"; + } +} + +// QueryBalanceRequest is the request type for the Query/Balance RPC method. +message QueryBalanceRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // address is the address to query balances for. + string address = 1; + + // denom is the coin denom to query balances for. + string denom = 2; +} + +// QueryBalanceResponse is the response type for the Query/Balance RPC method. +message QueryBalanceResponse { + // balance is the balance of the coin. + cosmos.base.v1beta1.Coin balance = 1; +} + +// QueryBalanceRequest is the request type for the Query/AllBalances RPC method. +message QueryAllBalancesRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // address is the address to query balances for. + string address = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC +// method. +message QueryAllBalancesResponse { + // balances is the balances of all the coins. + repeated cosmos.base.v1beta1.Coin balances = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC +// method. +message QueryTotalSupplyRequest {} + +// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC +// method +message QueryTotalSupplyResponse { + // supply is the supply of the coins + repeated cosmos.base.v1beta1.Coin supply = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. +message QuerySupplyOfRequest { + // denom is the coin denom to query balances for. + string denom = 1; +} + +// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. +message QuerySupplyOfResponse { + // amount is the supply of the coin. + cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false]; +} + +// QueryParamsRequest defines the request type for querying x/bank parameters. +message QueryParamsRequest {} + +// QueryParamsResponse defines the response type for querying x/bank parameters. +message QueryParamsResponse { + Params params = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/bank/v1beta1/tx.proto b/proto/cosmos/bank/v1beta1/tx.proto new file mode 100644 index 00000000..26b2ab41 --- /dev/null +++ b/proto/cosmos/bank/v1beta1/tx.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; +package cosmos.bank.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/bank/v1beta1/bank.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; + +// Msg defines the bank Msg service. +service Msg { + // Send defines a method for sending coins from one account to another account. + rpc Send(MsgSend) returns (MsgSendResponse); + + // MultiSend defines a method for sending coins from some accounts to other accounts. + rpc MultiSend(MsgMultiSend) returns (MsgMultiSendResponse); +} + +// MsgSend represents a message to send coins from one account to another. +message MsgSend { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; + string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; + repeated cosmos.base.v1beta1.Coin amount = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// MsgSendResponse defines the Msg/Send response type. +message MsgSendResponse {} + +// MsgMultiSend represents an arbitrary multi-in, multi-out send message. +message MsgMultiSend { + option (gogoproto.equal) = false; + + repeated Input inputs = 1 [(gogoproto.nullable) = false]; + repeated Output outputs = 2 [(gogoproto.nullable) = false]; +} + +// MsgMultiSendResponse defines the Msg/MultiSend response type. +message MsgMultiSendResponse {} diff --git a/proto/cosmos/base/abci/v1beta1/abci.proto b/proto/cosmos/base/abci/v1beta1/abci.proto new file mode 100644 index 00000000..72da2aac --- /dev/null +++ b/proto/cosmos/base/abci/v1beta1/abci.proto @@ -0,0 +1,137 @@ +syntax = "proto3"; +package cosmos.base.abci.v1beta1; + +import "gogoproto/gogo.proto"; +import "tendermint/abci/types.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/types"; +option (gogoproto.goproto_stringer_all) = false; + +// TxResponse defines a structure containing relevant tx data and metadata. The +// tags are stringified and the log is JSON decoded. +message TxResponse { + option (gogoproto.goproto_getters) = false; + // The block height + int64 height = 1; + // The transaction hash. + string txhash = 2 [(gogoproto.customname) = "TxHash"]; + // Namespace for the Code + string codespace = 3; + // Response code. + uint32 code = 4; + // Result bytes, if any. + string data = 5; + // The output of the application's logger (raw string). May be + // non-deterministic. + string raw_log = 6; + // The output of the application's logger (typed). May be non-deterministic. + repeated ABCIMessageLog logs = 7 [(gogoproto.castrepeated) = "ABCIMessageLogs", (gogoproto.nullable) = false]; + // Additional information. May be non-deterministic. + string info = 8; + // Amount of gas requested for transaction. + int64 gas_wanted = 9; + // Amount of gas consumed by transaction. + int64 gas_used = 10; + // The request transaction bytes. + google.protobuf.Any tx = 11; + // Time of the previous block. For heights > 1, it's the weighted median of + // the timestamps of the valid votes in the block.LastCommit. For height == 1, + // it's genesis time. + string timestamp = 12; +} + +// ABCIMessageLog defines a structure containing an indexed tx ABCI message log. +message ABCIMessageLog { + option (gogoproto.stringer) = true; + + uint32 msg_index = 1; + string log = 2; + + // Events contains a slice of Event objects that were emitted during some + // execution. + repeated StringEvent events = 3 [(gogoproto.castrepeated) = "StringEvents", (gogoproto.nullable) = false]; +} + +// StringEvent defines en Event object wrapper where all the attributes +// contain key/value pairs that are strings instead of raw bytes. +message StringEvent { + option (gogoproto.stringer) = true; + + string type = 1; + repeated Attribute attributes = 2 [(gogoproto.nullable) = false]; +} + +// Attribute defines an attribute wrapper where the key and value are +// strings instead of raw bytes. +message Attribute { + string key = 1; + string value = 2; +} + +// GasInfo defines tx execution gas context. +message GasInfo { + // GasWanted is the maximum units of work we allow this tx to perform. + uint64 gas_wanted = 1 [(gogoproto.moretags) = "yaml:\"gas_wanted\""]; + + // GasUsed is the amount of gas actually consumed. + uint64 gas_used = 2 [(gogoproto.moretags) = "yaml:\"gas_used\""]; +} + +// Result is the union of ResponseFormat and ResponseCheckTx. +message Result { + option (gogoproto.goproto_getters) = false; + + // Data is any data returned from message or handler execution. It MUST be + // length prefixed in order to separate data from multiple message executions. + bytes data = 1; + + // Log contains the log information from message or handler execution. + string log = 2; + + // Events contains a slice of Event objects that were emitted during message + // or handler execution. + repeated tendermint.abci.Event events = 3 [(gogoproto.nullable) = false]; +} + +// SimulationResponse defines the response generated when a transaction is +// successfully simulated. +message SimulationResponse { + GasInfo gas_info = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + Result result = 2; +} + +// MsgData defines the data returned in a Result object during message +// execution. +message MsgData { + option (gogoproto.stringer) = true; + + string msg_type = 1; + bytes data = 2; +} + +// TxMsgData defines a list of MsgData. A transaction will have a MsgData object +// for each message. +message TxMsgData { + option (gogoproto.stringer) = true; + + repeated MsgData data = 1; +} + +// SearchTxsResult defines a structure for querying txs pageable +message SearchTxsResult { + option (gogoproto.stringer) = true; + + // Count of all txs + uint64 total_count = 1 [(gogoproto.moretags) = "yaml:\"total_count\"", (gogoproto.jsontag) = "total_count"]; + // Count of txs in current page + uint64 count = 2; + // Index of current page, start from 1 + uint64 page_number = 3 [(gogoproto.moretags) = "yaml:\"page_number\"", (gogoproto.jsontag) = "page_number"]; + // Count of total pages + uint64 page_total = 4 [(gogoproto.moretags) = "yaml:\"page_total\"", (gogoproto.jsontag) = "page_total"]; + // Max count txs per page + uint64 limit = 5; + // List of txs in current page + repeated TxResponse txs = 6; +} diff --git a/proto/cosmos/base/kv/v1beta1/kv.proto b/proto/cosmos/base/kv/v1beta1/kv.proto new file mode 100644 index 00000000..4e9b8d28 --- /dev/null +++ b/proto/cosmos/base/kv/v1beta1/kv.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package cosmos.base.kv.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/types/kv"; + +// Pairs defines a repeated slice of Pair objects. +message Pairs { + repeated Pair pairs = 1 [(gogoproto.nullable) = false]; +} + +// Pair defines a key/value bytes tuple. +message Pair { + bytes key = 1; + bytes value = 2; +} diff --git a/proto/cosmos/base/query/v1beta1/pagination.proto b/proto/cosmos/base/query/v1beta1/pagination.proto new file mode 100644 index 00000000..2a8cbcce --- /dev/null +++ b/proto/cosmos/base/query/v1beta1/pagination.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; +package cosmos.base.query.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/types/query"; + +// PageRequest is to be embedded in gRPC request messages for efficient +// pagination. Ex: +// +// message SomeRequest { +// Foo some_parameter = 1; +// PageRequest pagination = 2; +// } +message PageRequest { + // key is a value returned in PageResponse.next_key to begin + // querying the next page most efficiently. Only one of offset or key + // should be set. + bytes key = 1; + + // offset is a numeric offset that can be used when key is unavailable. + // It is less efficient than using key. Only one of offset or key should + // be set. + uint64 offset = 2; + + // limit is the total number of results to be returned in the result page. + // If left empty it will default to a value to be set by each app. + uint64 limit = 3; + + // count_total is set to true to indicate that the result set should include + // a count of the total number of items available for pagination in UIs. + // count_total is only respected when offset is used. It is ignored when key + // is set. + bool count_total = 4; +} + +// PageResponse is to be embedded in gRPC response messages where the +// corresponding request message has used PageRequest. +// +// message SomeResponse { +// repeated Bar results = 1; +// PageResponse page = 2; +// } +message PageResponse { + // next_key is the key to be passed to PageRequest.key to + // query the next page most efficiently + bytes next_key = 1; + + // total is total number of results available if PageRequest.count_total + // was set, its value is undefined otherwise + uint64 total = 2; +} diff --git a/proto/cosmos/base/reflection/v1beta1/reflection.proto b/proto/cosmos/base/reflection/v1beta1/reflection.proto new file mode 100644 index 00000000..22670e72 --- /dev/null +++ b/proto/cosmos/base/reflection/v1beta1/reflection.proto @@ -0,0 +1,44 @@ +syntax = "proto3"; +package cosmos.base.reflection.v1beta1; + +import "google/api/annotations.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/reflection"; + +// ReflectionService defines a service for interface reflection. +service ReflectionService { + // ListAllInterfaces lists all the interfaces registered in the interface + // registry. + rpc ListAllInterfaces(ListAllInterfacesRequest) returns (ListAllInterfacesResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces"; + }; + + // ListImplementations list all the concrete types that implement a given + // interface. + rpc ListImplementations(ListImplementationsRequest) returns (ListImplementationsResponse) { + option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces/" + "{interface_name}/implementations"; + }; +} + +// ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. +message ListAllInterfacesRequest {} + +// ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. +message ListAllInterfacesResponse { + // interface_names is an array of all the registered interfaces. + repeated string interface_names = 1; +} + +// ListImplementationsRequest is the request type of the ListImplementations +// RPC. +message ListImplementationsRequest { + // interface_name defines the interface to query the implementations for. + string interface_name = 1; +} + +// ListImplementationsResponse is the response type of the ListImplementations +// RPC. +message ListImplementationsResponse { + repeated string implementation_message_names = 1; +} diff --git a/proto/cosmos/base/snapshots/v1beta1/snapshot.proto b/proto/cosmos/base/snapshots/v1beta1/snapshot.proto new file mode 100644 index 00000000..9ac5a7c3 --- /dev/null +++ b/proto/cosmos/base/snapshots/v1beta1/snapshot.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; +package cosmos.base.snapshots.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/snapshots/types"; + +// Snapshot contains Tendermint state sync snapshot info. +message Snapshot { + uint64 height = 1; + uint32 format = 2; + uint32 chunks = 3; + bytes hash = 4; + Metadata metadata = 5 [(gogoproto.nullable) = false]; +} + +// Metadata contains SDK-specific snapshot metadata. +message Metadata { + repeated bytes chunk_hashes = 1; // SHA-256 chunk hashes +} \ No newline at end of file diff --git a/proto/cosmos/base/store/v1beta1/commit_info.proto b/proto/cosmos/base/store/v1beta1/commit_info.proto new file mode 100644 index 00000000..98a33d30 --- /dev/null +++ b/proto/cosmos/base/store/v1beta1/commit_info.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; +package cosmos.base.store.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/store/types"; + +// CommitInfo defines commit information used by the multi-store when committing +// a version/height. +message CommitInfo { + int64 version = 1; + repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false]; +} + +// StoreInfo defines store-specific commit information. It contains a reference +// between a store name and the commit ID. +message StoreInfo { + string name = 1; + CommitID commit_id = 2 [(gogoproto.nullable) = false]; +} + +// CommitID defines the committment information when a specific store is +// committed. +message CommitID { + option (gogoproto.goproto_stringer) = false; + + int64 version = 1; + bytes hash = 2; +} diff --git a/proto/cosmos/base/store/v1beta1/snapshot.proto b/proto/cosmos/base/store/v1beta1/snapshot.proto new file mode 100644 index 00000000..83485509 --- /dev/null +++ b/proto/cosmos/base/store/v1beta1/snapshot.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; +package cosmos.base.store.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/store/types"; + +// SnapshotItem is an item contained in a rootmulti.Store snapshot. +message SnapshotItem { + // item is the specific type of snapshot item. + oneof item { + SnapshotStoreItem store = 1; + SnapshotIAVLItem iavl = 2 [(gogoproto.customname) = "IAVL"]; + } +} + +// SnapshotStoreItem contains metadata about a snapshotted store. +message SnapshotStoreItem { + string name = 1; +} + +// SnapshotIAVLItem is an exported IAVL node. +message SnapshotIAVLItem { + bytes key = 1; + bytes value = 2; + int64 version = 3; + int32 height = 4; +} \ No newline at end of file diff --git a/proto/cosmos/base/tendermint/v1beta1/query.proto b/proto/cosmos/base/tendermint/v1beta1/query.proto new file mode 100644 index 00000000..a6be8eb2 --- /dev/null +++ b/proto/cosmos/base/tendermint/v1beta1/query.proto @@ -0,0 +1,138 @@ +syntax = "proto3"; +// package cosmos.base.tendermint.v1beta1; +//由于当前package 包含tendermint 导致tendermint模块引入无法被正确定位,现自定义package cosmos.base.tendermint.v1beta1=>cosmos.base.tendermint_1.v1beta1 +package cosmos.base.tendermint_1.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "google/api/annotations.proto"; +import "tendermint/p2p/types.proto"; +import "tendermint/types/block.proto"; +import "tendermint/types/types.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/tmservice"; + +// Service defines the gRPC querier service for tendermint queries. +service Service { + // GetNodeInfo queries the current node info. + rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoResponse) { + option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/node_info"; + } + // GetSyncing queries node syncing. + rpc GetSyncing(GetSyncingRequest) returns (GetSyncingResponse) { + option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/syncing"; + } + // GetLatestBlock returns the latest block. + rpc GetLatestBlock(GetLatestBlockRequest) returns (GetLatestBlockResponse) { + option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/latest"; + } + // GetBlockByHeight queries block for given height. + rpc GetBlockByHeight(GetBlockByHeightRequest) returns (GetBlockByHeightResponse) { + option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/{height}"; + } + + // GetLatestValidatorSet queries latest validator-set. + rpc GetLatestValidatorSet(GetLatestValidatorSetRequest) returns (GetLatestValidatorSetResponse) { + option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validators/latest"; + } + // GetValidatorSetByHeight queries validator-set at a given height. + rpc GetValidatorSetByHeight(GetValidatorSetByHeightRequest) returns (GetValidatorSetByHeightResponse) { + option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validators/{height}"; + } +} + +// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. +message GetValidatorSetByHeightRequest { + int64 height = 1; + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. +message GetValidatorSetByHeightResponse { + int64 block_height = 1; + repeated Validator validators = 2; + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 3; +} + +// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. +message GetLatestValidatorSetRequest { + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. +message GetLatestValidatorSetResponse { + int64 block_height = 1; + repeated Validator validators = 2; + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 3; +} + +// Validator is the type for the validator-set. +message Validator { + string address = 1; + google.protobuf.Any pub_key = 2; + int64 voting_power = 3; + int64 proposer_priority = 4; +} + +// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. +message GetBlockByHeightRequest { + int64 height = 1; +} + +// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. +message GetBlockByHeightResponse { + tendermint.types.BlockID block_id = 1; + tendermint.types.Block block = 2; +} + +// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. +message GetLatestBlockRequest {} + +// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. +message GetLatestBlockResponse { + tendermint.types.BlockID block_id = 1; + tendermint.types.Block block = 2; +} + +// GetSyncingRequest is the request type for the Query/GetSyncing RPC method. +message GetSyncingRequest {} + +// GetSyncingResponse is the response type for the Query/GetSyncing RPC method. +message GetSyncingResponse { + bool syncing = 1; +} + +// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. +message GetNodeInfoRequest {} + +// GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. +message GetNodeInfoResponse { + tendermint.p2p.DefaultNodeInfo default_node_info = 1; + VersionInfo application_version = 2; +} + +// VersionInfo is the type for the GetNodeInfoResponse message. +message VersionInfo { + string name = 1; + string app_name = 2; + string version = 3; + string git_commit = 4; + string build_tags = 5; + string go_version = 6; + repeated Module build_deps = 7; +} + +// Module is the type for VersionInfo +message Module { + // module path + string path = 1; + // module version + string version = 2; + // checksum + string sum = 3; +} \ No newline at end of file diff --git a/proto/cosmos/base/v1beta1/coin.proto b/proto/cosmos/base/v1beta1/coin.proto new file mode 100644 index 00000000..fab75284 --- /dev/null +++ b/proto/cosmos/base/v1beta1/coin.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; +package cosmos.base.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/types"; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = false; + +// Coin defines a token with a denomination and an amount. +// +// NOTE: The amount field is an Int which implements the custom method +// signatures required by gogoproto. +message Coin { + option (gogoproto.equal) = true; + + string denom = 1; + string amount = 2 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; +} + +// DecCoin defines a token with a denomination and a decimal amount. +// +// NOTE: The amount field is an Dec which implements the custom method +// signatures required by gogoproto. +message DecCoin { + option (gogoproto.equal) = true; + + string denom = 1; + string amount = 2 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; +} + +// IntProto defines a Protobuf wrapper around an Int object. +message IntProto { + string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; +} + +// DecProto defines a Protobuf wrapper around a Dec object. +message DecProto { + string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/capability/v1beta1/capability.proto b/proto/cosmos/capability/v1beta1/capability.proto new file mode 100644 index 00000000..1c8332f3 --- /dev/null +++ b/proto/cosmos/capability/v1beta1/capability.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package cosmos.capability.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types"; + +import "gogoproto/gogo.proto"; + +// Capability defines an implementation of an object capability. The index +// provided to a Capability must be globally unique. +message Capability { + option (gogoproto.goproto_stringer) = false; + + uint64 index = 1 [(gogoproto.moretags) = "yaml:\"index\""]; +} + +// Owner defines a single capability owner. An owner is defined by the name of +// capability and the module name. +message Owner { + option (gogoproto.goproto_stringer) = false; + option (gogoproto.goproto_getters) = false; + + string module = 1 [(gogoproto.moretags) = "yaml:\"module\""]; + string name = 2 [(gogoproto.moretags) = "yaml:\"name\""]; +} + +// CapabilityOwners defines a set of owners of a single Capability. The set of +// owners must be unique. +message CapabilityOwners { + repeated Owner owners = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/capability/v1beta1/genesis.proto b/proto/cosmos/capability/v1beta1/genesis.proto new file mode 100644 index 00000000..05bb0afc --- /dev/null +++ b/proto/cosmos/capability/v1beta1/genesis.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +package cosmos.capability.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/capability/v1beta1/capability.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types"; + +// GenesisOwners defines the capability owners with their corresponding index. +message GenesisOwners { + // index is the index of the capability owner. + uint64 index = 1; + + // index_owners are the owners at the given index. + CapabilityOwners index_owners = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"index_owners\""]; +} + +// GenesisState defines the capability module's genesis state. +message GenesisState { + // index is the capability global index. + uint64 index = 1; + + // owners represents a map from index to owners of the capability index + // index key is string to allow amino marshalling. + repeated GenesisOwners owners = 2 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/crisis/v1beta1/genesis.proto b/proto/cosmos/crisis/v1beta1/genesis.proto new file mode 100644 index 00000000..5b0ff7ec --- /dev/null +++ b/proto/cosmos/crisis/v1beta1/genesis.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package cosmos.crisis.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types"; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +// GenesisState defines the crisis module's genesis state. +message GenesisState { + // constant_fee is the fee used to verify the invariant in the crisis + // module. + cosmos.base.v1beta1.Coin constant_fee = 3 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"constant_fee\""]; +} diff --git a/proto/cosmos/crisis/v1beta1/tx.proto b/proto/cosmos/crisis/v1beta1/tx.proto new file mode 100644 index 00000000..26457ad6 --- /dev/null +++ b/proto/cosmos/crisis/v1beta1/tx.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package cosmos.crisis.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types"; + +import "gogoproto/gogo.proto"; + +// Msg defines the bank Msg service. +service Msg { + // VerifyInvariant defines a method to verify a particular invariance. + rpc VerifyInvariant(MsgVerifyInvariant) returns (MsgVerifyInvariantResponse); +} + +// MsgVerifyInvariant represents a message to verify a particular invariance. +message MsgVerifyInvariant { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string sender = 1; + string invariant_module_name = 2 [(gogoproto.moretags) = "yaml:\"invariant_module_name\""]; + string invariant_route = 3 [(gogoproto.moretags) = "yaml:\"invariant_route\""]; +} + +// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. +message MsgVerifyInvariantResponse {} diff --git a/proto/cosmos/crypto/ed25519/keys.proto b/proto/cosmos/crypto/ed25519/keys.proto new file mode 100644 index 00000000..bed9c29c --- /dev/null +++ b/proto/cosmos/crypto/ed25519/keys.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package cosmos.crypto.ed25519; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"; + +// PubKey defines a ed25519 public key +// Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte +// if the y-coordinate is the lexicographically largest of the two associated with +// the x-coordinate. Otherwise the first byte is a 0x03. +// This prefix is followed with the x-coordinate. +message PubKey { + option (gogoproto.goproto_stringer) = false; + + bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PublicKey"]; +} + +// PrivKey defines a ed25519 private key. +message PrivKey { + bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PrivateKey"]; +} diff --git a/proto/cosmos/crypto/multisig/keys.proto b/proto/cosmos/crypto/multisig/keys.proto new file mode 100644 index 00000000..f8398e80 --- /dev/null +++ b/proto/cosmos/crypto/multisig/keys.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +package cosmos.crypto.multisig; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/multisig"; + +// LegacyAminoPubKey specifies a public key type +// which nests multiple public keys and a threshold, +// it uses legacy amino address rules. +message LegacyAminoPubKey { + option (gogoproto.goproto_getters) = false; + + uint32 threshold = 1 [(gogoproto.moretags) = "yaml:\"threshold\""]; + repeated google.protobuf.Any public_keys = 2 + [(gogoproto.customname) = "PubKeys", (gogoproto.moretags) = "yaml:\"pubkeys\""]; +} diff --git a/proto/cosmos/crypto/multisig/v1beta1/multisig.proto b/proto/cosmos/crypto/multisig/v1beta1/multisig.proto new file mode 100644 index 00000000..bf671f17 --- /dev/null +++ b/proto/cosmos/crypto/multisig/v1beta1/multisig.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package cosmos.crypto.multisig.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/crypto/types"; + +// MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. +// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers +// signed and with which modes. +message MultiSignature { + option (gogoproto.goproto_unrecognized) = true; + repeated bytes signatures = 1; +} + +// CompactBitArray is an implementation of a space efficient bit array. +// This is used to ensure that the encoded data takes up a minimal amount of +// space after proto encoding. +// This is not thread safe, and is not intended for concurrent usage. +message CompactBitArray { + option (gogoproto.goproto_stringer) = false; + + uint32 extra_bits_stored = 1; + bytes elems = 2; +} diff --git a/proto/cosmos/crypto/secp256k1/keys.proto b/proto/cosmos/crypto/secp256k1/keys.proto new file mode 100644 index 00000000..a2272571 --- /dev/null +++ b/proto/cosmos/crypto/secp256k1/keys.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package cosmos.crypto.secp256k1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"; + +// PubKey defines a secp256k1 public key +// Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte +// if the y-coordinate is the lexicographically largest of the two associated with +// the x-coordinate. Otherwise the first byte is a 0x03. +// This prefix is followed with the x-coordinate. +message PubKey { + option (gogoproto.goproto_stringer) = false; + + bytes key = 1; +} + +// PrivKey defines a secp256k1 private key. +message PrivKey { + bytes key = 1; +} diff --git a/proto/cosmos/crypto/sm2/keys.proto b/proto/cosmos/crypto/sm2/keys.proto new file mode 100644 index 00000000..97edf1f0 --- /dev/null +++ b/proto/cosmos/crypto/sm2/keys.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package cosmos.crypto.sm2; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/sm2"; + +// PubKey defines a secp256k1 public key +// Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte +// if the y-coordinate is the lexicographically largest of the two associated with +// the x-coordinate. Otherwise the first byte is a 0x03. +// This prefix is followed with the x-coordinate. +message PubKey { + option (gogoproto.goproto_stringer) = false; + + bytes key = 1; +} + +// PrivKey defines a secp256k1 private key. +message PrivKey { + bytes key = 1; +} \ No newline at end of file diff --git a/proto/cosmos/distribution/v1beta1/distribution.proto b/proto/cosmos/distribution/v1beta1/distribution.proto new file mode 100644 index 00000000..ae98ec0b --- /dev/null +++ b/proto/cosmos/distribution/v1beta1/distribution.proto @@ -0,0 +1,157 @@ +syntax = "proto3"; +package cosmos.distribution.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +// Params defines the set of params for the distribution module. +message Params { + option (gogoproto.goproto_stringer) = false; + string community_tax = 1 [ + (gogoproto.moretags) = "yaml:\"community_tax\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + string base_proposer_reward = 2 [ + (gogoproto.moretags) = "yaml:\"base_proposer_reward\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + string bonus_proposer_reward = 3 [ + (gogoproto.moretags) = "yaml:\"bonus_proposer_reward\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + bool withdraw_addr_enabled = 4 [(gogoproto.moretags) = "yaml:\"withdraw_addr_enabled\""]; +} + +// ValidatorHistoricalRewards represents historical rewards for a validator. +// Height is implicit within the store key. +// Cumulative reward ratio is the sum from the zeroeth period +// until this period of rewards / tokens, per the spec. +// The reference count indicates the number of objects +// which might need to reference this historical entry at any point. +// ReferenceCount = +// number of outstanding delegations which ended the associated period (and +// might need to read that record) +// + number of slashes which ended the associated period (and might need to +// read that record) +// + one per validator for the zeroeth period, set on initialization +message ValidatorHistoricalRewards { + repeated cosmos.base.v1beta1.DecCoin cumulative_reward_ratio = 1 [ + (gogoproto.moretags) = "yaml:\"cumulative_reward_ratio\"", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.nullable) = false + ]; + uint32 reference_count = 2 [(gogoproto.moretags) = "yaml:\"reference_count\""]; +} + +// ValidatorCurrentRewards represents current rewards and current +// period for a validator kept as a running counter and incremented +// each block as long as the validator's tokens remain constant. +message ValidatorCurrentRewards { + repeated cosmos.base.v1beta1.DecCoin rewards = 1 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; + uint64 period = 2; +} + +// ValidatorAccumulatedCommission represents accumulated commission +// for a validator kept as a running counter, can be withdrawn at any time. +message ValidatorAccumulatedCommission { + repeated cosmos.base.v1beta1.DecCoin commission = 1 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; +} + +// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards +// for a validator inexpensive to track, allows simple sanity checks. +message ValidatorOutstandingRewards { + repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ + (gogoproto.moretags) = "yaml:\"rewards\"", + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.nullable) = false + ]; +} + +// ValidatorSlashEvent represents a validator slash event. +// Height is implicit within the store key. +// This is needed to calculate appropriate amount of staking tokens +// for delegations which are withdrawn after a slash has occurred. +message ValidatorSlashEvent { + uint64 validator_period = 1 [(gogoproto.moretags) = "yaml:\"validator_period\""]; + string fraction = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + +// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. +message ValidatorSlashEvents { + option (gogoproto.goproto_stringer) = false; + repeated ValidatorSlashEvent validator_slash_events = 1 + [(gogoproto.moretags) = "yaml:\"validator_slash_events\"", (gogoproto.nullable) = false]; +} + +// FeePool is the global fee pool for distribution. +message FeePool { + repeated cosmos.base.v1beta1.DecCoin community_pool = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.moretags) = "yaml:\"community_pool\"" + ]; +} + +// CommunityPoolSpendProposal details a proposal for use of community funds, +// together with how many coins are proposed to be spent, and to which +// recipient account. +message CommunityPoolSpendProposal { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string title = 1; + string description = 2; + string recipient = 3; + repeated cosmos.base.v1beta1.Coin amount = 4 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// DelegatorStartingInfo represents the starting info for a delegator reward +// period. It tracks the previous validator period, the delegation's amount of +// staking token, and the creation height (to check later on if any slashes have +// occurred). NOTE: Even though validators are slashed to whole staking tokens, +// the delegators within the validator may be left with less than a full token, +// thus sdk.Dec is used. +message DelegatorStartingInfo { + uint64 previous_period = 1 [(gogoproto.moretags) = "yaml:\"previous_period\""]; + string stake = 2 [ + (gogoproto.moretags) = "yaml:\"stake\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + uint64 height = 3 [(gogoproto.moretags) = "yaml:\"creation_height\"", (gogoproto.jsontag) = "creation_height"]; +} + +// DelegationDelegatorReward represents the properties +// of a delegator's delegation reward. +message DelegationDelegatorReward { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = true; + + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + + repeated cosmos.base.v1beta1.DecCoin reward = 2 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; +} + +// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal +// with a deposit +message CommunityPoolSpendProposalWithDeposit { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = true; + + string title = 1 [(gogoproto.moretags) = "yaml:\"title\""]; + string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; + string recipient = 3 [(gogoproto.moretags) = "yaml:\"recipient\""]; + string amount = 4 [(gogoproto.moretags) = "yaml:\"amount\""]; + string deposit = 5 [(gogoproto.moretags) = "yaml:\"deposit\""]; +} diff --git a/proto/cosmos/distribution/v1beta1/genesis.proto b/proto/cosmos/distribution/v1beta1/genesis.proto new file mode 100644 index 00000000..c0b17cdf --- /dev/null +++ b/proto/cosmos/distribution/v1beta1/genesis.proto @@ -0,0 +1,155 @@ +syntax = "proto3"; +package cosmos.distribution.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/distribution/v1beta1/distribution.proto"; + +// DelegatorWithdrawInfo is the address for where distributions rewards are +// withdrawn to by default this struct is only used at genesis to feed in +// default withdraw addresses. +message DelegatorWithdrawInfo { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_address is the address of the delegator. + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + + // withdraw_address is the address to withdraw the delegation rewards to. + string withdraw_address = 2 [(gogoproto.moretags) = "yaml:\"withdraw_address\""]; +} + +// ValidatorOutstandingRewardsRecord is used for import/export via genesis json. +message ValidatorOutstandingRewardsRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator_address is the address of the validator. + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + + // outstanding_rewards represents the oustanding rewards of a validator. + repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"outstanding_rewards\"" + ]; +} + +// ValidatorAccumulatedCommissionRecord is used for import / export via genesis +// json. +message ValidatorAccumulatedCommissionRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator_address is the address of the validator. + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + + // accumulated is the accumulated commission of a validator. + ValidatorAccumulatedCommission accumulated = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"accumulated\""]; +} + +// ValidatorHistoricalRewardsRecord is used for import / export via genesis +// json. +message ValidatorHistoricalRewardsRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator_address is the address of the validator. + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + + // period defines the period the historical rewards apply to. + uint64 period = 2; + + // rewards defines the historical rewards of a validator. + ValidatorHistoricalRewards rewards = 3 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""]; +} + +// ValidatorCurrentRewardsRecord is used for import / export via genesis json. +message ValidatorCurrentRewardsRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator_address is the address of the validator. + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + + // rewards defines the current rewards of a validator. + ValidatorCurrentRewards rewards = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""]; +} + +// DelegatorStartingInfoRecord used for import / export via genesis json. +message DelegatorStartingInfoRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_address is the address of the delegator. + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + + // validator_address is the address of the validator. + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + + // starting_info defines the starting info of a delegator. + DelegatorStartingInfo starting_info = 3 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"starting_info\""]; +} + +// ValidatorSlashEventRecord is used for import / export via genesis json. +message ValidatorSlashEventRecord { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validator_address is the address of the validator. + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + // height defines the block height at which the slash event occured. + uint64 height = 2; + // period is the period of the slash event. + uint64 period = 3; + // validator_slash_event describes the slash event. + ValidatorSlashEvent validator_slash_event = 4 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"event\""]; +} + +// GenesisState defines the distribution module's genesis state. +message GenesisState { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // params defines all the paramaters of the module. + Params params = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"params\""]; + + // fee_pool defines the fee pool at genesis. + FeePool fee_pool = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"fee_pool\""]; + + // fee_pool defines the delegator withdraw infos at genesis. + repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_withdraw_infos\""]; + + // fee_pool defines the previous proposer at genesis. + string previous_proposer = 4 [(gogoproto.moretags) = "yaml:\"previous_proposer\""]; + + // fee_pool defines the outstanding rewards of all validators at genesis. + repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"outstanding_rewards\""]; + + // fee_pool defines the accumulated commisions of all validators at genesis. + repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_accumulated_commissions\""]; + + // fee_pool defines the historical rewards of all validators at genesis. + repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_historical_rewards\""]; + + // fee_pool defines the current rewards of all validators at genesis. + repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_current_rewards\""]; + + // fee_pool defines the delegator starting infos at genesis. + repeated DelegatorStartingInfoRecord delegator_starting_infos = 9 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_starting_infos\""]; + + // fee_pool defines the validator slash events at genesis. + repeated ValidatorSlashEventRecord validator_slash_events = 10 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_slash_events\""]; +} diff --git a/proto/cosmos/distribution/v1beta1/query.proto b/proto/cosmos/distribution/v1beta1/query.proto new file mode 100644 index 00000000..2991218d --- /dev/null +++ b/proto/cosmos/distribution/v1beta1/query.proto @@ -0,0 +1,218 @@ +syntax = "proto3"; +package cosmos.distribution.v1beta1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/distribution/v1beta1/distribution.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; + +// Query defines the gRPC querier service for distribution module. +service Query { + // Params queries params of the distribution module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/params"; + } + + // ValidatorOutstandingRewards queries rewards of a validator address. + rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest) + returns (QueryValidatorOutstandingRewardsResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" + "{validator_address}/outstanding_rewards"; + } + + // ValidatorCommission queries accumulated commission for a validator. + rpc ValidatorCommission(QueryValidatorCommissionRequest) returns (QueryValidatorCommissionResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" + "{validator_address}/commission"; + } + + // ValidatorSlashes queries slash events of a validator. + rpc ValidatorSlashes(QueryValidatorSlashesRequest) returns (QueryValidatorSlashesResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/slashes"; + } + + // DelegationRewards queries the total rewards accrued by a delegation. + rpc DelegationRewards(QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/" + "{validator_address}"; + } + + // DelegationTotalRewards queries the total rewards accrued by a each + // validator. + rpc DelegationTotalRewards(QueryDelegationTotalRewardsRequest) returns (QueryDelegationTotalRewardsResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards"; + } + + // DelegatorValidators queries the validators of a delegator. + rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" + "{delegator_address}/validators"; + } + + // DelegatorWithdrawAddress queries withdraw address of a delegator. + rpc DelegatorWithdrawAddress(QueryDelegatorWithdrawAddressRequest) returns (QueryDelegatorWithdrawAddressResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" + "{delegator_address}/withdraw_address"; + } + + // CommunityPool queries the community pool coins. + rpc CommunityPool(QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) { + option (google.api.http).get = "/cosmos/distribution/v1beta1/community_pool"; + } +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} + +// QueryValidatorOutstandingRewardsRequest is the request type for the +// Query/ValidatorOutstandingRewards RPC method. +message QueryValidatorOutstandingRewardsRequest { + // validator_address defines the validator address to query for. + string validator_address = 1; +} + +// QueryValidatorOutstandingRewardsResponse is the response type for the +// Query/ValidatorOutstandingRewards RPC method. +message QueryValidatorOutstandingRewardsResponse { + ValidatorOutstandingRewards rewards = 1 [(gogoproto.nullable) = false]; +} + +// QueryValidatorCommissionRequest is the request type for the +// Query/ValidatorCommission RPC method +message QueryValidatorCommissionRequest { + // validator_address defines the validator address to query for. + string validator_address = 1; +} + +// QueryValidatorCommissionResponse is the response type for the +// Query/ValidatorCommission RPC method +message QueryValidatorCommissionResponse { + // commission defines the commision the validator received. + ValidatorAccumulatedCommission commission = 1 [(gogoproto.nullable) = false]; +} + +// QueryValidatorSlashesRequest is the request type for the +// Query/ValidatorSlashes RPC method +message QueryValidatorSlashesRequest { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = true; + + // validator_address defines the validator address to query for. + string validator_address = 1; + // starting_height defines the optional starting height to query the slashes. + uint64 starting_height = 2; + // starting_height defines the optional ending height to query the slashes. + uint64 ending_height = 3; + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 4; +} + +// QueryValidatorSlashesResponse is the response type for the +// Query/ValidatorSlashes RPC method. +message QueryValidatorSlashesResponse { + // slashes defines the slashes the validator received. + repeated ValidatorSlashEvent slashes = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDelegationRewardsRequest is the request type for the +// Query/DelegationRewards RPC method. +message QueryDelegationRewardsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_address defines the delegator address to query for. + string delegator_address = 1; + // validator_address defines the validator address to query for. + string validator_address = 2; +} + +// QueryDelegationRewardsResponse is the response type for the +// Query/DelegationRewards RPC method. +message QueryDelegationRewardsResponse { + // rewards defines the rewards accrued by a delegation. + repeated cosmos.base.v1beta1.DecCoin rewards = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; +} + +// QueryDelegationTotalRewardsRequest is the request type for the +// Query/DelegationTotalRewards RPC method. +message QueryDelegationTotalRewardsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // delegator_address defines the delegator address to query for. + string delegator_address = 1; +} + +// QueryDelegationTotalRewardsResponse is the response type for the +// Query/DelegationTotalRewards RPC method. +message QueryDelegationTotalRewardsResponse { + // rewards defines all the rewards accrued by a delegator. + repeated DelegationDelegatorReward rewards = 1 [(gogoproto.nullable) = false]; + // total defines the sum of all the rewards. + repeated cosmos.base.v1beta1.DecCoin total = 2 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; +} + +// QueryDelegatorValidatorsRequest is the request type for the +// Query/DelegatorValidators RPC method. +message QueryDelegatorValidatorsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_address defines the delegator address to query for. + string delegator_address = 1; +} + +// QueryDelegatorValidatorsResponse is the response type for the +// Query/DelegatorValidators RPC method. +message QueryDelegatorValidatorsResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // validators defines the validators a delegator is delegating for. + repeated string validators = 1; +} + +// QueryDelegatorWithdrawAddressRequest is the request type for the +// Query/DelegatorWithdrawAddress RPC method. +message QueryDelegatorWithdrawAddressRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_address defines the delegator address to query for. + string delegator_address = 1; +} + +// QueryDelegatorWithdrawAddressResponse is the response type for the +// Query/DelegatorWithdrawAddress RPC method. +message QueryDelegatorWithdrawAddressResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // withdraw_address defines the delegator address to query for. + string withdraw_address = 1; +} + +// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC +// method. +message QueryCommunityPoolRequest {} + +// QueryCommunityPoolResponse is the response type for the Query/CommunityPool +// RPC method. +message QueryCommunityPoolResponse { + // pool defines community pool's coins. + repeated cosmos.base.v1beta1.DecCoin pool = 1 + [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/distribution/v1beta1/tx.proto b/proto/cosmos/distribution/v1beta1/tx.proto new file mode 100644 index 00000000..e6ce478b --- /dev/null +++ b/proto/cosmos/distribution/v1beta1/tx.proto @@ -0,0 +1,79 @@ +syntax = "proto3"; +package cosmos.distribution.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +// Msg defines the distribution Msg service. +service Msg { + // SetWithdrawAddress defines a method to change the withdraw address + // for a delegator (or validator self-delegation). + rpc SetWithdrawAddress(MsgSetWithdrawAddress) returns (MsgSetWithdrawAddressResponse); + + // WithdrawDelegatorReward defines a method to withdraw rewards of delegator + // from a single validator. + rpc WithdrawDelegatorReward(MsgWithdrawDelegatorReward) returns (MsgWithdrawDelegatorRewardResponse); + + // WithdrawValidatorCommission defines a method to withdraw the + // full commission to the validator address. + rpc WithdrawValidatorCommission(MsgWithdrawValidatorCommission) returns (MsgWithdrawValidatorCommissionResponse); + + // FundCommunityPool defines a method to allow an account to directly + // fund the community pool. + rpc FundCommunityPool(MsgFundCommunityPool) returns (MsgFundCommunityPoolResponse); +} + +// MsgSetWithdrawAddress sets the withdraw address for +// a delegator (or validator self-delegation). +message MsgSetWithdrawAddress { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string withdraw_address = 2 [(gogoproto.moretags) = "yaml:\"withdraw_address\""]; +} + +// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. +message MsgSetWithdrawAddressResponse {} + +// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator +// from a single validator. +message MsgWithdrawDelegatorReward { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; +} + +// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. +message MsgWithdrawDelegatorRewardResponse {} + +// MsgWithdrawValidatorCommission withdraws the full commission to the validator +// address. +message MsgWithdrawValidatorCommission { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; +} + +// MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. +message MsgWithdrawValidatorCommissionResponse {} + +// MsgFundCommunityPool allows an account to directly +// fund the community pool. +message MsgFundCommunityPool { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + repeated cosmos.base.v1beta1.Coin amount = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + string depositor = 2; +} + +// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. +message MsgFundCommunityPoolResponse {} diff --git a/proto/cosmos/evidence/v1beta1/evidence.proto b/proto/cosmos/evidence/v1beta1/evidence.proto new file mode 100644 index 00000000..14612c31 --- /dev/null +++ b/proto/cosmos/evidence/v1beta1/evidence.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +package cosmos.evidence.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; + +// Equivocation implements the Evidence interface and defines evidence of double +// signing misbehavior. +message Equivocation { + option (gogoproto.goproto_stringer) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.equal) = false; + + int64 height = 1; + google.protobuf.Timestamp time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + int64 power = 3; + string consensus_address = 4 [(gogoproto.moretags) = "yaml:\"consensus_address\""]; +} \ No newline at end of file diff --git a/proto/cosmos/evidence/v1beta1/genesis.proto b/proto/cosmos/evidence/v1beta1/genesis.proto new file mode 100644 index 00000000..199f446f --- /dev/null +++ b/proto/cosmos/evidence/v1beta1/genesis.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package cosmos.evidence.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; + +import "google/protobuf/any.proto"; + +// GenesisState defines the evidence module's genesis state. +message GenesisState { + // evidence defines all the evidence at genesis. + repeated google.protobuf.Any evidence = 1; +} diff --git a/proto/cosmos/evidence/v1beta1/query.proto b/proto/cosmos/evidence/v1beta1/query.proto new file mode 100644 index 00000000..eda00544 --- /dev/null +++ b/proto/cosmos/evidence/v1beta1/query.proto @@ -0,0 +1,51 @@ +syntax = "proto3"; +package cosmos.evidence.v1beta1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; + +// Query defines the gRPC querier service. +service Query { + // Evidence queries evidence based on evidence hash. + rpc Evidence(QueryEvidenceRequest) returns (QueryEvidenceResponse) { + option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence/{evidence_hash}"; + } + + // AllEvidence queries all evidence. + rpc AllEvidence(QueryAllEvidenceRequest) returns (QueryAllEvidenceResponse) { + option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence"; + } +} + +// QueryEvidenceRequest is the request type for the Query/Evidence RPC method. +message QueryEvidenceRequest { + // evidence_hash defines the hash of the requested evidence. + bytes evidence_hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; +} + +// QueryEvidenceResponse is the response type for the Query/Evidence RPC method. +message QueryEvidenceResponse { + // evidence returns the requested evidence. + google.protobuf.Any evidence = 1; +} + +// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC +// method. +message QueryAllEvidenceRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC +// method. +message QueryAllEvidenceResponse { + // evidence returns all evidences. + repeated google.protobuf.Any evidence = 1; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/cosmos/evidence/v1beta1/tx.proto b/proto/cosmos/evidence/v1beta1/tx.proto new file mode 100644 index 00000000..38795f25 --- /dev/null +++ b/proto/cosmos/evidence/v1beta1/tx.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; +package cosmos.evidence.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; + +// Msg defines the evidence Msg service. +service Msg { + // SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or + // counterfactual signing. + rpc SubmitEvidence(MsgSubmitEvidence) returns (MsgSubmitEvidenceResponse); +} + +// MsgSubmitEvidence represents a message that supports submitting arbitrary +// Evidence of misbehavior such as equivocation or counterfactual signing. +message MsgSubmitEvidence { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string submitter = 1; + google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "Evidence"]; +} + +// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. +message MsgSubmitEvidenceResponse { + // hash defines the hash of the evidence. + bytes hash = 4; +} diff --git a/proto/cosmos/genutil/v1beta1/genesis.proto b/proto/cosmos/genutil/v1beta1/genesis.proto new file mode 100644 index 00000000..a0207793 --- /dev/null +++ b/proto/cosmos/genutil/v1beta1/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package cosmos.genutil.v1beta1; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/genutil/types"; + +// GenesisState defines the raw genesis transaction in JSON. +message GenesisState { + // gen_txs defines the genesis transactions. + repeated bytes gen_txs = 1 [ + (gogoproto.casttype) = "encoding/json.RawMessage", + (gogoproto.jsontag) = "gentxs", + (gogoproto.moretags) = "yaml:\"gentxs\"" + ]; +} diff --git a/proto/cosmos/gov/v1beta1/genesis.proto b/proto/cosmos/gov/v1beta1/genesis.proto new file mode 100644 index 00000000..a9995004 --- /dev/null +++ b/proto/cosmos/gov/v1beta1/genesis.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; + +package cosmos.gov.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/gov/v1beta1/gov.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; + +// GenesisState defines the gov module's genesis state. +message GenesisState { + // starting_proposal_id is the ID of the starting proposal. + uint64 starting_proposal_id = 1 [(gogoproto.moretags) = "yaml:\"starting_proposal_id\""]; + // deposits defines all the deposits present at genesis. + repeated Deposit deposits = 2 [(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false]; + // votes defines all the votes present at genesis. + repeated Vote votes = 3 [(gogoproto.castrepeated) = "Votes", (gogoproto.nullable) = false]; + // proposals defines all the proposals present at genesis. + repeated Proposal proposals = 4 [(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false]; + // params defines all the paramaters of related to deposit. + DepositParams deposit_params = 5 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_params\""]; + // params defines all the paramaters of related to voting. + VotingParams voting_params = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_params\""]; + // params defines all the paramaters of related to tally. + TallyParams tally_params = 7 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"tally_params\""]; +} diff --git a/proto/cosmos/gov/v1beta1/gov.proto b/proto/cosmos/gov/v1beta1/gov.proto new file mode 100644 index 00000000..1d72e643 --- /dev/null +++ b/proto/cosmos/gov/v1beta1/gov.proto @@ -0,0 +1,183 @@ +syntax = "proto3"; +package cosmos.gov.v1beta1; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = false; +option (gogoproto.goproto_getters_all) = false; + +// VoteOption enumerates the valid vote options for a given governance proposal. +enum VoteOption { + option (gogoproto.goproto_enum_prefix) = false; + + // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + VOTE_OPTION_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "OptionEmpty"]; + // VOTE_OPTION_YES defines a yes vote option. + VOTE_OPTION_YES = 1 [(gogoproto.enumvalue_customname) = "OptionYes"]; + // VOTE_OPTION_ABSTAIN defines an abstain vote option. + VOTE_OPTION_ABSTAIN = 2 [(gogoproto.enumvalue_customname) = "OptionAbstain"]; + // VOTE_OPTION_NO defines a no vote option. + VOTE_OPTION_NO = 3 [(gogoproto.enumvalue_customname) = "OptionNo"]; + // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + VOTE_OPTION_NO_WITH_VETO = 4 [(gogoproto.enumvalue_customname) = "OptionNoWithVeto"]; +} + +// TextProposal defines a standard text proposal whose changes need to be +// manually updated in case of approval. +message TextProposal { + option (cosmos_proto.implements_interface) = "Content"; + + option (gogoproto.equal) = true; + + string title = 1; + string description = 2; +} + +// Deposit defines an amount deposited by an account address to an active +// proposal. +message Deposit { + option (gogoproto.goproto_getters) = false; + option (gogoproto.equal) = false; + + uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; + string depositor = 2; + repeated cosmos.base.v1beta1.Coin amount = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// Proposal defines the core field members of a governance proposal. +message Proposal { + option (gogoproto.equal) = true; + + uint64 proposal_id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = "yaml:\"id\""]; + google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "Content"]; + ProposalStatus status = 3 [(gogoproto.moretags) = "yaml:\"proposal_status\""]; + TallyResult final_tally_result = 4 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"final_tally_result\""]; + google.protobuf.Timestamp submit_time = 5 + [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"submit_time\""]; + google.protobuf.Timestamp deposit_end_time = 6 + [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_end_time\""]; + repeated cosmos.base.v1beta1.Coin total_deposit = 7 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"total_deposit\"" + ]; + google.protobuf.Timestamp voting_start_time = 8 + [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_start_time\""]; + google.protobuf.Timestamp voting_end_time = 9 + [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_end_time\""]; +} + +// ProposalStatus enumerates the valid statuses of a proposal. +enum ProposalStatus { + option (gogoproto.goproto_enum_prefix) = false; + + // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + PROPOSAL_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "StatusNil"]; + // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + // period. + PROPOSAL_STATUS_DEPOSIT_PERIOD = 1 [(gogoproto.enumvalue_customname) = "StatusDepositPeriod"]; + // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + // period. + PROPOSAL_STATUS_VOTING_PERIOD = 2 [(gogoproto.enumvalue_customname) = "StatusVotingPeriod"]; + // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + // passed. + PROPOSAL_STATUS_PASSED = 3 [(gogoproto.enumvalue_customname) = "StatusPassed"]; + // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + // been rejected. + PROPOSAL_STATUS_REJECTED = 4 [(gogoproto.enumvalue_customname) = "StatusRejected"]; + // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + // failed. + PROPOSAL_STATUS_FAILED = 5 [(gogoproto.enumvalue_customname) = "StatusFailed"]; +} + +// TallyResult defines a standard tally for a governance proposal. +message TallyResult { + option (gogoproto.equal) = true; + + string yes = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string abstain = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string no = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string no_with_veto = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"no_with_veto\"" + ]; +} + +// Vote defines a vote on a governance proposal. +// A Vote consists of a proposal ID, the voter, and the vote option. +message Vote { + option (gogoproto.goproto_stringer) = false; + option (gogoproto.equal) = false; + + uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; + string voter = 2; + VoteOption option = 3; +} + +// DepositParams defines the params for deposits on governance proposals. +message DepositParams { + // Minimum deposit for a proposal to enter voting period. + repeated cosmos.base.v1beta1.Coin min_deposit = 1 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"min_deposit\"", + (gogoproto.jsontag) = "min_deposit,omitempty" + ]; + + // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + // months. + google.protobuf.Duration max_deposit_period = 2 [ + (gogoproto.nullable) = false, + (gogoproto.stdduration) = true, + (gogoproto.jsontag) = "max_deposit_period,omitempty", + (gogoproto.moretags) = "yaml:\"max_deposit_period\"" + ]; +} + +// VotingParams defines the params for voting on governance proposals. +message VotingParams { + // Length of the voting period. + google.protobuf.Duration voting_period = 1 [ + (gogoproto.nullable) = false, + (gogoproto.stdduration) = true, + (gogoproto.jsontag) = "voting_period,omitempty", + (gogoproto.moretags) = "yaml:\"voting_period\"" + ]; +} + +// TallyParams defines the params for tallying votes on governance proposals. +message TallyParams { + // Minimum percentage of total stake needed to vote for a result to be + // considered valid. + bytes quorum = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "quorum,omitempty" + ]; + + // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. + bytes threshold = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "threshold,omitempty" + ]; + + // Minimum value of Veto votes to Total votes ratio for proposal to be + // vetoed. Default value: 1/3. + bytes veto_threshold = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "veto_threshold,omitempty", + (gogoproto.moretags) = "yaml:\"veto_threshold\"" + ]; +} diff --git a/proto/cosmos/gov/v1beta1/query.proto b/proto/cosmos/gov/v1beta1/query.proto new file mode 100644 index 00000000..da62bdba --- /dev/null +++ b/proto/cosmos/gov/v1beta1/query.proto @@ -0,0 +1,190 @@ +syntax = "proto3"; +package cosmos.gov.v1beta1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/gov/v1beta1/gov.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; + +// Query defines the gRPC querier service for gov module +service Query { + // Proposal queries proposal details based on ProposalID. + rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) { + option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}"; + } + + // Proposals queries all proposals based on given status. + rpc Proposals(QueryProposalsRequest) returns (QueryProposalsResponse) { + option (google.api.http).get = "/cosmos/gov/v1beta1/proposals"; + } + + // Vote queries voted information based on proposalID, voterAddr. + rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) { + option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}"; + } + + // Votes queries votes of a given proposal. + rpc Votes(QueryVotesRequest) returns (QueryVotesResponse) { + option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes"; + } + + // Params queries all parameters of the gov module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/gov/v1beta1/params/{params_type}"; + } + + // Deposit queries single deposit information based proposalID, depositAddr. + rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) { + option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}"; + } + + // Deposits queries all deposits of a single proposal. + rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) { + option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits"; + } + + // TallyResult queries the tally of a proposal vote. + rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) { + option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/tally"; + } +} + +// QueryProposalRequest is the request type for the Query/Proposal RPC method. +message QueryProposalRequest { + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; +} + +// QueryProposalResponse is the response type for the Query/Proposal RPC method. +message QueryProposalResponse { + Proposal proposal = 1 [(gogoproto.nullable) = false]; +} + +// QueryProposalsRequest is the request type for the Query/Proposals RPC method. +message QueryProposalsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // proposal_status defines the status of the proposals. + ProposalStatus proposal_status = 1; + + // voter defines the voter address for the proposals. + string voter = 2; + + // depositor defines the deposit addresses from the proposals. + string depositor = 3; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 4; +} + +// QueryProposalsResponse is the response type for the Query/Proposals RPC +// method. +message QueryProposalsResponse { + repeated Proposal proposals = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryVoteRequest is the request type for the Query/Vote RPC method. +message QueryVoteRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; + + // voter defines the oter address for the proposals. + string voter = 2; +} + +// QueryVoteResponse is the response type for the Query/Vote RPC method. +message QueryVoteResponse { + // vote defined the queried vote. + Vote vote = 1 [(gogoproto.nullable) = false]; +} + +// QueryVotesRequest is the request type for the Query/Votes RPC method. +message QueryVotesRequest { + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryVotesResponse is the response type for the Query/Votes RPC method. +message QueryVotesResponse { + // votes defined the queried votes. + repeated Vote votes = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest { + // params_type defines which parameters to query for, can be one of "voting", + // "tallying" or "deposit". + string params_type = 1; +} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // voting_params defines the parameters related to voting. + VotingParams voting_params = 1 [(gogoproto.nullable) = false]; + // deposit_params defines the parameters related to deposit. + DepositParams deposit_params = 2 [(gogoproto.nullable) = false]; + // tally_params defines the parameters related to tally. + TallyParams tally_params = 3 [(gogoproto.nullable) = false]; +} + +// QueryDepositRequest is the request type for the Query/Deposit RPC method. +message QueryDepositRequest { + option (gogoproto.goproto_getters) = false; + option (gogoproto.equal) = false; + + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; + + // depositor defines the deposit addresses from the proposals. + string depositor = 2; +} + +// QueryDepositResponse is the response type for the Query/Deposit RPC method. +message QueryDepositResponse { + // deposit defines the requested deposit. + Deposit deposit = 1 [(gogoproto.nullable) = false]; +} + +// QueryDepositsRequest is the request type for the Query/Deposits RPC method. +message QueryDepositsRequest { + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryDepositsResponse is the response type for the Query/Deposits RPC method. +message QueryDepositsResponse { + repeated Deposit deposits = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryTallyResultRequest is the request type for the Query/Tally RPC method. +message QueryTallyResultRequest { + // proposal_id defines the unique id of the proposal. + uint64 proposal_id = 1; +} + +// QueryTallyResultResponse is the response type for the Query/Tally RPC method. +message QueryTallyResultResponse { + // tally defines the requested tally. + TallyResult tally = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/gov/v1beta1/tx.proto b/proto/cosmos/gov/v1beta1/tx.proto new file mode 100644 index 00000000..d4f0c1f9 --- /dev/null +++ b/proto/cosmos/gov/v1beta1/tx.proto @@ -0,0 +1,75 @@ +syntax = "proto3"; +package cosmos.gov.v1beta1; + +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/gov/v1beta1/gov.proto"; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; + +// Msg defines the bank Msg service. +service Msg { + // SubmitProposal defines a method to create new proposal given a content. + rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse); + + // Vote defines a method to add a vote on a specific proposal. + rpc Vote(MsgVote) returns (MsgVoteResponse); + + // Deposit defines a method to add deposit on a specific proposal. + rpc Deposit(MsgDeposit) returns (MsgDepositResponse); +} + +// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary +// proposal Content. +message MsgSubmitProposal { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.stringer) = false; + option (gogoproto.goproto_getters) = false; + + google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "Content"]; + repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"initial_deposit\"" + ]; + string proposer = 3; +} + +// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. +message MsgSubmitProposalResponse { + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; +} + +// MsgVote defines a message to cast a vote. +message MsgVote { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.stringer) = false; + option (gogoproto.goproto_getters) = false; + + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; + string voter = 2; + VoteOption option = 3; +} + +// MsgVoteResponse defines the Msg/Vote response type. +message MsgVoteResponse {} + +// MsgDeposit defines a message to submit a deposit to an existing proposal. +message MsgDeposit { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.stringer) = false; + option (gogoproto.goproto_getters) = false; + + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; + string depositor = 2; + repeated cosmos.base.v1beta1.Coin amount = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// MsgDepositResponse defines the Msg/Deposit response type. +message MsgDepositResponse {} diff --git a/proto/cosmos/mint/v1beta1/genesis.proto b/proto/cosmos/mint/v1beta1/genesis.proto new file mode 100644 index 00000000..4e783fb5 --- /dev/null +++ b/proto/cosmos/mint/v1beta1/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package cosmos.mint.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/mint/v1beta1/mint.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; + +// GenesisState defines the mint module's genesis state. +message GenesisState { + // minter is a space for holding current inflation information. + Minter minter = 1 [(gogoproto.nullable) = false]; + + // params defines all the paramaters of the module. + Params params = 2 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/mint/v1beta1/mint.proto b/proto/cosmos/mint/v1beta1/mint.proto new file mode 100644 index 00000000..f94d4ae2 --- /dev/null +++ b/proto/cosmos/mint/v1beta1/mint.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; +package cosmos.mint.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; + +import "gogoproto/gogo.proto"; + +// Minter represents the minting state. +message Minter { + // current annual inflation rate + string inflation = 1 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + // current annual expected provisions + string annual_provisions = 2 [ + (gogoproto.moretags) = "yaml:\"annual_provisions\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} + +// Params holds parameters for the mint module. +message Params { + option (gogoproto.goproto_stringer) = false; + + // type of coin to mint + string mint_denom = 1; + // maximum annual change in inflation rate + string inflation_rate_change = 2 [ + (gogoproto.moretags) = "yaml:\"inflation_rate_change\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // maximum inflation rate + string inflation_max = 3 [ + (gogoproto.moretags) = "yaml:\"inflation_max\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // minimum inflation rate + string inflation_min = 4 [ + (gogoproto.moretags) = "yaml:\"inflation_min\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // goal of percent bonded atoms + string goal_bonded = 5 [ + (gogoproto.moretags) = "yaml:\"goal_bonded\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // expected blocks per year + uint64 blocks_per_year = 6 [(gogoproto.moretags) = "yaml:\"blocks_per_year\""]; +} diff --git a/proto/cosmos/mint/v1beta1/query.proto b/proto/cosmos/mint/v1beta1/query.proto new file mode 100644 index 00000000..acd341d7 --- /dev/null +++ b/proto/cosmos/mint/v1beta1/query.proto @@ -0,0 +1,57 @@ +syntax = "proto3"; +package cosmos.mint.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/mint/v1beta1/mint.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; + +// Query provides defines the gRPC querier service. +service Query { + // Params returns the total set of minting parameters. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/mint/v1beta1/params"; + } + + // Inflation returns the current minting inflation value. + rpc Inflation(QueryInflationRequest) returns (QueryInflationResponse) { + option (google.api.http).get = "/cosmos/mint/v1beta1/inflation"; + } + + // AnnualProvisions current minting annual provisions value. + rpc AnnualProvisions(QueryAnnualProvisionsRequest) returns (QueryAnnualProvisionsResponse) { + option (google.api.http).get = "/cosmos/mint/v1beta1/annual_provisions"; + } +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1 [(gogoproto.nullable) = false]; +} + +// QueryInflationRequest is the request type for the Query/Inflation RPC method. +message QueryInflationRequest {} + +// QueryInflationResponse is the response type for the Query/Inflation RPC +// method. +message QueryInflationResponse { + // inflation is the current minting inflation value. + bytes inflation = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + +// QueryAnnualProvisionsRequest is the request type for the +// Query/AnnualProvisions RPC method. +message QueryAnnualProvisionsRequest {} + +// QueryAnnualProvisionsResponse is the response type for the +// Query/AnnualProvisions RPC method. +message QueryAnnualProvisionsResponse { + // annual_provisions is the current minting annual provisions value. + bytes annual_provisions = 1 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/params/v1beta1/params.proto b/proto/cosmos/params/v1beta1/params.proto new file mode 100644 index 00000000..5382fd79 --- /dev/null +++ b/proto/cosmos/params/v1beta1/params.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; +package cosmos.params.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; + +// ParameterChangeProposal defines a proposal to change one or more parameters. +message ParameterChangeProposal { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string title = 1; + string description = 2; + repeated ParamChange changes = 3 [(gogoproto.nullable) = false]; +} + +// ParamChange defines an individual parameter change, for use in +// ParameterChangeProposal. +message ParamChange { + option (gogoproto.goproto_stringer) = false; + + string subspace = 1; + string key = 2; + string value = 3; +} diff --git a/proto/cosmos/params/v1beta1/query.proto b/proto/cosmos/params/v1beta1/query.proto new file mode 100644 index 00000000..1078e02a --- /dev/null +++ b/proto/cosmos/params/v1beta1/query.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; +package cosmos.params.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/params/v1beta1/params.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; + +// Query defines the gRPC querier service. +service Query { + // Params queries a specific parameter of a module, given its subspace and + // key. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/params/v1beta1/params"; + } +} + +// QueryParamsRequest is request type for the Query/Params RPC method. +message QueryParamsRequest { + // subspace defines the module to query the parameter for. + string subspace = 1; + + // key defines the key of the parameter in the subspace. + string key = 2; +} + +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + // param defines the queried parameter. + ParamChange param = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/slashing/v1beta1/genesis.proto b/proto/cosmos/slashing/v1beta1/genesis.proto new file mode 100644 index 00000000..c8135613 --- /dev/null +++ b/proto/cosmos/slashing/v1beta1/genesis.proto @@ -0,0 +1,50 @@ +syntax = "proto3"; +package cosmos.slashing.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; + +import "gogoproto/gogo.proto"; +import "cosmos/slashing/v1beta1/slashing.proto"; + +// GenesisState defines the slashing module's genesis state. +message GenesisState { + // params defines all the paramaters of related to deposit. + Params params = 1 [(gogoproto.nullable) = false]; + + // signing_infos represents a map between validator addresses and their + // signing infos. + repeated SigningInfo signing_infos = 2 + [(gogoproto.moretags) = "yaml:\"signing_infos\"", (gogoproto.nullable) = false]; + + // signing_infos represents a map between validator addresses and their + // missed blocks. + repeated ValidatorMissedBlocks missed_blocks = 3 + [(gogoproto.moretags) = "yaml:\"missed_blocks\"", (gogoproto.nullable) = false]; +} + +// SigningInfo stores validator signing info of corresponding address. +message SigningInfo { + // address is the validator address. + string address = 1; + // validator_signing_info represents the signing info of this validator. + ValidatorSigningInfo validator_signing_info = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_signing_info\""]; +} + +// ValidatorMissedBlocks contains array of missed blocks of corresponding +// address. +message ValidatorMissedBlocks { + // address is the validator address. + string address = 1; + // missed_blocks is an array of missed blocks by the validator. + repeated MissedBlock missed_blocks = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"missed_blocks\""]; +} + +// MissedBlock contains height and missed status as boolean. +message MissedBlock { + // index is the height at which the block was missed. + int64 index = 1; + // missed is the missed status. + bool missed = 2; +} diff --git a/proto/cosmos/slashing/v1beta1/query.proto b/proto/cosmos/slashing/v1beta1/query.proto new file mode 100644 index 00000000..869049a0 --- /dev/null +++ b/proto/cosmos/slashing/v1beta1/query.proto @@ -0,0 +1,63 @@ +syntax = "proto3"; +package cosmos.slashing.v1beta1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/slashing/v1beta1/slashing.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; + +// Query provides defines the gRPC querier service +service Query { + // Params queries the parameters of slashing module + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/slashing/v1beta1/params"; + } + + // SigningInfo queries the signing info of given cons address + rpc SigningInfo(QuerySigningInfoRequest) returns (QuerySigningInfoResponse) { + option (google.api.http).get = "/cosmos/slashing/v1beta1/signing_infos/{cons_address}"; + } + + // SigningInfos queries signing info of all validators + rpc SigningInfos(QuerySigningInfosRequest) returns (QuerySigningInfosResponse) { + option (google.api.http).get = "/cosmos/slashing/v1beta1/signing_infos"; + } +} + +// QueryParamsRequest is the request type for the Query/Params RPC method +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method +message QueryParamsResponse { + Params params = 1 [(gogoproto.nullable) = false]; +} + +// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC +// method +message QuerySigningInfoRequest { + // cons_address is the address to query signing info of + string cons_address = 1; +} + +// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC +// method +message QuerySigningInfoResponse { + // val_signing_info is the signing info of requested val cons address + ValidatorSigningInfo val_signing_info = 1 [(gogoproto.nullable) = false]; +} + +// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC +// method +message QuerySigningInfosRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC +// method +message QuerySigningInfosResponse { + // info is the signing info of all validators + repeated cosmos.slashing.v1beta1.ValidatorSigningInfo info = 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/proto/cosmos/slashing/v1beta1/slashing.proto b/proto/cosmos/slashing/v1beta1/slashing.proto new file mode 100644 index 00000000..657a90f1 --- /dev/null +++ b/proto/cosmos/slashing/v1beta1/slashing.proto @@ -0,0 +1,55 @@ +syntax = "proto3"; +package cosmos.slashing.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +// ValidatorSigningInfo defines a validator's signing info for monitoring their +// liveness activity. +message ValidatorSigningInfo { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + string address = 1; + // height at which validator was first a candidate OR was unjailed + int64 start_height = 2 [(gogoproto.moretags) = "yaml:\"start_height\""]; + // index offset into signed block bit array + int64 index_offset = 3 [(gogoproto.moretags) = "yaml:\"index_offset\""]; + // timestamp validator cannot be unjailed until + google.protobuf.Timestamp jailed_until = 4 + [(gogoproto.moretags) = "yaml:\"jailed_until\"", (gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + // whether or not a validator has been tombstoned (killed out of validator + // set) + bool tombstoned = 5; + // missed blocks counter (to avoid scanning the array every time) + int64 missed_blocks_counter = 6 [(gogoproto.moretags) = "yaml:\"missed_blocks_counter\""]; +} + +// Params represents the parameters used for by the slashing module. +message Params { + int64 signed_blocks_window = 1 [(gogoproto.moretags) = "yaml:\"signed_blocks_window\""]; + bytes min_signed_per_window = 2 [ + (gogoproto.moretags) = "yaml:\"min_signed_per_window\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + google.protobuf.Duration downtime_jail_duration = 3 [ + (gogoproto.nullable) = false, + (gogoproto.stdduration) = true, + (gogoproto.moretags) = "yaml:\"downtime_jail_duration\"" + ]; + bytes slash_fraction_double_sign = 4 [ + (gogoproto.moretags) = "yaml:\"slash_fraction_double_sign\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + bytes slash_fraction_downtime = 5 [ + (gogoproto.moretags) = "yaml:\"slash_fraction_downtime\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/cosmos/slashing/v1beta1/tx.proto b/proto/cosmos/slashing/v1beta1/tx.proto new file mode 100644 index 00000000..4d63370e --- /dev/null +++ b/proto/cosmos/slashing/v1beta1/tx.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +package cosmos.slashing.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; + +// Msg defines the slashing Msg service. +service Msg { + // Unjail defines a method for unjailing a jailed validator, thus returning + // them into the bonded validator set, so they can begin receiving provisions + // and rewards again. + rpc Unjail(MsgUnjail) returns (MsgUnjailResponse); +} + +// MsgUnjail defines the Msg/Unjail request type +message MsgUnjail { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = true; + + string validator_addr = 1 [(gogoproto.moretags) = "yaml:\"address\"", (gogoproto.jsontag) = "address"]; +} + +// MsgUnjailResponse defines the Msg/Unjail response type +message MsgUnjailResponse {} \ No newline at end of file diff --git a/proto/cosmos/staking/v1beta1/genesis.proto b/proto/cosmos/staking/v1beta1/genesis.proto new file mode 100644 index 00000000..d1563dbc --- /dev/null +++ b/proto/cosmos/staking/v1beta1/genesis.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; +package cosmos.staking.v1beta1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; + +import "gogoproto/gogo.proto"; +import "cosmos/staking/v1beta1/staking.proto"; + +// GenesisState defines the staking module's genesis state. +message GenesisState { + // params defines all the paramaters of related to deposit. + Params params = 1 [(gogoproto.nullable) = false]; + + // last_total_power tracks the total amounts of bonded tokens recorded during + // the previous end block. + bytes last_total_power = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"last_total_power\"", + (gogoproto.nullable) = false + ]; + + // last_validator_powers is a special index that provides a historical list + // of the last-block's bonded validators. + repeated LastValidatorPower last_validator_powers = 3 + [(gogoproto.moretags) = "yaml:\"last_validator_powers\"", (gogoproto.nullable) = false]; + + // delegations defines the validator set at genesis. + repeated Validator validators = 4 [(gogoproto.nullable) = false]; + + // delegations defines the delegations active at genesis. + repeated Delegation delegations = 5 [(gogoproto.nullable) = false]; + + // unbonding_delegations defines the unbonding delegations active at genesis. + repeated UnbondingDelegation unbonding_delegations = 6 + [(gogoproto.moretags) = "yaml:\"unbonding_delegations\"", (gogoproto.nullable) = false]; + + // redelegations defines the redelegations active at genesis. + repeated Redelegation redelegations = 7 [(gogoproto.nullable) = false]; + + bool exported = 8; +} + +// LastValidatorPower required for validator set update logic. +message LastValidatorPower { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // address is the address of the validator. + string address = 1; + + // power defines the power of the validator. + int64 power = 2; +} diff --git a/proto/cosmos/staking/v1beta1/query.proto b/proto/cosmos/staking/v1beta1/query.proto new file mode 100644 index 00000000..4852c535 --- /dev/null +++ b/proto/cosmos/staking/v1beta1/query.proto @@ -0,0 +1,348 @@ +syntax = "proto3"; +package cosmos.staking.v1beta1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/staking/v1beta1/staking.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; + +// Query defines the gRPC querier service. +service Query { + // Validators queries all validators that match the given status. + rpc Validators(QueryValidatorsRequest) returns (QueryValidatorsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators"; + } + + // Validator queries validator info for given validator address. + rpc Validator(QueryValidatorRequest) returns (QueryValidatorResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}"; + } + + // ValidatorDelegations queries delegate info for given validator. + rpc ValidatorDelegations(QueryValidatorDelegationsRequest) returns (QueryValidatorDelegationsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations"; + } + + // ValidatorUnbondingDelegations queries unbonding delegations of a validator. + rpc ValidatorUnbondingDelegations(QueryValidatorUnbondingDelegationsRequest) + returns (QueryValidatorUnbondingDelegationsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/" + "{validator_addr}/unbonding_delegations"; + } + + // Delegation queries delegate info for given validator delegator pair. + rpc Delegation(QueryDelegationRequest) returns (QueryDelegationResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/" + "{delegator_addr}"; + } + + // UnbondingDelegation queries unbonding info for given validator delegator + // pair. + rpc UnbondingDelegation(QueryUnbondingDelegationRequest) returns (QueryUnbondingDelegationResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/" + "{delegator_addr}/unbonding_delegation"; + } + + // DelegatorDelegations queries all delegations of a given delegator address. + rpc DelegatorDelegations(QueryDelegatorDelegationsRequest) returns (QueryDelegatorDelegationsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/delegations/{delegator_addr}"; + } + + // DelegatorUnbondingDelegations queries all unbonding delegations of a given + // delegator address. + rpc DelegatorUnbondingDelegations(QueryDelegatorUnbondingDelegationsRequest) + returns (QueryDelegatorUnbondingDelegationsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/" + "{delegator_addr}/unbonding_delegations"; + } + + // Redelegations queries redelegations of given address. + rpc Redelegations(QueryRedelegationsRequest) returns (QueryRedelegationsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations"; + } + + // DelegatorValidators queries all validators info for given delegator + // address. + rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators"; + } + + // DelegatorValidator queries validator info for given delegator validator + // pair. + rpc DelegatorValidator(QueryDelegatorValidatorRequest) returns (QueryDelegatorValidatorResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/" + "{validator_addr}"; + } + + // HistoricalInfo queries the historical info for given height. + rpc HistoricalInfo(QueryHistoricalInfoRequest) returns (QueryHistoricalInfoResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/historical_info/{height}"; + } + + // Pool queries the pool info. + rpc Pool(QueryPoolRequest) returns (QueryPoolResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/pool"; + } + + // Parameters queries the staking parameters. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/cosmos/staking/v1beta1/params"; + } +} + +// QueryValidatorsRequest is request type for Query/Validators RPC method. +message QueryValidatorsRequest { + // status enables to query for validators matching a given status. + string status = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryValidatorsResponse is response type for the Query/Validators RPC method +message QueryValidatorsResponse { + // validators contains all the queried validators. + repeated Validator validators = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryValidatorRequest is response type for the Query/Validator RPC method +message QueryValidatorRequest { + // validator_addr defines the validator address to query for. + string validator_addr = 1; +} + +// QueryValidatorResponse is response type for the Query/Validator RPC method +message QueryValidatorResponse { + // validator defines the the validator info. + Validator validator = 1 [(gogoproto.nullable) = false]; +} + +// QueryValidatorDelegationsRequest is request type for the +// Query/ValidatorDelegations RPC method +message QueryValidatorDelegationsRequest { + // validator_addr defines the validator address to query for. + string validator_addr = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryValidatorDelegationsResponse is response type for the +// Query/ValidatorDelegations RPC method +message QueryValidatorDelegationsResponse { + repeated DelegationResponse delegation_responses = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "DelegationResponses"]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryValidatorUnbondingDelegationsRequest is required type for the +// Query/ValidatorUnbondingDelegations RPC method +message QueryValidatorUnbondingDelegationsRequest { + // validator_addr defines the validator address to query for. + string validator_addr = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryValidatorUnbondingDelegationsResponse is response type for the +// Query/ValidatorUnbondingDelegations RPC method. +message QueryValidatorUnbondingDelegationsResponse { + repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDelegationRequest is request type for the Query/Delegation RPC method. +message QueryDelegationRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_addr defines the delegator address to query for. + string delegator_addr = 1; + + // validator_addr defines the validator address to query for. + string validator_addr = 2; +} + +// QueryDelegationResponse is response type for the Query/Delegation RPC method. +message QueryDelegationResponse { + // delegation_responses defines the delegation info of a delegation. + DelegationResponse delegation_response = 1; +} + +// QueryUnbondingDelegationRequest is request type for the +// Query/UnbondingDelegation RPC method. +message QueryUnbondingDelegationRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_addr defines the delegator address to query for. + string delegator_addr = 1; + + // validator_addr defines the validator address to query for. + string validator_addr = 2; +} + +// QueryDelegationResponse is response type for the Query/UnbondingDelegation +// RPC method. +message QueryUnbondingDelegationResponse { + // unbond defines the unbonding information of a delegation. + UnbondingDelegation unbond = 1 [(gogoproto.nullable) = false]; +} + +// QueryDelegatorDelegationsRequest is request type for the +// Query/DelegatorDelegations RPC method. +message QueryDelegatorDelegationsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_addr defines the delegator address to query for. + string delegator_addr = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryDelegatorDelegationsResponse is response type for the +// Query/DelegatorDelegations RPC method. +message QueryDelegatorDelegationsResponse { + // delegation_responses defines all the delegations' info of a delegator. + repeated DelegationResponse delegation_responses = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDelegatorUnbondingDelegationsRequest is request type for the +// Query/DelegatorUnbondingDelegations RPC method. +message QueryDelegatorUnbondingDelegationsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_addr defines the delegator address to query for. + string delegator_addr = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryUnbondingDelegatorDelegationsResponse is response type for the +// Query/UnbondingDelegatorDelegations RPC method. +message QueryDelegatorUnbondingDelegationsResponse { + repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryRedelegationsRequest is request type for the Query/Redelegations RPC +// method. +message QueryRedelegationsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_addr defines the delegator address to query for. + string delegator_addr = 1; + + // src_validator_addr defines the validator address to redelegate from. + string src_validator_addr = 2; + + // dst_validator_addr defines the validator address to redelegate to. + string dst_validator_addr = 3; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 4; +} + +// QueryRedelegationsResponse is response type for the Query/Redelegations RPC +// method. +message QueryRedelegationsResponse { + repeated RedelegationResponse redelegation_responses = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDelegatorValidatorsRequest is request type for the +// Query/DelegatorValidators RPC method. +message QueryDelegatorValidatorsRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_addr defines the delegator address to query for. + string delegator_addr = 1; + + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryDelegatorValidatorsResponse is response type for the +// Query/DelegatorValidators RPC method. +message QueryDelegatorValidatorsResponse { + // validators defines the the validators' info of a delegator. + repeated Validator validators = 1 [(gogoproto.nullable) = false]; + + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryDelegatorValidatorRequest is request type for the +// Query/DelegatorValidator RPC method. +message QueryDelegatorValidatorRequest { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // delegator_addr defines the delegator address to query for. + string delegator_addr = 1; + + // validator_addr defines the validator address to query for. + string validator_addr = 2; +} + +// QueryDelegatorValidatorResponse response type for the +// Query/DelegatorValidator RPC method. +message QueryDelegatorValidatorResponse { + // validator defines the the validator info. + Validator validator = 1 [(gogoproto.nullable) = false]; +} + +// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC +// method. +message QueryHistoricalInfoRequest { + // height defines at which height to query the historical info. + int64 height = 1; +} + +// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC +// method. +message QueryHistoricalInfoResponse { + // hist defines the historical info at the given height. + HistoricalInfo hist = 1; +} + +// QueryPoolRequest is request type for the Query/Pool RPC method. +message QueryPoolRequest {} + +// QueryPoolResponse is response type for the Query/Pool RPC method. +message QueryPoolResponse { + // pool defines the pool info. + Pool pool = 1 [(gogoproto.nullable) = false]; +} + +// QueryParamsRequest is request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is response type for the Query/Params RPC method. +message QueryParamsResponse { + // params holds all the parameters of this module. + Params params = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/cosmos/staking/v1beta1/staking.proto b/proto/cosmos/staking/v1beta1/staking.proto new file mode 100644 index 00000000..eadc86e9 --- /dev/null +++ b/proto/cosmos/staking/v1beta1/staking.proto @@ -0,0 +1,290 @@ +syntax = "proto3"; +package cosmos.staking.v1beta1; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "tendermint/types/types.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; + +// HistoricalInfo contains header and validator information for a given block. +// It is stored as part of staking module's state, which persists the `n` most +// recent HistoricalInfo +// (`n` is set by the staking module's `historical_entries` parameter). +message HistoricalInfo { + tendermint.types.Header header = 1 [(gogoproto.nullable) = false]; + repeated Validator valset = 2 [(gogoproto.nullable) = false]; +} + +// CommissionRates defines the initial commission rates to be used for creating +// a validator. +message CommissionRates { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + string rate = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string max_rate = 2 [ + (gogoproto.moretags) = "yaml:\"max_rate\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + string max_change_rate = 3 [ + (gogoproto.moretags) = "yaml:\"max_change_rate\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} + +// Commission defines commission parameters for a given validator. +message Commission { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + CommissionRates commission_rates = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + google.protobuf.Timestamp update_time = 2 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"update_time\""]; +} + +// Description defines a validator description. +message Description { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + string moniker = 1; + string identity = 2; + string website = 3; + string security_contact = 4 [(gogoproto.moretags) = "yaml:\"security_contact\""]; + string details = 5; +} + +// Validator defines a validator, together with the total amount of the +// Validator's bond shares and their exchange rate to coins. Slashing results in +// a decrease in the exchange rate, allowing correct calculation of future +// undelegations without iterating over delegators. When coins are delegated to +// this validator, the validator is credited with a delegation whose number of +// bond shares is based on the amount of coins delegated divided by the current +// exchange rate. Voting power can be calculated as total bonded shares +// multiplied by exchange rate. +message Validator { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.goproto_getters) = false; + + string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""]; + google.protobuf.Any consensus_pubkey = 2 + [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", (gogoproto.moretags) = "yaml:\"consensus_pubkey\""]; + bool jailed = 3; + BondStatus status = 4; + string tokens = 5 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string delegator_shares = 6 [ + (gogoproto.moretags) = "yaml:\"delegator_shares\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + Description description = 7 [(gogoproto.nullable) = false]; + int64 unbonding_height = 8 [(gogoproto.moretags) = "yaml:\"unbonding_height\""]; + google.protobuf.Timestamp unbonding_time = 9 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; + Commission commission = 10 [(gogoproto.nullable) = false]; + string min_self_delegation = 11 [ + (gogoproto.moretags) = "yaml:\"min_self_delegation\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} + +// BondStatus is the status of a validator. +enum BondStatus { + option (gogoproto.goproto_enum_prefix) = false; + + // UNSPECIFIED defines an invalid validator status. + BOND_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "Unspecified"]; + // UNBONDED defines a validator that is not bonded. + BOND_STATUS_UNBONDED = 1 [(gogoproto.enumvalue_customname) = "Unbonded"]; + // UNBONDING defines a validator that is unbonding. + BOND_STATUS_UNBONDING = 2 [(gogoproto.enumvalue_customname) = "Unbonding"]; + // BONDED defines a validator that is bonded. + BOND_STATUS_BONDED = 3 [(gogoproto.enumvalue_customname) = "Bonded"]; +} + +// ValAddresses defines a repeated set of validator addresses. +message ValAddresses { + option (gogoproto.goproto_stringer) = false; + option (gogoproto.stringer) = true; + + repeated string addresses = 1; +} + +// DVPair is struct that just has a delegator-validator pair with no other data. +// It is intended to be used as a marshalable pointer. For example, a DVPair can +// be used to construct the key to getting an UnbondingDelegation from state. +message DVPair { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; +} + +// DVPairs defines an array of DVPair objects. +message DVPairs { + repeated DVPair pairs = 1 [(gogoproto.nullable) = false]; +} + +// DVVTriplet is struct that just has a delegator-validator-validator triplet +// with no other data. It is intended to be used as a marshalable pointer. For +// example, a DVVTriplet can be used to construct the key to getting a +// Redelegation from state. +message DVVTriplet { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; + string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; +} + +// DVVTriplets defines an array of DVVTriplet objects. +message DVVTriplets { + repeated DVVTriplet triplets = 1 [(gogoproto.nullable) = false]; +} + +// Delegation represents the bond with tokens held by an account. It is +// owned by one delegator, and is associated with the voting power of one +// validator. +message Delegation { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + string shares = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + +// UnbondingDelegation stores all of a single delegator's unbonding bonds +// for a single validator in an time-ordered list. +message UnbondingDelegation { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries +} + +// UnbondingDelegationEntry defines an unbonding object with relevant metadata. +message UnbondingDelegationEntry { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; + google.protobuf.Timestamp completion_time = 2 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; + string initial_balance = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"initial_balance\"" + ]; + string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; +} + +// RedelegationEntry defines a redelegation object with relevant metadata. +message RedelegationEntry { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; + google.protobuf.Timestamp completion_time = 2 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; + string initial_balance = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"initial_balance\"" + ]; + string shares_dst = 4 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + +// Redelegation contains the list of a particular delegator's redelegating bonds +// from a particular source validator to a particular destination validator. +message Redelegation { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; + string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; + repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries +} + +// Params defines the parameters for the staking module. +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + google.protobuf.Duration unbonding_time = 1 + [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; + uint32 max_validators = 2 [(gogoproto.moretags) = "yaml:\"max_validators\""]; + uint32 max_entries = 3 [(gogoproto.moretags) = "yaml:\"max_entries\""]; + uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""]; + string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""]; +} + +// DelegationResponse is equivalent to Delegation except that it contains a +// balance in addition to shares which is more suitable for client responses. +message DelegationResponse { + option (gogoproto.equal) = false; + option (gogoproto.goproto_stringer) = false; + + Delegation delegation = 1 [(gogoproto.nullable) = false]; + + cosmos.base.v1beta1.Coin balance = 2 [(gogoproto.nullable) = false]; +} + +// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it +// contains a balance in addition to shares which is more suitable for client +// responses. +message RedelegationEntryResponse { + option (gogoproto.equal) = true; + + RedelegationEntry redelegation_entry = 1 [(gogoproto.nullable) = false]; + string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; +} + +// RedelegationResponse is equivalent to a Redelegation except that its entries +// contain a balance in addition to shares which is more suitable for client +// responses. +message RedelegationResponse { + option (gogoproto.equal) = false; + + Redelegation redelegation = 1 [(gogoproto.nullable) = false]; + repeated RedelegationEntryResponse entries = 2 [(gogoproto.nullable) = false]; +} + +// Pool is used for tracking bonded and not-bonded token supply of the bond +// denomination. +message Pool { + option (gogoproto.description) = true; + option (gogoproto.equal) = true; + string not_bonded_tokens = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.jsontag) = "not_bonded_tokens", + (gogoproto.nullable) = false + ]; + string bonded_tokens = 2 [ + (gogoproto.jsontag) = "bonded_tokens", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"bonded_tokens\"" + ]; +} diff --git a/proto/cosmos/staking/v1beta1/tx.proto b/proto/cosmos/staking/v1beta1/tx.proto new file mode 100644 index 00000000..ffcd74b2 --- /dev/null +++ b/proto/cosmos/staking/v1beta1/tx.proto @@ -0,0 +1,127 @@ +syntax = "proto3"; +package cosmos.staking.v1beta1; + +import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; +import "gogoproto/gogo.proto"; + +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/staking/v1beta1/staking.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; + +// Msg defines the staking Msg service. +service Msg { + // CreateValidator defines a method for creating a new validator. + rpc CreateValidator(MsgCreateValidator) returns (MsgCreateValidatorResponse); + + // EditValidator defines a method for editing an existing validator. + rpc EditValidator(MsgEditValidator) returns (MsgEditValidatorResponse); + + // Delegate defines a method for performing a delegation of coins + // from a delegator to a validator. + rpc Delegate(MsgDelegate) returns (MsgDelegateResponse); + + // BeginRedelegate defines a method for performing a redelegation + // of coins from a delegator and source validator to a destination validator. + rpc BeginRedelegate(MsgBeginRedelegate) returns (MsgBeginRedelegateResponse); + + // Undelegate defines a method for performing an undelegation from a + // delegate and a validator. + rpc Undelegate(MsgUndelegate) returns (MsgUndelegateResponse); +} + +// MsgCreateValidator defines a SDK message for creating a new validator. +message MsgCreateValidator { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + Description description = 1 [(gogoproto.nullable) = false]; + CommissionRates commission = 2 [(gogoproto.nullable) = false]; + string min_self_delegation = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"min_self_delegation\"", + (gogoproto.nullable) = false + ]; + string delegator_address = 4 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 5 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + google.protobuf.Any pubkey = 6 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"]; + cosmos.base.v1beta1.Coin value = 7 [(gogoproto.nullable) = false]; +} + +// MsgCreateValidatorResponse defines the Msg/CreateValidator response type. +message MsgCreateValidatorResponse {} + +// MsgEditValidator defines a SDK message for editing an existing validator. +message MsgEditValidator { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + Description description = 1 [(gogoproto.nullable) = false]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"address\""]; + + // We pass a reference to the new commission rate and min self delegation as + // it's not mandatory to update. If not updated, the deserialized rate will be + // zero with no way to distinguish if an update was intended. + // + // REF: #2373 + string commission_rate = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.moretags) = "yaml:\"commission_rate\"" + ]; + string min_self_delegation = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"min_self_delegation\"" + ]; +} + +// MsgEditValidatorResponse defines the Msg/EditValidator response type. +message MsgEditValidatorResponse {} + +// MsgDelegate defines a SDK message for performing a delegation of coins +// from a delegator to a validator. +message MsgDelegate { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; +} + +// MsgDelegateResponse defines the Msg/Delegate response type. +message MsgDelegateResponse {} + +// MsgBeginRedelegate defines a SDK message for performing a redelegation +// of coins from a delegator and source validator to a destination validator. +message MsgBeginRedelegate { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; + string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; + cosmos.base.v1beta1.Coin amount = 4 [(gogoproto.nullable) = false]; +} + +// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. +message MsgBeginRedelegateResponse { + google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +// MsgUndelegate defines a SDK message for performing an undelegation from a +// delegate and a validator. +message MsgUndelegate { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; + string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; + cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; +} + +// MsgUndelegateResponse defines the Msg/Undelegate response type. +message MsgUndelegateResponse { + google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} diff --git a/proto/cosmos/tx/signing/v1beta1/signing.proto b/proto/cosmos/tx/signing/v1beta1/signing.proto new file mode 100644 index 00000000..4c1be405 --- /dev/null +++ b/proto/cosmos/tx/signing/v1beta1/signing.proto @@ -0,0 +1,79 @@ +syntax = "proto3"; +package cosmos.tx.signing.v1beta1; + +import "cosmos/crypto/multisig/v1beta1/multisig.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/types/tx/signing"; + +// SignMode represents a signing mode with its own security guarantees. +enum SignMode { + // SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + // rejected + SIGN_MODE_UNSPECIFIED = 0; + + // SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + // verified with raw bytes from Tx + SIGN_MODE_DIRECT = 1; + + // SIGN_MODE_TEXTUAL is a future signing mode that will verify some + // human-readable textual representation on top of the binary representation + // from SIGN_MODE_DIRECT + SIGN_MODE_TEXTUAL = 2; + + // SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + // Amino JSON and will be removed in the future + SIGN_MODE_LEGACY_AMINO_JSON = 127; +} + +// SignatureDescriptors wraps multiple SignatureDescriptor's. +message SignatureDescriptors { + // signatures are the signature descriptors + repeated SignatureDescriptor signatures = 1; +} + +// SignatureDescriptor is a convenience type which represents the full data for +// a signature including the public key of the signer, signing modes and the +// signature itself. It is primarily used for coordinating signatures between +// clients. +message SignatureDescriptor { + // public_key is the public key of the signer + google.protobuf.Any public_key = 1; + + Data data = 2; + + // sequence is the sequence of the account, which describes the + // number of committed transactions signed by a given address. It is used to prevent + // replay attacks. + uint64 sequence = 3; + + // Data represents signature data + message Data { + // sum is the oneof that specifies whether this represents single or multi-signature data + oneof sum { + // single represents a single signer + Single single = 1; + + // multi represents a multisig signer + Multi multi = 2; + } + + // Single is the signature data for a single signer + message Single { + // mode is the signing mode of the single signer + SignMode mode = 1; + + // signature is the raw signature bytes + bytes signature = 2; + } + + // Multi is the signature data for a multisig public key + message Multi { + // bitarray specifies which keys within the multisig are signing + cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; + + // signatures is the signatures of the multi-signature + repeated Data signatures = 2; + } + } +} diff --git a/proto/cosmos/tx/v1beta1/service.proto b/proto/cosmos/tx/v1beta1/service.proto new file mode 100644 index 00000000..59df75ba --- /dev/null +++ b/proto/cosmos/tx/v1beta1/service.proto @@ -0,0 +1,117 @@ +syntax = "proto3"; +package cosmos.tx.v1beta1; + +import "google/api/annotations.proto"; +import "cosmos/base/abci/v1beta1/abci.proto"; +import "cosmos/tx/v1beta1/tx.proto"; +import "gogoproto/gogo.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; + +// Service defines a gRPC service for interacting with transactions. +service Service { + // Simulate simulates executing a transaction for estimating gas usage. + rpc Simulate(SimulateRequest) returns (SimulateResponse) { + option (google.api.http) = { + post: "/cosmos/tx/v1beta1/simulate" + body: "*" + }; + } + // GetTx fetches a tx by hash. + rpc GetTx(GetTxRequest) returns (GetTxResponse) { + option (google.api.http).get = "/cosmos/tx/v1beta1/txs/{hash}"; + } + // BroadcastTx broadcast transaction. + rpc BroadcastTx(BroadcastTxRequest) returns (BroadcastTxResponse) { + option (google.api.http) = { + post: "/cosmos/tx/v1beta1/txs" + body: "*" + }; + } + // GetTxsEvent fetches txs by event. + rpc GetTxsEvent(GetTxsEventRequest) returns (GetTxsEventResponse) { + option (google.api.http).get = "/cosmos/tx/v1beta1/txs"; + } +} + +// GetTxsEventRequest is the request type for the Service.TxsByEvents +// RPC method. +message GetTxsEventRequest { + // events is the list of transaction event type. + repeated string events = 1; + // pagination defines an pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// GetTxsEventResponse is the response type for the Service.TxsByEvents +// RPC method. +message GetTxsEventResponse { + // txs is the list of queried transactions. + repeated cosmos.tx.v1beta1.Tx txs = 1; + // tx_responses is the list of queried TxResponses. + repeated cosmos.base.abci.v1beta1.TxResponse tx_responses = 2; + // pagination defines an pagination for the response. + cosmos.base.query.v1beta1.PageResponse pagination = 3; +} + +// BroadcastTxRequest is the request type for the Service.BroadcastTxRequest +// RPC method. +message BroadcastTxRequest { + // tx_bytes is the raw transaction. + bytes tx_bytes = 1; + BroadcastMode mode = 2; +} + +// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. +enum BroadcastMode { + // zero-value for mode ordering + BROADCAST_MODE_UNSPECIFIED = 0; + // BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for + // the tx to be committed in a block. + BROADCAST_MODE_BLOCK = 1; + // BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for + // a CheckTx execution response only. + BROADCAST_MODE_SYNC = 2; + // BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns + // immediately. + BROADCAST_MODE_ASYNC = 3; +} + +// BroadcastTxResponse is the response type for the +// Service.BroadcastTx method. +message BroadcastTxResponse { + // tx_response is the queried TxResponses. + cosmos.base.abci.v1beta1.TxResponse tx_response = 1; +} + +// SimulateRequest is the request type for the Service.Simulate +// RPC method. +message SimulateRequest { + // tx is the transaction to simulate. + cosmos.tx.v1beta1.Tx tx = 1; +} + +// SimulateResponse is the response type for the +// Service.SimulateRPC method. +message SimulateResponse { + // gas_info is the information about gas used in the simulation. + cosmos.base.abci.v1beta1.GasInfo gas_info = 1; + // result is the result of the simulation. + cosmos.base.abci.v1beta1.Result result = 2; +} + +// GetTxRequest is the request type for the Service.GetTx +// RPC method. +message GetTxRequest { + // hash is the tx hash to query, encoded as a hex string. + string hash = 1; +} + +// GetTxResponse is the response type for the Service.GetTx method. +message GetTxResponse { + // tx is the queried transaction. + cosmos.tx.v1beta1.Tx tx = 1; + // tx_response is the queried TxResponses. + cosmos.base.abci.v1beta1.TxResponse tx_response = 2; +} \ No newline at end of file diff --git a/proto/cosmos/tx/v1beta1/tx.proto b/proto/cosmos/tx/v1beta1/tx.proto new file mode 100644 index 00000000..05eea1f6 --- /dev/null +++ b/proto/cosmos/tx/v1beta1/tx.proto @@ -0,0 +1,182 @@ +syntax = "proto3"; +package cosmos.tx.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/crypto/multisig/v1beta1/multisig.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/tx/signing/v1beta1/signing.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; + +// Tx is the standard type used for broadcasting transactions. +message Tx { + // body is the processable content of the transaction + TxBody body = 1; + + // auth_info is the authorization related content of the transaction, + // specifically signers, signer modes and fee + AuthInfo auth_info = 2; + + // signatures is a list of signatures that matches the length and order of + // AuthInfo's signer_infos to allow connecting signature meta information like + // public key and signing mode by position. + repeated bytes signatures = 3; +} + +// TxRaw is a variant of Tx that pins the signer's exact binary representation +// of body and auth_info. This is used for signing, broadcasting and +// verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and +// the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used +// as the transaction ID. +message TxRaw { + // body_bytes is a protobuf serialization of a TxBody that matches the + // representation in SignDoc. + bytes body_bytes = 1; + + // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + // representation in SignDoc. + bytes auth_info_bytes = 2; + + // signatures is a list of signatures that matches the length and order of + // AuthInfo's signer_infos to allow connecting signature meta information like + // public key and signing mode by position. + repeated bytes signatures = 3; +} + +// SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. +message SignDoc { + // body_bytes is protobuf serialization of a TxBody that matches the + // representation in TxRaw. + bytes body_bytes = 1; + + // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the + // representation in TxRaw. + bytes auth_info_bytes = 2; + + // chain_id is the unique identifier of the chain this transaction targets. + // It prevents signed transactions from being used on another chain by an + // attacker + string chain_id = 3; + + // account_number is the account number of the account in state + uint64 account_number = 4; +} + +// TxBody is the body of a transaction that all signers sign over. +message TxBody { + // messages is a list of messages to be executed. The required signers of + // those messages define the number and order of elements in AuthInfo's + // signer_infos and Tx's signatures. Each required signer address is added to + // the list only the first time it occurs. + // + // By convention, the first required signer (usually from the first message) + // is referred to as the primary signer and pays the fee for the whole + // transaction. + repeated google.protobuf.Any messages = 1; + + // memo is any arbitrary memo to be added to the transaction + string memo = 2; + + // timeout is the block height after which this transaction will not + // be processed by the chain + uint64 timeout_height = 3; + + // extension_options are arbitrary options that can be added by chains + // when the default options are not sufficient. If any of these are present + // and can't be handled, the transaction will be rejected + repeated google.protobuf.Any extension_options = 1023; + + // extension_options are arbitrary options that can be added by chains + // when the default options are not sufficient. If any of these are present + // and can't be handled, they will be ignored + repeated google.protobuf.Any non_critical_extension_options = 2047; +} + +// AuthInfo describes the fee and signer modes that are used to sign a +// transaction. +message AuthInfo { + // signer_infos defines the signing modes for the required signers. The number + // and order of elements must match the required signers from TxBody's + // messages. The first element is the primary signer and the one which pays + // the fee. + repeated SignerInfo signer_infos = 1; + + // Fee is the fee and gas limit for the transaction. The first signer is the + // primary signer and the one which pays the fee. The fee can be calculated + // based on the cost of evaluating the body and doing signature verification + // of the signers. This can be estimated via simulation. + Fee fee = 2; +} + +// SignerInfo describes the public key and signing mode of a single top-level +// signer. +message SignerInfo { + // public_key is the public key of the signer. It is optional for accounts + // that already exist in state. If unset, the verifier can use the required \ + // signer address for this position and lookup the public key. + google.protobuf.Any public_key = 1; + + // mode_info describes the signing mode of the signer and is a nested + // structure to support nested multisig pubkey's + ModeInfo mode_info = 2; + + // sequence is the sequence of the account, which describes the + // number of committed transactions signed by a given address. It is used to + // prevent replay attacks. + uint64 sequence = 3; +} + +// ModeInfo describes the signing mode of a single or nested multisig signer. +message ModeInfo { + // sum is the oneof that specifies whether this represents a single or nested + // multisig signer + oneof sum { + // single represents a single signer + Single single = 1; + + // multi represents a nested multisig signer + Multi multi = 2; + } + + // Single is the mode info for a single signer. It is structured as a message + // to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the + // future + message Single { + // mode is the signing mode of the single signer + cosmos.tx.signing.v1beta1.SignMode mode = 1; + } + + // Multi is the mode info for a multisig public key + message Multi { + // bitarray specifies which keys within the multisig are signing + cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; + + // mode_infos is the corresponding modes of the signers of the multisig + // which could include nested multisig public keys + repeated ModeInfo mode_infos = 2; + } +} + +// Fee includes the amount of coins paid in fees and the maximum +// gas to be used by the transaction. The ratio yields an effective "gasprice", +// which must be above some miminum to be accepted into the mempool. +message Fee { + // amount is the amount of coins to be paid as a fee + repeated cosmos.base.v1beta1.Coin amount = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + // gas_limit is the maximum gas that can be used in transaction processing + // before an out of gas error occurs + uint64 gas_limit = 2; + + // if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. + // the payer must be a tx signer (and thus have signed this field in AuthInfo). + // setting this field does *not* change the ordering of required signers for the transaction. + string payer = 3; + + // if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used + // to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does + // not support fee grants, this will fail + string granter = 4; +} diff --git a/proto/cosmos/upgrade/v1beta1/query.proto b/proto/cosmos/upgrade/v1beta1/query.proto new file mode 100644 index 00000000..9eab27e7 --- /dev/null +++ b/proto/cosmos/upgrade/v1beta1/query.proto @@ -0,0 +1,68 @@ +syntax = "proto3"; +package cosmos.upgrade.v1beta1; + +import "google/protobuf/any.proto"; +import "google/api/annotations.proto"; +import "cosmos/upgrade/v1beta1/upgrade.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; + +// Query defines the gRPC upgrade querier service. +service Query { + // CurrentPlan queries the current upgrade plan. + rpc CurrentPlan(QueryCurrentPlanRequest) returns (QueryCurrentPlanResponse) { + option (google.api.http).get = "/cosmos/upgrade/v1beta1/current_plan"; + } + + // AppliedPlan queries a previously applied upgrade plan by its name. + rpc AppliedPlan(QueryAppliedPlanRequest) returns (QueryAppliedPlanResponse) { + option (google.api.http).get = "/cosmos/upgrade/v1beta1/applied_plan/{name}"; + } + + // UpgradedConsensusState queries the consensus state that will serve + // as a trusted kernel for the next version of this chain. It will only be + // stored at the last height of this chain. + // UpgradedConsensusState RPC not supported with legacy querier + rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) { + option (google.api.http).get = "/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}"; + } +} + +// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC +// method. +message QueryCurrentPlanRequest {} + +// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC +// method. +message QueryCurrentPlanResponse { + // plan is the current upgrade plan. + Plan plan = 1; +} + +// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC +// method. +message QueryAppliedPlanRequest { + // name is the name of the applied plan to query for. + string name = 1; +} + +// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC +// method. +message QueryAppliedPlanResponse { + // height is the block height at which the plan was applied. + int64 height = 1; +} + +// QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState +// RPC method. +message QueryUpgradedConsensusStateRequest { + // last height of the current chain must be sent in request + // as this is the height under which next consensus state is stored + int64 last_height = 1; +} + +// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState +// RPC method. +message QueryUpgradedConsensusStateResponse { + google.protobuf.Any upgraded_consensus_state = 1; +} diff --git a/proto/cosmos/upgrade/v1beta1/upgrade.proto b/proto/cosmos/upgrade/v1beta1/upgrade.proto new file mode 100644 index 00000000..6d6839ca --- /dev/null +++ b/proto/cosmos/upgrade/v1beta1/upgrade.proto @@ -0,0 +1,62 @@ +syntax = "proto3"; +package cosmos.upgrade.v1beta1; + +import "google/protobuf/any.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_getters_all) = false; + +// Plan specifies information about a planned upgrade and when it should occur. +message Plan { + option (gogoproto.equal) = true; + + // Sets the name for the upgrade. This name will be used by the upgraded + // version of the software to apply any special "on-upgrade" commands during + // the first BeginBlock method after the upgrade is applied. It is also used + // to detect whether a software version can handle a given upgrade. If no + // upgrade handler with this name has been set in the software, it will be + // assumed that the software is out-of-date when the upgrade Time or Height is + // reached and the software will exit. + string name = 1; + + // The time after which the upgrade must be performed. + // Leave set to its zero value to use a pre-defined Height instead. + google.protobuf.Timestamp time = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + + // The height at which the upgrade must be performed. + // Only used if Time is not set. + int64 height = 3; + + // Any application specific upgrade info to be included on-chain + // such as a git commit that validators could automatically upgrade to + string info = 4; + + // IBC-enabled chains can opt-in to including the upgraded client state in its upgrade plan + // This will make the chain commit to the correct upgraded (self) client state before the upgrade occurs, + // so that connecting chains can verify that the new upgraded client is valid by verifying a proof on the + // previous version of the chain. + // This will allow IBC connections to persist smoothly across planned chain upgrades + google.protobuf.Any upgraded_client_state = 5 [(gogoproto.moretags) = "yaml:\"upgraded_client_state\""]; +} + +// SoftwareUpgradeProposal is a gov Content type for initiating a software +// upgrade. +message SoftwareUpgradeProposal { + option (gogoproto.equal) = true; + + string title = 1; + string description = 2; + Plan plan = 3 [(gogoproto.nullable) = false]; +} + +// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software +// upgrade. +message CancelSoftwareUpgradeProposal { + option (gogoproto.equal) = true; + + string title = 1; + string description = 2; +} diff --git a/proto/cosmos/vesting/v1beta1/tx.proto b/proto/cosmos/vesting/v1beta1/tx.proto new file mode 100644 index 00000000..c49be802 --- /dev/null +++ b/proto/cosmos/vesting/v1beta1/tx.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package cosmos.vesting.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; + +// Msg defines the bank Msg service. +service Msg { + // CreateVestingAccount defines a method that enables creating a vesting + // account. + rpc CreateVestingAccount(MsgCreateVestingAccount) returns (MsgCreateVestingAccountResponse); +} + +// MsgCreateVestingAccount defines a message that enables creating a vesting +// account. +message MsgCreateVestingAccount { + option (gogoproto.equal) = true; + + string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; + string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; + repeated cosmos.base.v1beta1.Coin amount = 3 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + + int64 end_time = 4 [(gogoproto.moretags) = "yaml:\"end_time\""]; + bool delayed = 5; +} + +// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. +message MsgCreateVestingAccountResponse {} \ No newline at end of file diff --git a/proto/cosmos/vesting/v1beta1/vesting.proto b/proto/cosmos/vesting/v1beta1/vesting.proto new file mode 100644 index 00000000..6bdbbf08 --- /dev/null +++ b/proto/cosmos/vesting/v1beta1/vesting.proto @@ -0,0 +1,73 @@ +syntax = "proto3"; +package cosmos.vesting.v1beta1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/auth/v1beta1/auth.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; + +// BaseVestingAccount implements the VestingAccount interface. It contains all +// the necessary fields needed for any vesting account implementation. +message BaseVestingAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + cosmos.auth.v1beta1.BaseAccount base_account = 1 [(gogoproto.embed) = true]; + repeated cosmos.base.v1beta1.Coin original_vesting = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"original_vesting\"" + ]; + repeated cosmos.base.v1beta1.Coin delegated_free = 3 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"delegated_free\"" + ]; + repeated cosmos.base.v1beta1.Coin delegated_vesting = 4 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"delegated_vesting\"" + ]; + int64 end_time = 5 [(gogoproto.moretags) = "yaml:\"end_time\""]; +} + +// ContinuousVestingAccount implements the VestingAccount interface. It +// continuously vests by unlocking coins linearly with respect to time. +message ContinuousVestingAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; + int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""]; +} + +// DelayedVestingAccount implements the VestingAccount interface. It vests all +// coins after a specific time, but non prior. In other words, it keeps them +// locked until a specified time. +message DelayedVestingAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; +} + +// Period defines a length of time and amount of coins that will vest. +message Period { + option (gogoproto.goproto_stringer) = false; + + int64 length = 1; + repeated cosmos.base.v1beta1.Coin amount = 2 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; +} + +// PeriodicVestingAccount implements the VestingAccount interface. It +// periodically vests by unlocking coins during each specified period. +message PeriodicVestingAccount { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; + int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""]; + repeated Period vesting_periods = 3 [(gogoproto.moretags) = "yaml:\"vesting_periods\"", (gogoproto.nullable) = false]; +} diff --git a/proto/ibc/applications/transfer/v1/genesis.proto b/proto/ibc/applications/transfer/v1/genesis.proto new file mode 100644 index 00000000..98cf2296 --- /dev/null +++ b/proto/ibc/applications/transfer/v1/genesis.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +package ibc.applications.transfer.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"; + +import "gogoproto/gogo.proto"; +import "ibc/applications/transfer/v1/transfer.proto"; + +// GenesisState defines the ibc-transfer genesis state +message GenesisState { + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + repeated DenomTrace denom_traces = 2 [ + (gogoproto.castrepeated) = "Traces", + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"denom_traces\"" + ]; + Params params = 3 [(gogoproto.nullable) = false]; +} diff --git a/proto/ibc/applications/transfer/v1/query.proto b/proto/ibc/applications/transfer/v1/query.proto new file mode 100644 index 00000000..e9cbd02a --- /dev/null +++ b/proto/ibc/applications/transfer/v1/query.proto @@ -0,0 +1,66 @@ +syntax = "proto3"; +package ibc.applications.transfer.v1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "ibc/applications/transfer/v1/transfer.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"; + +// Query provides defines the gRPC querier service. +service Query { + // DenomTrace queries a denomination trace information. + rpc DenomTrace(QueryDenomTraceRequest) returns (QueryDenomTraceResponse) { + option (google.api.http).get = "/ibc/applications/transfer/v1beta1/denom_traces/{hash}"; + } + + // DenomTraces queries all denomination traces. + rpc DenomTraces(QueryDenomTracesRequest) returns (QueryDenomTracesResponse) { + option (google.api.http).get = "/ibc/applications/transfer/v1beta1/denom_traces"; + } + + // Params queries all parameters of the ibc-transfer module. + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/ibc/applications/transfer/v1beta1/params"; + } +} + +// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC +// method +message QueryDenomTraceRequest { + // hash (in hex format) of the denomination trace information. + string hash = 1; +} + +// QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC +// method. +message QueryDenomTraceResponse { + // denom_trace returns the requested denomination trace information. + DenomTrace denom_trace = 1; +} + +// QueryConnectionsRequest is the request type for the Query/DenomTraces RPC +// method +message QueryDenomTracesRequest { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryConnectionsResponse is the response type for the Query/DenomTraces RPC +// method. +message QueryDenomTracesResponse { + // denom_traces returns all denominations trace information. + repeated DenomTrace denom_traces = 1 [(gogoproto.castrepeated) = "Traces", (gogoproto.nullable) = false]; + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message QueryParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message QueryParamsResponse { + // params defines the parameters of the module. + Params params = 1; +} diff --git a/proto/ibc/applications/transfer/v1/transfer.proto b/proto/ibc/applications/transfer/v1/transfer.proto new file mode 100644 index 00000000..b388c3b8 --- /dev/null +++ b/proto/ibc/applications/transfer/v1/transfer.proto @@ -0,0 +1,43 @@ +syntax = "proto3"; +package ibc.applications.transfer.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"; + +import "gogoproto/gogo.proto"; + +// FungibleTokenPacketData defines a struct for the packet payload +// See FungibleTokenPacketData spec: +// https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures +message FungibleTokenPacketData { + // the token denomination to be transferred + string denom = 1; + // the token amount to be transferred + uint64 amount = 2; + // the sender address + string sender = 3; + // the recipient address on the destination chain + string receiver = 4; +} + +// DenomTrace contains the base denomination for ICS20 fungible tokens and the +// source tracing information path. +message DenomTrace { + // path defines the chain of port/channel identifiers used for tracing the + // source of the fungible token. + string path = 1; + // base denomination of the relayed fungible token. + string base_denom = 2; +} + +// Params defines the set of IBC transfer parameters. +// NOTE: To prevent a single token from being transferred, set the +// TransfersEnabled parameter to true and then set the bank module's SendEnabled +// parameter for the denomination to false. +message Params { + // send_enabled enables or disables all cross-chain token transfers from this + // chain. + bool send_enabled = 1 [(gogoproto.moretags) = "yaml:\"send_enabled\""]; + // receive_enabled enables or disables all cross-chain token transfers to this + // chain. + bool receive_enabled = 2 [(gogoproto.moretags) = "yaml:\"receive_enabled\""]; +} diff --git a/proto/ibc/applications/transfer/v1/tx.proto b/proto/ibc/applications/transfer/v1/tx.proto new file mode 100644 index 00000000..a0f0827a --- /dev/null +++ b/proto/ibc/applications/transfer/v1/tx.proto @@ -0,0 +1,43 @@ +syntax = "proto3"; +package ibc.applications.transfer.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/types"; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "ibc/core/client/v1/client.proto"; + +// Msg defines the ibc/transfer Msg service. +service Msg { + // Transfer defines a rpc handler method for MsgTransfer. + rpc Transfer(MsgTransfer) returns (MsgTransferResponse); +} + +// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between +// ICS20 enabled chains. See ICS Spec here: +// https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer#data-structures +message MsgTransfer { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // the port on which the packet will be sent + string source_port = 1 [(gogoproto.moretags) = "yaml:\"source_port\""]; + // the channel by which the packet will be sent + string source_channel = 2 [(gogoproto.moretags) = "yaml:\"source_channel\""]; + // the tokens to be transferred + cosmos.base.v1beta1.Coin token = 3 [(gogoproto.nullable) = false]; + // the sender address + string sender = 4; + // the recipient address on the destination chain + string receiver = 5; + // Timeout height relative to the current block height. + // The timeout is disabled when set to 0. + ibc.core.client.v1.Height timeout_height = 6 + [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; + // Timeout timestamp (in nanoseconds) relative to the current block timestamp. + // The timeout is disabled when set to 0. + uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; +} + +// MsgTransferResponse defines the Msg/Transfer response type. +message MsgTransferResponse {} diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto new file mode 100644 index 00000000..302a4806 --- /dev/null +++ b/proto/ibc/core/channel/v1/channel.proto @@ -0,0 +1,147 @@ +syntax = "proto3"; +package ibc.core.channel.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types"; + +import "gogoproto/gogo.proto"; +import "ibc/core/client/v1/client.proto"; + +// Channel defines pipeline for exactly-once packet delivery between specific +// modules on separate blockchains, which has at least one end capable of +// sending packets and one end capable of receiving packets. +message Channel { + option (gogoproto.goproto_getters) = false; + + // current state of the channel end + State state = 1; + // whether the channel is ordered or unordered + Order ordering = 2; + // counterparty channel end + Counterparty counterparty = 3 [(gogoproto.nullable) = false]; + // list of connection identifiers, in order, along which packets sent on + // this channel will travel + repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""]; + // opaque channel version, which is agreed upon during the handshake + string version = 5; +} + +// IdentifiedChannel defines a channel with additional port and channel +// identifier fields. +message IdentifiedChannel { + option (gogoproto.goproto_getters) = false; + + // current state of the channel end + State state = 1; + // whether the channel is ordered or unordered + Order ordering = 2; + // counterparty channel end + Counterparty counterparty = 3 [(gogoproto.nullable) = false]; + // list of connection identifiers, in order, along which packets sent on + // this channel will travel + repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""]; + // opaque channel version, which is agreed upon during the handshake + string version = 5; + // port identifier + string port_id = 6; + // channel identifier + string channel_id = 7; +} + +// State defines if a channel is in one of the following states: +// CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. +enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Default State + STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"]; + // A channel has just started the opening handshake. + STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"]; + // A channel has acknowledged the handshake step on the counterparty chain. + STATE_TRYOPEN = 2 [(gogoproto.enumvalue_customname) = "TRYOPEN"]; + // A channel has completed the handshake. Open channels are + // ready to send and receive packets. + STATE_OPEN = 3 [(gogoproto.enumvalue_customname) = "OPEN"]; + // A channel has been closed and can no longer be used to send or receive + // packets. + STATE_CLOSED = 4 [(gogoproto.enumvalue_customname) = "CLOSED"]; +} + +// Order defines if a channel is ORDERED or UNORDERED +enum Order { + option (gogoproto.goproto_enum_prefix) = false; + + // zero-value for channel ordering + ORDER_NONE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "NONE"]; + // packets can be delivered in any order, which may differ from the order in + // which they were sent. + ORDER_UNORDERED = 1 [(gogoproto.enumvalue_customname) = "UNORDERED"]; + // packets are delivered exactly in the order which they were sent + ORDER_ORDERED = 2 [(gogoproto.enumvalue_customname) = "ORDERED"]; +} + +// Counterparty defines a channel end counterparty +message Counterparty { + option (gogoproto.goproto_getters) = false; + + // port on the counterparty chain which owns the other end of the channel. + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // channel end on the counterparty chain + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; +} + +// Packet defines a type that carries data across different chains through IBC +message Packet { + option (gogoproto.goproto_getters) = false; + + // number corresponds to the order of sends and receives, where a Packet + // with an earlier sequence number must be sent and received before a Packet + // with a later sequence number. + uint64 sequence = 1; + // identifies the port on the sending chain. + string source_port = 2 [(gogoproto.moretags) = "yaml:\"source_port\""]; + // identifies the channel end on the sending chain. + string source_channel = 3 [(gogoproto.moretags) = "yaml:\"source_channel\""]; + // identifies the port on the receiving chain. + string destination_port = 4 [(gogoproto.moretags) = "yaml:\"destination_port\""]; + // identifies the channel end on the receiving chain. + string destination_channel = 5 [(gogoproto.moretags) = "yaml:\"destination_channel\""]; + // actual opaque bytes transferred directly to the application module + bytes data = 6; + // block height after which the packet times out + ibc.core.client.v1.Height timeout_height = 7 + [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; + // block timestamp (in nanoseconds) after which the packet times out + uint64 timeout_timestamp = 8 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; +} + +// PacketState defines the generic type necessary to retrieve and store +// packet commitments, acknowledgements, and receipts. +// Caller is responsible for knowing the context necessary to interpret this +// state as a commitment, acknowledgement, or a receipt. +message PacketState { + option (gogoproto.goproto_getters) = false; + + // channel port identifier. + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // channel unique identifier. + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + // packet sequence. + uint64 sequence = 3; + // embedded data that represents packet state. + bytes data = 4; +} + +// Acknowledgement is the recommended acknowledgement format to be used by +// app-specific protocols. +// NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental +// conflicts with other protobuf message formats used for acknowledgements. +// The first byte of any message with this format will be the non-ASCII values +// `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: +// https://github.com/cosmos/ics/tree/master/spec/ics-004-channel-and-packet-semantics#acknowledgement-envelope +message Acknowledgement { + // response contains either a result or an error and must be non-empty + oneof response { + bytes result = 21; + string error = 22; + } +} diff --git a/proto/ibc/core/channel/v1/genesis.proto b/proto/ibc/core/channel/v1/genesis.proto new file mode 100644 index 00000000..d3b2c042 --- /dev/null +++ b/proto/ibc/core/channel/v1/genesis.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package ibc.core.channel.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types"; + +import "gogoproto/gogo.proto"; +import "ibc/core/channel/v1/channel.proto"; + +// GenesisState defines the ibc channel submodule's genesis state. +message GenesisState { + repeated IdentifiedChannel channels = 1 [(gogoproto.casttype) = "IdentifiedChannel", (gogoproto.nullable) = false]; + repeated PacketState acknowledgements = 2 [(gogoproto.nullable) = false]; + repeated PacketState commitments = 3 [(gogoproto.nullable) = false]; + repeated PacketState receipts = 4 [(gogoproto.nullable) = false]; + repeated PacketSequence send_sequences = 5 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"send_sequences\""]; + repeated PacketSequence recv_sequences = 6 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"recv_sequences\""]; + repeated PacketSequence ack_sequences = 7 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"ack_sequences\""]; + // the sequence for the next generated channel identifier + uint64 next_channel_sequence = 8 [(gogoproto.moretags) = "yaml:\"next_channel_sequence\""]; +} + +// PacketSequence defines the genesis type necessary to retrieve and store +// next send and receive sequences. +message PacketSequence { + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + uint64 sequence = 3; +} diff --git a/proto/ibc/core/channel/v1/query.proto b/proto/ibc/core/channel/v1/query.proto new file mode 100644 index 00000000..d9e3ceb8 --- /dev/null +++ b/proto/ibc/core/channel/v1/query.proto @@ -0,0 +1,367 @@ +syntax = "proto3"; +package ibc.core.channel.v1; + +import "ibc/core/client/v1/client.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "ibc/core/channel/v1/channel.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/any.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types"; + +// Query provides defines the gRPC querier service +service Query { + // Channel queries an IBC Channel. + rpc Channel(QueryChannelRequest) returns (QueryChannelResponse) { + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}"; + } + + // Channels queries all the IBC channels of a chain. + rpc Channels(QueryChannelsRequest) returns (QueryChannelsResponse) { + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels"; + } + + // ConnectionChannels queries all the channels associated with a connection + // end. + rpc ConnectionChannels(QueryConnectionChannelsRequest) returns (QueryConnectionChannelsResponse) { + option (google.api.http).get = "/ibc/core/channel/v1beta1/connections/{connection}/channels"; + } + + // ChannelClientState queries for the client state for the channel associated + // with the provided channel identifiers. + rpc ChannelClientState(QueryChannelClientStateRequest) returns (QueryChannelClientStateResponse) { + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/client_state"; + } + + // ChannelConsensusState queries for the consensus state for the channel + // associated with the provided channel identifiers. + rpc ChannelConsensusState(QueryChannelConsensusStateRequest) returns (QueryChannelConsensusStateResponse) { + option (google.api.http).get = + "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/" + "{revision_number}/height/{revision_height}"; + } + + // PacketCommitment queries a stored packet commitment hash. + rpc PacketCommitment(QueryPacketCommitmentRequest) returns (QueryPacketCommitmentResponse) { + option (google.api.http).get = + "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}"; + } + + // PacketCommitments returns all the packet commitments hashes associated + // with a channel. + rpc PacketCommitments(QueryPacketCommitmentsRequest) returns (QueryPacketCommitmentsResponse) { + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments"; + } + + // PacketReceipt queries if a given packet sequence has been received on the queried chain + rpc PacketReceipt(QueryPacketReceiptRequest) returns (QueryPacketReceiptResponse) { + option (google.api.http).get = + "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}"; + } + + // PacketAcknowledgement queries a stored packet acknowledgement hash. + rpc PacketAcknowledgement(QueryPacketAcknowledgementRequest) returns (QueryPacketAcknowledgementResponse) { + option (google.api.http).get = + "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}"; + } + + // PacketAcknowledgements returns all the packet acknowledgements associated + // with a channel. + rpc PacketAcknowledgements(QueryPacketAcknowledgementsRequest) returns (QueryPacketAcknowledgementsResponse) { + option (google.api.http).get = + "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements"; + } + + // UnreceivedPackets returns all the unreceived IBC packets associated with a + // channel and sequences. + rpc UnreceivedPackets(QueryUnreceivedPacketsRequest) returns (QueryUnreceivedPacketsResponse) { + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/" + "{packet_commitment_sequences}/unreceived_packets"; + } + + // UnreceivedAcks returns all the unreceived IBC acknowledgements associated with a + // channel and sequences. + rpc UnreceivedAcks(QueryUnreceivedAcksRequest) returns (QueryUnreceivedAcksResponse) { + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/" + "{packet_ack_sequences}/unreceived_acks"; + } + + // NextSequenceReceive returns the next receive sequence for a given channel. + rpc NextSequenceReceive(QueryNextSequenceReceiveRequest) returns (QueryNextSequenceReceiveResponse) { + option (google.api.http).get = "/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/next_sequence"; + } +} + +// QueryChannelRequest is the request type for the Query/Channel RPC method +message QueryChannelRequest { + // port unique identifier + string port_id = 1; + // channel unique identifier + string channel_id = 2; +} + +// QueryChannelResponse is the response type for the Query/Channel RPC method. +// Besides the Channel end, it includes a proof and the height from which the +// proof was retrieved. +message QueryChannelResponse { + // channel associated with the request identifiers + ibc.core.channel.v1.Channel channel = 1; + // merkle proof of existence + bytes proof = 2; + // height at which the proof was retrieved + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; +} + +// QueryChannelsRequest is the request type for the Query/Channels RPC method +message QueryChannelsRequest { + // pagination request + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryChannelsResponse is the response type for the Query/Channels RPC method. +message QueryChannelsResponse { + // list of stored channels of the chain. + repeated ibc.core.channel.v1.IdentifiedChannel channels = 1; + // pagination response + cosmos.base.query.v1beta1.PageResponse pagination = 2; + // query block height + ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; +} + +// QueryConnectionChannelsRequest is the request type for the +// Query/QueryConnectionChannels RPC method +message QueryConnectionChannelsRequest { + // connection unique identifier + string connection = 1; + // pagination request + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryConnectionChannelsResponse is the Response type for the +// Query/QueryConnectionChannels RPC method +message QueryConnectionChannelsResponse { + // list of channels associated with a connection. + repeated ibc.core.channel.v1.IdentifiedChannel channels = 1; + // pagination response + cosmos.base.query.v1beta1.PageResponse pagination = 2; + // query block height + ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; +} + +// QueryChannelClientStateRequest is the request type for the Query/ClientState +// RPC method +message QueryChannelClientStateRequest { + // port unique identifier + string port_id = 1; + // channel unique identifier + string channel_id = 2; +} + +// QueryChannelClientStateResponse is the Response type for the +// Query/QueryChannelClientState RPC method +message QueryChannelClientStateResponse { + // client state associated with the channel + ibc.core.client.v1.IdentifiedClientState identified_client_state = 1; + // merkle proof of existence + bytes proof = 2; + // height at which the proof was retrieved + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; +} + +// QueryChannelConsensusStateRequest is the request type for the +// Query/ConsensusState RPC method +message QueryChannelConsensusStateRequest { + // port unique identifier + string port_id = 1; + // channel unique identifier + string channel_id = 2; + // revision number of the consensus state + uint64 revision_number = 3; + // revision height of the consensus state + uint64 revision_height = 4; +} + +// QueryChannelClientStateResponse is the Response type for the +// Query/QueryChannelClientState RPC method +message QueryChannelConsensusStateResponse { + // consensus state associated with the channel + google.protobuf.Any consensus_state = 1; + // client ID associated with the consensus state + string client_id = 2; + // merkle proof of existence + bytes proof = 3; + // height at which the proof was retrieved + ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; +} + +// QueryPacketCommitmentRequest is the request type for the +// Query/PacketCommitment RPC method +message QueryPacketCommitmentRequest { + // port unique identifier + string port_id = 1; + // channel unique identifier + string channel_id = 2; + // packet sequence + uint64 sequence = 3; +} + +// QueryPacketCommitmentResponse defines the client query response for a packet +// which also includes a proof and the height from which the proof was +// retrieved +message QueryPacketCommitmentResponse { + // packet associated with the request fields + bytes commitment = 1; + // merkle proof of existence + bytes proof = 2; + // height at which the proof was retrieved + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; +} + +// QueryPacketCommitmentsRequest is the request type for the +// Query/QueryPacketCommitments RPC method +message QueryPacketCommitmentsRequest { + // port unique identifier + string port_id = 1; + // channel unique identifier + string channel_id = 2; + // pagination request + cosmos.base.query.v1beta1.PageRequest pagination = 3; +} + +// QueryPacketCommitmentsResponse is the request type for the +// Query/QueryPacketCommitments RPC method +message QueryPacketCommitmentsResponse { + repeated ibc.core.channel.v1.PacketState commitments = 1; + // pagination response + cosmos.base.query.v1beta1.PageResponse pagination = 2; + // query block height + ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; +} + +// QueryPacketReceiptRequest is the request type for the +// Query/PacketReceipt RPC method +message QueryPacketReceiptRequest { + // port unique identifier + string port_id = 1; + // channel unique identifier + string channel_id = 2; + // packet sequence + uint64 sequence = 3; +} + +// QueryPacketReceiptResponse defines the client query response for a packet receipt +// which also includes a proof, and the height from which the proof was +// retrieved +message QueryPacketReceiptResponse { + // success flag for if receipt exists + bool received = 2; + // merkle proof of existence + bytes proof = 3; + // height at which the proof was retrieved + ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; +} + +// QueryPacketAcknowledgementRequest is the request type for the +// Query/PacketAcknowledgement RPC method +message QueryPacketAcknowledgementRequest { + // port unique identifier + string port_id = 1; + // channel unique identifier + string channel_id = 2; + // packet sequence + uint64 sequence = 3; +} + +// QueryPacketAcknowledgementResponse defines the client query response for a +// packet which also includes a proof and the height from which the +// proof was retrieved +message QueryPacketAcknowledgementResponse { + // packet associated with the request fields + bytes acknowledgement = 1; + // merkle proof of existence + bytes proof = 2; + // height at which the proof was retrieved + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; +} + +// QueryPacketAcknowledgementsRequest is the request type for the +// Query/QueryPacketCommitments RPC method +message QueryPacketAcknowledgementsRequest { + // port unique identifier + string port_id = 1; + // channel unique identifier + string channel_id = 2; + // pagination request + cosmos.base.query.v1beta1.PageRequest pagination = 3; +} + +// QueryPacketAcknowledgemetsResponse is the request type for the +// Query/QueryPacketAcknowledgements RPC method +message QueryPacketAcknowledgementsResponse { + repeated ibc.core.channel.v1.PacketState acknowledgements = 1; + // pagination response + cosmos.base.query.v1beta1.PageResponse pagination = 2; + // query block height + ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; +} + +// QueryUnreceivedPacketsRequest is the request type for the +// Query/UnreceivedPackets RPC method +message QueryUnreceivedPacketsRequest { + // port unique identifier + string port_id = 1; + // channel unique identifier + string channel_id = 2; + // list of packet sequences + repeated uint64 packet_commitment_sequences = 3; +} + +// QueryUnreceivedPacketsResponse is the response type for the +// Query/UnreceivedPacketCommitments RPC method +message QueryUnreceivedPacketsResponse { + // list of unreceived packet sequences + repeated uint64 sequences = 1; + // query block height + ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; +} + +// QueryUnreceivedAcks is the request type for the +// Query/UnreceivedAcks RPC method +message QueryUnreceivedAcksRequest { + // port unique identifier + string port_id = 1; + // channel unique identifier + string channel_id = 2; + // list of acknowledgement sequences + repeated uint64 packet_ack_sequences = 3; +} + +// QueryUnreceivedAcksResponse is the response type for the +// Query/UnreceivedAcks RPC method +message QueryUnreceivedAcksResponse { + // list of unreceived acknowledgement sequences + repeated uint64 sequences = 1; + // query block height + ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; +} + +// QueryNextSequenceReceiveRequest is the request type for the +// Query/QueryNextSequenceReceiveRequest RPC method +message QueryNextSequenceReceiveRequest { + // port unique identifier + string port_id = 1; + // channel unique identifier + string channel_id = 2; +} + +// QuerySequenceResponse is the request type for the +// Query/QueryNextSequenceReceiveResponse RPC method +message QueryNextSequenceReceiveResponse { + // next sequence receive number + uint64 next_sequence_receive = 1; + // merkle proof of existence + bytes proof = 2; + // height at which the proof was retrieved + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; +} diff --git a/proto/ibc/core/channel/v1/tx.proto b/proto/ibc/core/channel/v1/tx.proto new file mode 100644 index 00000000..5f842641 --- /dev/null +++ b/proto/ibc/core/channel/v1/tx.proto @@ -0,0 +1,207 @@ +syntax = "proto3"; +package ibc.core.channel.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/04-channel/types"; + +import "gogoproto/gogo.proto"; +import "ibc/core/client/v1/client.proto"; +import "ibc/core/channel/v1/channel.proto"; + +// Msg defines the ibc/channel Msg service. +service Msg { + // ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. + rpc ChannelOpenInit(MsgChannelOpenInit) returns (MsgChannelOpenInitResponse); + + // ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. + rpc ChannelOpenTry(MsgChannelOpenTry) returns (MsgChannelOpenTryResponse); + + // ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. + rpc ChannelOpenAck(MsgChannelOpenAck) returns (MsgChannelOpenAckResponse); + + // ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. + rpc ChannelOpenConfirm(MsgChannelOpenConfirm) returns (MsgChannelOpenConfirmResponse); + + // ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. + rpc ChannelCloseInit(MsgChannelCloseInit) returns (MsgChannelCloseInitResponse); + + // ChannelCloseConfirm defines a rpc handler method for MsgChannelCloseConfirm. + rpc ChannelCloseConfirm(MsgChannelCloseConfirm) returns (MsgChannelCloseConfirmResponse); + + // RecvPacket defines a rpc handler method for MsgRecvPacket. + rpc RecvPacket(MsgRecvPacket) returns (MsgRecvPacketResponse); + + // Timeout defines a rpc handler method for MsgTimeout. + rpc Timeout(MsgTimeout) returns (MsgTimeoutResponse); + + // TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. + rpc TimeoutOnClose(MsgTimeoutOnClose) returns (MsgTimeoutOnCloseResponse); + + // Acknowledgement defines a rpc handler method for MsgAcknowledgement. + rpc Acknowledgement(MsgAcknowledgement) returns (MsgAcknowledgementResponse); +} + +// MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It +// is called by a relayer on Chain A. +message MsgChannelOpenInit { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + Channel channel = 2 [(gogoproto.nullable) = false]; + string signer = 3; +} + +// MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. +message MsgChannelOpenInitResponse {} + +// MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel +// on Chain B. +message MsgChannelOpenTry { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + // in the case of crossing hello's, when both chains call OpenInit, we need the channel identifier + // of the previous channel in state INIT + string previous_channel_id = 2 [(gogoproto.moretags) = "yaml:\"previous_channel_id\""]; + Channel channel = 3 [(gogoproto.nullable) = false]; + string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; + bytes proof_init = 5 [(gogoproto.moretags) = "yaml:\"proof_init\""]; + ibc.core.client.v1.Height proof_height = 6 + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + string signer = 7; +} + +// MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. +message MsgChannelOpenTryResponse {} + +// MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge +// the change of channel state to TRYOPEN on Chain B. +message MsgChannelOpenAck { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + string counterparty_channel_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_channel_id\""]; + string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; + bytes proof_try = 5 [(gogoproto.moretags) = "yaml:\"proof_try\""]; + ibc.core.client.v1.Height proof_height = 6 + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + string signer = 7; +} + +// MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. +message MsgChannelOpenAckResponse {} + +// MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to +// acknowledge the change of channel state to OPEN on Chain A. +message MsgChannelOpenConfirm { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + bytes proof_ack = 3 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; + ibc.core.client.v1.Height proof_height = 4 + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + string signer = 5; +} + +// MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response type. +message MsgChannelOpenConfirmResponse {} + +// MsgChannelCloseInit defines a msg sent by a Relayer to Chain A +// to close a channel with Chain B. +message MsgChannelCloseInit { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + string signer = 3; +} + +// MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. +message MsgChannelCloseInitResponse {} + +// MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B +// to acknowledge the change of channel state to CLOSED on Chain A. +message MsgChannelCloseConfirm { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; + string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; + bytes proof_init = 3 [(gogoproto.moretags) = "yaml:\"proof_init\""]; + ibc.core.client.v1.Height proof_height = 4 + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + string signer = 5; +} + +// MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response type. +message MsgChannelCloseConfirmResponse {} + +// MsgRecvPacket receives incoming IBC packet +message MsgRecvPacket { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + Packet packet = 1 [(gogoproto.nullable) = false]; + bytes proof_commitment = 2 [(gogoproto.moretags) = "yaml:\"proof_commitment\""]; + ibc.core.client.v1.Height proof_height = 3 + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + string signer = 4; +} + +// MsgRecvPacketResponse defines the Msg/RecvPacket response type. +message MsgRecvPacketResponse {} + +// MsgTimeout receives timed-out packet +message MsgTimeout { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + Packet packet = 1 [(gogoproto.nullable) = false]; + bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""]; + ibc.core.client.v1.Height proof_height = 3 + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + uint64 next_sequence_recv = 4 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; + string signer = 5; +} + +// MsgTimeoutResponse defines the Msg/Timeout response type. +message MsgTimeoutResponse {} + +// MsgTimeoutOnClose timed-out packet upon counterparty channel closure. +message MsgTimeoutOnClose { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + Packet packet = 1 [(gogoproto.nullable) = false]; + bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""]; + bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""]; + ibc.core.client.v1.Height proof_height = 4 + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + uint64 next_sequence_recv = 5 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; + string signer = 6; +} + +// MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. +message MsgTimeoutOnCloseResponse {} + +// MsgAcknowledgement receives incoming IBC acknowledgement +message MsgAcknowledgement { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + Packet packet = 1 [(gogoproto.nullable) = false]; + bytes acknowledgement = 2; + bytes proof_acked = 3 [(gogoproto.moretags) = "yaml:\"proof_acked\""]; + ibc.core.client.v1.Height proof_height = 4 + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + string signer = 5; +} + +// MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. +message MsgAcknowledgementResponse {} diff --git a/proto/ibc/core/client/v1/client.proto b/proto/ibc/core/client/v1/client.proto new file mode 100644 index 00000000..11d2195a --- /dev/null +++ b/proto/ibc/core/client/v1/client.proto @@ -0,0 +1,74 @@ +syntax = "proto3"; +package ibc.core.client.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; + +// IdentifiedClientState defines a client state with an additional client +// identifier field. +message IdentifiedClientState { + // client identifier + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // client state + google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; +} + +// ConsensusStateWithHeight defines a consensus state with an additional height field. +message ConsensusStateWithHeight { + // consensus state height + Height height = 1 [(gogoproto.nullable) = false]; + // consensus state + google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml\"consensus_state\""]; +} + +// ClientConsensusStates defines all the stored consensus states for a given +// client. +message ClientConsensusStates { + // client identifier + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // consensus states and their heights associated with the client + repeated ConsensusStateWithHeight consensus_states = 2 + [(gogoproto.moretags) = "yaml:\"consensus_states\"", (gogoproto.nullable) = false]; +} + +// ClientUpdateProposal is a governance proposal. If it passes, the client is +// updated with the provided header. The update may fail if the header is not +// valid given certain conditions specified by the client implementation. +message ClientUpdateProposal { + option (gogoproto.goproto_getters) = false; + // the title of the update proposal + string title = 1; + // the description of the proposal + string description = 2; + // the client identifier for the client to be updated if the proposal passes + string client_id = 3 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // the header used to update the client if the proposal passes + google.protobuf.Any header = 4; +} + +// Height is a monotonically increasing data type +// that can be compared against another Height for the purposes of updating and +// freezing clients +// +// Normally the RevisionHeight is incremented at each height while keeping RevisionNumber +// the same. However some consensus algorithms may choose to reset the +// height in certain conditions e.g. hard forks, state-machine breaking changes +// In these cases, the RevisionNumber is incremented so that height continues to +// be monitonically increasing even as the RevisionHeight gets reset +message Height { + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + // the revision that the client is currently on + uint64 revision_number = 1 [(gogoproto.moretags) = "yaml:\"revision_number\""]; + // the height within the given revision + uint64 revision_height = 2 [(gogoproto.moretags) = "yaml:\"revision_height\""]; +} + +// Params defines the set of IBC light client parameters. +message Params { + // allowed_clients defines the list of allowed client state types. + repeated string allowed_clients = 1 [(gogoproto.moretags) = "yaml:\"allowed_clients\""]; +} diff --git a/proto/ibc/core/client/v1/genesis.proto b/proto/ibc/core/client/v1/genesis.proto new file mode 100644 index 00000000..16febbce --- /dev/null +++ b/proto/ibc/core/client/v1/genesis.proto @@ -0,0 +1,46 @@ +syntax = "proto3"; +package ibc.core.client.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; + +import "ibc/core/client/v1/client.proto"; +import "gogoproto/gogo.proto"; + +// GenesisState defines the ibc client submodule's genesis state. +message GenesisState { + // client states with their corresponding identifiers + repeated IdentifiedClientState clients = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "IdentifiedClientStates"]; + // consensus states from each client + repeated ClientConsensusStates clients_consensus = 2 [ + (gogoproto.nullable) = false, + (gogoproto.castrepeated) = "ClientsConsensusStates", + (gogoproto.moretags) = "yaml:\"clients_consensus\"" + ]; + // metadata from each client + repeated IdentifiedGenesisMetadata clients_metadata = 3 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"clients_metadata\""]; + Params params = 4 [(gogoproto.nullable) = false]; + // create localhost on initialization + bool create_localhost = 5 [(gogoproto.moretags) = "yaml:\"create_localhost\""]; + // the sequence for the next generated client identifier + uint64 next_client_sequence = 6 [(gogoproto.moretags) = "yaml:\"next_client_sequence\""]; +} + +// GenesisMetadata defines the genesis type for metadata that clients may return +// with ExportMetadata +message GenesisMetadata { + option (gogoproto.goproto_getters) = false; + + // store key of metadata without clientID-prefix + bytes key = 1; + // metadata value + bytes value = 2; +} + +// IdentifiedGenesisMetadata has the client metadata with the corresponding client id. +message IdentifiedGenesisMetadata { + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + repeated GenesisMetadata client_metadata = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_metadata\""]; +} \ No newline at end of file diff --git a/proto/ibc/core/client/v1/query.proto b/proto/ibc/core/client/v1/query.proto new file mode 100644 index 00000000..97f3acd6 --- /dev/null +++ b/proto/ibc/core/client/v1/query.proto @@ -0,0 +1,130 @@ +syntax = "proto3"; +package ibc.core.client.v1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "ibc/core/client/v1/client.proto"; +import "google/protobuf/any.proto"; +import "google/api/annotations.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; + +// Query provides defines the gRPC querier service +service Query { + // ClientState queries an IBC light client. + rpc ClientState(QueryClientStateRequest) returns (QueryClientStateResponse) { + option (google.api.http).get = "/ibc/core/client/v1beta1/client_states/{client_id}"; + } + + // ClientStates queries all the IBC light clients of a chain. + rpc ClientStates(QueryClientStatesRequest) returns (QueryClientStatesResponse) { + option (google.api.http).get = "/ibc/core/client/v1beta1/client_states"; + } + + // ConsensusState queries a consensus state associated with a client state at + // a given height. + rpc ConsensusState(QueryConsensusStateRequest) returns (QueryConsensusStateResponse) { + option (google.api.http).get = "/ibc/core/client/v1beta1/consensus_states/{client_id}/revision/{revision_number}/" + "height/{revision_height}"; + } + + // ConsensusStates queries all the consensus state associated with a given + // client. + rpc ConsensusStates(QueryConsensusStatesRequest) returns (QueryConsensusStatesResponse) { + option (google.api.http).get = "/ibc/core/client/v1beta1/consensus_states/{client_id}"; + } + + // ClientParams queries all parameters of the ibc client. + rpc ClientParams(QueryClientParamsRequest) returns (QueryClientParamsResponse) { + option (google.api.http).get = "/ibc/client/v1beta1/params"; + } +} + +// QueryClientStateRequest is the request type for the Query/ClientState RPC +// method +message QueryClientStateRequest { + // client state unique identifier + string client_id = 1; +} + +// QueryClientStateResponse is the response type for the Query/ClientState RPC +// method. Besides the client state, it includes a proof and the height from +// which the proof was retrieved. +message QueryClientStateResponse { + // client state associated with the request identifier + google.protobuf.Any client_state = 1; + // merkle proof of existence + bytes proof = 2; + // height at which the proof was retrieved + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; +} + +// QueryClientStatesRequest is the request type for the Query/ClientStates RPC +// method +message QueryClientStatesRequest { + // pagination request + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryClientStatesResponse is the response type for the Query/ClientStates RPC +// method. +message QueryClientStatesResponse { + // list of stored ClientStates of the chain. + repeated IdentifiedClientState client_states = 1 + [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "IdentifiedClientStates"]; + // pagination response + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryConsensusStateRequest is the request type for the Query/ConsensusState +// RPC method. Besides the consensus state, it includes a proof and the height +// from which the proof was retrieved. +message QueryConsensusStateRequest { + // client identifier + string client_id = 1; + // consensus state revision number + uint64 revision_number = 2; + // consensus state revision height + uint64 revision_height = 3; + // latest_height overrrides the height field and queries the latest stored + // ConsensusState + bool latest_height = 4; +} + +// QueryConsensusStateResponse is the response type for the Query/ConsensusState +// RPC method +message QueryConsensusStateResponse { + // consensus state associated with the client identifier at the given height + google.protobuf.Any consensus_state = 1; + // merkle proof of existence + bytes proof = 2; + // height at which the proof was retrieved + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; +} + +// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates +// RPC method. +message QueryConsensusStatesRequest { + // client identifier + string client_id = 1; + // pagination request + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +// QueryConsensusStatesResponse is the response type for the +// Query/ConsensusStates RPC method +message QueryConsensusStatesResponse { + // consensus states associated with the identifier + repeated ConsensusStateWithHeight consensus_states = 1 [(gogoproto.nullable) = false]; + // pagination response + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryClientParamsRequest is the request type for the Query/ClientParams RPC method. +message QueryClientParamsRequest {} + +// QueryClientParamsResponse is the response type for the Query/ClientParams RPC method. +message QueryClientParamsResponse { + // params defines the parameters of the module. + Params params = 1; +} diff --git a/proto/ibc/core/client/v1/tx.proto b/proto/ibc/core/client/v1/tx.proto new file mode 100644 index 00000000..a30ec8bb --- /dev/null +++ b/proto/ibc/core/client/v1/tx.proto @@ -0,0 +1,96 @@ +syntax = "proto3"; +package ibc.core.client.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/02-client/types"; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "ibc/core/client/v1/client.proto"; + +// Msg defines the ibc/client Msg service. +service Msg { + // CreateClient defines a rpc handler method for MsgCreateClient. + rpc CreateClient(MsgCreateClient) returns (MsgCreateClientResponse); + + // UpdateClient defines a rpc handler method for MsgUpdateClient. + rpc UpdateClient(MsgUpdateClient) returns (MsgUpdateClientResponse); + + // UpgradeClient defines a rpc handler method for MsgUpgradeClient. + rpc UpgradeClient(MsgUpgradeClient) returns (MsgUpgradeClientResponse); + + // SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. + rpc SubmitMisbehaviour(MsgSubmitMisbehaviour) returns (MsgSubmitMisbehaviourResponse); +} + +// MsgCreateClient defines a message to create an IBC client +message MsgCreateClient { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // light client state + google.protobuf.Any client_state = 1 [(gogoproto.moretags) = "yaml:\"client_state\""]; + // consensus state associated with the client that corresponds to a given + // height. + google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; + // signer address + string signer = 3; +} + +// MsgCreateClientResponse defines the Msg/CreateClient response type. +message MsgCreateClientResponse {} + +// MsgUpdateClient defines an sdk.Msg to update a IBC client state using +// the given header. +message MsgUpdateClient { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // client unique identifier + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // header to update the light client + google.protobuf.Any header = 2; + // signer address + string signer = 3; +} + +// MsgUpdateClientResponse defines the Msg/UpdateClient response type. +message MsgUpdateClientResponse {} + +// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client state +message MsgUpgradeClient { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // client unique identifier + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // upgraded client state + google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; + // upgraded consensus state, only contains enough information to serve as a basis of trust in update logic + google.protobuf.Any consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; + // proof that old chain committed to new client + bytes proof_upgrade_client = 4 [(gogoproto.moretags) = "yaml:\"proof_upgrade_client\""]; + // proof that old chain committed to new consensus state + bytes proof_upgrade_consensus_state = 5 [(gogoproto.moretags) = "yaml:\"proof_upgrade_consensus_state\""]; + // signer address + string signer = 6; +} + +// MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. +message MsgUpgradeClientResponse {} + +// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for +// light client misbehaviour. +message MsgSubmitMisbehaviour { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + // client unique identifier + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // misbehaviour used for freezing the light client + google.protobuf.Any misbehaviour = 2; + // signer address + string signer = 3; +} + +// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response type. +message MsgSubmitMisbehaviourResponse {} diff --git a/proto/ibc/core/commitment/v1/commitment.proto b/proto/ibc/core/commitment/v1/commitment.proto new file mode 100644 index 00000000..51c10273 --- /dev/null +++ b/proto/ibc/core/commitment/v1/commitment.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; +package ibc.core.commitment.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/23-commitment/types"; + +import "gogoproto/gogo.proto"; +import "confio/proofs.proto"; + +// MerkleRoot defines a merkle root hash. +// In the Cosmos SDK, the AppHash of a block header becomes the root. +message MerkleRoot { + option (gogoproto.goproto_getters) = false; + + bytes hash = 1; +} + +// MerklePrefix is merkle path prefixed to the key. +// The constructed key from the Path and the key will be append(Path.KeyPath, +// append(Path.KeyPrefix, key...)) +message MerklePrefix { + bytes key_prefix = 1 [(gogoproto.moretags) = "yaml:\"key_prefix\""]; +} + +// MerklePath is the path used to verify commitment proofs, which can be an +// arbitrary structured object (defined by a commitment type). +// MerklePath is represented from root-to-leaf +message MerklePath { + option (gogoproto.goproto_stringer) = false; + + repeated string key_path = 1 [(gogoproto.moretags) = "yaml:\"key_path\""]; +} + +// MerkleProof is a wrapper type over a chain of CommitmentProofs. +// It demonstrates membership or non-membership for an element or set of +// elements, verifiable in conjunction with a known commitment root. Proofs +// should be succinct. +// MerkleProofs are ordered from leaf-to-root +message MerkleProof { + repeated ics23.CommitmentProof proofs = 1; +} \ No newline at end of file diff --git a/proto/ibc/core/connection/v1/connection.proto b/proto/ibc/core/connection/v1/connection.proto new file mode 100644 index 00000000..d21e5951 --- /dev/null +++ b/proto/ibc/core/connection/v1/connection.proto @@ -0,0 +1,104 @@ +syntax = "proto3"; +package ibc.core.connection.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types"; + +import "gogoproto/gogo.proto"; +import "ibc/core/commitment/v1/commitment.proto"; + +// ICS03 - Connection Data Structures as defined in +// https://github.com/cosmos/ics/tree/master/spec/ics-003-connection-semantics#data-structures + +// ConnectionEnd defines a stateful object on a chain connected to another +// separate one. +// NOTE: there must only be 2 defined ConnectionEnds to establish +// a connection between two chains. +message ConnectionEnd { + option (gogoproto.goproto_getters) = false; + // client associated with this connection. + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // IBC version which can be utilised to determine encodings or protocols for + // channels or packets utilising this connection. + repeated Version versions = 2; + // current state of the connection end. + State state = 3; + // counterparty chain associated with this connection. + Counterparty counterparty = 4 [(gogoproto.nullable) = false]; + // delay period that must pass before a consensus state can be used for packet-verification + // NOTE: delay period logic is only implemented by some clients. + uint64 delay_period = 5 [(gogoproto.moretags) = "yaml:\"delay_period\""]; +} + +// IdentifiedConnection defines a connection with additional connection +// identifier field. +message IdentifiedConnection { + option (gogoproto.goproto_getters) = false; + // connection identifier. + string id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; + // client associated with this connection. + string client_id = 2 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // IBC version which can be utilised to determine encodings or protocols for + // channels or packets utilising this connection + repeated Version versions = 3; + // current state of the connection end. + State state = 4; + // counterparty chain associated with this connection. + Counterparty counterparty = 5 [(gogoproto.nullable) = false]; + // delay period associated with this connection. + uint64 delay_period = 6 [(gogoproto.moretags) = "yaml:\"delay_period\""]; +} + +// State defines if a connection is in one of the following states: +// INIT, TRYOPEN, OPEN or UNINITIALIZED. +enum State { + option (gogoproto.goproto_enum_prefix) = false; + + // Default State + STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"]; + // A connection end has just started the opening handshake. + STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"]; + // A connection end has acknowledged the handshake step on the counterparty + // chain. + STATE_TRYOPEN = 2 [(gogoproto.enumvalue_customname) = "TRYOPEN"]; + // A connection end has completed the handshake. + STATE_OPEN = 3 [(gogoproto.enumvalue_customname) = "OPEN"]; +} + +// Counterparty defines the counterparty chain associated with a connection end. +message Counterparty { + option (gogoproto.goproto_getters) = false; + + // identifies the client on the counterparty chain associated with a given + // connection. + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // identifies the connection end on the counterparty chain associated with a + // given connection. + string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + // commitment merkle prefix of the counterparty chain. + ibc.core.commitment.v1.MerklePrefix prefix = 3 [(gogoproto.nullable) = false]; +} + +// ClientPaths define all the connection paths for a client state. +message ClientPaths { + // list of connection paths + repeated string paths = 1; +} + +// ConnectionPaths define all the connection paths for a given client state. +message ConnectionPaths { + // client state unique identifier + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // list of connection paths + repeated string paths = 2; +} + +// Version defines the versioning scheme used to negotiate the IBC verison in +// the connection handshake. +message Version { + option (gogoproto.goproto_getters) = false; + + // unique version identifier + string identifier = 1; + // list of features compatible with the specified identifier + repeated string features = 2; +} diff --git a/proto/ibc/core/connection/v1/genesis.proto b/proto/ibc/core/connection/v1/genesis.proto new file mode 100644 index 00000000..11df4ba1 --- /dev/null +++ b/proto/ibc/core/connection/v1/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package ibc.core.connection.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types"; + +import "gogoproto/gogo.proto"; +import "ibc/core/connection/v1/connection.proto"; + +// GenesisState defines the ibc connection submodule's genesis state. +message GenesisState { + repeated IdentifiedConnection connections = 1 [(gogoproto.nullable) = false]; + repeated ConnectionPaths client_connection_paths = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_connection_paths\""]; + // the sequence for the next generated connection identifier + uint64 next_connection_sequence = 3 [(gogoproto.moretags) = "yaml:\"next_connection_sequence\""]; +} diff --git a/proto/ibc/core/connection/v1/query.proto b/proto/ibc/core/connection/v1/query.proto new file mode 100644 index 00000000..c5085a13 --- /dev/null +++ b/proto/ibc/core/connection/v1/query.proto @@ -0,0 +1,137 @@ +syntax = "proto3"; +package ibc.core.connection.v1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "ibc/core/client/v1/client.proto"; +import "ibc/core/connection/v1/connection.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types"; + +// Query provides defines the gRPC querier service +service Query { + // Connection queries an IBC connection end. + rpc Connection(QueryConnectionRequest) returns (QueryConnectionResponse) { + option (google.api.http).get = "/ibc/core/connection/v1beta1/connections/{connection_id}"; + } + + // Connections queries all the IBC connections of a chain. + rpc Connections(QueryConnectionsRequest) returns (QueryConnectionsResponse) { + option (google.api.http).get = "/ibc/core/connection/v1beta1/connections"; + } + + // ClientConnections queries the connection paths associated with a client + // state. + rpc ClientConnections(QueryClientConnectionsRequest) returns (QueryClientConnectionsResponse) { + option (google.api.http).get = "/ibc/core/connection/v1beta1/client_connections/{client_id}"; + } + + // ConnectionClientState queries the client state associated with the + // connection. + rpc ConnectionClientState(QueryConnectionClientStateRequest) returns (QueryConnectionClientStateResponse) { + option (google.api.http).get = "/ibc/core/connection/v1beta1/connections/{connection_id}/client_state"; + } + + // ConnectionConsensusState queries the consensus state associated with the + // connection. + rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest) returns (QueryConnectionConsensusStateResponse) { + option (google.api.http).get = "/ibc/core/connection/v1beta1/connections/{connection_id}/consensus_state/" + "revision/{revision_number}/height/{revision_height}"; + } +} + +// QueryConnectionRequest is the request type for the Query/Connection RPC +// method +message QueryConnectionRequest { + // connection unique identifier + string connection_id = 1; +} + +// QueryConnectionResponse is the response type for the Query/Connection RPC +// method. Besides the connection end, it includes a proof and the height from +// which the proof was retrieved. +message QueryConnectionResponse { + // connection associated with the request identifier + ibc.core.connection.v1.ConnectionEnd connection = 1; + // merkle proof of existence + bytes proof = 2; + // height at which the proof was retrieved + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; +} + +// QueryConnectionsRequest is the request type for the Query/Connections RPC +// method +message QueryConnectionsRequest { + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryConnectionsResponse is the response type for the Query/Connections RPC +// method. +message QueryConnectionsResponse { + // list of stored connections of the chain. + repeated ibc.core.connection.v1.IdentifiedConnection connections = 1; + // pagination response + cosmos.base.query.v1beta1.PageResponse pagination = 2; + // query block height + ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; +} + +// QueryClientConnectionsRequest is the request type for the +// Query/ClientConnections RPC method +message QueryClientConnectionsRequest { + // client identifier associated with a connection + string client_id = 1; +} + +// QueryClientConnectionsResponse is the response type for the +// Query/ClientConnections RPC method +message QueryClientConnectionsResponse { + // slice of all the connection paths associated with a client. + repeated string connection_paths = 1; + // merkle proof of existence + bytes proof = 2; + // height at which the proof was generated + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; +} + +// QueryConnectionClientStateRequest is the request type for the +// Query/ConnectionClientState RPC method +message QueryConnectionClientStateRequest { + // connection identifier + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; +} + +// QueryConnectionClientStateResponse is the response type for the +// Query/ConnectionClientState RPC method +message QueryConnectionClientStateResponse { + // client state associated with the channel + ibc.core.client.v1.IdentifiedClientState identified_client_state = 1; + // merkle proof of existence + bytes proof = 2; + // height at which the proof was retrieved + ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; +} + +// QueryConnectionConsensusStateRequest is the request type for the +// Query/ConnectionConsensusState RPC method +message QueryConnectionConsensusStateRequest { + // connection identifier + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + uint64 revision_number = 2; + uint64 revision_height = 3; +} + +// QueryConnectionConsensusStateResponse is the response type for the +// Query/ConnectionConsensusState RPC method +message QueryConnectionConsensusStateResponse { + // consensus state associated with the channel + google.protobuf.Any consensus_state = 1; + // client ID associated with the consensus state + string client_id = 2; + // merkle proof of existence + bytes proof = 3; + // height at which the proof was retrieved + ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; +} diff --git a/proto/ibc/core/connection/v1/tx.proto b/proto/ibc/core/connection/v1/tx.proto new file mode 100644 index 00000000..19b40c69 --- /dev/null +++ b/proto/ibc/core/connection/v1/tx.proto @@ -0,0 +1,115 @@ +syntax = "proto3"; +package ibc.core.connection.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types"; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "ibc/core/client/v1/client.proto"; +import "ibc/core/connection/v1/connection.proto"; + +// Msg defines the ibc/connection Msg service. +service Msg { + // ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. + rpc ConnectionOpenInit(MsgConnectionOpenInit) returns (MsgConnectionOpenInitResponse); + + // ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. + rpc ConnectionOpenTry(MsgConnectionOpenTry) returns (MsgConnectionOpenTryResponse); + + // ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. + rpc ConnectionOpenAck(MsgConnectionOpenAck) returns (MsgConnectionOpenAckResponse); + + // ConnectionOpenConfirm defines a rpc handler method for MsgConnectionOpenConfirm. + rpc ConnectionOpenConfirm(MsgConnectionOpenConfirm) returns (MsgConnectionOpenConfirmResponse); +} + +// MsgConnectionOpenInit defines the msg sent by an account on Chain A to +// initialize a connection with Chain B. +message MsgConnectionOpenInit { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + Counterparty counterparty = 2 [(gogoproto.nullable) = false]; + Version version = 3; + uint64 delay_period = 4 [(gogoproto.moretags) = "yaml:\"delay_period\""]; + string signer = 5; +} + +// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response type. +message MsgConnectionOpenInitResponse {} + +// MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a +// connection on Chain B. +message MsgConnectionOpenTry { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + // in the case of crossing hello's, when both chains call OpenInit, we need the connection identifier + // of the previous connection in state INIT + string previous_connection_id = 2 [(gogoproto.moretags) = "yaml:\"previous_connection_id\""]; + google.protobuf.Any client_state = 3 [(gogoproto.moretags) = "yaml:\"client_state\""]; + Counterparty counterparty = 4 [(gogoproto.nullable) = false]; + uint64 delay_period = 5 [(gogoproto.moretags) = "yaml:\"delay_period\""]; + repeated Version counterparty_versions = 6 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""]; + ibc.core.client.v1.Height proof_height = 7 + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + // proof of the initialization the connection on Chain A: `UNITIALIZED -> + // INIT` + bytes proof_init = 8 [(gogoproto.moretags) = "yaml:\"proof_init\""]; + // proof of client state included in message + bytes proof_client = 9 [(gogoproto.moretags) = "yaml:\"proof_client\""]; + // proof of client consensus state + bytes proof_consensus = 10 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; + ibc.core.client.v1.Height consensus_height = 11 + [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; + string signer = 12; +} + +// MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. +message MsgConnectionOpenTryResponse {} + +// MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to +// acknowledge the change of connection state to TRYOPEN on Chain B. +message MsgConnectionOpenAck { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + string counterparty_connection_id = 2 [(gogoproto.moretags) = "yaml:\"counterparty_connection_id\""]; + Version version = 3; + google.protobuf.Any client_state = 4 [(gogoproto.moretags) = "yaml:\"client_state\""]; + ibc.core.client.v1.Height proof_height = 5 + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + // proof of the initialization the connection on Chain B: `UNITIALIZED -> + // TRYOPEN` + bytes proof_try = 6 [(gogoproto.moretags) = "yaml:\"proof_try\""]; + // proof of client state included in message + bytes proof_client = 7 [(gogoproto.moretags) = "yaml:\"proof_client\""]; + // proof of client consensus state + bytes proof_consensus = 8 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; + ibc.core.client.v1.Height consensus_height = 9 + [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; + string signer = 10; +} + +// MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. +message MsgConnectionOpenAckResponse {} + +// MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to +// acknowledge the change of connection state to OPEN on Chain A. +message MsgConnectionOpenConfirm { + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + + string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; + // proof for the change of the connection state on Chain A: `INIT -> OPEN` + bytes proof_ack = 2 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; + ibc.core.client.v1.Height proof_height = 3 + [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; + string signer = 4; +} + +// MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm response type. +message MsgConnectionOpenConfirmResponse {} diff --git a/proto/ibc/core/types/v1/genesis.proto b/proto/ibc/core/types/v1/genesis.proto new file mode 100644 index 00000000..ace50859 --- /dev/null +++ b/proto/ibc/core/types/v1/genesis.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +package ibc.core.types.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/types"; + +import "gogoproto/gogo.proto"; +import "ibc/core/client/v1/genesis.proto"; +import "ibc/core/connection/v1/genesis.proto"; +import "ibc/core/channel/v1/genesis.proto"; + +// GenesisState defines the ibc module's genesis state. +message GenesisState { + // ICS002 - Clients genesis state + ibc.core.client.v1.GenesisState client_genesis = 1 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_genesis\""]; + // ICS003 - Connections genesis state + ibc.core.connection.v1.GenesisState connection_genesis = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"connection_genesis\""]; + // ICS004 - Channel genesis state + ibc.core.channel.v1.GenesisState channel_genesis = 3 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"channel_genesis\""]; +} diff --git a/proto/ibc/lightclients/localhost/v1/localhost.proto b/proto/ibc/lightclients/localhost/v1/localhost.proto new file mode 100644 index 00000000..d48a1c00 --- /dev/null +++ b/proto/ibc/lightclients/localhost/v1/localhost.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package ibc.lightclients.localhost.v1; + +import "gogoproto/gogo.proto"; +import "ibc/core/client/v1/client.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/09-localhost/types"; + +// ClientState defines a loopback (localhost) client. It requires (read-only) +// access to keys outside the client prefix. +message ClientState { + option (gogoproto.goproto_getters) = false; + // self chain ID + string chain_id = 1 [(gogoproto.moretags) = "yaml:\"chain_id\""]; + // self latest block height + ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; +} diff --git a/proto/ibc/lightclients/solomachine/v1/solomachine.proto b/proto/ibc/lightclients/solomachine/v1/solomachine.proto new file mode 100644 index 00000000..89686f3b --- /dev/null +++ b/proto/ibc/lightclients/solomachine/v1/solomachine.proto @@ -0,0 +1,186 @@ +syntax = "proto3"; +package ibc.lightclients.solomachine.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/06-solomachine/types"; + +import "ibc/core/connection/v1/connection.proto"; +import "ibc/core/channel/v1/channel.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; + +// ClientState defines a solo machine client that tracks the current consensus +// state and if the client is frozen. +message ClientState { + option (gogoproto.goproto_getters) = false; + // latest sequence of the client state + uint64 sequence = 1; + // frozen sequence of the solo machine + uint64 frozen_sequence = 2 [(gogoproto.moretags) = "yaml:\"frozen_sequence\""]; + ConsensusState consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; + // when set to true, will allow governance to update a solo machine client. + // The client will be unfrozen if it is frozen. + bool allow_update_after_proposal = 4 [(gogoproto.moretags) = "yaml:\"allow_update_after_proposal\""]; +} + +// ConsensusState defines a solo machine consensus state. The sequence of a consensus state +// is contained in the "height" key used in storing the consensus state. +message ConsensusState { + option (gogoproto.goproto_getters) = false; + // public key of the solo machine + google.protobuf.Any public_key = 1 [(gogoproto.moretags) = "yaml:\"public_key\""]; + // diversifier allows the same public key to be re-used across different solo machine clients + // (potentially on different chains) without being considered misbehaviour. + string diversifier = 2; + uint64 timestamp = 3; +} + +// Header defines a solo machine consensus header +message Header { + option (gogoproto.goproto_getters) = false; + // sequence to update solo machine public key at + uint64 sequence = 1; + uint64 timestamp = 2; + bytes signature = 3; + google.protobuf.Any new_public_key = 4 [(gogoproto.moretags) = "yaml:\"new_public_key\""]; + string new_diversifier = 5 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; +} + +// Misbehaviour defines misbehaviour for a solo machine which consists +// of a sequence and two signatures over different messages at that sequence. +message Misbehaviour { + option (gogoproto.goproto_getters) = false; + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + uint64 sequence = 2; + SignatureAndData signature_one = 3 [(gogoproto.moretags) = "yaml:\"signature_one\""]; + SignatureAndData signature_two = 4 [(gogoproto.moretags) = "yaml:\"signature_two\""]; +} + +// SignatureAndData contains a signature and the data signed over to create that +// signature. +message SignatureAndData { + option (gogoproto.goproto_getters) = false; + bytes signature = 1; + DataType data_type = 2 [(gogoproto.moretags) = "yaml:\"data_type\""]; + bytes data = 3; + uint64 timestamp = 4; +} + +// TimestampedSignatureData contains the signature data and the timestamp of the +// signature. +message TimestampedSignatureData { + option (gogoproto.goproto_getters) = false; + bytes signature_data = 1 [(gogoproto.moretags) = "yaml:\"signature_data\""]; + uint64 timestamp = 2; +} + +// SignBytes defines the signed bytes used for signature verification. +message SignBytes { + option (gogoproto.goproto_getters) = false; + + uint64 sequence = 1; + uint64 timestamp = 2; + string diversifier = 3; + // type of the data used + DataType data_type = 4 [(gogoproto.moretags) = "yaml:\"data_type\""]; + // marshaled data + bytes data = 5; +} + +// DataType defines the type of solo machine proof being created. This is done to preserve uniqueness of different +// data sign byte encodings. +enum DataType { + option (gogoproto.goproto_enum_prefix) = false; + + // Default State + DATA_TYPE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNSPECIFIED"]; + // Data type for client state verification + DATA_TYPE_CLIENT_STATE = 1 [(gogoproto.enumvalue_customname) = "CLIENT"]; + // Data type for consensus state verification + DATA_TYPE_CONSENSUS_STATE = 2 [(gogoproto.enumvalue_customname) = "CONSENSUS"]; + // Data type for connection state verification + DATA_TYPE_CONNECTION_STATE = 3 [(gogoproto.enumvalue_customname) = "CONNECTION"]; + // Data type for channel state verification + DATA_TYPE_CHANNEL_STATE = 4 [(gogoproto.enumvalue_customname) = "CHANNEL"]; + // Data type for packet commitment verification + DATA_TYPE_PACKET_COMMITMENT = 5 [(gogoproto.enumvalue_customname) = "PACKETCOMMITMENT"]; + // Data type for packet acknowledgement verification + DATA_TYPE_PACKET_ACKNOWLEDGEMENT = 6 [(gogoproto.enumvalue_customname) = "PACKETACKNOWLEDGEMENT"]; + // Data type for packet receipt absence verification + DATA_TYPE_PACKET_RECEIPT_ABSENCE = 7 [(gogoproto.enumvalue_customname) = "PACKETRECEIPTABSENCE"]; + // Data type for next sequence recv verification + DATA_TYPE_NEXT_SEQUENCE_RECV = 8 [(gogoproto.enumvalue_customname) = "NEXTSEQUENCERECV"]; + // Data type for header verification + DATA_TYPE_HEADER = 9 [(gogoproto.enumvalue_customname) = "HEADER"]; +} + +// HeaderData returns the SignBytes data for update verification. +message HeaderData { + option (gogoproto.goproto_getters) = false; + + // header public key + google.protobuf.Any new_pub_key = 1 [(gogoproto.moretags) = "yaml:\"new_pub_key\""]; + // header diversifier + string new_diversifier = 2 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; +} + +// ClientStateData returns the SignBytes data for client state verification. +message ClientStateData { + option (gogoproto.goproto_getters) = false; + + bytes path = 1; + google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; +} + +// ConsensusStateData returns the SignBytes data for consensus state +// verification. +message ConsensusStateData { + option (gogoproto.goproto_getters) = false; + + bytes path = 1; + google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; +} + +// ConnectionStateData returns the SignBytes data for connection state +// verification. +message ConnectionStateData { + option (gogoproto.goproto_getters) = false; + + bytes path = 1; + ibc.core.connection.v1.ConnectionEnd connection = 2; +} + +// ChannelStateData returns the SignBytes data for channel state +// verification. +message ChannelStateData { + option (gogoproto.goproto_getters) = false; + + bytes path = 1; + ibc.core.channel.v1.Channel channel = 2; +} + +// PacketCommitmentData returns the SignBytes data for packet commitment +// verification. +message PacketCommitmentData { + bytes path = 1; + bytes commitment = 2; +} + +// PacketAcknowledgementData returns the SignBytes data for acknowledgement +// verification. +message PacketAcknowledgementData { + bytes path = 1; + bytes acknowledgement = 2; +} + +// PacketReceiptAbsenceData returns the SignBytes data for +// packet receipt absence verification. +message PacketReceiptAbsenceData { + bytes path = 1; +} + +// NextSequenceRecvData returns the SignBytes data for verification of the next +// sequence to be received. +message NextSequenceRecvData { + bytes path = 1; + uint64 next_seq_recv = 2 [(gogoproto.moretags) = "yaml:\"next_seq_recv\""]; +} diff --git a/proto/ibc/lightclients/tendermint/v1/tendermint.proto b/proto/ibc/lightclients/tendermint/v1/tendermint.proto new file mode 100644 index 00000000..a6882bf4 --- /dev/null +++ b/proto/ibc/lightclients/tendermint/v1/tendermint.proto @@ -0,0 +1,111 @@ +syntax = "proto3"; +package ibc.lightclients.tendermint.v1; + +option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/light-clients/07-tendermint/types"; + +import "tendermint/types/validator.proto"; +import "tendermint/types/types.proto"; +import "confio/proofs.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "ibc/core/client/v1/client.proto"; +import "ibc/core/commitment/v1/commitment.proto"; +import "gogoproto/gogo.proto"; + +// ClientState from Tendermint tracks the current validator set, latest height, +// and a possible frozen height. +message ClientState { + option (gogoproto.goproto_getters) = false; + + string chain_id = 1; + Fraction trust_level = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trust_level\""]; + // duration of the period since the LastestTimestamp during which the + // submitted headers are valid for upgrade + google.protobuf.Duration trusting_period = 3 + [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"trusting_period\""]; + // duration of the staking unbonding period + google.protobuf.Duration unbonding_period = 4 [ + (gogoproto.nullable) = false, + (gogoproto.stdduration) = true, + (gogoproto.moretags) = "yaml:\"unbonding_period\"" + ]; + // defines how much new (untrusted) header's Time can drift into the future. + google.protobuf.Duration max_clock_drift = 5 + [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"max_clock_drift\""]; + // Block height when the client was frozen due to a misbehaviour + ibc.core.client.v1.Height frozen_height = 6 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"frozen_height\""]; + // Latest height the client was updated to + ibc.core.client.v1.Height latest_height = 7 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"latest_height\""]; + + // Proof specifications used in verifying counterparty state + repeated ics23.ProofSpec proof_specs = 8 [(gogoproto.moretags) = "yaml:\"proof_specs\""]; + + // Path at which next upgraded client will be committed. + // Each element corresponds to the key for a single CommitmentProof in the chained proof. + // NOTE: ClientState must stored under `{upgradePath}/{upgradeHeight}/clientState` + // ConsensusState must be stored under `{upgradepath}/{upgradeHeight}/consensusState` + // For SDK chains using the default upgrade module, upgrade_path should be []string{"upgrade", "upgradedIBCState"}` + repeated string upgrade_path = 9 [(gogoproto.moretags) = "yaml:\"upgrade_path\""]; + + // This flag, when set to true, will allow governance to recover a client + // which has expired + bool allow_update_after_expiry = 10 [(gogoproto.moretags) = "yaml:\"allow_update_after_expiry\""]; + // This flag, when set to true, will allow governance to unfreeze a client + // whose chain has experienced a misbehaviour event + bool allow_update_after_misbehaviour = 11 [(gogoproto.moretags) = "yaml:\"allow_update_after_misbehaviour\""]; +} + +// ConsensusState defines the consensus state from Tendermint. +message ConsensusState { + option (gogoproto.goproto_getters) = false; + + // timestamp that corresponds to the block height in which the ConsensusState + // was stored. + google.protobuf.Timestamp timestamp = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + // commitment root (i.e app hash) + ibc.core.commitment.v1.MerkleRoot root = 2 [(gogoproto.nullable) = false]; + bytes next_validators_hash = 3 [ + (gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes", + (gogoproto.moretags) = "yaml:\"next_validators_hash\"" + ]; +} + +// Misbehaviour is a wrapper over two conflicting Headers +// that implements Misbehaviour interface expected by ICS-02 +message Misbehaviour { + option (gogoproto.goproto_getters) = false; + + string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; + Header header_1 = 2 [(gogoproto.customname) = "Header1", (gogoproto.moretags) = "yaml:\"header_1\""]; + Header header_2 = 3 [(gogoproto.customname) = "Header2", (gogoproto.moretags) = "yaml:\"header_2\""]; +} + +// Header defines the Tendermint client consensus Header. +// It encapsulates all the information necessary to update from a trusted +// Tendermint ConsensusState. The inclusion of TrustedHeight and +// TrustedValidators allows this update to process correctly, so long as the +// ConsensusState for the TrustedHeight exists, this removes race conditions +// among relayers The SignedHeader and ValidatorSet are the new untrusted update +// fields for the client. The TrustedHeight is the height of a stored +// ConsensusState on the client that will be used to verify the new untrusted +// header. The Trusted ConsensusState must be within the unbonding period of +// current time in order to correctly verify, and the TrustedValidators must +// hash to TrustedConsensusState.NextValidatorsHash since that is the last +// trusted validator set at the TrustedHeight. +message Header { + .tendermint.types.SignedHeader signed_header = 1 + [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"signed_header\""]; + + .tendermint.types.ValidatorSet validator_set = 2 [(gogoproto.moretags) = "yaml:\"validator_set\""]; + ibc.core.client.v1.Height trusted_height = 3 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trusted_height\""]; + .tendermint.types.ValidatorSet trusted_validators = 4 [(gogoproto.moretags) = "yaml:\"trusted_validators\""]; +} + +// Fraction defines the protobuf message type for tmmath.Fraction that only supports positive values. +message Fraction { + uint64 numerator = 1; + uint64 denominator = 2; +} diff --git a/proto/irismod/coinswap/coinswap.proto b/proto/irismod/coinswap/coinswap.proto new file mode 100644 index 00000000..408735dd --- /dev/null +++ b/proto/irismod/coinswap/coinswap.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package irismod.coinswap; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irismod/modules/coinswap/types"; +option (gogoproto.goproto_getters_all) = false; + +// Input defines the properties of order's input +message Input { + string address = 1; + cosmos.base.v1beta1.Coin coin = 2 [(gogoproto.nullable) = false]; +} + +// Output defines the properties of order's output +message Output { + string address = 1; + cosmos.base.v1beta1.Coin coin = 2 [(gogoproto.nullable) = false]; +} + +// token parameters +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + cosmos.base.v1beta1.Coin fee = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + + string standard_denom = 2 [(gogoproto.moretags) = "yaml:\"standard_denom\""]; +} diff --git a/proto/irismod/coinswap/genesis.proto b/proto/irismod/coinswap/genesis.proto new file mode 100644 index 00000000..19407cf6 --- /dev/null +++ b/proto/irismod/coinswap/genesis.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; +package irismod.coinswap; + +import "gogoproto/gogo.proto"; +import "irismod/coinswap/coinswap.proto"; + +option go_package = "github.com/irisnet/irismod/modules/coinswap/types"; + +// GenesisState defines the coinswap module's genesis state. +message GenesisState { + Params params = 1 [(gogoproto.nullable) = false]; +} + diff --git a/proto/irismod/coinswap/query.proto b/proto/irismod/coinswap/query.proto new file mode 100644 index 00000000..87a8b4e0 --- /dev/null +++ b/proto/irismod/coinswap/query.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; +package irismod.coinswap; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/irisnet/irismod/modules/coinswap/types"; + +// Query creates service with coinswap as rpc +service Query { + // Liquidity returns the total liquidity available for the provided denomination + rpc Liquidity (QueryLiquidityRequest) returns (QueryLiquidityResponse) { + option (google.api.http).get = "/irismod/coinswap/liquidities/{id}"; + } +} + +// QueryLiquidityRequest is request type for the Query/Liquidity RPC method +message QueryLiquidityRequest { + string id = 1; +} + +// QueryLiquidityResponse is response type for the Query/Liquidity RPC method +message QueryLiquidityResponse { + cosmos.base.v1beta1.Coin standard = 1 [(gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin token = 2 [(gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin liquidity = 3 [(gogoproto.nullable) = false]; + string fee = 4; +} \ No newline at end of file diff --git a/proto/irismod/coinswap/tx.proto b/proto/irismod/coinswap/tx.proto new file mode 100644 index 00000000..15af60d3 --- /dev/null +++ b/proto/irismod/coinswap/tx.proto @@ -0,0 +1,60 @@ +syntax = "proto3"; +package irismod.coinswap; + +import "irismod/coinswap/coinswap.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irismod/modules/coinswap/types"; +option (gogoproto.goproto_getters_all) = false; + +// Msg defines the coinswap Msg service. +service Msg { + // AddLiquidity defines a method for depositing some tokens to the liquidity pool. + rpc AddLiquidity(MsgAddLiquidity) returns (MsgAddLiquidityResponse); + + // RemoveLiquidity defines a method for withdraw some tokens from the liquidity pool. + rpc RemoveLiquidity(MsgRemoveLiquidity) returns (MsgRemoveLiquidityResponse); + + // SwapCoin defines a method for swapping a token with the other token from the liquidity pool. + rpc SwapCoin(MsgSwapOrder) returns (MsgSwapCoinResponse); +} + +// MsgAddLiquidity represents a msg for adding liquidity to a reserve pool +message MsgAddLiquidity { + cosmos.base.v1beta1.Coin max_token = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"max_token\""]; + string exact_standard_amt = 2 [(gogoproto.moretags) = "yaml:\"exact_standard_amt\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string min_liquidity = 3 [(gogoproto.moretags) = "yaml:\"min_liquidity\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + int64 deadline = 4; + string sender = 5; +} + +// MsgAddLiquidityResponse defines the Msg/AddLiquidity response type. +message MsgAddLiquidityResponse { + cosmos.base.v1beta1.Coin mint_token = 1; +} + +// MsgRemoveLiquidity - struct for removing liquidity from a reserve pool +message MsgRemoveLiquidity { + cosmos.base.v1beta1.Coin withdraw_liquidity = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"withdraw_liquidity\""]; + string min_token = 2 [(gogoproto.moretags) = "yaml:\"min_token\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + string min_standard_amt = 3 [(gogoproto.moretags) = "yaml:\"min_standard_amt\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; + int64 deadline = 4; + string sender = 5; +} + +// MsgRemoveLiquidityResponse defines the Msg/RemoveLiquidity response type. +message MsgRemoveLiquidityResponse { + repeated cosmos.base.v1beta1.Coin withdraw_coins = 1; +} + +// MsgSwapOrder represents a msg for swap order +message MsgSwapOrder { + Input input = 1 [(gogoproto.nullable) = false]; + Output output = 2 [(gogoproto.nullable) = false]; + int64 deadline = 3; + bool is_buy_order = 4 [(gogoproto.moretags) = "yaml:\"is_buy_order\""]; +} + +// MsgSwapCoinResponse defines the Msg/SwapCoin response type. +message MsgSwapCoinResponse {} \ No newline at end of file diff --git a/proto/irismod/htlc/genesis.proto b/proto/irismod/htlc/genesis.proto new file mode 100644 index 00000000..b5eb9ab4 --- /dev/null +++ b/proto/irismod/htlc/genesis.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package irismod.htlc; + +import "gogoproto/gogo.proto"; +import "irismod/htlc/htlc.proto"; + +option go_package = "github.com/irisnet/irismod/modules/htlc/types"; + +// GenesisState defines the htlc module's genesis state. +message GenesisState { + map pending_htlcs = 1 [(gogoproto.nullable) = false]; +} \ No newline at end of file diff --git a/proto/irismod/htlc/htlc.proto b/proto/irismod/htlc/htlc.proto new file mode 100644 index 00000000..407cc0d1 --- /dev/null +++ b/proto/irismod/htlc/htlc.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; +package irismod.htlc; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irismod/modules/htlc/types"; +option (gogoproto.goproto_getters_all) = false; + +// HTLC defines a struct for an HTLC +message HTLC { + option (gogoproto.equal) = true; + + string sender = 1; + string to = 2; + string receiver_on_other_chain = 3 [(gogoproto.moretags) = "yaml:\"receiver_on_other_chain\""]; + repeated cosmos.base.v1beta1.Coin amount = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + string secret = 5; + uint64 timestamp = 6; + uint64 expiration_height = 7 [(gogoproto.moretags) = "yaml:\"expiration_height\""]; + HTLCState state = 8; +} + +// HTLCState defines a state for an HTLC +enum HTLCState { + option (gogoproto.goproto_enum_prefix) = false; + + // HTLC_STATE_OPEN defines an open state. + HTLC_STATE_OPEN = 0 [(gogoproto.enumvalue_customname) = "Open"]; + // HTLC_STATE_COMPLETED defines a completed state. + HTLC_STATE_COMPLETED = 1 [(gogoproto.enumvalue_customname) = "Completed"]; + // HTLC_STATE_EXPIRED defines an expired state. + HTLC_STATE_EXPIRED = 2 [(gogoproto.enumvalue_customname) = "Expired"]; + // HTLC_STATE_REFUNDED defines a refunded state. + HTLC_STATE_REFUNDED = 3 [(gogoproto.enumvalue_customname) = "Refunded"]; +} diff --git a/proto/irismod/htlc/query.proto b/proto/irismod/htlc/query.proto new file mode 100644 index 00000000..11b15060 --- /dev/null +++ b/proto/irismod/htlc/query.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +package irismod.htlc; + +import "google/api/annotations.proto"; +import "irismod/htlc/htlc.proto"; + +option go_package = "github.com/irisnet/irismod/modules/htlc/types"; + +// Query provides defines the gRPC querier service +service Query { + // Balance queries the balance of a single coin for a single account + rpc HTLC (QueryHTLCRequest) returns (QueryHTLCResponse) { + option (google.api.http).get = "/irismod/htlc/htlcs/{hash_lock}"; + } +} + +// QueryHTLCRequest is the request type for the Query/HTLC RPC method +message QueryHTLCRequest { + // address is the address to query balances for + string hash_lock = 1; +} + +// QueryBalanceResponse is the response type for the Query/HTLC RPC method +message QueryHTLCResponse { + HTLC htlc = 1; +} diff --git a/proto/irismod/htlc/tx.proto b/proto/irismod/htlc/tx.proto new file mode 100644 index 00000000..e214339b --- /dev/null +++ b/proto/irismod/htlc/tx.proto @@ -0,0 +1,60 @@ +syntax = "proto3"; +package irismod.htlc; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irismod/modules/htlc/types"; +option (gogoproto.goproto_getters_all) = false; + + +// Msg defines the htlc Msg service. +service Msg { + // CreateHTLC defines a method for creating a HTLC. + rpc CreateHTLC(MsgCreateHTLC) returns (MsgCreateHTLCResponse); + + // ClaimHTLC defines a method for claiming a HTLC + rpc ClaimHTLC(MsgClaimHTLC) returns (MsgClaimHTLCResponse); + + // RefundHTLC defines a method for refunding a HTLC. + rpc RefundHTLC(MsgRefundHTLC) returns (MsgRefundHTLCResponse); +} + +// MsgCreateHTLC defines a message to create an HTLC +message MsgCreateHTLC { + option (gogoproto.equal) = true; + + string sender = 1; + string to = 2; + string receiver_on_other_chain = 3 [(gogoproto.moretags) = "yaml:\"receiver_on_other_chain\""]; + repeated cosmos.base.v1beta1.Coin amount = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + string hash_lock = 5 [(gogoproto.moretags) = "yaml:\"hash_lock\""]; + uint64 timestamp = 6; + uint64 time_lock = 7 [(gogoproto.moretags) = "yaml:\"time_lock\""]; +} + +// MsgCreateHTLCResponse defines the Msg/CreateHTLC response type. +message MsgCreateHTLCResponse {} + +// MsgClaimHTLC defines a message to claim an HTLC +message MsgClaimHTLC { + option (gogoproto.equal) = true; + + string sender = 1; + string hash_lock = 2 [(gogoproto.moretags) = "yaml:\"hash_lock\""]; + string secret = 3; +} + +// MsgClaimHTLCResponse defines the Msg/ClaimHTLC response type. +message MsgClaimHTLCResponse {} + +// MsgRefundHTLC defines a message to refund an HTLC +message MsgRefundHTLC { + option (gogoproto.equal) = true; + + string sender = 1; + string hash_lock = 2 [(gogoproto.moretags) = "yaml:\"hash_lock\""]; +} + +// MsgRefundHTLCResponse defines the Msg/RefundHTLC response type. +message MsgRefundHTLCResponse {} \ No newline at end of file diff --git a/proto/irismod/nft/genesis.proto b/proto/irismod/nft/genesis.proto new file mode 100644 index 00000000..e9c975d3 --- /dev/null +++ b/proto/irismod/nft/genesis.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; +package irismod.nft; + +import "gogoproto/gogo.proto"; +import "irismod/nft/nft.proto"; + +option go_package = "github.com/irisnet/irismod/modules/nft/types"; + +// GenesisState defines the nft module's genesis state. +message GenesisState { + repeated Collection collections = 1 [(gogoproto.nullable) = false]; +} + diff --git a/proto/irismod/nft/nft.proto b/proto/irismod/nft/nft.proto new file mode 100644 index 00000000..e9d2c747 --- /dev/null +++ b/proto/irismod/nft/nft.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; +package irismod.nft; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irismod/modules/nft/types"; +option (gogoproto.goproto_getters_all) = false; + +// BaseNFT defines a non fungible token. +message BaseNFT { + option (gogoproto.equal) = true; + + string id = 1; + string name = 2; + string uri = 3 [ (gogoproto.customname) = "URI" ]; + string data = 4; + string owner = 5; +} + +// Denom defines a type of NFT. +message Denom { + option (gogoproto.equal) = true; + + string id = 1; + string name = 2; + string schema = 3; + string creator = 4; +} + +message IDCollection { + option (gogoproto.equal) = true; + + string denom_id = 1 [ (gogoproto.moretags) = "yaml:\"denom_id\"" ]; + repeated string token_ids = 2 [ (gogoproto.moretags) = "yaml:\"token_ids\"" ]; +} + +message Owner { + option (gogoproto.equal) = true; + + string address = 1; + repeated IDCollection id_collections = 2 [ (gogoproto.moretags) = "yaml:\"idcs\"", (gogoproto.customname) = "IDCollections", (gogoproto.nullable) = false ]; +} + +message Collection { + option (gogoproto.equal) = true; + + Denom denom = 1 [ (gogoproto.nullable) = false ]; + repeated BaseNFT nfts = 2 [ (gogoproto.customname) = "NFTs", (gogoproto.nullable) = false ]; +} \ No newline at end of file diff --git a/proto/irismod/nft/query.proto b/proto/irismod/nft/query.proto new file mode 100644 index 00000000..77d56cf7 --- /dev/null +++ b/proto/irismod/nft/query.proto @@ -0,0 +1,103 @@ +syntax = "proto3"; +package irismod.nft; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "irismod/nft/nft.proto"; + +option go_package = "github.com/irisnet/irismod/modules/nft/types"; + +// Query defines the gRPC querier service for nft module +service Query { + // Supply queries the total supply of a given denom or owner + rpc Supply(QuerySupplyRequest) returns (QuerySupplyResponse) { + option (google.api.http).get = "/irismod/nft/collections/{denom_id}/supply"; + } + + // Owner queries the NFTs of the specified owner + rpc Owner(QueryOwnerRequest) returns (QueryOwnerResponse) { + option (google.api.http).get = "/irismod/nft/owners/{owner}"; + } + + // Collection queries the NFTs of the specified denom + rpc Collection(QueryCollectionRequest) returns (QueryCollectionResponse) { + option (google.api.http).get = "/irismod/nft/collections/{denom_id}"; + } + + // Denom queries the definition of a given denom + rpc Denom(QueryDenomRequest) returns (QueryDenomResponse) { + option (google.api.http).get = "/irismod/nft/denoms/{denom_id}"; + } + + // Denoms queries all the denoms + rpc Denoms(QueryDenomsRequest) returns (QueryDenomsResponse) { + option (google.api.http).get = "/irismod/nft/denoms"; + } + + // NFT queries the NFT for the given denom and token ID + rpc NFT(QueryNFTRequest) returns (QueryNFTResponse) { + option (google.api.http).get = "/irismod/nft/nfts/{denom_id}/{token_id}"; + } +} + +// QuerySupplyRequest is the request type for the Query/HTLC RPC method +message QuerySupplyRequest { + string denom_id = 1 [ (gogoproto.moretags) = "yaml:\"denom_id\"" ]; + string owner = 2; +} + +// QuerySupplyResponse is the response type for the Query/Supply RPC method +message QuerySupplyResponse { + uint64 amount = 1; +} + +// QueryOwnerRequest is the request type for the Query/Owner RPC method +message QueryOwnerRequest { + string denom_id = 1 [ (gogoproto.moretags) = "yaml:\"denom_id\"" ]; + string owner = 2; +} + +// QueryOwnerResponse is the response type for the Query/Owner RPC method +message QueryOwnerResponse { + Owner owner = 1; +} + +// QueryCollectionRequest is the request type for the Query/Collection RPC method +message QueryCollectionRequest { + string denom_id = 1 [ (gogoproto.moretags) = "yaml:\"denom_id\"" ]; +} + +// QueryCollectionResponse is the response type for the Query/Collection RPC method +message QueryCollectionResponse { + Collection collection = 1; +} + +// QueryDenomRequest is the request type for the Query/Denom RPC method +message QueryDenomRequest { + string denom_id = 1 [ (gogoproto.moretags) = "yaml:\"denom_id\"" ]; +} + +// QueryDenomResponse is the response type for the Query/Denom RPC method +message QueryDenomResponse { + Denom denom = 1; +} + +// QueryDenomsRequest is the request type for the Query/Denoms RPC method +message QueryDenomsRequest { +} + +// QueryDenomsResponse is the response type for the Query/Denoms RPC method +message QueryDenomsResponse { + repeated Denom denoms = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryNFTRequest is the request type for the Query/NFT RPC method +message QueryNFTRequest { + string denom_id = 1 [ (gogoproto.moretags) = "yaml:\"denom_id\"" ]; + string token_id = 2 [ (gogoproto.moretags) = "yaml:\"token_id\"" ]; +} + +// QueryNFTResponse is the response type for the Query/NFT RPC method +message QueryNFTResponse { + BaseNFT nft = 1 [ (gogoproto.customname) = "NFT" ]; +} \ No newline at end of file diff --git a/proto/irismod/nft/tx.proto b/proto/irismod/nft/tx.proto new file mode 100644 index 00000000..bbe221b8 --- /dev/null +++ b/proto/irismod/nft/tx.proto @@ -0,0 +1,97 @@ +syntax = "proto3"; +package irismod.nft; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irismod/modules/nft/types"; +option (gogoproto.goproto_getters_all) = false; + +// Msg defines the htlc Msg service. +service Msg { + // IssueDenom defines a method for issue a denom. + rpc IssueDenom(MsgIssueDenom) returns (MsgIssueDenomResponse); + + // MintNFT defines a method for mint a new nft + rpc MintNFT(MsgMintNFT) returns (MsgMintNFTResponse); + + // RefundHTLC defines a method for editing a nft. + rpc EditNFT(MsgEditNFT) returns (MsgEditNFTResponse); + + // TransferNFT defines a method for transferring a nft. + rpc TransferNFT(MsgTransferNFT) returns (MsgTransferNFTResponse); + + // BurnNFT defines a method for burning a nft. + rpc BurnNFT(MsgBurnNFT) returns (MsgBurnNFTResponse); +} + +// MsgIssueDenom defines an SDK message for creating a new denom. +message MsgIssueDenom { + option (gogoproto.equal) = true; + + string id = 1; + string name = 2; + string schema = 3; + string sender = 4; +} + +// MsgIssueDenomResponse defines the Msg/IssueDenom response type. +message MsgIssueDenomResponse {} + +// MsgTransferNFT defines an SDK message for transferring an NFT to recipient. +message MsgTransferNFT { + option (gogoproto.equal) = true; + + string id = 1; + string denom_id = 2 [ (gogoproto.moretags) = "yaml:\"denom_id\"" ]; + string name = 3; + string uri = 4 [ (gogoproto.customname) = "URI" ]; + string data = 5; + string sender = 6; + string recipient = 7; +} + +// MsgTransferNFTResponse defines the Msg/TransferNFT response type. +message MsgTransferNFTResponse {} + +// MsgEditNFT defines an SDK message for editing a nft. +message MsgEditNFT { + option (gogoproto.equal) = true; + + string id = 1; + string denom_id = 2 [ (gogoproto.moretags) = "yaml:\"denom_id\"" ]; + string name = 3; + string uri = 4 [ (gogoproto.customname) = "URI" ]; + string data = 5; + string sender = 6; +} + +// MsgEditNFTResponse defines the Msg/EditNFT response type. +message MsgEditNFTResponse {} + +// MsgMintNFT defines an SDK message for creating a new NFT. +message MsgMintNFT { + option (gogoproto.equal) = true; + + string id = 1; + string denom_id = 2 [ (gogoproto.moretags) = "yaml:\"denom_id\"" ]; + string name = 3; + string uri = 4 [ (gogoproto.customname) = "URI" ]; + string data = 5; + string sender = 6; + string recipient = 7; +} + +// MsgMintNFTResponse defines the Msg/MintNFT response type. +message MsgMintNFTResponse {} + +// MsgBurnNFT defines an SDK message for burning a NFT. +message MsgBurnNFT { + option (gogoproto.equal) = true; + + string id = 1; + string denom_id = 2 [ (gogoproto.moretags) = "yaml:\"denom_id\"" ]; + string sender = 3; +} + +// MsgBurnNFTResponse defines the Msg/BurnNFT response type. +message MsgBurnNFTResponse {} \ No newline at end of file diff --git a/proto/irismod/oracle/genesis.proto b/proto/irismod/oracle/genesis.proto new file mode 100644 index 00000000..f15a3e1d --- /dev/null +++ b/proto/irismod/oracle/genesis.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; +package irismod.oracle; + +import "irismod/oracle/oracle.proto"; +import "irismod/service/service.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irismod/modules/oracle/types"; + +// GenesisState defines the oracle module's genesis state. +message GenesisState { + repeated FeedEntry entries = 1 [(gogoproto.nullable) = false]; +} + +message FeedEntry { + Feed feed = 1 [(gogoproto.nullable) = false]; + irismod.service.RequestContextState state = 2; + repeated FeedValue values = 3 [(gogoproto.nullable) = false]; +} \ No newline at end of file diff --git a/proto/irismod/oracle/oracle.proto b/proto/irismod/oracle/oracle.proto new file mode 100644 index 00000000..0d840e2e --- /dev/null +++ b/proto/irismod/oracle/oracle.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package irismod.oracle; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/irisnet/irismod/modules/oracle/types"; + +// Feed defines the feed standard +message Feed { + string feed_name = 1 [ (gogoproto.moretags) = "yaml:\"feed_name\"" ]; + string description = 2; + string aggregate_func = 3 [ (gogoproto.moretags) = "yaml:\"aggregate_func\"" ]; + string value_json_path = 4 [ (gogoproto.moretags) = "yaml:\"value_json_path\"" ]; + uint64 latest_history = 5 [ (gogoproto.moretags) = "yaml:\"latest_history\"" ]; + string request_context_id = 6 [ (gogoproto.customname) = "RequestContextID", (gogoproto.moretags) = "yaml:\"request_context_id\"" ]; + string creator = 7; +} + +// FeedValue defines the feed result standard +message FeedValue { + string data = 1; + google.protobuf.Timestamp timestamp = 2 [ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; +} diff --git a/proto/irismod/oracle/query.proto b/proto/irismod/oracle/query.proto new file mode 100644 index 00000000..4d7434eb --- /dev/null +++ b/proto/irismod/oracle/query.proto @@ -0,0 +1,73 @@ +syntax = "proto3"; +package irismod.oracle; + +import "irismod/oracle/oracle.proto"; +import "irismod/service/service.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/irisnet/irismod/modules/oracle/types"; + +// Query creates service with guardian as rpc +service Query { + // Feed queries the feed + rpc Feed(QueryFeedRequest) returns (QueryFeedResponse) { + option (google.api.http).get = "/irismod/oracle/feeds/{feed_name}"; + } + + // QueryFeedsRequest queries the feed list + rpc Feeds(QueryFeedsRequest) returns (QueryFeedsResponse) { + option (google.api.http).get = "/irismod/oracle/feeds"; + } + + // FeedValue queries the feed value + rpc FeedValue(QueryFeedValueRequest) returns (QueryFeedValueResponse) { + option (google.api.http).get = "/irismod/oracle/feeds/{feed_name}/values"; + } +} + +// QueryFeedRequest is request type for the Query/Feed RPC method +message QueryFeedRequest { + string feed_name = 1; +} + +// QueryFeedResponse is response type for the Query/Feed RPC method +message QueryFeedResponse { + FeedContext feed = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryFeedsRequest is request type for the Query/Feeds RPC method +message QueryFeedsRequest { + string state = 1; +} + +// QueryFeedsResponse is response type for the Query/Feeds RPC method +message QueryFeedsResponse { + repeated FeedContext feeds = 1 [ (gogoproto.nullable) = false ]; +} + +// QueryFeedValueRequest is request type for the Query/FeedValue RPC method +message QueryFeedValueRequest { + string feed_name = 1; +} + +// QueryFeedValueResponse is response type for the Query/FeedValue RPC method +message QueryFeedValueResponse { + repeated FeedValue feed_values = 1 [ (gogoproto.nullable) = false ]; +} + +// FeedContext defines the feed context struct +message FeedContext { + option (gogoproto.goproto_stringer) = false; + + Feed feed = 1; + string service_name = 2 [ (gogoproto.moretags) = "yaml:\"service_name\"" ]; + repeated string providers = 3; + string input = 4; + int64 timeout = 5; + repeated cosmos.base.v1beta1.Coin service_fee_cap = 6 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee_cap\"" ]; + uint64 repeated_frequency = 7 [ (gogoproto.moretags) = "yaml:\"repeated_frequency\"" ]; + uint32 response_threshold = 8 [ (gogoproto.moretags) = "yaml:\"response_threshold\"" ]; + irismod.service.RequestContextState state = 9; +} diff --git a/proto/irismod/oracle/tx.proto b/proto/irismod/oracle/tx.proto new file mode 100644 index 00000000..16a2db3e --- /dev/null +++ b/proto/irismod/oracle/tx.proto @@ -0,0 +1,76 @@ +syntax = "proto3"; +package irismod.oracle; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/irisnet/irismod/modules/oracle/types"; + +// Msg defines the oracle Msg service. +service Msg { + // CreateFeed defines a method for creating a new feed. + rpc CreateFeed(MsgCreateFeed) returns (MsgCreateFeedResponse); + + // EditFeed defines a method for editing a feed. + rpc EditFeed(MsgEditFeed) returns (MsgEditFeedResponse); + + // StartFeed defines a method for starting a feed + rpc StartFeed(MsgStartFeed) returns (MsgStartFeedResponse); + + // PauseFeed defines a method for pausing a feed. + rpc PauseFeed(MsgPauseFeed) returns (MsgPauseFeedResponse); +} + +// MsgCreateFeed defines an sdk.Msg type that supports creating a feed +message MsgCreateFeed { + string feed_name = 1 [ (gogoproto.moretags) = "yaml:\"feed_name\"" ]; + uint64 latest_history = 2 [ (gogoproto.moretags) = "yaml:\"latest_history\"" ]; + string description = 3; + string creator = 4; + string service_name = 5 [ (gogoproto.moretags) = "yaml:\"service_name\"" ]; + repeated string providers = 6; + string input = 7; + int64 timeout = 8; + repeated cosmos.base.v1beta1.Coin service_fee_cap = 9 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee_cap\"" ]; + uint64 repeated_frequency = 10 [ (gogoproto.moretags) = "yaml:\"repeated_frequency\"" ]; + string aggregate_func = 11 [ (gogoproto.moretags) = "yaml:\"aggregate_func\"" ]; + string value_json_path = 12 [ (gogoproto.moretags) = "yaml:\"value_json_path\"" ]; + uint32 response_threshold = 13 [ (gogoproto.moretags) = "yaml:\"response_threshold\"" ]; +} + +// MsgCreateFeedResponse defines the Msg/CreateFeed response type. +message MsgCreateFeedResponse {} + +// MsgPauseFeed defines an sdk.Msg type that supports stating a feed +message MsgStartFeed { + string feed_name = 1 [ (gogoproto.moretags) = "yaml:\"feed_name\"" ]; + string creator = 2; +} + +// MsgStartFeedResponse defines the Msg/StartFeed response type. +message MsgStartFeedResponse {} + +// MsgPauseFeed defines an sdk.Msg type that supports pausing a feed +message MsgPauseFeed { + string feed_name = 1 [ (gogoproto.moretags) = "yaml:\"feed_name\"" ]; + string creator = 2; +} + +// MsgPauseFeedResponse defines the Msg/PauseFeed response type. +message MsgPauseFeedResponse {} + +// MsgEditFeed defines an sdk.Msg type that supports editing a feed +message MsgEditFeed { + string feed_name = 1 [ (gogoproto.moretags) = "yaml:\"feed_name\"" ]; + string description = 2; + uint64 latest_history = 3 [ (gogoproto.moretags) = "yaml:\"latest_history\"" ]; + repeated string providers = 4; + int64 timeout = 5; + repeated cosmos.base.v1beta1.Coin service_fee_cap = 6 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee_cap\"" ]; + uint64 repeated_frequency = 7 [ (gogoproto.moretags) = "yaml:\"repeated_frequency\"" ]; + uint32 response_threshold = 8 [ (gogoproto.moretags) = "yaml:\"response_threshold\"" ]; + string creator = 9; +} + +// MsgEditFeedResponse defines the Msg/EditFeed response type. +message MsgEditFeedResponse {} \ No newline at end of file diff --git a/proto/irismod/random/genesis.proto b/proto/irismod/random/genesis.proto new file mode 100644 index 00000000..c810f03b --- /dev/null +++ b/proto/irismod/random/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package irismod.random; + +import "irismod/random/random.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irismod/modules/random/types"; + +// GenesisState defines the random module's genesis state. +message GenesisState { + map pending_random_requests = 1 [(gogoproto.nullable) = false]; +} + +message Requests { + repeated Request requests = 1 [(gogoproto.nullable) = false]; +} \ No newline at end of file diff --git a/proto/irismod/random/query.proto b/proto/irismod/random/query.proto new file mode 100644 index 00000000..54b53b72 --- /dev/null +++ b/proto/irismod/random/query.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; +package irismod.random; + +import "irismod/random/random.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/irisnet/irismod/modules/random/types"; + +// Query creates service with guardian as rpc +service Query { + // Random queries the random result + rpc Random(QueryRandomRequest) returns (QueryRandomResponse) { + option (google.api.http).get = "/irismod/random/randoms/{req_id}"; + } + + // RandomRequestQueue queries the random request queue + rpc RandomRequestQueue(QueryRandomRequestQueueRequest) returns (QueryRandomRequestQueueResponse) { + option (google.api.http).get = "/irismod/random/queue"; + } +} + +// QueryRandomRequest is request type for the Query/Random RPC method +message QueryRandomRequest { + string req_id = 1; +} + +// QueryParametersResponse is response type for the Query/Random RPC method +message QueryRandomResponse { + Random random = 1; +} + +// QueryRandomRequestQueueRequest is request type for the Query/RandomRequestQueue RPC method +message QueryRandomRequestQueueRequest { + int64 height = 1; +} + +// QueryRandomRequestQueueResponse is response type for the Query/RandomRequestQueue RPC method +message QueryRandomRequestQueueResponse { + repeated Request requests = 1 [ (gogoproto.nullable) = false ]; +} \ No newline at end of file diff --git a/proto/irismod/random/random.proto b/proto/irismod/random/random.proto new file mode 100644 index 00000000..72bca684 --- /dev/null +++ b/proto/irismod/random/random.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package irismod.random; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/irisnet/irismod/modules/random/types"; + +// Random defines the feed standard +message Random { + string request_tx_hash = 1 [ (gogoproto.moretags) = "yaml:\"request_tx_hash\"" ]; + int64 height = 2; + string value = 3; +} + +// Request defines the random request standard +message Request { + int64 height = 1; + string consumer = 2; + string tx_hash = 3 [ (gogoproto.moretags) = "yaml:\"tx_hash\"" ]; + bool oracle = 4; + repeated cosmos.base.v1beta1.Coin service_fee_cap = 5 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee_cap\"" ]; + string service_context_id = 6 [ (gogoproto.customname) = "ServiceContextID", (gogoproto.moretags) = "yaml:\"service_context_id\"" ]; +} diff --git a/proto/irismod/random/tx.proto b/proto/irismod/random/tx.proto new file mode 100644 index 00000000..c33bff5c --- /dev/null +++ b/proto/irismod/random/tx.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +package irismod.random; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +option go_package = "github.com/irisnet/irismod/modules/random/types"; + +// Msg defines the oracle Msg service. +service Msg { + // RequestRandom defines a method for requesting a new random number. + rpc RequestRandom(MsgRequestRandom) returns (MsgRequestRandomResponse); +} + +// MsgRequestRandom defines an sdk.Msg type that supports requesting a random number +message MsgRequestRandom { + uint64 block_interval = 1 [ (gogoproto.moretags) = "yaml:\"block_interval\"" ]; + string consumer = 2; + bool oracle = 3; + repeated cosmos.base.v1beta1.Coin service_fee_cap = 4 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee_cap\"" ]; +} + + +// MsgRequestRandomResponse defines the Msg/RequestRandom response type. +message MsgRequestRandomResponse {} + diff --git a/proto/irismod/record/genesis.proto b/proto/irismod/record/genesis.proto new file mode 100644 index 00000000..f6ddbacb --- /dev/null +++ b/proto/irismod/record/genesis.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; +package irismod.record; + +import "gogoproto/gogo.proto"; +import "irismod/record/record.proto"; + +option go_package = "github.com/irisnet/irismod/modules/record/types"; + +// GenesisState defines the record module's genesis state. +message GenesisState { + repeated Record records = 1 [(gogoproto.nullable) = false]; +} + diff --git a/proto/irismod/record/query.proto b/proto/irismod/record/query.proto new file mode 100644 index 00000000..5e6415f3 --- /dev/null +++ b/proto/irismod/record/query.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package irismod.record; + +import "irismod/record/record.proto"; +import "google/api/annotations.proto"; + +option go_package = "github.com/irisnet/irismod/modules/record/types"; + +// Query defines the gRPC querier service for record module +service Query { + // Record queries the record by the given record ID + rpc Record (QueryRecordRequest) returns (QueryRecordResponse) { + option (google.api.http).get = "/irismod/record/records/{record_id}"; + } +} + +// QueryRecordRequest is the request type for the Query/Record RPC method +message QueryRecordRequest { + string record_id = 1; +} + +// QueryRecordResponse is the response type for the Query/Record RPC method +message QueryRecordResponse { + record.Record record = 1; +} diff --git a/proto/irismod/record/record.proto b/proto/irismod/record/record.proto new file mode 100644 index 00000000..572ffaa6 --- /dev/null +++ b/proto/irismod/record/record.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package irismod.record; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irismod/modules/record/types"; +option (gogoproto.goproto_getters_all) = false; + +// Content defines the detailed information for a record. +message Content { + option (gogoproto.equal) = true; + + string digest = 1; + string digest_algo = 2 [(gogoproto.moretags) = "yaml:\"digest_algo\""]; + string uri = 3 [(gogoproto.customname) = "URI"]; + string meta = 4; +} + +message Record { + option (gogoproto.equal) = true; + + string tx_hash = 1 [(gogoproto.moretags) = "yaml:\"tx_hash\""]; + repeated Content contents = 2 [(gogoproto.nullable) = false]; + string creator = 3; +} diff --git a/proto/irismod/record/tx.proto b/proto/irismod/record/tx.proto new file mode 100644 index 00000000..36e42043 --- /dev/null +++ b/proto/irismod/record/tx.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; +package irismod.record; + +import "irismod/record/record.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irismod/modules/record/types"; +option (gogoproto.goproto_getters_all) = false; + + +// Msg defines the oracle Msg service. +service Msg { + // CreateRecord defines a method for creating a new record. + rpc CreateRecord(MsgCreateRecord) returns (MsgCreateRecordResponse); +} + +// MsgCreateRecord defines an SDK message for creating a new record. +message MsgCreateRecord { + option (gogoproto.equal) = true; + + repeated Content contents = 1 [(gogoproto.nullable) = false]; + string creator = 2; +} + +// MsgCreateRecordResponse defines the Msg/CreateRecord response type. +message MsgCreateRecordResponse { + string id = 1; +} \ No newline at end of file diff --git a/proto/irismod/service/genesis.proto b/proto/irismod/service/genesis.proto new file mode 100644 index 00000000..408fd742 --- /dev/null +++ b/proto/irismod/service/genesis.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package irismod.service; + +import "gogoproto/gogo.proto"; +import "irismod/service/service.proto"; + +option go_package = "github.com/irisnet/irismod/modules/service/types"; + +// GenesisState defines the service module's genesis state. +message GenesisState { + Params params = 1 [ (gogoproto.nullable) = false ]; + repeated ServiceDefinition definitions = 2 [ (gogoproto.nullable) = false ]; + repeated ServiceBinding bindings = 3 [ (gogoproto.nullable) = false ]; + map withdraw_addresses = 4 [ (gogoproto.moretags) = "yaml:\"withdraw_addresses\"" ]; + map request_contexts = 5 [ (gogoproto.moretags) = "yaml:\"request_contexts\"" ]; +} \ No newline at end of file diff --git a/proto/irismod/service/query.proto b/proto/irismod/service/query.proto new file mode 100644 index 00000000..489e6a7d --- /dev/null +++ b/proto/irismod/service/query.proto @@ -0,0 +1,214 @@ +syntax = "proto3"; +package irismod.service; + +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "irismod/service/service.proto"; + +option go_package = "github.com/irisnet/irismod/modules/service/types"; + +// Query creates service with iservice as rpc +service Query { + // Definition returns service definition + rpc Definition(QueryDefinitionRequest) returns (QueryDefinitionResponse) { + option (google.api.http).get = "/irismod/service/definitions/{service_name}"; + } + + // Binding returns service Binding with service name and provider + rpc Binding(QueryBindingRequest) returns (QueryBindingResponse) { + option (google.api.http).get = "/irismod/service/bindings/{service_name}/{provider}"; + } + + // Bindings returns all service Bindings with service name and owner + rpc Bindings(QueryBindingsRequest) returns (QueryBindingsResponse) { + option (google.api.http).get = "/irismod/service/bindings/{service_name}"; + } + + // WithdrawAddress returns the withdraw address of the binding owner + rpc WithdrawAddress(QueryWithdrawAddressRequest) returns (QueryWithdrawAddressResponse) { + option (google.api.http).get = "/irismod/service/owners/{owner}/withdraw-address"; + } + + // RequestContext returns the request context + rpc RequestContext(QueryRequestContextRequest) returns (QueryRequestContextResponse) { + option (google.api.http).get = "/irismod/service/contexts/{request_context_id}"; + } + + // Request returns the request + rpc Request(QueryRequestRequest) returns (QueryRequestResponse) { + option (google.api.http).get = "/irismod/service/requests/{request_id}"; + } + + // Request returns all requests of one service with provider + rpc Requests(QueryRequestsRequest) returns (QueryRequestsResponse) { + option (google.api.http).get = "/irismod/service/requests/{service_name}/{provider}"; + } + + // RequestsByReqCtx returns all requests of one service call batch + rpc RequestsByReqCtx(QueryRequestsByReqCtxRequest) returns (QueryRequestsByReqCtxResponse) { + option (google.api.http).get = "/irismod/service/requests/{request_context_id}/{batch_counter}"; + } + + // Response returns the response of request + rpc Response(QueryResponseRequest) returns (QueryResponseResponse) { + option (google.api.http).get = "/irismod/service/responses/{request_id}"; + } + + // Responses returns all responses of one service call batch + rpc Responses(QueryResponsesRequest) returns (QueryResponsesResponse) { + option (google.api.http).get = "/irismod/service/responses/{request_context_id}/{batch_counter}"; + } + + // EarnedFees returns the earned service fee of one provider + rpc EarnedFees(QueryEarnedFeesRequest) returns (QueryEarnedFeesResponse) { + option (google.api.http).get = "/irismod/service/fees/{provider}"; + } + + // Schema returns the schema + rpc Schema(QuerySchemaRequest) returns (QuerySchemaResponse) { + option (google.api.http).get = "/irismod/service/schemas/{schema_name}"; + } + + // Params queries the service parameters + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/irismod/service/params"; + } +} + +// QueryDefinitionRequest is request type for the Query/Definition RPC method +message QueryDefinitionRequest { + string service_name = 1; +} + +// QueryDefinitionResponse is response type for the Query/Definition RPC method +message QueryDefinitionResponse { + ServiceDefinition service_definition = 1; +} + +// QueryBindingRequest is request type for the Query/Binding RPC method +message QueryBindingRequest { + string service_name = 1; + string provider = 2; +} + +// QueryDefinitionResponse is response type for the Query/Binding RPC method +message QueryBindingResponse { + ServiceBinding service_binding = 1; +} + +// QueryBindingsRequest is request type for the Query/Bindings RPC method +message QueryBindingsRequest { + string service_name = 1; + string owner = 2; +} + +// QueryDefinitionsResponse is response type for the Query/Bindings RPC method +message QueryBindingsResponse { + repeated ServiceBinding service_bindings = 1; +} + +// QueryWithdrawAddressRequest is request type for the Query/WithdrawAddress RPC method +message QueryWithdrawAddressRequest { + string owner = 1; +} + +// QueryWithdrawAddressResponse is response type for the Query/WithdrawAddress RPC method +message QueryWithdrawAddressResponse { + string withdraw_address = 1; +} + +// QueryRequestContextRequest is request type for the Query/RequestContext RPC method +message QueryRequestContextRequest { + string request_context_id = 1; +} + +// QueryRequestContextResponse is response type for the Query/RequestContext RPC method +message QueryRequestContextResponse { + RequestContext request_context = 1; +} + +// QueryRequestRequest is request type for the Query/Request RPC method +message QueryRequestRequest { + string request_id = 1; +} + +// QueryRequestResponse is response type for the Query/Request RPC method +message QueryRequestResponse { + Request request = 1; +} + +// QueryRequestsRequest is request type for the Query/Requests RPC method +message QueryRequestsRequest { + string service_name = 1; + string provider = 2; +} + +// QueryRequestsResponse is response type for the Query/Requests RPC method +message QueryRequestsResponse { + repeated Request requests = 1; +} + +// QueryRequestsByReqCtxRequest is request type for the Query/RequestsByReqCtx RPC method +message QueryRequestsByReqCtxRequest { + string request_context_id = 1; + uint64 batch_counter = 2; +} + +// QueryRequestsByReqCtxResponse is response type for the Query/RequestsByReqCtx RPC method +message QueryRequestsByReqCtxResponse { + repeated Request requests = 1; +} + +// QueryResponseRequest is request type for the Query/Response RPC method +message QueryResponseRequest { + string request_id = 1; +} + +// QueryResponseResponse is response type for the Query/Response RPC method +message QueryResponseResponse { + Response response = 1; +} + +// QueryResponsesRequest is request type for the Query/Responses RPC method +message QueryResponsesRequest { + string request_context_id = 1; + uint64 batch_counter = 2; +} + +// QueryResponsesResponse is response type for the Query/Responses RPC method +message QueryResponsesResponse { + repeated Response responses = 1; +} + +// QueryEarnedFeesRequest is request type for the Query/EarnedFees RPC method +message QueryEarnedFeesRequest { + string provider = 1; +} + +// QueryEarnedFeesResponse is response type for the Query/EarnedFees RPC method +message QueryEarnedFeesResponse { + repeated cosmos.base.v1beta1.Coin fees = 1 [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee\"" ]; +} + +// QuerySchemaRequest is request type for the Query/Schema RPC method +message QuerySchemaRequest { + string schema_name = 1; +} + +// QuerySchemaResponse is response type for the Query/Schema RPC method +message QuerySchemaResponse { + string schema = 1; +} + +// QueryParametersRequest is request type for the Query/Parameters RPC method +message QueryParamsRequest { +} + +// QueryParametersResponse is response type for the Query/Parameters RPC method +message QueryParamsResponse { + service.Params params = 1 [ (gogoproto.nullable) = false ]; + + cosmos.base.query.v1beta1.PageResponse res = 2; +} diff --git a/proto/irismod/service/service.proto b/proto/irismod/service/service.proto new file mode 100644 index 00000000..85f30909 --- /dev/null +++ b/proto/irismod/service/service.proto @@ -0,0 +1,152 @@ +syntax = "proto3"; +package irismod.service; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/irisnet/irismod/modules/service/types"; +option (gogoproto.goproto_getters_all) = false; + +// ServiceDefinition defines a standard for service definition. +message ServiceDefinition { + string name = 1; + string description = 2; + repeated string tags = 3; + string author = 4; + string author_description = 5 [(gogoproto.moretags) = "yaml:\"author_description\""]; + string schemas = 6; +} + +// ServiceBinding defines a standard for service binding. +message ServiceBinding { + string service_name = 1 [(gogoproto.moretags) = "yaml:\"service_name\""]; + string provider = 2; + repeated cosmos.base.v1beta1.Coin deposit = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + string pricing = 4; + uint64 qos = 5 [(gogoproto.customname) = "QoS"]; + string options = 6; + bool available = 7; + google.protobuf.Timestamp disabled_time = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"disabled_time\""]; + string owner = 9; +} + +// RequestContext defines a standard for request context. +message RequestContext { + string service_name = 1 [(gogoproto.moretags) = "yaml:\"service_name\""]; + repeated string providers = 2; + string consumer = 3; + string input = 4; + repeated cosmos.base.v1beta1.Coin service_fee_cap = 5 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee_cap\""]; + string module_name = 6 [(gogoproto.moretags) = "yaml:\"module_name\""]; + int64 timeout = 7; + bool super_mode = 8 [(gogoproto.moretags) = "yaml:\"super_mode\""]; + bool repeated = 9; + uint64 repeated_frequency = 10 [(gogoproto.moretags) = "yaml:\"repeated_frequency\""]; + int64 repeated_total = 11 [(gogoproto.moretags) = "yaml:\"repeated_total\""]; + uint64 batch_counter = 12 [(gogoproto.moretags) = "yaml:\"batch_counter\""]; + uint32 batch_request_count = 13 [(gogoproto.moretags) = "yaml:\"batch_request_count\""]; + uint32 batch_response_count = 14 [(gogoproto.moretags) = "yaml:\"batch_response_count\""]; + uint32 batch_response_threshold = 15 [(gogoproto.moretags) = "yaml:\"batch_response_threshold\""]; + uint32 response_threshold = 16 [(gogoproto.moretags) = "yaml:\"response_threshold\""]; + RequestContextBatchState batch_state = 17 [(gogoproto.moretags) = "yaml:\"batch_state\""]; + RequestContextState state = 18; +} + +// Request defines a standard for request. +message Request { + string id = 1; + string service_name = 2 [(gogoproto.moretags) = "yaml:\"service_name\""]; + string provider = 3; + string consumer = 4; + string input = 5; + repeated cosmos.base.v1beta1.Coin service_fee = 6 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee\""]; + bool super_mode = 7 [(gogoproto.moretags) = "yaml:\"super_mode\""]; + int64 request_height = 8 [(gogoproto.moretags) = "yaml:\"request_height\""]; + int64 expiration_height = 9 [(gogoproto.moretags) = "yaml:\"expiration_height\""]; + string request_context_id = 10 [(gogoproto.moretags) = "yaml:\"request_context_id\""]; + uint64 request_context_batch_counter = 11 [(gogoproto.moretags) = "yaml:\"request_context_batch_counter\""]; +} + +// CompactRequest defines a standard for compact request. +message CompactRequest { + string request_context_id = 1 [(gogoproto.moretags) = "yaml:\"request_context_id\""]; + uint64 request_context_batch_counter = 2 [(gogoproto.moretags) = "yaml:\"request_context_batch_counter\""]; + string provider = 3; + repeated cosmos.base.v1beta1.Coin service_fee = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee\""]; + int64 request_height = 5 [(gogoproto.moretags) = "yaml:\"request_height\""]; + int64 expiration_height = 6 [(gogoproto.moretags) = "yaml:\"expiration_height\""]; +} + +// Response defines a standard for response. +message Response { + string provider = 1; + string consumer = 2; + string result = 3; + string output = 4; + string request_context_id = 5 [(gogoproto.moretags) = "yaml:\"request_context_id\""]; + uint64 request_context_batch_counter = 6 [(gogoproto.moretags) = "yaml:\"request_context_batch_counter\""]; +} + +// Pricing defines a standard for service pricing. +message Pricing { + repeated cosmos.base.v1beta1.Coin price = 6 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + repeated PromotionByTime promotions_by_time = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"promotions_by_time\""]; + repeated PromotionByVolume promotions_by_volume = 3 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"promotions_by_volume\""]; +} + +// PromotionByTime defines a standard for service promotion by time. +message PromotionByTime { + google.protobuf.Timestamp start_time = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"start_time\""]; + google.protobuf.Timestamp end_time = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"end_time\""]; + string discount = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + +// PromotionByVolume defines a standard for service promotion by volume. +message PromotionByVolume { + uint64 volume = 1; + string discount = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} + +// RequestContextBatchState is a type alias that represents a request batch status as a byte +enum RequestContextBatchState { + option (gogoproto.enum_stringer) = true; + option (gogoproto.goproto_enum_stringer) = false; + option (gogoproto.goproto_enum_prefix) = false; + + // BATCH_RUNNING defines the running batch status. + BATCH_RUNNING = 0 [(gogoproto.enumvalue_customname) = "BATCHRUNNING"]; + // BATCH_COMPLETED defines the completed batch status. + BATCH_COMPLETED = 1 [(gogoproto.enumvalue_customname) = "BATCHCOMPLETED"]; +} + +// RequestContextState is a type alias that represents a request status as a byte +enum RequestContextState { + option (gogoproto.enum_stringer) = true; + option (gogoproto.goproto_enum_stringer) = false; + option (gogoproto.goproto_enum_prefix) = false; + + // RUNNING defines the running request context status. + RUNNING = 0 [(gogoproto.enumvalue_customname) = "RUNNING"]; + // PAUSED defines the paused request context status. + PAUSED = 1 [(gogoproto.enumvalue_customname) = "PAUSED"]; + // COMPLETED defines the completed request context status. + COMPLETED = 2 [(gogoproto.enumvalue_customname) = "COMPLETED"]; +} + +// service parameters +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + int64 max_request_timeout = 1 [(gogoproto.moretags) = "yaml:\"max_request_timeout\""]; + int64 min_deposit_multiple = 2 [(gogoproto.moretags) = "yaml:\"min_deposit_multiple\""]; + repeated cosmos.base.v1beta1.Coin min_deposit = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + string service_fee_tax = 4 [(gogoproto.moretags) = "yaml:\"service_fee_tax\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + string slash_fraction = 5 [(gogoproto.moretags) = "yaml:\"slash_fraction\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + google.protobuf.Duration complaint_retrospect = 6 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"complaint_retrospect\""]; + google.protobuf.Duration arbitration_time_limit = 7 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"arbitration_time_limit\""]; + uint64 tx_size_limit = 8 [(gogoproto.moretags) = "yaml:\"tx_size_limit\""]; + string base_denom = 9 [(gogoproto.moretags) = "yaml:\"base_denom\""]; +} diff --git a/proto/irismod/service/tx.proto b/proto/irismod/service/tx.proto new file mode 100644 index 00000000..e888c429 --- /dev/null +++ b/proto/irismod/service/tx.proto @@ -0,0 +1,217 @@ +syntax = "proto3"; +package irismod.service; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irismod/modules/service/types"; +option (gogoproto.goproto_getters_all) = false; + + +// Msg defines the oracle Msg service. +service Msg { + // DefineService defines a method for define a new service. + rpc DefineService(MsgDefineService) returns (MsgDefineServiceResponse); + + // BindService defines a method for bind a server. + rpc BindService(MsgBindService) returns (MsgBindServiceResponse); + + // UpdateServiceBinding defines a method for update a service binding. + rpc UpdateServiceBinding(MsgUpdateServiceBinding) returns (MsgUpdateServiceBindingResponse); + + // SetWithdrawAddress defines a method for setting a withdraw address. + rpc SetWithdrawAddress(MsgSetWithdrawAddress) returns (MsgSetWithdrawAddressResponse); + + // EnableServiceBinding defines a method for enabling a service binding. + rpc EnableServiceBinding(MsgEnableServiceBinding) returns (MsgEnableServiceBindingResponse); + + // DisableServiceBinding defines a method for disabling a service binding. + rpc DisableServiceBinding(MsgDisableServiceBinding) returns (MsgDisableServiceBindingResponse); + + // RefundServiceDeposit defines a method for refunding a fee. + rpc RefundServiceDeposit(MsgRefundServiceDeposit) returns (MsgRefundServiceDepositResponse); + + // CallService defines a method for calling a service. + rpc CallService(MsgCallService) returns (MsgCallServiceResponse); + + // RespondService defines a method for responding a service. + rpc RespondService(MsgRespondService) returns (MsgRespondServiceResponse); + + // PauseRequestContext defines a method for pausing a service call. + rpc PauseRequestContext(MsgPauseRequestContext) returns (MsgPauseRequestContextResponse); + + // StartRequestContext defines a method for starting a service call. + rpc StartRequestContext(MsgStartRequestContext) returns (MsgStartRequestContextResponse); + + // KillRequestContext defines a method for killing a service call. + rpc KillRequestContext(MsgKillRequestContext) returns (MsgKillRequestContextResponse); + + // UpdateRequestContext defines a method for updating a service call. + rpc UpdateRequestContext(MsgUpdateRequestContext) returns (MsgUpdateRequestContextResponse); + + // WithdrawEarnedFees defines a method for Withdrawing a earned fees. + rpc WithdrawEarnedFees(MsgWithdrawEarnedFees) returns (MsgWithdrawEarnedFeesResponse); +} + +// MsgDefineService defines an SDK message for defining a new service. +message MsgDefineService { + string name = 1; + string description = 2; + repeated string tags = 3; + string author = 4; + string author_description = 5 [(gogoproto.moretags) = "yaml:\"author_description\""]; + string schemas = 6; +} + + +// MsgDefineServiceResponse defines the Msg/DefineService response type. +message MsgDefineServiceResponse {} + +// MsgBindService defines an SDK message for binding to an existing service. +message MsgBindService { + string service_name = 1 [(gogoproto.moretags) = "yaml:\"service_name\""]; + string provider = 2; + repeated cosmos.base.v1beta1.Coin deposit = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + string pricing = 4; + uint64 qos = 5 [(gogoproto.customname) = "QoS"]; + string options = 6; + string owner = 7; +} + +// MsgBindServiceResponse defines the Msg/BindService response type. +message MsgBindServiceResponse {} + +// MsgUpdateServiceBinding defines an SDK message for updating an existing service binding. +message MsgUpdateServiceBinding { + string service_name = 1 [(gogoproto.moretags) = "yaml:\"service_name\""]; + string provider = 2; + repeated cosmos.base.v1beta1.Coin deposit = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + string pricing = 4; + uint64 qos = 5 [(gogoproto.customname) = "QoS"]; + string options = 6; + string owner = 7; +} + +// MsgUpdateServiceBindingResponse defines the Msg/UpdateServiceBinding response type. +message MsgUpdateServiceBindingResponse {} + +// MsgSetWithdrawAddress defines an SDK message to set the withdrawal address for a provider. +message MsgSetWithdrawAddress { + string owner = 1; + string withdraw_address = 2 [(gogoproto.moretags) = "yaml:\"withdraw_address\""]; +} + +// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. +message MsgSetWithdrawAddressResponse {} + +// MsgDisableServiceBinding defines an SDK message to disable a service binding. +message MsgDisableServiceBinding { + string service_name = 1 [(gogoproto.moretags) = "yaml:\"service_name\""]; + string provider = 2; + string owner = 3; +} + +// MsgDisableServiceBindingResponse defines the Msg/DisableServiceBinding response type. +message MsgDisableServiceBindingResponse {} + +// MsgEnableServiceBinding defines an SDK message to enable a service binding. +message MsgEnableServiceBinding { + string service_name = 1 [(gogoproto.moretags) = "yaml:\"service_name\""]; + string provider = 2; + repeated cosmos.base.v1beta1.Coin deposit = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; + string owner = 4; +} + +// MsgEnableServiceBindingResponse defines the Msg/EnableServiceBinding response type. +message MsgEnableServiceBindingResponse {} + +// MsgRefundServiceDeposit defines an SDK message to refund deposit from a service binding. +message MsgRefundServiceDeposit { + string service_name = 1 [(gogoproto.moretags) = "yaml:\"service_name\""]; + string provider = 2; + string owner = 3; +} + +// MsgRefundServiceDepositResponse defines the Msg/RefundServiceDeposit response type. +message MsgRefundServiceDepositResponse {} + + +// MsgCallService defines an SDK message to initiate a service request context. +message MsgCallService { + string service_name = 1 [(gogoproto.moretags) = "yaml:\"service_name\""]; + repeated string providers = 2; + string consumer = 3; + string input = 4; + repeated cosmos.base.v1beta1.Coin service_fee_cap = 5 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee_cap\""]; + int64 timeout = 6; + bool super_mode = 7 [(gogoproto.moretags) = "yaml:\"super_mode\""]; + bool repeated = 8; + uint64 repeated_frequency = 9 [(gogoproto.moretags) = "yaml:\"repeated_frequency\""]; + int64 repeated_total = 10 [(gogoproto.moretags) = "yaml:\"repeated_total\""]; +} + +// MsgCallServiceResponse defines the Msg/CallService response type. +message MsgCallServiceResponse { + string request_context_id = 1 [(gogoproto.moretags) = "yaml:\"request_context_id\""]; +} + +// MsgRespondService defines an SDK message to respond a service request. +message MsgRespondService { + string request_id = 1 [(gogoproto.moretags) = "yaml:\"request_id\""]; + string provider = 2; + string result = 3; + string output = 4; +} + +// MsgRespondService defines the Msg/RespondService response type. +message MsgRespondServiceResponse {} + +// MsgPauseRequestContext defines an SDK message to pause a service request. +message MsgPauseRequestContext { + string request_context_id = 1 [(gogoproto.moretags) = "yaml:\"request_context_id\""]; + string consumer = 2; +} + +// MsgPauseRequestContextResponse defines the Msg/PauseRequestContext response type. +message MsgPauseRequestContextResponse {} + +// MsgStartRequestContext defines an SDK message to resume a service request. +message MsgStartRequestContext { + string request_context_id = 1 [(gogoproto.moretags) = "yaml:\"request_context_id\""]; + string consumer = 2; +} + +// MsgStartRequestContextResponse defines the Msg/StartRequestContext response type. +message MsgStartRequestContextResponse {} + +// MsgKillRequestContext defines an SDK message to terminate a service request. +message MsgKillRequestContext { + string request_context_id = 1 [(gogoproto.moretags) = "yaml:\"request_context_id\""]; + string consumer = 2; +} + +// MsgKillRequestContextResponse defines the Msg/KillRequestContext response type. +message MsgKillRequestContextResponse {} + +// MsgUpdateRequestContext defines an SDK message to update a service request context. +message MsgUpdateRequestContext { + string request_context_id = 1 [(gogoproto.moretags) = "yaml:\"request_context_id\""]; + repeated string providers = 2; + string consumer = 3; + repeated cosmos.base.v1beta1.Coin service_fee_cap = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"service_fee_cap\""]; + int64 timeout = 5; + uint64 repeated_frequency = 6 [(gogoproto.moretags) = "yaml:\"repeated_frequency\""]; + int64 repeated_total = 7 [(gogoproto.moretags) = "yaml:\"repeated_total\""]; +} + +// MsgUpdateRequestContextResponse defines the Msg/UpdateRequestContext response type. +message MsgUpdateRequestContextResponse {} + +// MsgWithdrawEarnedFees defines an SDK message to withdraw the fees earned by the provider or owner. +message MsgWithdrawEarnedFees { + string owner = 1; + string provider = 2; +} + +// MsgWithdrawEarnedFeesResponse defines the Msg/WithdrawEarnedFees response type. +message MsgWithdrawEarnedFeesResponse {} \ No newline at end of file diff --git a/proto/irismod/token/genesis.proto b/proto/irismod/token/genesis.proto new file mode 100644 index 00000000..36ee418d --- /dev/null +++ b/proto/irismod/token/genesis.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; +package irismod.token; + +import "gogoproto/gogo.proto"; +import "irismod/token/token.proto"; + +option go_package = "github.com/irisnet/irismod/modules/token/types"; + +// GenesisState defines the token module's genesis state. +message GenesisState { + Params params = 1 [(gogoproto.nullable) = false]; + repeated Token tokens = 2 [(gogoproto.nullable) = false]; +} + diff --git a/proto/irismod/token/query.proto b/proto/irismod/token/query.proto new file mode 100644 index 00000000..b28a7aa5 --- /dev/null +++ b/proto/irismod/token/query.proto @@ -0,0 +1,75 @@ +syntax = "proto3"; +package irismod.token; + +import "cosmos/base/v1beta1/coin.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "google/protobuf/any.proto"; +import "irismod/token/token.proto"; + +option go_package = "github.com/irisnet/irismod/modules/token/types"; + +// Query creates service with token as rpc +service Query { + // Token returns token with token name + rpc Token(QueryTokenRequest) returns (QueryTokenResponse) { + option (google.api.http).get = "/irismod/token/tokens/{denom}"; + } + // Tokens returns the token list + rpc Tokens(QueryTokensRequest) returns (QueryTokensResponse) { + option (google.api.http).get = "/irismod/token/tokens"; + } + // Fees returns the fees to issue or mint a token + rpc Fees(QueryFeesRequest) returns (QueryFeesResponse) { + option (google.api.http).get = "/irismod/token/tokens/{symbol}/fees"; + } + // Params queries the token parameters + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/irismod/token/params"; + } +} + +// QueryTokenRequest is request type for the Query/Token RPC method +message QueryTokenRequest { + string denom = 1; +} + +// QueryTokenResponse is response type for the Query/Token RPC method +message QueryTokenResponse { + google.protobuf.Any Token = 1 [(cosmos_proto.accepts_interface) = "ContentI"]; +} + +// QueryTokensRequest is request type for the Query/Tokens RPC method +message QueryTokensRequest { + string owner = 1; +} + +// QueryTokensResponse is response type for the Query/Tokens RPC method +message QueryTokensResponse { + repeated google.protobuf.Any Tokens = 1 [(cosmos_proto.accepts_interface) = "ContentI"]; +} + +// QueryFeesRequest is request type for the Query/Fees RPC method +message QueryFeesRequest { + string symbol = 1; +} + +// QueryFeesResponse is response type for the Query/Fees RPC method +message QueryFeesResponse { + bool exist = 1; + cosmos.base.v1beta1.Coin issue_fee = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"issue_fee\"", (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.Coin"]; + cosmos.base.v1beta1.Coin mint_fee = 3 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"mint_fee\"", (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.Coin"]; +} + +// QueryParametersRequest is request type for the Query/Parameters RPC method +message QueryParamsRequest { +} + +// QueryParametersResponse is response type for the Query/Parameters RPC method +message QueryParamsResponse { + token.Params params = 1 [(gogoproto.nullable) = false]; + + cosmos.base.query.v1beta1.PageResponse res = 2; +} diff --git a/proto/irismod/token/token.proto b/proto/irismod/token/token.proto new file mode 100644 index 00000000..f9346373 --- /dev/null +++ b/proto/irismod/token/token.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; +package irismod.token; + +import "cosmos/base/v1beta1/coin.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irismod/modules/token/types"; +option (gogoproto.goproto_getters_all) = false; + +// Token defines a standard for the fungible token +message Token { + option (gogoproto.goproto_stringer) = false; + option (gogoproto.goproto_getters) = false; + + string symbol = 1; + string name = 2; + uint32 scale = 3; + string min_unit = 4 [(gogoproto.moretags) = "yaml:\"min_unit\""]; + uint64 initial_supply = 5 [(gogoproto.moretags) = "yaml:\"initial_supply\""]; + uint64 max_supply = 6 [(gogoproto.moretags) = "yaml:\"max_supply\""]; + bool mintable = 7; + string owner = 8; +} + +// token parameters +message Params { + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + string token_tax_rate = 1 [(gogoproto.moretags) = "yaml:\"token_tax_rate\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; + + cosmos.base.v1beta1.Coin issue_token_base_fee = 2 [(gogoproto.moretags) = "yaml:\"issue_token_base_fee\"", (gogoproto.nullable) = false]; + + string mint_token_fee_ratio = 3 [(gogoproto.moretags) = "yaml:\"mint_token_fee_ratio\"", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; +} diff --git a/proto/irismod/token/tx.proto b/proto/irismod/token/tx.proto new file mode 100644 index 00000000..31e68012 --- /dev/null +++ b/proto/irismod/token/tx.proto @@ -0,0 +1,70 @@ +syntax = "proto3"; +package irismod.token; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/irisnet/irismod/modules/token/types"; +option (gogoproto.goproto_getters_all) = false; + +// Msg defines the oracle Msg service. +service Msg { + // IssueToken defines a method for issuing a new token. + rpc IssueToken(MsgIssueToken) returns (MsgIssueTokenResponse); + + // EditToken defines a method for editing a token. + rpc EditToken(MsgEditToken) returns (MsgEditTokenResponse); + + // MintToken defines a method for minting some tokens. + rpc MintToken(MsgMintToken) returns (MsgMintTokenResponse); + + // TransferTokenOwner defines a method for minting some tokens. + rpc TransferTokenOwner(MsgTransferTokenOwner) returns (MsgTransferTokenOwnerResponse); +} + +// MsgIssueToken defines an SDK message for issuing a new token. +message MsgIssueToken { + string symbol = 1; + string name = 2; + uint32 scale = 3; + string min_unit = 4 [(gogoproto.moretags) = "yaml:\"min_unit\""]; + uint64 initial_supply = 5 [(gogoproto.moretags) = "yaml:\"initial_supply\""]; + uint64 max_supply = 6 [(gogoproto.moretags) = "yaml:\"max_supply\""]; + bool mintable = 7; + string owner = 8; +} + +// MsgIssueTokenResponse defines the Msg/IssueToken response type. +message MsgIssueTokenResponse {} + +// MsgMintToken defines an SDK message for transferring the token owner. +message MsgTransferTokenOwner { + string src_owner = 1 [(gogoproto.moretags) = "yaml:\"src_owner\""]; + string dst_owner = 2 [(gogoproto.moretags) = "yaml:\"dst_owner\""]; + string symbol = 3; +} + +// MsgTransferTokenOwnerResponse defines the Msg/TransferTokenOwner response type. +message MsgTransferTokenOwnerResponse {} + +// MsgEditToken defines an SDK message for editing a new token. +message MsgEditToken { + string symbol = 1; + string name = 2; + uint64 max_supply = 3 [(gogoproto.moretags) = "yaml:\"max_supply\""]; + string mintable = 4 [(gogoproto.casttype) = "Bool"]; + string owner = 5; +} + +// MsgEditTokenResponse defines the Msg/EditToken response type. +message MsgEditTokenResponse {} + +// MsgMintToken defines an SDK message for minting a new token. +message MsgMintToken { + string symbol = 1; + uint64 amount = 2; + string to = 3; + string owner = 4; +} + +// MsgMintTokenResponse defines the Msg/MintToken response type. +message MsgMintTokenResponse {} \ No newline at end of file diff --git a/proto/third_party/confio/proofs.proto b/proto/third_party/confio/proofs.proto new file mode 100644 index 00000000..da43503e --- /dev/null +++ b/proto/third_party/confio/proofs.proto @@ -0,0 +1,234 @@ +syntax = "proto3"; + +package ics23; +option go_package = "github.com/confio/ics23/go"; + +enum HashOp { + // NO_HASH is the default if no data passed. Note this is an illegal argument some places. + NO_HASH = 0; + SHA256 = 1; + SHA512 = 2; + KECCAK = 3; + RIPEMD160 = 4; + BITCOIN = 5; // ripemd160(sha256(x)) +} + +/** +LengthOp defines how to process the key and value of the LeafOp +to include length information. After encoding the length with the given +algorithm, the length will be prepended to the key and value bytes. +(Each one with it's own encoded length) +*/ +enum LengthOp { + // NO_PREFIX don't include any length info + NO_PREFIX = 0; + // VAR_PROTO uses protobuf (and go-amino) varint encoding of the length + VAR_PROTO = 1; + // VAR_RLP uses rlp int encoding of the length + VAR_RLP = 2; + // FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer + FIXED32_BIG = 3; + // FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer + FIXED32_LITTLE = 4; + // FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer + FIXED64_BIG = 5; + // FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer + FIXED64_LITTLE = 6; + // REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) + REQUIRE_32_BYTES = 7; + // REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) + REQUIRE_64_BYTES = 8; +} + +/** +ExistenceProof takes a key and a value and a set of steps to perform on it. +The result of peforming all these steps will provide a "root hash", which can +be compared to the value in a header. + +Since it is computationally infeasible to produce a hash collission for any of the used +cryptographic hash functions, if someone can provide a series of operations to transform +a given key and value into a root hash that matches some trusted root, these key and values +must be in the referenced merkle tree. + +The only possible issue is maliablity in LeafOp, such as providing extra prefix data, +which should be controlled by a spec. Eg. with lengthOp as NONE, + prefix = FOO, key = BAR, value = CHOICE +and + prefix = F, key = OOBAR, value = CHOICE +would produce the same value. + +With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field +in the ProofSpec is valuable to prevent this mutability. And why all trees should +length-prefix the data before hashing it. +*/ +message ExistenceProof { + bytes key = 1; + bytes value = 2; + LeafOp leaf = 3; + repeated InnerOp path = 4; +} + +/* +NonExistenceProof takes a proof of two neighbors, one left of the desired key, +one right of the desired key. If both proofs are valid AND they are neighbors, +then there is no valid proof for the given key. +*/ +message NonExistenceProof { + bytes key = 1; // TODO: remove this as unnecessary??? we prove a range + ExistenceProof left = 2; + ExistenceProof right = 3; +} + +/* +CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages +*/ +message CommitmentProof { + oneof proof { + ExistenceProof exist = 1; + NonExistenceProof nonexist = 2; + BatchProof batch = 3; + CompressedBatchProof compressed = 4; + } +} + +/** +LeafOp represents the raw key-value data we wish to prove, and +must be flexible to represent the internal transformation from +the original key-value pairs into the basis hash, for many existing +merkle trees. + +key and value are passed in. So that the signature of this operation is: + leafOp(key, value) -> output + +To process this, first prehash the keys and values if needed (ANY means no hash in this case): + hkey = prehashKey(key) + hvalue = prehashValue(value) + +Then combine the bytes, and hash it + output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) +*/ +message LeafOp { + HashOp hash = 1; + HashOp prehash_key = 2; + HashOp prehash_value = 3; + LengthOp length = 4; + // prefix is a fixed bytes that may optionally be included at the beginning to differentiate + // a leaf node from an inner node. + bytes prefix = 5; +} + +/** +InnerOp represents a merkle-proof step that is not a leaf. +It represents concatenating two children and hashing them to provide the next result. + +The result of the previous step is passed in, so the signature of this op is: + innerOp(child) -> output + +The result of applying InnerOp should be: + output = op.hash(op.prefix || child || op.suffix) + + where the || operator is concatenation of binary data, +and child is the result of hashing all the tree below this step. + +Any special data, like prepending child with the length, or prepending the entire operation with +some value to differentiate from leaf nodes, should be included in prefix and suffix. +If either of prefix or suffix is empty, we just treat it as an empty string +*/ +message InnerOp { + HashOp hash = 1; + bytes prefix = 2; + bytes suffix = 3; +} + + +/** +ProofSpec defines what the expected parameters are for a given proof type. +This can be stored in the client and used to validate any incoming proofs. + + verify(ProofSpec, Proof) -> Proof | Error + +As demonstrated in tests, if we don't fix the algorithm used to calculate the +LeafHash for a given tree, there are many possible key-value pairs that can +generate a given hash (by interpretting the preimage differently). +We need this for proper security, requires client knows a priori what +tree format server uses. But not in code, rather a configuration object. +*/ +message ProofSpec { + // any field in the ExistenceProof must be the same as in this spec. + // except Prefix, which is just the first bytes of prefix (spec can be longer) + LeafOp leaf_spec = 1; + InnerSpec inner_spec = 2; + // max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) + int32 max_depth = 3; + // min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) + int32 min_depth = 4; +} + +/* +InnerSpec contains all store-specific structure info to determine if two proofs from a +given store are neighbors. + +This enables: + + isLeftMost(spec: InnerSpec, op: InnerOp) + isRightMost(spec: InnerSpec, op: InnerOp) + isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) +*/ +message InnerSpec { + // Child order is the ordering of the children node, must count from 0 + // iavl tree is [0, 1] (left then right) + // merk is [0, 2, 1] (left, right, here) + repeated int32 child_order = 1; + int32 child_size = 2; + int32 min_prefix_length = 3; + int32 max_prefix_length = 4; + // empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) + bytes empty_child = 5; + // hash is the algorithm that must be used for each InnerOp + HashOp hash = 6; +} + +/* +BatchProof is a group of multiple proof types than can be compressed +*/ +message BatchProof { + repeated BatchEntry entries = 1; +} + +// Use BatchEntry not CommitmentProof, to avoid recursion +message BatchEntry { + oneof proof { + ExistenceProof exist = 1; + NonExistenceProof nonexist = 2; + } +} + + +/****** all items here are compressed forms *******/ + +message CompressedBatchProof { + repeated CompressedBatchEntry entries = 1; + repeated InnerOp lookup_inners = 2; +} + +// Use BatchEntry not CommitmentProof, to avoid recursion +message CompressedBatchEntry { + oneof proof { + CompressedExistenceProof exist = 1; + CompressedNonExistenceProof nonexist = 2; + } +} + +message CompressedExistenceProof { + bytes key = 1; + bytes value = 2; + LeafOp leaf = 3; + // these are indexes into the lookup_inners table in CompressedBatchProof + repeated int32 path = 4; +} + +message CompressedNonExistenceProof { + bytes key = 1; // TODO: remove this as unnecessary??? we prove a range + CompressedExistenceProof left = 2; + CompressedExistenceProof right = 3; +} diff --git a/proto/third_party/cosmos_proto/cosmos.proto b/proto/third_party/cosmos_proto/cosmos.proto new file mode 100644 index 00000000..167b1707 --- /dev/null +++ b/proto/third_party/cosmos_proto/cosmos.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package cosmos_proto; + +import "google/protobuf/descriptor.proto"; + +option go_package = "github.com/regen-network/cosmos-proto"; + +extend google.protobuf.MessageOptions { + string interface_type = 93001; + + string implements_interface = 93002; +} + +extend google.protobuf.FieldOptions { + string accepts_interface = 93001; +} diff --git a/proto/third_party/gogoproto/gogo.proto b/proto/third_party/gogoproto/gogo.proto new file mode 100644 index 00000000..49e78f99 --- /dev/null +++ b/proto/third_party/gogoproto/gogo.proto @@ -0,0 +1,145 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package gogoproto; + +import "google/protobuf/descriptor.proto"; + +option java_package = "com.google.protobuf"; +option java_outer_classname = "GoGoProtos"; +option go_package = "github.com/gogo/protobuf/gogoproto"; + +extend google.protobuf.EnumOptions { + optional bool goproto_enum_prefix = 62001; + optional bool goproto_enum_stringer = 62021; + optional bool enum_stringer = 62022; + optional string enum_customname = 62023; + optional bool enumdecl = 62024; +} + +extend google.protobuf.EnumValueOptions { + optional string enumvalue_customname = 66001; +} + +extend google.protobuf.FileOptions { + optional bool goproto_getters_all = 63001; + optional bool goproto_enum_prefix_all = 63002; + optional bool goproto_stringer_all = 63003; + optional bool verbose_equal_all = 63004; + optional bool face_all = 63005; + optional bool gostring_all = 63006; + optional bool populate_all = 63007; + optional bool stringer_all = 63008; + optional bool onlyone_all = 63009; + + optional bool equal_all = 63013; + optional bool description_all = 63014; + optional bool testgen_all = 63015; + optional bool benchgen_all = 63016; + optional bool marshaler_all = 63017; + optional bool unmarshaler_all = 63018; + optional bool stable_marshaler_all = 63019; + + optional bool sizer_all = 63020; + + optional bool goproto_enum_stringer_all = 63021; + optional bool enum_stringer_all = 63022; + + optional bool unsafe_marshaler_all = 63023; + optional bool unsafe_unmarshaler_all = 63024; + + optional bool goproto_extensions_map_all = 63025; + optional bool goproto_unrecognized_all = 63026; + optional bool gogoproto_import = 63027; + optional bool protosizer_all = 63028; + optional bool compare_all = 63029; + optional bool typedecl_all = 63030; + optional bool enumdecl_all = 63031; + + optional bool goproto_registration = 63032; + optional bool messagename_all = 63033; + + optional bool goproto_sizecache_all = 63034; + optional bool goproto_unkeyed_all = 63035; +} + +extend google.protobuf.MessageOptions { + optional bool goproto_getters = 64001; + optional bool goproto_stringer = 64003; + optional bool verbose_equal = 64004; + optional bool face = 64005; + optional bool gostring = 64006; + optional bool populate = 64007; + optional bool stringer = 67008; + optional bool onlyone = 64009; + + optional bool equal = 64013; + optional bool description = 64014; + optional bool testgen = 64015; + optional bool benchgen = 64016; + optional bool marshaler = 64017; + optional bool unmarshaler = 64018; + optional bool stable_marshaler = 64019; + + optional bool sizer = 64020; + + optional bool unsafe_marshaler = 64023; + optional bool unsafe_unmarshaler = 64024; + + optional bool goproto_extensions_map = 64025; + optional bool goproto_unrecognized = 64026; + + optional bool protosizer = 64028; + optional bool compare = 64029; + + optional bool typedecl = 64030; + + optional bool messagename = 64033; + + optional bool goproto_sizecache = 64034; + optional bool goproto_unkeyed = 64035; +} + +extend google.protobuf.FieldOptions { + optional bool nullable = 65001; + optional bool embed = 65002; + optional string customtype = 65003; + optional string customname = 65004; + optional string jsontag = 65005; + optional string moretags = 65006; + optional string casttype = 65007; + optional string castkey = 65008; + optional string castvalue = 65009; + + optional bool stdtime = 65010; + optional bool stdduration = 65011; + optional bool wktpointer = 65012; + + optional string castrepeated = 65013; +} diff --git a/proto/third_party/google/api/annotations.proto b/proto/third_party/google/api/annotations.proto new file mode 100644 index 00000000..85c361b4 --- /dev/null +++ b/proto/third_party/google/api/annotations.proto @@ -0,0 +1,31 @@ +// Copyright (c) 2015, Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +import "google/api/http.proto"; +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "AnnotationsProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.MethodOptions { + // See `HttpRule`. + HttpRule http = 72295728; +} diff --git a/proto/third_party/google/api/http.proto b/proto/third_party/google/api/http.proto new file mode 100644 index 00000000..2bd3a19b --- /dev/null +++ b/proto/third_party/google/api/http.proto @@ -0,0 +1,318 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.api; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "HttpProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + + +// Defines the HTTP configuration for an API service. It contains a list of +// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method +// to one or more HTTP REST API methods. +message Http { + // A list of HTTP configuration rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated HttpRule rules = 1; + + // When set to true, URL path parmeters will be fully URI-decoded except in + // cases of single segment matches in reserved expansion, where "%2F" will be + // left encoded. + // + // The default behavior is to not decode RFC 6570 reserved characters in multi + // segment matches. + bool fully_decode_reserved_expansion = 2; +} + +// `HttpRule` defines the mapping of an RPC method to one or more HTTP +// REST API methods. The mapping specifies how different portions of the RPC +// request message are mapped to URL path, URL query parameters, and +// HTTP request body. The mapping is typically specified as an +// `google.api.http` annotation on the RPC method, +// see "google/api/annotations.proto" for details. +// +// The mapping consists of a field specifying the path template and +// method kind. The path template can refer to fields in the request +// message, as in the example below which describes a REST GET +// operation on a resource collection of messages: +// +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // mapped to the URL +// SubMessage sub = 2; // `sub.subfield` is url-mapped +// } +// message Message { +// string text = 1; // content of the resource +// } +// +// The same http annotation can alternatively be expressed inside the +// `GRPC API Configuration` YAML file. +// +// http: +// rules: +// - selector: .Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// This definition enables an automatic, bidrectional mapping of HTTP +// JSON to RPC. Example: +// +// HTTP | RPC +// -----|----- +// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` +// +// In general, not only fields but also field paths can be referenced +// from a path pattern. Fields mapped to the path pattern cannot be +// repeated and must have a primitive (non-message) type. +// +// Any fields in the request message which are not bound by the path +// pattern automatically become (optional) HTTP query +// parameters. Assume the following definition of the request message: +// +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http).get = "/v1/messages/{message_id}"; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // mapped to the URL +// int64 revision = 2; // becomes a parameter +// SubMessage sub = 3; // `sub.subfield` becomes a parameter +// } +// +// +// This enables a HTTP JSON to RPC mapping as below: +// +// HTTP | RPC +// -----|----- +// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` +// +// Note that fields which are mapped to HTTP parameters must have a +// primitive type or a repeated primitive type. Message types are not +// allowed. In the case of a repeated type, the parameter can be +// repeated in the URL, as in `...?param=A¶m=B`. +// +// For HTTP method kinds which allow a request body, the `body` field +// specifies the mapping. Consider a REST update method on the +// message resource collection: +// +// +// service Messaging { +// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { +// option (google.api.http) = { +// put: "/v1/messages/{message_id}" +// body: "message" +// }; +// } +// } +// message UpdateMessageRequest { +// string message_id = 1; // mapped to the URL +// Message message = 2; // mapped to the body +// } +// +// +// The following HTTP JSON to RPC mapping is enabled, where the +// representation of the JSON in the request body is determined by +// protos JSON encoding: +// +// HTTP | RPC +// -----|----- +// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` +// +// The special name `*` can be used in the body mapping to define that +// every field not bound by the path template should be mapped to the +// request body. This enables the following alternative definition of +// the update method: +// +// service Messaging { +// rpc UpdateMessage(Message) returns (Message) { +// option (google.api.http) = { +// put: "/v1/messages/{message_id}" +// body: "*" +// }; +// } +// } +// message Message { +// string message_id = 1; +// string text = 2; +// } +// +// +// The following HTTP JSON to RPC mapping is enabled: +// +// HTTP | RPC +// -----|----- +// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` +// +// Note that when using `*` in the body mapping, it is not possible to +// have HTTP parameters, as all fields not bound by the path end in +// the body. This makes this option more rarely used in practice of +// defining REST APIs. The common usage of `*` is in custom methods +// which don't use the URL at all for transferring data. +// +// It is possible to define multiple HTTP methods for one RPC by using +// the `additional_bindings` option. Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/messages/{message_id}" +// additional_bindings { +// get: "/v1/users/{user_id}/messages/{message_id}" +// } +// }; +// } +// } +// message GetMessageRequest { +// string message_id = 1; +// string user_id = 2; +// } +// +// +// This enables the following two alternative HTTP JSON to RPC +// mappings: +// +// HTTP | RPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` +// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` +// +// # Rules for HTTP mapping +// +// The rules for mapping HTTP path, query parameters, and body fields +// to the request message are as follows: +// +// 1. The `body` field specifies either `*` or a field path, or is +// omitted. If omitted, it indicates there is no HTTP request body. +// 2. Leaf fields (recursive expansion of nested messages in the +// request) can be classified into three types: +// (a) Matched in the URL template. +// (b) Covered by body (if body is `*`, everything except (a) fields; +// else everything under the body field) +// (c) All other fields. +// 3. URL query parameters found in the HTTP request are mapped to (c) fields. +// 4. Any body sent with an HTTP request can contain only (b) fields. +// +// The syntax of the path template is as follows: +// +// Template = "/" Segments [ Verb ] ; +// Segments = Segment { "/" Segment } ; +// Segment = "*" | "**" | LITERAL | Variable ; +// Variable = "{" FieldPath [ "=" Segments ] "}" ; +// FieldPath = IDENT { "." IDENT } ; +// Verb = ":" LITERAL ; +// +// The syntax `*` matches a single path segment. The syntax `**` matches zero +// or more path segments, which must be the last part of the path except the +// `Verb`. The syntax `LITERAL` matches literal text in the path. +// +// The syntax `Variable` matches part of the URL path as specified by its +// template. A variable template must not contain other variables. If a variable +// matches a single path segment, its template may be omitted, e.g. `{var}` +// is equivalent to `{var=*}`. +// +// If a variable contains exactly one path segment, such as `"{var}"` or +// `"{var=*}"`, when such a variable is expanded into a URL path, all characters +// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the +// Discovery Document as `{var}`. +// +// If a variable contains one or more path segments, such as `"{var=foo/*}"` +// or `"{var=**}"`, when such a variable is expanded into a URL path, all +// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables +// show up in the Discovery Document as `{+var}`. +// +// NOTE: While the single segment variable matches the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 +// Simple String Expansion, the multi segment variable **does not** match +// RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion +// does not expand special characters like `?` and `#`, which would lead +// to invalid URLs. +// +// NOTE: the field paths in variables and in the `body` must not refer to +// repeated fields or map fields. +message HttpRule { + // Selects methods to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. + string selector = 1; + + // Determines the URL pattern is matched by this rules. This pattern can be + // used with any of the {get|put|post|delete|patch} methods. A custom method + // can be defined using the 'custom' field. + oneof pattern { + // Used for listing and getting information about resources. + string get = 2; + + // Used for updating a resource. + string put = 3; + + // Used for creating a resource. + string post = 4; + + // Used for deleting a resource. + string delete = 5; + + // Used for updating a resource. + string patch = 6; + + // The custom pattern is used for specifying an HTTP method that is not + // included in the `pattern` field, such as HEAD, or "*" to leave the + // HTTP method unspecified for this rule. The wild-card rule is useful + // for services that provide content to Web (HTML) clients. + CustomHttpPattern custom = 8; + } + + // The name of the request field whose value is mapped to the HTTP body, or + // `*` for mapping all fields not captured by the path pattern to the HTTP + // body. NOTE: the referred field must not be a repeated field and must be + // present at the top-level of request message type. + string body = 7; + + // Optional. The name of the response field whose value is mapped to the HTTP + // body of response. Other response fields are ignored. When + // not set, the response message will be used as HTTP body of response. + string response_body = 12; + + // Additional HTTP bindings for the selector. Nested bindings must + // not contain an `additional_bindings` field themselves (that is, + // the nesting may only be one level deep). + repeated HttpRule additional_bindings = 11; +} + +// A custom pattern is used for defining custom HTTP verb. +message CustomHttpPattern { + // The name of this custom HTTP verb. + string kind = 1; + + // The path matched by this custom verb. + string path = 2; +} diff --git a/proto/third_party/google/api/httpbody.proto b/proto/third_party/google/api/httpbody.proto new file mode 100644 index 00000000..4428515c --- /dev/null +++ b/proto/third_party/google/api/httpbody.proto @@ -0,0 +1,78 @@ +// Copyright 2018 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.api; + +import "google/protobuf/any.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody"; +option java_multiple_files = true; +option java_outer_classname = "HttpBodyProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Message that represents an arbitrary HTTP body. It should only be used for +// payload formats that can't be represented as JSON, such as raw binary or +// an HTML page. +// +// +// This message can be used both in streaming and non-streaming API methods in +// the request as well as the response. +// +// It can be used as a top-level request field, which is convenient if one +// wants to extract parameters from either the URL or HTTP template into the +// request fields and also want access to the raw HTTP body. +// +// Example: +// +// message GetResourceRequest { +// // A unique request id. +// string request_id = 1; +// +// // The raw HTTP body is bound to this field. +// google.api.HttpBody http_body = 2; +// } +// +// service ResourceService { +// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); +// rpc UpdateResource(google.api.HttpBody) returns +// (google.protobuf.Empty); +// } +// +// Example with streaming methods: +// +// service CaldavService { +// rpc GetCalendar(stream google.api.HttpBody) +// returns (stream google.api.HttpBody); +// rpc UpdateCalendar(stream google.api.HttpBody) +// returns (stream google.api.HttpBody); +// } +// +// Use of this type only changes how the request and response bodies are +// handled, all other features will continue to work unchanged. +message HttpBody { + // The HTTP Content-Type header value specifying the content type of the body. + string content_type = 1; + + // The HTTP request/response body as raw binary. + bytes data = 2; + + // Application specific response metadata. Must be set in the first response + // for streaming APIs. + repeated google.protobuf.Any extensions = 3; +} \ No newline at end of file diff --git a/proto/third_party/google/protobuf/any.proto b/proto/third_party/google/protobuf/any.proto new file mode 100644 index 00000000..1431810e --- /dev/null +++ b/proto/third_party/google/protobuf/any.proto @@ -0,0 +1,161 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +import "gogoproto/gogo.proto"; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "AnyProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// any.Unpack(foo) +// ... +// +// Example 4: Pack and unpack a message in Go +// +// foo := &pb.Foo{...} +// any, err := ptypes.MarshalAny(foo) +// ... +// foo := &pb.Foo{} +// if err := ptypes.UnmarshalAny(any, foo); err != nil { +// ... +// } +// +// The pack methods provided by protobuf library will by default use +// 'type.googleapis.com/full.type.name' as the type URL and the unpack +// methods only use the fully qualified type name after the last '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// +message Any { + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. This string must contain at least + // one "/" character. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + // + string type_url = 1; + + // Must be a valid serialized protocol buffer of the above specified type. + bytes value = 2; + + option (gogoproto.typedecl) = false; +} + +option (gogoproto.goproto_registration) = false; diff --git a/proto/third_party/tendermint/abci/types.proto b/proto/third_party/tendermint/abci/types.proto new file mode 100644 index 00000000..2cbcabb2 --- /dev/null +++ b/proto/third_party/tendermint/abci/types.proto @@ -0,0 +1,407 @@ +syntax = "proto3"; +package tendermint.abci; + +option go_package = "github.com/tendermint/tendermint/abci/types"; + +// For more information on gogo.proto, see: +// https://github.com/gogo/protobuf/blob/master/extensions.md +import "tendermint/crypto/proof.proto"; +import "tendermint/types/types.proto"; +import "tendermint/crypto/keys.proto"; +import "tendermint/types/params.proto"; +import "google/protobuf/timestamp.proto"; +import "gogoproto/gogo.proto"; + +// This file is copied from http://github.com/tendermint/abci +// NOTE: When using custom types, mind the warnings. +// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues + +//---------------------------------------- +// Request types + +message Request { + oneof value { + RequestEcho echo = 1; + RequestFlush flush = 2; + RequestInfo info = 3; + RequestSetOption set_option = 4; + RequestInitChain init_chain = 5; + RequestQuery query = 6; + RequestBeginBlock begin_block = 7; + RequestCheckTx check_tx = 8; + RequestDeliverTx deliver_tx = 9; + RequestEndBlock end_block = 10; + RequestCommit commit = 11; + RequestListSnapshots list_snapshots = 12; + RequestOfferSnapshot offer_snapshot = 13; + RequestLoadSnapshotChunk load_snapshot_chunk = 14; + RequestApplySnapshotChunk apply_snapshot_chunk = 15; + } +} + +message RequestEcho { + string message = 1; +} + +message RequestFlush {} + +message RequestInfo { + string version = 1; + uint64 block_version = 2; + uint64 p2p_version = 3; +} + +// nondeterministic +message RequestSetOption { + string key = 1; + string value = 2; +} + +message RequestInitChain { + google.protobuf.Timestamp time = 1 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + string chain_id = 2; + ConsensusParams consensus_params = 3; + repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; + bytes app_state_bytes = 5; + int64 initial_height = 6; +} + +message RequestQuery { + bytes data = 1; + string path = 2; + int64 height = 3; + bool prove = 4; +} + +message RequestBeginBlock { + bytes hash = 1; + tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; + LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; + repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; +} + +enum CheckTxType { + NEW = 0 [(gogoproto.enumvalue_customname) = "New"]; + RECHECK = 1 [(gogoproto.enumvalue_customname) = "Recheck"]; +} + +message RequestCheckTx { + bytes tx = 1; + CheckTxType type = 2; +} + +message RequestDeliverTx { + bytes tx = 1; +} + +message RequestEndBlock { + int64 height = 1; +} + +message RequestCommit {} + +// lists available snapshots +message RequestListSnapshots { +} + +// offers a snapshot to the application +message RequestOfferSnapshot { + Snapshot snapshot = 1; // snapshot offered by peers + bytes app_hash = 2; // light client-verified app hash for snapshot height +} + +// loads a snapshot chunk +message RequestLoadSnapshotChunk { + uint64 height = 1; + uint32 format = 2; + uint32 chunk = 3; +} + +// Applies a snapshot chunk +message RequestApplySnapshotChunk { + uint32 index = 1; + bytes chunk = 2; + string sender = 3; +} + +//---------------------------------------- +// Response types + +message Response { + oneof value { + ResponseException exception = 1; + ResponseEcho echo = 2; + ResponseFlush flush = 3; + ResponseInfo info = 4; + ResponseSetOption set_option = 5; + ResponseInitChain init_chain = 6; + ResponseQuery query = 7; + ResponseBeginBlock begin_block = 8; + ResponseCheckTx check_tx = 9; + ResponseDeliverTx deliver_tx = 10; + ResponseEndBlock end_block = 11; + ResponseCommit commit = 12; + ResponseListSnapshots list_snapshots = 13; + ResponseOfferSnapshot offer_snapshot = 14; + ResponseLoadSnapshotChunk load_snapshot_chunk = 15; + ResponseApplySnapshotChunk apply_snapshot_chunk = 16; + } +} + +// nondeterministic +message ResponseException { + string error = 1; +} + +message ResponseEcho { + string message = 1; +} + +message ResponseFlush {} + +message ResponseInfo { + string data = 1; + + string version = 2; + uint64 app_version = 3; + + int64 last_block_height = 4; + bytes last_block_app_hash = 5; +} + +// nondeterministic +message ResponseSetOption { + uint32 code = 1; + // bytes data = 2; + string log = 3; + string info = 4; +} + +message ResponseInitChain { + ConsensusParams consensus_params = 1; + repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false]; + bytes app_hash = 3; +} + +message ResponseQuery { + uint32 code = 1; + // bytes data = 2; // use "value" instead. + string log = 3; // nondeterministic + string info = 4; // nondeterministic + int64 index = 5; + bytes key = 6; + bytes value = 7; + tendermint.crypto.ProofOps proof_ops = 8; + int64 height = 9; + string codespace = 10; +} + +message ResponseBeginBlock { + repeated Event events = 1 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; +} + +message ResponseCheckTx { + uint32 code = 1; + bytes data = 2; + string log = 3; // nondeterministic + string info = 4; // nondeterministic + int64 gas_wanted = 5 [json_name = "gas_wanted"]; + int64 gas_used = 6 [json_name = "gas_used"]; + repeated Event events = 7 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + string codespace = 8; +} + +message ResponseDeliverTx { + uint32 code = 1; + bytes data = 2; + string log = 3; // nondeterministic + string info = 4; // nondeterministic + int64 gas_wanted = 5 [json_name = "gas_wanted"]; + int64 gas_used = 6 [json_name = "gas_used"]; + repeated Event events = 7 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + string codespace = 8; +} + +message ResponseEndBlock { + repeated ValidatorUpdate validator_updates = 1 + [(gogoproto.nullable) = false]; + ConsensusParams consensus_param_updates = 2; + repeated Event events = 3 + [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; +} + +message ResponseCommit { + // reserve 1 + bytes data = 2; + int64 retain_height = 3; +} + +message ResponseListSnapshots { + repeated Snapshot snapshots = 1; +} + +message ResponseOfferSnapshot { + Result result = 1; + + enum Result { + UNKNOWN = 0; // Unknown result, abort all snapshot restoration + ACCEPT = 1; // Snapshot accepted, apply chunks + ABORT = 2; // Abort all snapshot restoration + REJECT = 3; // Reject this specific snapshot, try others + REJECT_FORMAT = 4; // Reject all snapshots of this format, try others + REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others + } +} + +message ResponseLoadSnapshotChunk { + bytes chunk = 1; +} + +message ResponseApplySnapshotChunk { + Result result = 1; + repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply + repeated string reject_senders = 3; // Chunk senders to reject and ban + + enum Result { + UNKNOWN = 0; // Unknown result, abort all snapshot restoration + ACCEPT = 1; // Chunk successfully accepted + ABORT = 2; // Abort all snapshot restoration + RETRY = 3; // Retry chunk (combine with refetch and reject) + RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) + REJECT_SNAPSHOT = 5; // Reject this snapshot, try others + } +} + +//---------------------------------------- +// Misc. + +// ConsensusParams contains all consensus-relevant parameters +// that can be adjusted by the abci app +message ConsensusParams { + BlockParams block = 1; + tendermint.types.EvidenceParams evidence = 2; + tendermint.types.ValidatorParams validator = 3; + tendermint.types.VersionParams version = 4; +} + +// BlockParams contains limits on the block size. +message BlockParams { + // Note: must be greater than 0 + int64 max_bytes = 1; + // Note: must be greater or equal to -1 + int64 max_gas = 2; +} + +message LastCommitInfo { + int32 round = 1; + repeated VoteInfo votes = 2 [(gogoproto.nullable) = false]; +} + +// Event allows application developers to attach additional information to +// ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. +// Later, transactions may be queried using these events. +message Event { + string type = 1; + repeated EventAttribute attributes = 2 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "attributes,omitempty" + ]; +} + +// EventAttribute is a single key-value pair, associated with an event. +message EventAttribute { + bytes key = 1; + bytes value = 2; + bool index = 3; // nondeterministic +} + +// TxResult contains results of executing the transaction. +// +// One usage is indexing transaction results. +message TxResult { + int64 height = 1; + uint32 index = 2; + bytes tx = 3; + ResponseDeliverTx result = 4 [(gogoproto.nullable) = false]; +} + +//---------------------------------------- +// Blockchain Types + +// Validator +message Validator { + bytes address = 1; // The first 20 bytes of SHA256(public key) + // PubKey pub_key = 2 [(gogoproto.nullable)=false]; + int64 power = 3; // The voting power +} + +// ValidatorUpdate +message ValidatorUpdate { + tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; + int64 power = 2; +} + +// VoteInfo +message VoteInfo { + Validator validator = 1 [(gogoproto.nullable) = false]; + bool signed_last_block = 2; +} + +enum EvidenceType { + UNKNOWN = 0; + DUPLICATE_VOTE = 1; + LIGHT_CLIENT_ATTACK = 2; +} + +message Evidence { + EvidenceType type = 1; + // The offending validator + Validator validator = 2 [(gogoproto.nullable) = false]; + // The height when the offense occurred + int64 height = 3; + // The corresponding time where the offense occurred + google.protobuf.Timestamp time = 4 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; + // Total voting power of the validator set in case the ABCI application does + // not store historical validators. + // https://github.com/tendermint/tendermint/issues/4581 + int64 total_voting_power = 5; +} + +//---------------------------------------- +// State Sync Types + +message Snapshot { + uint64 height = 1; // The height at which the snapshot was taken + uint32 format = 2; // The application-specific snapshot format + uint32 chunks = 3; // Number of chunks in the snapshot + bytes hash = 4; // Arbitrary snapshot hash, equal only if identical + bytes metadata = 5; // Arbitrary application metadata +} + +//---------------------------------------- +// Service Definition + +service ABCIApplication { + rpc Echo(RequestEcho) returns (ResponseEcho); + rpc Flush(RequestFlush) returns (ResponseFlush); + rpc Info(RequestInfo) returns (ResponseInfo); + rpc SetOption(RequestSetOption) returns (ResponseSetOption); + rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx); + rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx); + rpc Query(RequestQuery) returns (ResponseQuery); + rpc Commit(RequestCommit) returns (ResponseCommit); + rpc InitChain(RequestInitChain) returns (ResponseInitChain); + rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock); + rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock); + rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots); + rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot); + rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) returns (ResponseLoadSnapshotChunk); + rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk); +} diff --git a/proto/third_party/tendermint/crypto/keys.proto b/proto/third_party/tendermint/crypto/keys.proto new file mode 100644 index 00000000..16fd7adf --- /dev/null +++ b/proto/third_party/tendermint/crypto/keys.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package tendermint.crypto; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; + +import "gogoproto/gogo.proto"; + +// PublicKey defines the keys available for use with Tendermint Validators +message PublicKey { + option (gogoproto.compare) = true; + option (gogoproto.equal) = true; + + oneof sum { + bytes ed25519 = 1; + bytes secp256k1 = 2; + } +} diff --git a/proto/third_party/tendermint/crypto/proof.proto b/proto/third_party/tendermint/crypto/proof.proto new file mode 100644 index 00000000..975df768 --- /dev/null +++ b/proto/third_party/tendermint/crypto/proof.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; +package tendermint.crypto; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; + +import "gogoproto/gogo.proto"; + +message Proof { + int64 total = 1; + int64 index = 2; + bytes leaf_hash = 3; + repeated bytes aunts = 4; +} + +message ValueOp { + // Encoded in ProofOp.Key. + bytes key = 1; + + // To encode in ProofOp.Data + Proof proof = 2; +} + +message DominoOp { + string key = 1; + string input = 2; + string output = 3; +} + +// ProofOp defines an operation used for calculating Merkle root +// The data could be arbitrary format, providing nessecary data +// for example neighbouring node hash +message ProofOp { + string type = 1; + bytes key = 2; + bytes data = 3; +} + +// ProofOps is Merkle proof defined by the list of ProofOps +message ProofOps { + repeated ProofOp ops = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/third_party/tendermint/libs/bits/types.proto b/proto/third_party/tendermint/libs/bits/types.proto new file mode 100644 index 00000000..3111d113 --- /dev/null +++ b/proto/third_party/tendermint/libs/bits/types.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +package tendermint.libs.bits; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/libs/bits"; + +message BitArray { + int64 bits = 1; + repeated uint64 elems = 2; +} diff --git a/proto/third_party/tendermint/p2p/types.proto b/proto/third_party/tendermint/p2p/types.proto new file mode 100644 index 00000000..0d42ea40 --- /dev/null +++ b/proto/third_party/tendermint/p2p/types.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; +package tendermint.p2p; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/p2p"; + +import "gogoproto/gogo.proto"; + +message NetAddress { + string id = 1 [(gogoproto.customname) = "ID"]; + string ip = 2 [(gogoproto.customname) = "IP"]; + uint32 port = 3; +} + +message ProtocolVersion { + uint64 p2p = 1 [(gogoproto.customname) = "P2P"]; + uint64 block = 2; + uint64 app = 3; +} + +message DefaultNodeInfo { + ProtocolVersion protocol_version = 1 [(gogoproto.nullable) = false]; + string default_node_id = 2 [(gogoproto.customname) = "DefaultNodeID"]; + string listen_addr = 3; + string network = 4; + string version = 5; + bytes channels = 6; + string moniker = 7; + DefaultNodeInfoOther other = 8 [(gogoproto.nullable) = false]; +} + +message DefaultNodeInfoOther { + string tx_index = 1; + string rpc_address = 2 [(gogoproto.customname) = "RPCAddress"]; +} diff --git a/proto/third_party/tendermint/types/block.proto b/proto/third_party/tendermint/types/block.proto new file mode 100644 index 00000000..84e9bb15 --- /dev/null +++ b/proto/third_party/tendermint/types/block.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package tendermint.types; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; + +import "gogoproto/gogo.proto"; +import "tendermint/types/types.proto"; +import "tendermint/types/evidence.proto"; + +message Block { + Header header = 1 [(gogoproto.nullable) = false]; + Data data = 2 [(gogoproto.nullable) = false]; + tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; + Commit last_commit = 4; +} diff --git a/proto/third_party/tendermint/types/evidence.proto b/proto/third_party/tendermint/types/evidence.proto new file mode 100644 index 00000000..3b234571 --- /dev/null +++ b/proto/third_party/tendermint/types/evidence.proto @@ -0,0 +1,38 @@ +syntax = "proto3"; +package tendermint.types; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "tendermint/types/types.proto"; +import "tendermint/types/validator.proto"; + +message Evidence { + oneof sum { + DuplicateVoteEvidence duplicate_vote_evidence = 1; + LightClientAttackEvidence light_client_attack_evidence = 2; + } +} + +// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. +message DuplicateVoteEvidence { + tendermint.types.Vote vote_a = 1; + tendermint.types.Vote vote_b = 2; + int64 total_voting_power = 3; + int64 validator_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. +message LightClientAttackEvidence { + tendermint.types.LightBlock conflicting_block = 1; + int64 common_height = 2; + repeated tendermint.types.Validator byzantine_validators = 3; + int64 total_voting_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; +} + +message EvidenceList { + repeated Evidence evidence = 1 [(gogoproto.nullable) = false]; +} diff --git a/proto/third_party/tendermint/types/params.proto b/proto/third_party/tendermint/types/params.proto new file mode 100644 index 00000000..0de7d846 --- /dev/null +++ b/proto/third_party/tendermint/types/params.proto @@ -0,0 +1,80 @@ +syntax = "proto3"; +package tendermint.types; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; + +import "gogoproto/gogo.proto"; +import "google/protobuf/duration.proto"; + +option (gogoproto.equal_all) = true; + +// ConsensusParams contains consensus critical parameters that determine the +// validity of blocks. +message ConsensusParams { + BlockParams block = 1 [(gogoproto.nullable) = false]; + EvidenceParams evidence = 2 [(gogoproto.nullable) = false]; + ValidatorParams validator = 3 [(gogoproto.nullable) = false]; + VersionParams version = 4 [(gogoproto.nullable) = false]; +} + +// BlockParams contains limits on the block size. +message BlockParams { + // Max block size, in bytes. + // Note: must be greater than 0 + int64 max_bytes = 1; + // Max gas per block. + // Note: must be greater or equal to -1 + int64 max_gas = 2; + // Minimum time increment between consecutive blocks (in milliseconds) If the + // block header timestamp is ahead of the system clock, decrease this value. + // + // Not exposed to the application. + int64 time_iota_ms = 3; +} + +// EvidenceParams determine how we handle evidence of malfeasance. +message EvidenceParams { + // Max age of evidence, in blocks. + // + // The basic formula for calculating this is: MaxAgeDuration / {average block + // time}. + int64 max_age_num_blocks = 1; + + // Max age of evidence, in time. + // + // It should correspond with an app's "unbonding period" or other similar + // mechanism for handling [Nothing-At-Stake + // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + google.protobuf.Duration max_age_duration = 2 + [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; + + // This sets the maximum size of total evidence in bytes that can be committed in a single block. + // and should fall comfortably under the max block bytes. + // Default is 1048576 or 1MB + int64 max_bytes = 3; +} + +// ValidatorParams restrict the public key types validators can use. +// NOTE: uses ABCI pubkey naming, not Amino names. +message ValidatorParams { + option (gogoproto.populate) = true; + option (gogoproto.equal) = true; + + repeated string pub_key_types = 1; +} + +// VersionParams contains the ABCI application version. +message VersionParams { + option (gogoproto.populate) = true; + option (gogoproto.equal) = true; + + uint64 app_version = 1; +} + +// HashedParams is a subset of ConsensusParams. +// +// It is hashed into the Header.ConsensusHash. +message HashedParams { + int64 block_max_bytes = 1; + int64 block_max_gas = 2; +} diff --git a/proto/third_party/tendermint/types/types.proto b/proto/third_party/tendermint/types/types.proto new file mode 100644 index 00000000..7f7ea74c --- /dev/null +++ b/proto/third_party/tendermint/types/types.proto @@ -0,0 +1,157 @@ +syntax = "proto3"; +package tendermint.types; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "tendermint/crypto/proof.proto"; +import "tendermint/version/types.proto"; +import "tendermint/types/validator.proto"; + +// BlockIdFlag indicates which BlcokID the signature is for +enum BlockIDFlag { + option (gogoproto.goproto_enum_stringer) = true; + option (gogoproto.goproto_enum_prefix) = false; + + BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; + BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; + BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; + BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; +} + +// SignedMsgType is a type of signed message in the consensus. +enum SignedMsgType { + option (gogoproto.goproto_enum_stringer) = true; + option (gogoproto.goproto_enum_prefix) = false; + + SIGNED_MSG_TYPE_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "UnknownType"]; + // Votes + SIGNED_MSG_TYPE_PREVOTE = 1 [(gogoproto.enumvalue_customname) = "PrevoteType"]; + SIGNED_MSG_TYPE_PRECOMMIT = 2 [(gogoproto.enumvalue_customname) = "PrecommitType"]; + + // Proposals + SIGNED_MSG_TYPE_PROPOSAL = 32 [(gogoproto.enumvalue_customname) = "ProposalType"]; +} + +// PartsetHeader +message PartSetHeader { + uint32 total = 1; + bytes hash = 2; +} + +message Part { + uint32 index = 1; + bytes bytes = 2; + tendermint.crypto.Proof proof = 3 [(gogoproto.nullable) = false]; +} + +// BlockID +message BlockID { + bytes hash = 1; + PartSetHeader part_set_header = 2 [(gogoproto.nullable) = false]; +} + +// -------------------------------- + +// Header defines the structure of a Tendermint block header. +message Header { + // basic block info + tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; + string chain_id = 2 [(gogoproto.customname) = "ChainID"]; + int64 height = 3; + google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + + // prev block info + BlockID last_block_id = 5 [(gogoproto.nullable) = false]; + + // hashes of block data + bytes last_commit_hash = 6; // commit from validators from the last block + bytes data_hash = 7; // transactions + + // hashes from the app output from the prev block + bytes validators_hash = 8; // validators for the current block + bytes next_validators_hash = 9; // validators for the next block + bytes consensus_hash = 10; // consensus params for current block + bytes app_hash = 11; // state after txs from the previous block + bytes last_results_hash = 12; // root hash of all results from the txs from the previous block + + // consensus info + bytes evidence_hash = 13; // evidence included in the block + bytes proposer_address = 14; // original proposer of the block +} + +// Data contains the set of transactions included in the block +message Data { + // Txs that will be applied by state @ block.Height+1. + // NOTE: not all txs here are valid. We're just agreeing on the order first. + // This means that block.AppHash does not include these txs. + repeated bytes txs = 1; +} + +// Vote represents a prevote, precommit, or commit vote from validators for +// consensus. +message Vote { + SignedMsgType type = 1; + int64 height = 2; + int32 round = 3; + BlockID block_id = 4 + [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. + google.protobuf.Timestamp timestamp = 5 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes validator_address = 6; + int32 validator_index = 7; + bytes signature = 8; +} + +// Commit contains the evidence that a block was committed by a set of validators. +message Commit { + int64 height = 1; + int32 round = 2; + BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; + repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; +} + +// CommitSig is a part of the Vote included in a Commit. +message CommitSig { + BlockIDFlag block_id_flag = 1; + bytes validator_address = 2; + google.protobuf.Timestamp timestamp = 3 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 4; +} + +message Proposal { + SignedMsgType type = 1; + int64 height = 2; + int32 round = 3; + int32 pol_round = 4; + BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; + google.protobuf.Timestamp timestamp = 6 + [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 7; +} + +message SignedHeader { + Header header = 1; + Commit commit = 2; +} + +message LightBlock { + SignedHeader signed_header = 1; + tendermint.types.ValidatorSet validator_set = 2; +} + +message BlockMeta { + BlockID block_id = 1 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; + int64 block_size = 2; + Header header = 3 [(gogoproto.nullable) = false]; + int64 num_txs = 4; +} + +// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. +message TxProof { + bytes root_hash = 1; + bytes data = 2; + tendermint.crypto.Proof proof = 3; +} diff --git a/proto/third_party/tendermint/types/validator.proto b/proto/third_party/tendermint/types/validator.proto new file mode 100644 index 00000000..49860b96 --- /dev/null +++ b/proto/third_party/tendermint/types/validator.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +package tendermint.types; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; + +import "gogoproto/gogo.proto"; +import "tendermint/crypto/keys.proto"; + +message ValidatorSet { + repeated Validator validators = 1; + Validator proposer = 2; + int64 total_voting_power = 3; +} + +message Validator { + bytes address = 1; + tendermint.crypto.PublicKey pub_key = 2 [(gogoproto.nullable) = false]; + int64 voting_power = 3; + int64 proposer_priority = 4; +} + +message SimpleValidator { + tendermint.crypto.PublicKey pub_key = 1; + int64 voting_power = 2; +} diff --git a/proto/third_party/tendermint/version/types.proto b/proto/third_party/tendermint/version/types.proto new file mode 100644 index 00000000..6061868b --- /dev/null +++ b/proto/third_party/tendermint/version/types.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; +package tendermint.version; + +option go_package = "github.com/tendermint/tendermint/proto/tendermint/version"; + +import "gogoproto/gogo.proto"; + +// App includes the protocol and software version for the application. +// This information is included in ResponseInfo. The App.Protocol can be +// updated in ResponseEndBlock. +message App { + uint64 protocol = 1; + string software = 2; +} + +// Consensus captures the consensus rules for processing a block in the blockchain, +// including all blockchain data structures and the rules of the application's +// state transition machine. +message Consensus { + option (gogoproto.equal) = true; + + uint64 block = 1; + uint64 app = 2; +} diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh new file mode 100755 index 00000000..251c540e --- /dev/null +++ b/scripts/protocgen.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -eo pipefail + +proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) +# echo $proto_dirs; +for dir in $proto_dirs; do + protoc \ + -I "./proto/third_party" \ + -I "./proto" \ + --js_out=import_style=commonjs,binary:./src/types/proto-types\ + $(find "${dir}" -maxdepth 1 -name '*.proto') + + # command to generate gRPC web (*_grpc_web_pb.js in respective modules) files + protoc \ + -I "./proto/third_party" \ + -I "./proto" \ + --grpc-web_out=import_style=commonjs,mode=grpcwebtext:./src/types/proto-types\ + $(find "${dir}" -maxdepth 1 -name '*.proto') + +done diff --git a/src/client.ts b/src/client.ts index dd0d4881..bb0c79f0 100644 --- a/src/client.ts +++ b/src/client.ts @@ -4,9 +4,10 @@ import { RpcClient } from './nets/rpc-client'; import { EventListener } from './nets/event-listener'; import { AxiosRequestConfig } from 'axios'; import * as types from './types'; -import { SdkError } from './errors'; +import { SdkError, CODES } from './errors'; import * as AES from 'crypto-js/aes'; import * as ENC from 'crypto-js/enc-utf8'; +import {Wallet} from "./types"; /** IRISHub Client */ export class Client { @@ -17,13 +18,13 @@ export class Client { rpcClient: RpcClient; /** WebSocket event listener */ - eventListener: EventListener; + // eventListener: EventListener; /** Auth module */ auth: modules.Auth; - /** Asset module */ - asset: modules.Asset; + /** Token module */ + token: modules.Token; /** Bank module */ bank: modules.Bank; @@ -31,6 +32,9 @@ export class Client { /** Key management module */ keys: modules.Keys; + /** Protobuf module */ + protobuf: modules.Protobuf; + /** Staking module */ staking: modules.Staking; @@ -38,7 +42,7 @@ export class Client { tx: modules.Tx; /** Gov module */ - gov: modules.Gov; + // gov: modules.Gov; /** Slashing module */ slashing: modules.Slashing; @@ -47,13 +51,13 @@ export class Client { distribution: modules.Distribution; /** Service module */ - service: modules.Service; + // service: modules.Service; /** Oracle module */ - oracle: modules.Oracle; + // oracle: modules.Oracle; /** Random module */ - random: modules.Random; + // random: modules.Random; /** Utils module */ utils: modules.Utils; @@ -61,11 +65,13 @@ export class Client { /** Tendermint module */ tendermint: modules.Tendermint; - /** Htlc module */ - htlc: modules.Htlc + /** Coinswap module */ + // coinswap: modules.Coinswap; - /** IRISHub SDK Constructor */ + /** NFT module */ + nft: modules.Nft; + /** IRISHub SDK Constructor */ constructor(config: DefaultClientConfig) { this.config = config; if (!this.config.rpcConfig) this.config.rpcConfig = {}; @@ -88,26 +94,30 @@ export class Client { ConsAddr: 'fca', ConsPub: 'fcp', }; + this.config.rpcConfig.baseURL = this.config.node; this.rpcClient = new RpcClient(this.config.rpcConfig); - this.eventListener = new EventListener(this); + // this.eventListener = new EventListener(this); //TODO (lvsc) there is an error 'Event... is not a constructor' // Modules - this.asset = new modules.Asset(this); + this.token = new modules.Token(this); this.utils = new modules.Utils(this); this.bank = new modules.Bank(this); this.keys = new modules.Keys(this); this.tx = new modules.Tx(this); + this.protobuf = new modules.Protobuf(this); this.staking = new modules.Staking(this); - this.gov = new modules.Gov(this); + // this.gov = new modules.Gov(this); this.slashing = new modules.Slashing(this); this.distribution = new modules.Distribution(this); - this.service = new modules.Service(this); - this.oracle = new modules.Oracle(this); - this.random = new modules.Random(this); + // this.service = new modules.Service(this); + // this.oracle = new modules.Oracle(this); + // this.random = new modules.Random(this); this.auth = new modules.Auth(this); this.tendermint = new modules.Tendermint(this); - this.htlc = new modules.Htlc(this); + // this.coinswap = new modules.Coinswap(this); + this.nft = new modules.Nft(this); + // Set default encrypt/decrypt methods if (!this.config.keyDAO.encrypt || !this.config.keyDAO.decrypt) { @@ -235,9 +245,9 @@ export class DefaultClientConfig implements ClientConfig { constructor() { this.node = ''; this.network = types.Network.Mainnet; - this.chainId = 'irishub'; + this.chainId = ''; this.gas = '100000'; - this.fee = { amount: '0.6', denom: 'iris' }; + this.fee = { amount: '', denom: '' }; this.keyDAO = new DefaultKeyDAOImpl(); this.bech32Prefix = {} as Bech32Prefix; this.rpcConfig = { timeout: 2000 }; @@ -255,7 +265,7 @@ export interface KeyDAO { * @param key The encrypted private key object * @throws `SdkError` if the save fails. */ - write(name: string, key: types.Key): void; + write(name: string, key: Wallet): void; /** * Get the encrypted private key by name @@ -263,14 +273,14 @@ export interface KeyDAO { * @param name Name of the key * @returns The encrypted private key object or undefined */ - read(name: string): types.Key; + read(name: string): Wallet; /** * Delete the key by name * @param name Name of the key * @throws `SdkError` if the deletion fails. */ - delete(name: string): void; + delete?(name: string): void; /** * Optional function to encrypt the private key by yourself. Default to AES Encryption @@ -304,25 +314,28 @@ export interface Bech32Prefix { } export class DefaultKeyDAOImpl implements KeyDAO { - write(name: string, key: types.Key): void { + write(name: string, key: Wallet): void { throw new SdkError( - 'Method not implemented. Please implement KeyDAO first.' + 'Method not implemented. Please implement KeyDAO first.', + CODES.Panic ); } - read(name: string): types.Key { + read(name: string): Wallet { throw new SdkError( - 'Method not implemented. Please implement KeyDAO first.' + 'Method not implemented. Please implement KeyDAO first.', + CODES.Panic ); } delete(name: string): void { throw new SdkError( - 'Method not implemented. Please implement KeyDAO first.' + 'Method not implemented. Please implement KeyDAO first.', + CODES.Panic ); } encrypt(privKey: string, password: string): string { const encrypted = AES.encrypt(privKey, password).toString(); if (!encrypted) { - throw new SdkError('Private key encrypt failed'); + throw new SdkError('Private key encrypt failed',CODES.Internal); } return encrypted; } @@ -330,7 +343,7 @@ export class DefaultKeyDAOImpl implements KeyDAO { decrypt(encrptedPrivKey: string, password: string): string { const decrypted = AES.decrypt(encrptedPrivKey, password).toString(ENC); if (!decrypted) { - throw new SdkError('Wrong password'); + throw new SdkError('Wrong password',CODES.InvalidPassword); } return decrypted; } diff --git a/src/errors.ts b/src/errors.ts index 2d40b713..5459339d 100644 --- a/src/errors.ts +++ b/src/errors.ts @@ -1,10 +1,10 @@ const CODESPACE_ROOT = 'sdk'; /** Error codes in irishub v1.0 */ -const CODES = { +export const CODES = { OK: 0, Internal: 1, - TxDecode: 2, + TxParseError: 2, InvalidSequence: 3, Unauthorized: 4, InsufficientFunds: 5, @@ -16,7 +16,6 @@ const CODES = { OutOfGas: 11, MemoTooLarge: 12, InsufficientFee: 13, - OutOfService: 15, TooManySignatures: 14, NoSignatures: 15, ErrJsonMarshal: 16, @@ -25,68 +24,34 @@ const CODES = { TxInMempoolCache: 19, MempoolIsFull: 20, TxTooLarge: 21, -}; + KeyNotFound:22, + InvalidPassword:23, + SignerDoesNotMatch:24, + InvalidGasAdjustment:25, + InvalidHeight:26, + InvalidVersion:27, + InvalidChainId:28, + InvalidType:29, + TxTimeoutHeight:30, + UnknownExtensionOptions:31, + IncorrectAccountSequence:32, + FailedPackingProtobufMessageToAny:33, + FailedUnpackingProtobufMessagFromAny:34, + InternalLogicError:35, + Conflict:36, + FeatureNotSupported:37, + Panic:111222, -/** Error codes in irishub v0.17 */ -const CODES_V17 = { - OK: 0, - Internal: 1, - TxDecode: 2, - InvalidSequence: 3, - Unauthorized: 4, - InsufficientFunds: 5, - UnknownRequest: 6, - InvalidAddress: 7, - InvalidPubkey: 8, - UnknownAddress: 9, - InsufficientCoins: 10, - InvalidCoins: 11, - OutOfGas: 12, - MemoTooLarge: 13, - InsufficientFee: 14, - OutOfService: 15, - TooManySignatures: 16, - GasPriceTooLow: 17, - InvalidGas: 18, - InvalidTxFee: 19, - InvalidFeeDenom: 20, - ExceedsTxSize: 21, - ServiceTxLimit: 22, - PaginationParams: 23, + //sdk custom + InvalidMnemonic:801, + DerivePrivateKeyError:802 + }; -// Map error codes in irishub v0.17 to v1.0 -const errorMap = new Map([ - [CODESPACE_ROOT + CODES_V17.OK, CODES.OK], - [CODESPACE_ROOT + CODES_V17.Internal, CODES.Internal], - [CODESPACE_ROOT + CODES_V17.TxDecode, CODES.TxDecode], - [CODESPACE_ROOT + CODES_V17.InvalidSequence, CODES.InvalidSequence], - [CODESPACE_ROOT + CODES_V17.Unauthorized, CODES.Unauthorized], - [CODESPACE_ROOT + CODES_V17.InsufficientFunds, CODES.InsufficientFunds], - [CODESPACE_ROOT + CODES_V17.UnknownRequest, CODES.UnknownRequest], - [CODESPACE_ROOT + CODES_V17.InvalidAddress, CODES.InvalidAddress], - [CODESPACE_ROOT + CODES_V17.InvalidPubkey, CODES.InvalidPubkey], - [CODESPACE_ROOT + CODES_V17.UnknownAddress, CODES.UnknownAddress], - [CODESPACE_ROOT + CODES_V17.InsufficientCoins, CODES.InsufficientFunds], - [CODESPACE_ROOT + CODES_V17.InvalidCoins, CODES.InvalidCoins], - [CODESPACE_ROOT + CODES_V17.OutOfGas, CODES.OutOfGas], - [CODESPACE_ROOT + CODES_V17.MemoTooLarge, CODES.MemoTooLarge], - [CODESPACE_ROOT + CODES_V17.InsufficientFee, CODES.InsufficientFee], - [CODESPACE_ROOT + CODES_V17.OutOfService, CODES.UnknownRequest], // Unused - [CODESPACE_ROOT + CODES_V17.TooManySignatures, CODES.TooManySignatures], - [CODESPACE_ROOT + CODES_V17.GasPriceTooLow, CODES.InsufficientFee], - [CODESPACE_ROOT + CODES_V17.InvalidGas, CODES.InvalidRequest], - [CODESPACE_ROOT + CODES_V17.InvalidTxFee, CODES.InvalidRequest], - [CODESPACE_ROOT + CODES_V17.InvalidFeeDenom, CODES.InvalidRequest], // Only used in ValidateFee for genesis - [CODESPACE_ROOT + CODES_V17.ExceedsTxSize, CODES.TxTooLarge], - [CODESPACE_ROOT + CODES_V17.ServiceTxLimit, CODES.InvalidRequest], - [CODESPACE_ROOT + CODES_V17.PaginationParams, CODES.InvalidRequest], -]); - /** IRISHub SDK Error */ export class SdkError extends Error { - /** Error code space, reserved field */ - codespace = CODESPACE_ROOT; + // /** Error code space, reserved field */ + // codespace = CODESPACE_ROOT; /** Error code */ code = CODES.InvalidRequest; @@ -96,7 +61,7 @@ export class SdkError extends Error { */ constructor(msg: string, code = CODES.InvalidRequest) { super(msg); - const mappedCode = errorMap.get(this.codespace + code); - this.code = mappedCode ? mappedCode : CODES.InvalidRequest; + // const mappedCode = errorMap.get(this.codespace + code); + this.code = code; } } diff --git a/src/helper/index.ts b/src/helper/index.ts new file mode 100644 index 00000000..065766e9 --- /dev/null +++ b/src/helper/index.ts @@ -0,0 +1,3 @@ +export * from './modelCreator'; +export * from './txHelper'; +export * from './txModelCreator'; \ No newline at end of file diff --git a/src/helper/modelCreator.ts b/src/helper/modelCreator.ts new file mode 100644 index 00000000..2418d973 --- /dev/null +++ b/src/helper/modelCreator.ts @@ -0,0 +1,20 @@ +import * as types from '../types' +import * as is from "is_js"; + +export class ModelCreator{ + static createPaginationModel( + page_number:number = 1, + page_size:number = 30, + count_total:boolean = false, + key?:string):any{ + const pagination = new types.base_query_pagination_pb.PageRequest(); + if (is.not.undefined(key)) {//only one of offset or key should be set. + pagination.setKey(key); + } else { + pagination.setOffset((page_number - 1) * page_size > 0 ? (page_number - 1) * page_size : 0); + pagination.setLimit(page_size > 0 ? page_size : 10); + } + pagination.setCountTotal(count_total); + return pagination; + } +} \ No newline at end of file diff --git a/src/helper/txHelper.ts b/src/helper/txHelper.ts new file mode 100644 index 00000000..4b2d0aed --- /dev/null +++ b/src/helper/txHelper.ts @@ -0,0 +1,29 @@ +import * as Bech32 from 'bech32'; +import * as types from '../types'; +import { SdkError, CODES } from '../errors'; + +export class TxHelper { + static getHexPubkey(pubkey:string):string{ + try { + let pk = Bech32.decode(pubkey); + pubkey = Buffer.from(Bech32.fromWords(pk.words)).toString('hex').toUpperCase(); + }catch (e) {} + return pubkey; + } + + static isSignDoc(signDoc:any):boolean{ + return signDoc instanceof types.tx_tx_pb.SignDoc; + } + + static isAny(value:any):boolean{ + return value instanceof types.any_pb.Any; + } + + static ecodeModelAddress(address:string):Buffer{ + if (!address) { + throw new SdkError("address is empty",CODES.UnknownAddress); + } + let words = Bech32.decode(address,'utf-8').words; + return Buffer.from(Bech32.fromWords(words)); + } +} \ No newline at end of file diff --git a/src/helper/txModelCreator.ts b/src/helper/txModelCreator.ts new file mode 100644 index 00000000..a1ed7c30 --- /dev/null +++ b/src/helper/txModelCreator.ts @@ -0,0 +1,108 @@ + +import * as types from '../types'; +import { TxHelper } from './txHelper'; +import { SdkError, CODES } from '../errors'; + +export class TxModelCreator { + static createBodyModel(msgs:types.Msg[], memo:string, timeoutHeight:number):any{ + let body = new types.tx_tx_pb.TxBody(); + msgs.forEach((msg)=>{ + body.addMessages(msg.pack()); + }); + body.setMemo(memo); + body.setTimeoutHeight(timeoutHeight); + return body; + } + + static createAuthInfoModel( + fee:types.StdFee, + sequence?:string, + publicKey?:string|types.Pubkey):any + { + let authInfo = new types.tx_tx_pb.AuthInfo(); + + let feeModel = TxModelCreator.createFeeModel(fee.amount, fee.gasLimit); + authInfo.setFee(feeModel); + + if (publicKey && typeof sequence != 'undefined') { + let signerInfo = TxModelCreator.createSignerInfoModel(sequence, publicKey); + authInfo.addSignerInfos(signerInfo); + } + return authInfo; + } + + static createSignerInfoModel(sequence:string, publicKey:string|types.Pubkey):any{ + let single = new types.tx_tx_pb.ModeInfo.Single(); + single.setMode(types.signing_signing_pb.SignMode.SIGN_MODE_DIRECT); + + let mode_info = new types.tx_tx_pb.ModeInfo(); + mode_info.setSingle(single); + + let signerInfo = new types.tx_tx_pb.SignerInfo(); + signerInfo.setModeInfo(mode_info); + signerInfo.setSequence(String(sequence)); + + if (publicKey) { + let pk = TxModelCreator.createPublicKeyModel(publicKey); + signerInfo.setPublicKey(TxModelCreator.createAnyModel(pk.type, pk.value.serializeBinary())); + } + return signerInfo; + } + + static createPublicKeyModel(publicKey:string|types.Pubkey):{type:string, value:any}{ + if (typeof publicKey == 'string') { + publicKey = {type:types.PubkeyType.secp256k1, value:publicKey}; + } + let pk_hex = TxHelper.getHexPubkey(publicKey.value); + let pubByteArray = Array.from(Buffer.from(pk_hex, 'hex')); + if (pubByteArray.length > 33) { + //去掉amino编码前缀 + pubByteArray = pubByteArray.slice(5) + } + let pk:any; + let type = ''; + switch(publicKey.type){ + case types.PubkeyType.secp256k1: + type = 'cosmos.crypto.secp256k1.PubKey'; + pk = new types.crypto_secp256k1_keys_pb.PubKey(); + break; + case types.PubkeyType.ed25519: + type = 'cosmos.crypto.ed25519.PubKey'; + pk = new types.crypto_ed25519_keys_pb.PubKey(); + break; + case types.PubkeyType.sm2: + type = 'cosmos.crypto.sm2.PubKey'; + pk = new types.crypto_sm2_keys_pb.PubKey(); + break; + } + if (!pk) { + throw new SdkError("Unsupported public Key types",CODES.InvalidPubkey); + } + pk.setKey(Buffer.from(pubByteArray)); + return { type:type, value:pk }; + } + + static createFeeModel(amounts:types.Coin[], gasLimit:string):any{ + let fee = new types.tx_tx_pb.Fee(); + amounts.forEach((amount)=>{ + let coin = TxModelCreator.createCoinModel(amount.denom, amount.amount); + fee.addAmount(coin); + }); + fee.setGasLimit(String(gasLimit)); + return fee; + } + + static createCoinModel(denom:string, amount:string):any{ + let coin = new types.base_coin_pb.Coin(); + coin.setDenom(denom); + coin.setAmount(String(amount)); + return coin; + } + + static createAnyModel(typeUrl:string, value:Uint8Array):any{ + let msg_any = new types.any_pb.Any(); + msg_any.setTypeUrl(`/${typeUrl}`); + msg_any.setValue(value); + return msg_any; + } +} diff --git a/src/import.d.ts b/src/import.d.ts index db4a8a2d..6e3f25ac 100644 --- a/src/import.d.ts +++ b/src/import.d.ts @@ -15,4 +15,4 @@ declare module 'elliptic'; declare module 'tiny-secp256k1'; declare module 'events'; -declare var window: any; \ No newline at end of file +declare var window: Window & typeof globalThis; \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index f3612b27..44de7e14 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,10 +1,11 @@ -export * from './types/constants'; -export { KeyDAO } from './client'; +export * as types from './types'; +export * as utils from './utils'; +export { Client, ClientConfig, KeyDAO } from './client'; +export {Crypto} from "./utils"; import { Client, ClientConfig, DefaultClientConfig, - DefaultKeyDAOImpl, } from './client'; /** diff --git a/src/modules/asset.ts b/src/modules/asset.ts deleted file mode 100644 index 5df599ba..00000000 --- a/src/modules/asset.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Client } from '../client'; -import * as types from '../types'; -import * as is from 'is_js'; -import { SdkError } from '../errors'; - -/** - * IRISHub allows individuals and companies to create and issue their own tokens. - * - * [More Details](https://www.irisnet.org/docs/features/asset.html) - * - * @category Modules - * @since v0.17 - */ -export class Asset { - /** @hidden */ - private client: Client; - /** @hidden */ - constructor(client: Client) { - this.client = client; - } - - /** - * Query details of a token - * @param symbol The token symbol - * @returns - * @since v0.17 - */ - queryToken(symbol: string): Promise { - if (is.empty(symbol)) { - throw new SdkError('symbol can not be empty'); - } - return this.client.rpcClient.abciQuery('custom/asset/token', { - TokenId: this.getCoinName(symbol), - }); - } - - /** - * Query details of a group of tokens - * @param owner The optional token owner address - * @returns - * @since v0.17 - */ - queryTokens(owner?: string): Promise { - return this.client.rpcClient.abciQuery( - 'custom/asset/tokens', - { - Owner: owner, - } - ); - } - - /** - * Query the asset related fees - * @param symbol The token symbol - * @returns - * @since v0.17 - */ - queryFees(symbol: string): Promise { - return this.client.rpcClient.abciQuery( - 'custom/asset/fees', - { - Symbol: symbol, - } - ); - } - - /** - * Get coin name by denom - * - * **NOTE:** For iris units in irishub v0.17, only support `iris` and `iris-atto` - * - * @param denom - * @since v0.17 - */ - private getCoinName(denom: string): string { - denom = denom.toLowerCase(); - - if (denom === types.IRIS || denom === types.IRIS_ATTO) { - return types.IRIS; - } - - if ( - !denom.startsWith(types.IRIS + '-') && - !denom.endsWith(types.MIN_UNIT_SUFFIX) - ) { - return denom; - } - - return denom.substr(0, denom.indexOf(types.MIN_UNIT_SUFFIX)); - } -} diff --git a/src/modules/auth.ts b/src/modules/auth.ts index 9f7e8ac2..39792d14 100644 --- a/src/modules/auth.ts +++ b/src/modules/auth.ts @@ -1,6 +1,7 @@ import { Client } from '../client'; import * as types from '../types'; import * as is from 'is_js'; +import { SdkError, CODES } from '../errors'; /** * Auth module is only used to build `StdTx` @@ -18,7 +19,7 @@ export class Auth { this.client = client; this.defaultStdFee = { amount: [this.client.config.fee], - gas: this.client.config.gas, + gasLimit: this.client.config.gas, }; } @@ -38,10 +39,8 @@ export class Auth { newStdTx( msgs: types.Msg[], baseTx: types.BaseTx, - sigs: types.StdSignature[] = [], - memo = '' - ): types.Tx { - const stdFee: types.StdFee = { amount: [], gas: '' }; + ): types.ProtoTx { + const stdFee: types.StdFee = { amount: [], gasLimit: '' }; Object.assign(stdFee, this.defaultStdFee); // Copy from default std fee if (baseTx.fee) { @@ -49,16 +48,56 @@ export class Auth { } if (baseTx.gas && is.not.empty(baseTx.gas)) { - stdFee.gas = baseTx.gas; + stdFee.gasLimit = baseTx.gas; } - return { - type: 'irishub/bank/StdTx', - value: { - msg: msgs, - fee: stdFee, - signatures: sigs, - memo, - }, - }; + + let protoTx = new types.ProtoTx({ + msgs, + memo:baseTx.memo||'', + stdFee, + chain_id:this.client.config.chainId, + account_number:baseTx.account_number || undefined, + sequence:baseTx.sequence || undefined + }); + return protoTx; + } + + /** + * Account returns account details based on address. + * @param address defines the address to query for. + */ + queryAccount(address:string): Promise { + if (!address) { + throw new SdkError("address can ont be empty"); + } + const request = new types.auth_query_pb.QueryAccountRequest(); + request.setAddress(address); + + return this.client.rpcClient.protoQuery( + '/cosmos.auth.v1beta1.Query/Account', + request, + types.auth_query_pb.QueryAccountResponse + ).then((data)=>{ + let result:any = {}; + if (data && data.account && data.account.value) { + result = types.auth_auth_pb.BaseAccount.deserializeBinary(data.account.value).toObject(); + if (result.pubKey && result.pubKey.value) { + result.pubKey = types.crypto_secp256k1_keys_pb.PubKey.deserializeBinary(result.pubKey.value).toObject(); + } + } + return result as types.BaseAccount; + }); + } + + /** + * Params queries all parameters. + */ + queryParams(): Promise { + const request = new types.auth_query_pb.QueryParamsRequest(); + return this.client.rpcClient.protoQuery( + '/cosmos.auth.v1beta1.Query/Params', + request, + types.auth_query_pb.QueryParamsResponse + ); } } diff --git a/src/modules/bank.ts b/src/modules/bank.ts index 938bbd06..e8717622 100644 --- a/src/modules/bank.ts +++ b/src/modules/bank.ts @@ -1,9 +1,7 @@ import { Client } from '../client'; import { Crypto } from '../utils/crypto'; import * as types from '../types'; -import * as AminoTypes from '@irisnet/amino-js/types'; -import { SdkError } from '../errors'; -import { MsgSend, MsgBurn, MsgSetMemoRegexp } from '../types/bank'; +import { SdkError, CODES } from '../errors'; import { EventQueryBuilder, EventKey, EventAction } from '../types'; /** @@ -24,47 +22,6 @@ export class Bank { this.client = client; } - /** - * Get the cointype of a token - * - * @deprecated Please refer to [[asset.queryToken]] - * @since v0.17 - */ - queryCoinType(tokenName: string) { - throw new SdkError('Not supported'); - } - - /** - * Query account info from blockchain - * @param address Bech32 address - * @returns - * @since v0.17 - * // TODO: - */ - queryAccount(address: string): Promise { - return this.client.rpcClient.abciQuery( - 'custom/acc/account', - { - Address: address, - } - ); - } - - /** - * Query the token statistic, including total loose tokens, total burned tokens and total bonded tokens. - * @param tokenID Identity of the token - * @returns - * @since v0.17 - */ - queryTokenStats(tokenID?: string): Promise { - return this.client.rpcClient.abciQuery( - 'custom/acc/tokenStats', - { - TokenId: tokenID, - } - ); - } - /** * Send coins * @param to Recipient bech32 address @@ -82,100 +39,130 @@ export class Bank { if (!Crypto.checkAddress(to, this.client.config.bech32Prefix.AccAddr)) { throw new SdkError('Invalid bech32 address'); } - const from = this.client.keys.show(baseTx.from); - - const coins = await this.client.utils.toMinCoins(amount); - const msgs: types.Msg[] = [ - new MsgSend([{ address: from, coins }], [{ address: to, coins }]), + const msgs: any[] = [ + { + type:types.TxType.MsgSend, + value:{ + from_address:from, + to_address:to, + amount + } + } ]; - return this.client.tx.buildAndSend(msgs, baseTx); } /** - * Burn coins - * @param amount Coins to be burnt + * multiSend coins + * @param to Recipient bech32 address + * @param amount Coins to be sent * @param baseTx { types.BaseTx } * @returns * @since v0.17 */ - async burn( + async multiSend( + to: string, amount: types.Coin[], baseTx: types.BaseTx ): Promise { + // Validate bech32 address + if (!Crypto.checkAddress(to, this.client.config.bech32Prefix.AccAddr)) { + throw new SdkError('Invalid bech32 address'); + } const from = this.client.keys.show(baseTx.from); - - const coins = await this.client.utils.toMinCoins(amount); - const msgs: types.Msg[] = [new MsgBurn(from, coins)]; - + const coins = amount; + const msgs: any[] = [ + { + type:types.TxType.MsgMultiSend, + value:{ + inputs:[{ address: from, coins }], + outputs:[{ address: to, coins }], + } + } + ]; return this.client.tx.buildAndSend(msgs, baseTx); } /** - * Set memo regexp for your own address, so that you can only receive coins from transactions with the corresponding memo. - * @param memoRegexp - * @param baseTx { types.BaseTx } - * @returns - * @since v0.17 + * Balance queries the balance of a single coin for a single account. + * @param address is the address to query balances for. + * @param denom is the coin denom to query balances for. */ - async setMemoRegexp( - memoRegexp: string, - baseTx: types.BaseTx - ): Promise { - const from = this.client.keys.show(baseTx.from); - const msgs: types.Msg[] = [new MsgSetMemoRegexp(from, memoRegexp)]; + queryBalance(address:string, denom:string): Promise { + if (!address) { + throw new SdkError("address can ont be empty"); + } + if (!denom) { + throw new SdkError("denom can ont be empty"); + } + const request = new types.bank_query_pb.QueryBalanceRequest(); + request.setAddress(address); + request.setDenom(denom); + + return this.client.rpcClient.protoQuery( + '/cosmos.bank.v1beta1.Query/Balance', + request, + types.bank_query_pb.QueryBalanceResponse + ); + } - return this.client.tx.buildAndSend(msgs, baseTx); + /** + * AllBalances queries the balance of all coins for a single account. + * @param address is the address to query balances for. + */ + queryAllBalances(address:string): Promise { + if (!address) { + throw new SdkError("address can ont be empty"); + } + const request = new types.bank_query_pb.QueryAllBalancesRequest(); + request.setAddress(address); + + return this.client.rpcClient.protoQuery( + '/cosmos.bank.v1beta1.Query/AllBalances', + request, + types.bank_query_pb.QueryAllBalancesResponse + ); } /** - * Subscribe Send Txs - * @param conditions Query conditions for the subscription - * @param callback A function to receive notifications - * @returns - * @since v0.17 + * TotalSupply queries the total supply of all coins. */ - subscribeSendTx( - conditions: { from?: string; to?: string }, - callback: (error?: SdkError, data?: types.EventDataMsgSend) => void - ): types.EventSubscription { - const queryBuilder = new EventQueryBuilder().addCondition( - new types.Condition(EventKey.Action).eq(EventAction.Send) + queryTotalSupply(): Promise { + const request = new types.bank_query_pb.QueryTotalSupplyRequest(); + return this.client.rpcClient.protoQuery( + '/cosmos.bank.v1beta1.Query/TotalSupply', + request, + types.bank_query_pb.QueryTotalSupplyResponse ); + } - if (conditions.from) { - queryBuilder.addCondition( - new types.Condition(EventKey.Sender).eq(conditions.from) - ); - } - if (conditions.to) { - queryBuilder.addCondition( - new types.Condition(EventKey.Recipient).eq(conditions.to) - ); + /** + * SupplyOf queries the supply of a single coin. + * @param denom is the coin denom to query balances for. + */ + querySupplyOf(denom:string): Promise { + if (!denom) { + throw new SdkError("denom can ont be empty"); } + const request = new types.bank_query_pb.QuerySupplyOfRequest(); + request.setDenom(denom); + return this.client.rpcClient.protoQuery( + '/cosmos.bank.v1beta1.Query/SupplyOf', + request, + types.bank_query_pb.QuerySupplyOfResponse + ); + } - const subscription = this.client.eventListener.subscribeTx( - queryBuilder, - (error, data) => { - if (error) { - callback(error); - return; - } - data?.tx.value.msg.forEach(msg => { - if (msg.type !== 'irishub/bank/Send') return; - const msgSend = msg as types.MsgSend; - const height = data.height; - const hash = data.hash; - msgSend.value.inputs.forEach((input: types.Input, index: number) => { - const from = input.address; - const to = msgSend.value.outputs[index].address; - const amount = input.coins; - callback(undefined, { height, hash, from, to, amount }); - }); - }); - } + /** + * Params queries the parameters of x/bank module. + */ + queryParams(): Promise { + const request = new types.bank_query_pb.QueryParamsRequest(); + return this.client.rpcClient.protoQuery( + '/cosmos.bank.v1beta1.Query/Params', + request, + types.bank_query_pb.QueryParamsResponse ); - return subscription; } } diff --git a/src/modules/coinswap.ts b/src/modules/coinswap.ts new file mode 100644 index 00000000..80f6edb4 --- /dev/null +++ b/src/modules/coinswap.ts @@ -0,0 +1,422 @@ +import { Client } from '../client'; +import * as types from '../types'; +import * as mathjs from 'mathjs'; +import * as is from 'is_js'; +import { + MsgAddLiquidity, + DepositRequest, + WithdrawRequest, + MsgRemoveLiquidity, + SwapOrderRequest, + MsgSwapOrder, + STD_DENOM, + Coin, +} from '../types'; +import { SdkError, CODES } from '../errors'; + +/** + * Implementation of the [Constant Product Market Maker Model](https://github.com/runtimeverification/verified-smart-contracts/blob/uniswap/uniswap/x-y-k.pdf) token exchange protocol on IRISHub. + * + * [More Details](https://www.irisnet.org/docs/features/coinswap.html) + * + * @category Modules + */ +export class Coinswap { + /** @hidden */ + private client: Client; + /** @hidden */ + private formatUniABSPrefix = 'uni:'; + /** @hidden */ + private mathConfig = { + number: 'BigNumber', // Choose 'number' (default), 'BigNumber', or 'Fraction' + precision: 64, // 64 by default, only applicable for BigNumbers + }; + /** @hidden */ + private math: Partial; + + /** @hidden */ + constructor(client: Client) { + this.client = client; + this.math = mathjs.create(mathjs.all, this.mathConfig); + } + + /** + * + * Query liquidity by id + * @param id The liquidity id + * @returns + * @since v1.0 + */ + queryLiquidity(id: string): Promise { + return this.client.rpcClient.abciQuery( + 'custom/coinswap/liquidity', + { + id, + } + ); + } + + /** + * Add liquidity by exact iris amount, calculated token and liquidity amount + * @param request Add liquidity request + * @param baseTx + * @returns + * @since v1.0 + */ + async deposit( + request: DepositRequest, + baseTx: types.BaseTx + ): Promise { + const from = this.client.keys.show(baseTx.from); + const msgs: types.Msg[] = [new MsgAddLiquidity(request, from)]; + + return this.client.tx.buildAndSend(msgs, baseTx); + } + + /** + * Remove liquidity by exact liquidity amount, calculated iris and token amount + * @param request Remove liquidity request + * @param baseTx + * @returns + * @since v1.0 + */ + async withdraw( + request: WithdrawRequest, + baseTx: types.BaseTx + ): Promise { + const from = this.client.keys.show(baseTx.from); + const msgs: types.Msg[] = [new MsgRemoveLiquidity(request, from)]; + + return this.client.tx.buildAndSend(msgs, baseTx); + } + + /** + * Swap coin by exact output, calculated input + * @param request Buy order request + * @param baseTx + * @returns + * @since v1.0 + */ + async buy( + request: SwapOrderRequest, + baseTx: types.BaseTx + ): Promise { + const msgs: types.Msg[] = [new MsgSwapOrder(request, true)]; + + return this.client.tx.buildAndSend(msgs, baseTx); + } + + /** + * Swap coin by exact input, calculated output + * @param request Sell order request + * @param baseTx + * @returns + * @since v1.0 + */ + async sell( + request: SwapOrderRequest, + baseTx: types.BaseTx + ): Promise { + const msgs: types.Msg[] = [new MsgSwapOrder(request, true)]; + + return this.client.tx.buildAndSend(msgs, baseTx); + } + + private getUniDenomFromDenoms(denom1: string, denom2: string): string { + if (denom1 === denom2) { + throw new SdkError('input and output denomination are equal'); + } + if (denom1 !== STD_DENOM && denom2 !== STD_DENOM) { + throw new SdkError( + `standard denom: '${STD_DENOM}', denom1: '${denom1}', denom2: '${denom2}'` + ); + } + if (denom1 === STD_DENOM) { + return this.formatUniABSPrefix + denom2; + } + return this.formatUniABSPrefix + denom1; + } + + /** + * Calculate the amount of another token to be received based on the exact amount of tokens sold + * @param exactSoldCoin sold coin + * @param soldTokenDenom received token's denom + * @returns output token amount to be received + * @since v1.0 + */ + async calculateWithExactInput( + exactSoldCoin: Coin, + boughtTokenDenom: string + ): Promise { + if (exactSoldCoin.denom !== STD_DENOM && boughtTokenDenom !== STD_DENOM) { + return this.calculateDoubleWithExactInput( + exactSoldCoin, + boughtTokenDenom + ); + } + const uniDenom = this.getUniDenomFromDenoms( + exactSoldCoin.denom, + boughtTokenDenom + ); + const reservePool = await this.queryLiquidity(uniDenom); + let inputReserve: number; + let outputReserve: number; + if (reservePool.standard.denom === exactSoldCoin.denom) { + inputReserve = Number(reservePool.standard.amount); + outputReserve = Number(reservePool.token.amount); + } else { + inputReserve = Number(reservePool.token.amount); + outputReserve = Number(reservePool.standard.amount); + } + + if (is.not.positive(inputReserve)) { + throw new SdkError( + `liquidity pool insufficient funds: ['${inputReserve}${exactSoldCoin.denom}']` + ); + } + if (is.not.positive(outputReserve)) { + throw new SdkError( + `liquidity pool insufficient funds: ['${outputReserve}${boughtTokenDenom}']` + ); + } + + const boughtAmt = this.getInputPrice( + Number(exactSoldCoin.amount), + inputReserve, + outputReserve, + Number(reservePool.fee) + ); + + if (is.above(Number(boughtAmt), outputReserve)) { + throw new SdkError( + `liquidity pool insufficient balance of '${boughtTokenDenom}', only bought: '${outputReserve}', got: '${inputReserve}'` + ); + } + + return boughtAmt + } + + /** + * Calculate the amount of the token to be paid based on the exact amount of the token to be bought + * @param exactBoughtCoin + * @param soldTokenDenom + * @return: input amount to be paid + * @since v1.0 + */ + async calculateWithExactOutput( + exactBoughtCoin: Coin, + soldTokenDenom: string + ): Promise { + if (exactBoughtCoin.denom !== STD_DENOM && soldTokenDenom !== STD_DENOM) { + return this.calculateDoubleWithExactOutput( + exactBoughtCoin, + soldTokenDenom + ); + } + const uniDenom = this.getUniDenomFromDenoms( + exactBoughtCoin.denom, + soldTokenDenom + ); + const reservePool = await this.queryLiquidity(uniDenom); + let inputReserve: number; + let outputReserve: number; + if (reservePool.standard.denom === soldTokenDenom) { + inputReserve = Number(reservePool.standard.amount); + outputReserve = Number(reservePool.token.amount); + } else { + inputReserve = Number(reservePool.token.amount); + outputReserve = Number(reservePool.standard.amount); + } + if (is.not.positive(inputReserve)) { + throw new SdkError( + `liquidity pool insufficient funds, actual ['${inputReserve}${soldTokenDenom}']` + ); + } + if (is.not.positive(outputReserve)) { + throw new SdkError( + `liquidity pool insufficient funds, actual ['${outputReserve}${exactBoughtCoin.denom}']` + ); + } + if (is.above(Number(exactBoughtCoin.amount), outputReserve)) { + throw new SdkError( + `liquidity pool insufficient balance of '${exactBoughtCoin.denom}', user expected: '${exactBoughtCoin.amount}', got: '${outputReserve}'` + ); + } + + const paidAmt = this.getOutputPrice( + Number(exactBoughtCoin.amount), + inputReserve, + outputReserve, + Number(reservePool.fee) + ); + + if (is.infinite(paidAmt)) { + throw new SdkError( + `infinite amount of '${soldTokenDenom}' is required` + ); + } + + return paidAmt; + } + + /** + * Calculate token amount and liquidity amount of the deposit request by exact standard token amount + * @param exactStdAmt Exact standard token amount to be deposited + * @param calculatedDenom The token denom being calculated + * @returns The [[DepositRequest]], max_token = -1 means the liquidity pool is empty, users can deposit any amount of the token + * @since v1.0 + */ + async calculateDeposit( + exactStdAmt: number, + calculatedDenom: string + ): Promise { + const reservePool = await this.queryLiquidity( + this.getUniDenomFromDenoms(STD_DENOM, calculatedDenom) + ); + + // Initiate default deposit request, max_token = -1 means the liquidity pool is empty, users can deposit any amount of the token + const depositRequest: DepositRequest = { + exact_standard_amt: exactStdAmt, + max_token: { denom: calculatedDenom, amount: '-1' }, + min_liquidity: exactStdAmt, + deadline: 10000, // default 10s + }; + + if ( + is.positive(Number(reservePool.standard.amount)) && + is.positive(Number(reservePool.token.amount)) + ) { + // ∆t = ⌊(∆i/i) * t⌋ + 1 + const deltaTokenAmt = + this.math.floor!( + this.math.multiply!( + this.math.divide!(exactStdAmt, Number(reservePool.standard.amount)), + Number(reservePool.token.amount) + ) + ) + 1; + depositRequest.max_token = { + denom: calculatedDenom, + amount: String(deltaTokenAmt), + }; + } + + return depositRequest; + } + + /** + * Calculate how many tokens can be withdrawn by exact liquidity amount + * @param exactWithdrawLiquidity Exact liquidity amount to be withdrawn + * @returns The [[WithdrawRequest]] + * @since v1.0 + */ + async calculateWithdraw( + exactWithdrawLiquidity: Coin + ): Promise { + const reservePool = await this.queryLiquidity(exactWithdrawLiquidity.denom); + + // Initiate default withdraw request + const withdrawRequest: WithdrawRequest = { + min_standard_amt: 0, + min_token: 0, + withdraw_liquidity: exactWithdrawLiquidity, + deadline: 10000, // default 10s + }; + + if ( + is.positive(Number(reservePool.standard.amount)) && + is.positive(Number(reservePool.token.amount)) + ) { + // ∆i = ⌊(∆l/l) * i⌋ + const deltaStdAmt = this.math.floor!( + this.math.multiply!( + this.math.divide!( + Number(exactWithdrawLiquidity.amount), + Number(reservePool.liquidity.amount) + ), + Number(reservePool.standard.amount) + ) + ); + withdrawRequest.min_standard_amt = deltaStdAmt; + + // ∆t = ⌊(∆l/l) * t⌋ + const deltaTokenAmt = this.math.floor!( + this.math.multiply!( + this.math.divide!( + Number(exactWithdrawLiquidity.amount), + Number(reservePool.liquidity.amount) + ), + Number(reservePool.token.amount) + ) + ); + withdrawRequest.min_token = deltaTokenAmt; + } + + return withdrawRequest; + } + + private async calculateDoubleWithExactInput( + exactSoldCoin: Coin, + boughtTokenDenom: string + ): Promise { + const boughtStandardAmount = await this.calculateWithExactInput( + exactSoldCoin, + STD_DENOM + ); + const boughtTokenAmt = await this.calculateWithExactInput( + { denom: STD_DENOM, amount: String(boughtStandardAmount) }, + boughtTokenDenom + ); + return boughtTokenAmt; + } + + private async calculateDoubleWithExactOutput( + exactBoughtCoin: Coin, + soldTokenDenom: string + ): Promise { + const soldStandardAmount = await this.calculateWithExactOutput( + exactBoughtCoin, + STD_DENOM + ); + const soldTokenAmt = await this.calculateWithExactOutput( + { denom: STD_DENOM, amount: String(soldStandardAmount) }, + soldTokenDenom + ); + return soldTokenAmt; + } + + // getInputPrice returns the amount of coins bought (calculated) given the input amount being sold (exact) + // The fee is included in the input coins being bought + // https://github.com/runtimeverification/verified-smart-contracts/blob/uniswap/uniswap/x-y-k.pdf + private getInputPrice( + inputAmt: number, + inputReserve: number, + outputReserve: number, + fee: number + ): number { + const deltaFee = 1 - fee; + const inputAmtWithFee = this.math.multiply!(inputAmt, deltaFee); + const numerator = this.math.multiply!(inputAmtWithFee, outputReserve); + const denominator = this.math.add!( + this.math.floor!(inputReserve), + inputAmtWithFee + ); + return this.math.floor!(Number(this.math.divide!(numerator, denominator))); + } + + // getOutputPrice returns the amount of coins sold (calculated) given the output amount being bought (exact) + // The fee is included in the output coins being bought + private getOutputPrice( + outputAmt: number, + inputReserve: number, + outputReserve: number, + fee: number + ): number { + const deltaFee = 1 - fee; + const numerator = this.math.multiply!(inputReserve, outputAmt); + const denominator = this.math.multiply!( + this.math.subtract!(outputReserve, outputAmt), + deltaFee + ); + return this.math.floor!(Number(this.math.divide!(numerator, denominator))) + 1; + } +} diff --git a/src/modules/distribution.ts b/src/modules/distribution.ts index 6e3bbc53..1cc53692 100644 --- a/src/modules/distribution.ts +++ b/src/modules/distribution.ts @@ -1,12 +1,10 @@ -import { Client } from '../client'; +import {Client} from '../client'; import * as types from '../types'; import * as is from 'is_js'; -import { - MsgSetWithdrawAddress, - MsgWithdrawValidatorRewardsAll, - MsgWithdrawDelegatorReward, - MsgWithdrawDelegatorRewardsAll, -} from '../types/distribution'; +import { Crypto } from '../utils'; +import { ModelCreator } from '../helper'; +import { SdkError, CODES } from '../errors'; + /** * This module is in charge of distributing collected transaction fee and inflated token to all validators and delegators. @@ -21,84 +19,271 @@ import { export class Distribution { /** @hidden */ private client: Client; + /** @hidden */ constructor(client: Client) { this.client = client; } /** - * Query all the rewards of a validator or a delegator - * @param address Bech32 account address + * Set another address to receive the rewards instead of using the delegator address + * @param withdrawAddress Bech32 account address + * @param baseTx * @returns * @since v0.17 */ - queryRewards(address: string): Promise { - return this.client.rpcClient.abciQuery( - 'custom/distr/rewards', + async setWithdrawAddr( + withdrawAddress: string, + baseTx: types.BaseTx + ): Promise { + const from = this.client.keys.show(baseTx.from); + const msgs: any[] = [ { - address, + type: types.TxType.MsgSetWithdrawAddress, + value: { + delegator_address: from, + withdraw_address: withdrawAddress, + } } - ); + ]; + + return this.client.tx.buildAndSend(msgs, baseTx); } /** - * Get the address of which the delegator receives the rewards - * @param delegatorAddress Bech32 account address - * @returns + * Withdraw rewards to the withdraw-address(default to the delegator address, you can set to another address via [[setWithdrawAddr]]) + * @param baseTx { types.BaseTx } + * @param validatorAddr withdraw from this validator address + * @returns { Promise } * @since v0.17 */ - queryWithdrawAddr(delegatorAddress: string): Promise { - return this.client.rpcClient.abciQuery( - 'custom/distr/withdraw_addr', + async withdrawRewards( + validatorAddr: string, + baseTx: types.BaseTx, + ): Promise { + const delegatorAddr = this.client.keys.show(baseTx.from); + const msgs: any[] = [ { - delegator_address: delegatorAddress, + type: types.TxType.MsgWithdrawDelegatorReward, + value: { + delegator_address:delegatorAddr, + validator_address:validatorAddr, + } } - ); + ]; + return this.client.tx.buildAndSend(msgs, baseTx); } /** - * Set another address to receive the rewards instead of using the delegator address - * @param withdrawAddress Bech32 account address - * @param baseTx - * @returns + * withdraws the full commission to the validator + * @param validatorAddr withdraw from this validator address + * @param baseTx { types.BaseTx } + * @returns { Promise } * @since v0.17 */ - async setWithdrawAddr( - withdrawAddress: string, - baseTx: types.BaseTx + async withdrawValidatorCommission( + validator_address: string, + baseTx: types.BaseTx, ): Promise { - const from = this.client.keys.show(baseTx.from); - const msgs: types.Msg[] = [ - new MsgSetWithdrawAddress(from, withdrawAddress), + if (!Crypto.checkAddress(validator_address, this.client.config.bech32Prefix.ValAddr)) { + throw new SdkError('Invalid bech32 address'); + } + const msgs: any[] = [ + { + type: types.TxType.MsgWithdrawValidatorCommission, + value: { + validator_address:validator_address, + } + } ]; - return this.client.tx.buildAndSend(msgs, baseTx); } /** - * Withdraw rewards to the withdraw-address(default to the delegator address, you can set to another address via [[setWithdrawAddr]]) + * fundCommunityPool allows an account to directly fund the community pool + * @param amount Coins to be fund * @param baseTx { types.BaseTx } - * @param onlyFromValidator only withdraw from this validator address - * @param isValidator also withdraw validator's commission, can be set to `true` only if the `onlyFromValidator` is specified * @returns { Promise } * @since v0.17 */ - async withdrawRewards( + async fundCommunityPool( + amount: types.Coin[], baseTx: types.BaseTx, - onlyFromValidator = '', - isValidator = false ): Promise { - const from = this.client.keys.show(baseTx.from); - let msgs: types.Msg[]; - if (is.not.empty(onlyFromValidator)) { - if (isValidator) { - msgs = [new MsgWithdrawValidatorRewardsAll(onlyFromValidator)]; - } else { - msgs = [new MsgWithdrawDelegatorReward(from, onlyFromValidator)]; + const depositor = this.client.keys.show(baseTx.from); + const msgs: any[] = [ + { + type: types.TxType.MsgFundCommunityPool, + value: { + depositor:depositor, + amount:amount + } } - } else { - msgs = [new MsgWithdrawDelegatorRewardsAll(from)]; - } + ]; return this.client.tx.buildAndSend(msgs, baseTx); } + + /** + * Params queries params of the distribution module. + */ + queryParams(): Promise { + const request = new types.distribution_query_pb.QueryParamsRequest(); + return this.client.rpcClient.protoQuery( + '/cosmos.distribution.v1beta1.Query/Params', + request, + types.distribution_query_pb.QueryParamsResponse + ); + } + + /** + * ValidatorOutstandingRewards queries rewards of a validator address. + * @param validator_address Bech32 address + */ + queryValidatorOutstandingRewards(validator_address:string): Promise { + if (!validator_address) { + throw new SdkError("validator_address can ont be empty"); + } + const request = new types.distribution_query_pb.QueryValidatorOutstandingRewardsRequest(); + request.setValidatorAddress(validator_address); + return this.client.rpcClient.protoQuery( + '/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards', + request, + types.distribution_query_pb.QueryValidatorOutstandingRewardsResponse + ); + } + + /** + * ValidatorCommission queries accumulated commission for a validator. + * @param validator_address Bech32 address + */ + queryValidatorCommission(validator_address:string): Promise { + if (!validator_address) { + throw new SdkError("validator_address can ont be empty"); + } + const request = new types.distribution_query_pb.QueryValidatorCommissionRequest(); + request.setValidatorAddress(validator_address); + return this.client.rpcClient.protoQuery( + '/cosmos.distribution.v1beta1.Query/ValidatorCommission', + request, + types.distribution_query_pb.QueryValidatorCommissionResponse + ); + } + + /** + * ValidatorSlashes queries slash events of a validator. + * @param validator_address defines the validator address to query for. + * @param starting_height defines the optional starting height to query the slashes. + * @param ending_height defines the optional ending height to query the slashes. + * @param page_number + * @param page_size + */ + queryValidatorSlashes( + validator_address:string, + starting_height:number = 0, + ending_height:number = 0, + page_number:number = 1, + page_size:number = 10 + ): Promise { + if (!validator_address) { + throw new SdkError("validator_address can ont be empty"); + } + const pagination = ModelCreator.createPaginationModel(page_number, page_size, true); + const request = new types.distribution_query_pb.QueryValidatorSlashesRequest(); + request.setValidatorAddress(validator_address); + request.setPagination(pagination); + if (starting_height) {request.setStartingHeight(starting_height);} + if (ending_height) {request.setEndingHeight(ending_height);} + + return this.client.rpcClient.protoQuery( + '/cosmos.distribution.v1beta1.Query/ValidatorSlashes', + request, + types.distribution_query_pb.QueryValidatorSlashesResponse + ); + } + + /** + * DelegationRewards queries the total rewards accrued by a delegation. + * @param validator_address defines the validator address to query for + * @param delegator_address defines the delegator address to query for + */ + queryDelegationRewards(validator_address:string, delegator_address:string): Promise { + if (!validator_address) { + throw new SdkError("validator_address can ont be empty"); + } + if (!delegator_address) { + throw new SdkError("delegator_address can ont be empty"); + } + const request = new types.distribution_query_pb.QueryDelegationRewardsRequest(); + request.setValidatorAddress(validator_address); + request.setDelegatorAddress(delegator_address); + return this.client.rpcClient.protoQuery( + '/cosmos.distribution.v1beta1.Query/DelegationRewards', + request, + types.distribution_query_pb.QueryDelegationRewardsResponse + ); + } + + /** + * DelegationTotalRewards queries the total rewards accrued by a each validator. + * @param delegator_address defines the delegator address to query for + */ + queryDelegationTotalRewards(delegator_address:string): Promise { + if (!delegator_address) { + throw new SdkError("delegator_address can ont be empty"); + } + const request = new types.distribution_query_pb.QueryDelegationTotalRewardsRequest(); + request.setDelegatorAddress(delegator_address); + return this.client.rpcClient.protoQuery( + '/cosmos.distribution.v1beta1.Query/DelegationTotalRewards', + request, + types.distribution_query_pb.QueryDelegationTotalRewardsResponse + ); + } + + /** + * DelegatorValidators queries the validators of a delegator. + * @param delegator_address defines the delegator address to query for + */ + queryDelegatorValidators(delegator_address:string): Promise { + if (!delegator_address) { + throw new SdkError("delegator_address can ont be empty"); + } + const request = new types.distribution_query_pb.QueryDelegatorValidatorsRequest(); + request.setDelegatorAddress(delegator_address); + return this.client.rpcClient.protoQuery( + '/cosmos.distribution.v1beta1.Query/DelegatorValidators', + request, + types.distribution_query_pb.QueryDelegatorValidatorsResponse + ); + } + + /** + * DelegatorWithdrawAddress queries withdraw address of a delegator. + * @param delegator_address defines the delegator address to query for + */ + queryDelegatorWithdrawAddress(delegator_address:string): Promise { + if (!delegator_address) { + throw new SdkError("delegator_address can ont be empty"); + } + const request = new types.distribution_query_pb.QueryDelegatorWithdrawAddressRequest(); + request.setDelegatorAddress(delegator_address); + return this.client.rpcClient.protoQuery( + '/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress', + request, + types.distribution_query_pb.QueryDelegatorWithdrawAddressResponse + ); + } + + /** + * CommunityPool queries the community pool coins. + */ + queryCommunityPool(): Promise { + const request = new types.distribution_query_pb.QueryCommunityPoolRequest(); + return this.client.rpcClient.protoQuery( + '/cosmos.distribution.v1beta1.Query/CommunityPool', + request, + types.distribution_query_pb.QueryCommunityPoolResponse + ); + } + } diff --git a/src/modules/gov.ts b/src/modules/gov.ts index b0d702ad..dead7d32 100644 --- a/src/modules/gov.ts +++ b/src/modules/gov.ts @@ -1,5 +1,6 @@ import { Client } from '../client'; import * as types from '../types'; +import { SdkError, CODES } from '../errors'; import { MsgSubmitParameterChangeProposal, MsgSubmitPlainTextProposal, diff --git a/src/modules/htlc.ts b/src/modules/htlc.ts deleted file mode 100644 index e27a63b9..00000000 --- a/src/modules/htlc.ts +++ /dev/null @@ -1,117 +0,0 @@ -import { Client } from '../client'; -import * as types from '../types'; -import {Crypto} from "../utils/crypto"; -import {SdkError} from "../errors"; -import {MsgClaimHTLC, MsgCreateHTLC, MsgRefundHTLC} from "../types/htlc"; -import {Utils} from "../utils"; -const is = require("is_js"); - -class Consts { - static readonly SecretLength = 32 // the length for the secret - static readonly HashLockLength = 32 // the length for the hash lock - static readonly MaxLengthForAddressOnOtherChain = 128 // maximal length for the address on other chains - static readonly MinTimeLock = 50 // minimal time span for HTLC - static readonly MaxTimeLock = 25480 // maximal time span for HTLC -} - -export class Htlc { - client: Client; - constructor(client: Client) { - this.client = client; - } - - /** - * Query details of an Htlc - * @param hashLock hash lock - * @returns { promise} - */ - queryHTLC(hashLock: string): Promise { - return this.client.rpcClient.abciQuery( - 'custom/htlc/htlc', - { - HashLock: Buffer.from(hashLock, 'hex').toString('base64') - } - ).then(res => { - res.secret = Buffer.from(res.secret, 'base64').toString('hex') - return res - }) - } - - /** - * Claim an opened Htlc - */ - async claim( - baseTx: types.BaseTx, - hashLock: string, - secret: string - ): Promise { - secret = Buffer.from(secret, 'hex').toString('base64') - hashLock = Buffer.from(hashLock, 'hex').toString('base64') - const msgs: types.Msg[] = [ - new MsgClaimHTLC(this.client.keys.show(baseTx.from), secret, hashLock) - ] - return this.client.tx.buildAndSend(msgs, baseTx); - } - - /** - * Create an Htlc - * @param - * @returns { Promise } - */ - async create( - baseTx: types.BaseTx, - to: string, - receiverOnOtherChain: string, - amount: types.Coin[], - secret: string, - lockTime: string, - hashLock: string, - timestamp?: string, - ): Promise { - if (!Crypto.checkAddress(to, this.client.config.bech32Prefix.AccAddr)) { - throw new SdkError('Invalid bech32 address, prefix of address should be: ' + this.client.config.bech32Prefix.AccAddr); - } - if (!is.empty(secret) && secret.length != Consts.SecretLength * 2) { - throw new SdkError(`the secret must be ${Consts.SecretLength} bytes long`) - } - let ts: number = parseInt(timestamp + '') - if (isNaN(ts)) timestamp = '0' - if (is.empty(hashLock)) { - if(is.empty(secret)) { - secret = Buffer.of(...Array.from({length: Consts.SecretLength}, () => Math.round(Math.random() * 255))).toString('hex'); - } - if (!isNaN(ts) && ts > 0) { - let hex: string = ts.toString(16); - secret += Array(16 - hex.length + 1).join('0') + hex - } - hashLock = Buffer.from(Utils.sha256(secret), 'hex').toString('base64') - } else { - hashLock = Buffer.from(hashLock, 'hex').toString('base64') - } - const from = this.client.keys.show(baseTx.from); - const msgs: types.Msg[] = [ - new MsgCreateHTLC(from, to, receiverOnOtherChain, amount, lockTime, hashLock, timestamp + '') - ]; - return this.client.tx.buildAndSend(msgs, baseTx).then(res => { - let result: types.CreateHTLCResult = res - result.secret = secret - result.hashLock = Buffer.from(hashLock, 'base64').toString('hex') - return result - }); - } - - /** - * Refund from an expired Htlc - */ - async refund( - baseTx: types.BaseTx, - hashLock: string - ): Promise { - hashLock = Buffer.from(hashLock, 'hex').toString('base64') - const msgs: types.Msg[] = [ - new MsgRefundHTLC(this.client.keys.show(baseTx.from), hashLock) - ] - return this.client.tx.buildAndSend(msgs, baseTx); - } - -} diff --git a/src/modules/index.ts b/src/modules/index.ts index da6e20ed..6326518d 100644 --- a/src/modules/index.ts +++ b/src/modules/index.ts @@ -10,7 +10,9 @@ export * from './distribution'; export * from './service'; export * from './oracle'; export * from './random'; -export * from './asset'; +export * from './token'; export * from './utils'; export * from './tendermint'; -export * from './htlc'; \ No newline at end of file +export * from './coinswap'; +export * from './protobuf'; +export * from './nft'; diff --git a/src/modules/keys.ts b/src/modules/keys.ts index 1d490064..4a5f53ea 100644 --- a/src/modules/keys.ts +++ b/src/modules/keys.ts @@ -1,6 +1,6 @@ import { Client } from '../client'; import { Crypto } from '../utils/crypto'; -import { SdkError } from '../errors'; +import { SdkError, CODES } from '../errors'; import * as is from 'is_js'; import * as types from '../types'; @@ -25,10 +25,15 @@ export class Keys { * * @param name Name of the key * @param password Password for encrypting the keystore + * @param type Pubkey Type * @returns Bech32 address and mnemonic * @since v0.17 */ - add(name: string, password: string): { address: string; mnemonic: string } { + add( + name: string, + password: string, + type:types.PubkeyType = types.PubkeyType.secp256k1 + ): { address: string; mnemonic: string } { if (is.empty(name)) { throw new SdkError(`Name of the key can not be empty`); } @@ -38,13 +43,13 @@ export class Keys { if (!this.client.config.keyDAO.encrypt) { throw new SdkError(`Encrypt method of KeyDAO not implemented`); } - const exists = this.client.config.keyDAO.read(name); - if (exists) { - throw new SdkError(`Key with name '${name}' already exists`); - } + // const exists = this.client.config.keyDAO.read(name); + // if (exists) { + // throw new SdkError(`Key with name '${name}' already exists`); + // } const mnemonic = Crypto.generateMnemonic(); const privKey = Crypto.getPrivateKeyFromMnemonic(mnemonic); - const pubKey = Crypto.getPublicKeyFromPrivateKey(privKey); + const pubKey = Crypto.getPublicKeyFromPrivateKey(privKey, type); const address = Crypto.getAddressFromPublicKey( pubKey, this.client.config.bech32Prefix.AccAddr @@ -55,10 +60,17 @@ export class Keys { password ); + const encryptedMnemonic = this.client.config.keyDAO.encrypt( + mnemonic, + password + ); + // Save the key to app this.client.config.keyDAO.write(name, { - address, - privKey: encryptedPrivKey, + address, + privateKey: encryptedPrivKey, + publicKey: Crypto.aminoMarshalPubKey(pubKey), + mnemonic: encryptedMnemonic, }); return { address, mnemonic }; @@ -70,8 +82,9 @@ export class Keys { * @param name Name of the key * @param password Password for encrypting the keystore * @param mnemonic Mnemonic of the key - * @param derive Derive a private key using the default HD path (default: true) + * @param type Pubkey Type * @param index The bip44 address index (default: 0) + * @param derive Derive a private key using the default HD path (default: true) * @param saltPassword A passphrase for generating the salt, according to bip39 * @returns Bech32 address * @since v0.17 @@ -80,9 +93,10 @@ export class Keys { name: string, password: string, mnemonic: string, - derive = true, + type:types.PubkeyType = types.PubkeyType.secp256k1, index = 0, - saltPassword = '' + derive = true, + saltPassword = '', ): string { if (is.empty(name)) { throw new SdkError(`Name of the key can not be empty`); @@ -96,18 +110,18 @@ export class Keys { if (!this.client.config.keyDAO.encrypt) { throw new SdkError(`Encrypt method of KeyDAO not implemented`); } - const exists = this.client.config.keyDAO.read(name); - if (exists) { - throw new SdkError(`Key with name '${name}' exists`); - } + // const exists = this.client.config.keyDAO.read(name); + // if (exists) { + // throw new SdkError(`Key with name '${name}' exists`); + // } const privKey = Crypto.getPrivateKeyFromMnemonic( mnemonic, - derive, index, + derive, saltPassword ); - const pubKey = Crypto.getPublicKeyFromPrivateKey(privKey); + const pubKey = Crypto.getPublicKeyFromPrivateKey(privKey, type); const address = Crypto.getAddressFromPublicKey( pubKey, this.client.config.bech32Prefix.AccAddr @@ -120,8 +134,9 @@ export class Keys { // Save the key to app this.client.config.keyDAO.write(name, { - address, - privKey: encryptedPrivKey, + address, + privateKey: encryptedPrivKey, + publicKey: Crypto.aminoMarshalPubKey(pubKey), }); return address; @@ -133,13 +148,15 @@ export class Keys { * @param name Name of the key * @param password Password of the keystore * @param keystore Keystore json or object + * @param type Pubkey Type * @returns Bech32 address * @since v0.17 */ import( name: string, password: string, - keystore: string | types.Keystore + keystore: string | types.Keystore, + type:types.PubkeyType = types.PubkeyType.secp256k1 ): string { if (is.empty(name)) { throw new SdkError(`Name of the key can not be empty`); @@ -153,13 +170,13 @@ export class Keys { if (!this.client.config.keyDAO.encrypt) { throw new SdkError(`Encrypt method of KeyDAO not implemented`); } - const exists = this.client.config.keyDAO.read(name); - if (exists) { - throw new SdkError(`Key with name '${name}' already exists`); - } + // const exists = this.client.config.keyDAO.read(name); + // if (exists) { + // throw new SdkError(`Key with name '${name}' already exists`); + // } const privKey = Crypto.getPrivateKeyFromKeyStore(keystore, password); - const pubKey = Crypto.getPublicKeyFromPrivateKey(privKey); + const pubKey = Crypto.getPublicKeyFromPrivateKey(privKey, type); const address = Crypto.getAddressFromPublicKey( pubKey, this.client.config.bech32Prefix.AccAddr @@ -172,8 +189,60 @@ export class Keys { // Save the key to app this.client.config.keyDAO.write(name, { - address, - privKey: encryptedPrivKey, + address, + privateKey: encryptedPrivKey, + publicKey:Crypto.aminoMarshalPubKey(pubKey), + }); + + return address; + } + + /** + * Import a PrivateKey + * + * @param name Name of the key + * @param password Password of the keystore + * @param privateKey privateKey hex + * @param type Pubkey Type + * @returns Bech32 address + * @since v0.17 + */ + importPrivateKey( + name: string, + password: string, + privateKey: string, + type:types.PubkeyType = types.PubkeyType.secp256k1 + ): string { + if (is.empty(name)) { + throw new SdkError(`Name of the key can not be empty`); + } + if (is.empty(password)) { + throw new SdkError(`Password of the key can not be empty`); + } + if (is.empty(privateKey)) { + throw new SdkError(`privateKey can not be empty`); + } + + // const exists = this.client.config.keyDAO.read(name); + // if (exists) { + // throw new SdkError(`Key with name '${name}' already exists`); + // } + + const pubKey = Crypto.getPublicKeyFromPrivateKey(privateKey, type); + const address = Crypto.getAddressFromPublicKey( + pubKey, + this.client.config.bech32Prefix.AccAddr + ); + + const encryptedPrivKey = this.client.config.keyDAO.encrypt!( + privateKey, + password + ); + // Save the key to app + this.client.config.keyDAO.write(name, { + address, + privateKey: encryptedPrivKey, + publicKey:Crypto.aminoMarshalPubKey(pubKey) }); return address; @@ -185,10 +254,11 @@ export class Keys { * @param name Name of the key * @param keyPassword Password of the key * @param keystorePassword Password for encrypting the keystore + * @param iterations * @returns Keystore json * @since v0.17 */ - export(name: string, keyPassword: string, keystorePassword: string): string { + export(name: string, keyPassword: string, keystorePassword: string, iterations?: number): string { if (is.empty(name)) { throw new SdkError(`Name of the key can not be empty`); } @@ -204,14 +274,15 @@ export class Keys { } const privKey = this.client.config.keyDAO.decrypt( - keyObj.privKey, + keyObj.privateKey, keyPassword ); const keystore = Crypto.generateKeyStore( privKey, keystorePassword, - this.client.config.bech32Prefix.AccAddr + this.client.config.bech32Prefix.AccAddr, + iterations ); return JSON.stringify(keystore); } @@ -239,10 +310,10 @@ export class Keys { } // Check keystore password - this.client.config.keyDAO.decrypt(keyObj.privKey, password); + this.client.config.keyDAO.decrypt(keyObj.privateKey, password); // Delete the key from app - this.client.config.keyDAO.delete(name); + this.client.config.keyDAO.delete!(name); } /** @@ -258,7 +329,7 @@ export class Keys { } const keyObj = this.client.config.keyDAO.read(name); if (!keyObj) { - throw new SdkError(`Key with name '${name}' not found`); + throw new SdkError(`Key with name '${name}' not found`,CODES.KeyNotFound); } return keyObj.address; } diff --git a/src/modules/nft.ts b/src/modules/nft.ts new file mode 100644 index 00000000..1d077149 --- /dev/null +++ b/src/modules/nft.ts @@ -0,0 +1,299 @@ +import { Client } from '../client'; +import { Crypto } from '../utils/crypto'; +import * as types from '../types'; +import { SdkError, CODES } from '../errors'; + +/** + * This module implements NFT related functions + * + * @category Modules + * @since v0.17 + */ +export class Nft { + /** @hidden */ + private client: Client; + /** @hidden */ + constructor(client: Client) { + this.client = client; + } + + /** + * issue Denom + * @param id string + * @param name string + * @param schema string + * @param baseTx { types.BaseTx } + * @returns + * @since v0.17 + */ + async issueDenom( + id: string, + name: string, + schema: string, + baseTx: types.BaseTx + ): Promise { + const sender = this.client.keys.show(baseTx.from); + const msgs: any[] = [ + { + type:types.TxType.MsgIssueDenom, + value:{ + id, + name, + schema, + sender + } + } + ]; + return this.client.tx.buildAndSend(msgs, baseTx); + } + + /** + * mint NFT + * @param id string + * @param denom_id string + * @param name string + * @param uri string + * @param data string + * @param recipient string If recipient it's "", recipient default is sender + * @param baseTx { types.BaseTx } + * @returns + * @since v0.17 + */ + async mintNft( + id: string, + denom_id:string, + name: string, + uri:string, + data:string, + recipient: string, + baseTx: types.BaseTx + ): Promise { + if (recipient && !Crypto.checkAddress(recipient, this.client.config.bech32Prefix.AccAddr)) { + throw new SdkError('recipient Invalid bech32 address'); + } + const sender = this.client.keys.show(baseTx.from); + if (!recipient) { + recipient = sender; + } + + const msgs: any[] = [ + { + type:types.TxType.MsgMintNFT, + value:{ + id, + denom_id, + name, + uri, + data, + sender, + recipient + } + } + ]; + return this.client.tx.buildAndSend(msgs, baseTx); + } + + /** + * edit NFT + * @param id string + * @param denom_id string + * @param newProperty {name?: string,uri?:string,data?:string} new nft property + * @param baseTx { types.BaseTx } + * @returns + * @since v0.17 + */ + async editNft( + id: string, + denom_id:string, + new_property:{name?:string, uri?:string, data?:string}, + baseTx: types.BaseTx + ): Promise { + const sender = this.client.keys.show(baseTx.from); + const msgs: any[] = [ + { + type:types.TxType.MsgEditNFT, + value:{ + id, + denom_id, + sender, + ...new_property + } + } + ]; + return this.client.tx.buildAndSend(msgs, baseTx); + } + + /** + * transfer NFT + * @param id string + * @param denom_id string + * @param recipient string + * @param newProperty {name?: string,uri?:string,data?:string} new nft property + * @param baseTx { types.BaseTx } + * @returns + * @since v0.17 + */ + async transferNft( + id: string, + denom_id:string, + recipient:string, + new_property:{name?:string, uri?:string, data?:string}, + baseTx: types.BaseTx + ): Promise { + if (recipient && !Crypto.checkAddress(recipient, this.client.config.bech32Prefix.AccAddr)) { + throw new SdkError('recipient Invalid bech32 address'); + } + const sender = this.client.keys.show(baseTx.from); + const msgs: any[] = [ + { + type:types.TxType.MsgTransferNFT, + value:{ + id, + denom_id, + sender, + recipient, + ...new_property + } + } + ]; + return this.client.tx.buildAndSend(msgs, baseTx); + } + + /** + * burn NFT + * @param id string + * @param denom_id string + * @param baseTx { types.BaseTx } + * @returns + * @since v0.17 + */ + async burnNft( + id: string, + denom_id:string, + baseTx: types.BaseTx + ): Promise { + const sender = this.client.keys.show(baseTx.from); + const msgs: any[] = [ + { + type:types.TxType.MsgBurnNFT, + value:{ + id, + denom_id, + sender, + } + } + ]; + return this.client.tx.buildAndSend(msgs, baseTx); + } + + /** + * Supply queries the total supply of a given denom or owner + * @param denom_id + * @param owner + */ + querySupply(denom_id?:string, owner?:string): Promise { + if (!denom_id && !owner) { + throw new SdkError("there must be one denom_id or owner"); + } + const request = new types.nft_query_pb.QuerySupplyRequest(); + if (denom_id) {request.setDenomId(denom_id)} + if (owner) {request.setOwner(owner)} + + return this.client.rpcClient.protoQuery( + '/irismod.nft.Query/Supply', + request, + types.nft_query_pb.QuerySupplyResponse + ); + } + + /** + * Owner queries the NFTs of the specified owner + * @param owner + * @param denom_id + */ + queryOwner(owner:string, denom_id?:string): Promise { + if (!owner) { + throw new SdkError("owner can ont be empty"); + } + const request = new types.nft_query_pb.QueryOwnerRequest(); + request.setOwner(owner); + if (denom_id) {request.setDenomId(denom_id)} + + return this.client.rpcClient.protoQuery( + '/irismod.nft.Query/Owner', + request, + types.nft_query_pb.QueryOwnerResponse + ); + } + + /** + * Collection queries the NFTs of the specified denom + * @param denom_id + */ + queryCollection(denom_id:string): Promise { + if (!denom_id) { + throw new SdkError("denom_id can ont be empty"); + } + const request = new types.nft_query_pb.QueryCollectionRequest(); + request.setDenomId(denom_id); + + return this.client.rpcClient.protoQuery( + '/irismod.nft.Query/Collection', + request, + types.nft_query_pb.QueryCollectionResponse + ); + } + + /** + * Denom queries the definition of a given denom + * @param denom_id + */ + queryDenom(denom_id:string): Promise { + if (!denom_id) { + throw new SdkError("denom_id can ont be empty"); + } + const request = new types.nft_query_pb.QueryDenomRequest(); + request.setDenomId(denom_id); + + return this.client.rpcClient.protoQuery( + '/irismod.nft.Query/Denom', + request, + types.nft_query_pb.QueryDenomResponse + ); + } + + /** + * Denoms queries all the denoms + */ + queryDenoms(): Promise { + const request = new types.nft_query_pb.QueryDenomsRequest(); + return this.client.rpcClient.protoQuery( + '/irismod.nft.Query/Denoms', + request, + types.nft_query_pb.QueryDenomsResponse + ); + } + + /** + * NFT queries the NFT for the given denom and token ID + * @param denom_id + * @param token_id + */ + queryNFT(denom_id:string, token_id:string): Promise { + if (!denom_id) { + throw new SdkError("denom_id can ont be empty"); + } + if (!token_id) { + throw new SdkError("token_id can ont be empty"); + } + const request = new types.nft_query_pb.QueryNFTRequest(); + request.setDenomId(denom_id); + request.setTokenId(token_id); + + return this.client.rpcClient.protoQuery( + '/irismod.nft.Query/NFT', + request, + types.nft_query_pb.QueryNFTResponse + ); + } +} diff --git a/src/modules/oracle.ts b/src/modules/oracle.ts index 5c97468d..9721cffe 100644 --- a/src/modules/oracle.ts +++ b/src/modules/oracle.ts @@ -1,6 +1,6 @@ import { Client } from '../client'; import * as types from '../types'; -import { SdkError } from '../errors'; +import { SdkError, CODES } from '../errors'; /** * @category Modules @@ -68,7 +68,7 @@ export class Oracle { * ** Not Supported ** */ createFeed() { - throw new SdkError('Not supported'); + throw new SdkError('Not supported',CODES.Internal); } /** @@ -77,7 +77,7 @@ export class Oracle { * ** Not Supported ** */ startFeed() { - throw new SdkError('Not supported'); + throw new SdkError('Not supported',CODES.Internal); } /** @@ -86,7 +86,7 @@ export class Oracle { * ** Not Supported ** */ pauseFeed() { - throw new SdkError('Not supported'); + throw new SdkError('Not supported',CODES.Internal); } /** @@ -95,6 +95,6 @@ export class Oracle { * ** Not Supported ** */ editFeed() { - throw new SdkError('Not supported'); + throw new SdkError('Not supported',CODES.Internal); } } diff --git a/src/modules/protobuf.ts b/src/modules/protobuf.ts new file mode 100644 index 00000000..d07c564b --- /dev/null +++ b/src/modules/protobuf.ts @@ -0,0 +1,238 @@ +import { Client } from '../client'; +import * as types from '../types'; +import { SdkError, CODES } from '../errors'; + +const slashing_pb = require('../types/proto-types/cosmos/slashing/v1beta1/slashing_pb'); + +/** + * ProtobufModel module allows you to deserialize protobuf serialize string + * + * @category Modules + * @since v0.17 + */ +export class Protobuf { + /** @hidden */ + private client: Client; + /** @hidden */ + constructor(client: Client) { + this.client = client; + } + + /** + * deserialize Tx + * @param {[type]} Tx:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} Tx object + */ + deserializeTx(tx:string, returnProtobufModel?:boolean):types.ValidatorSigningInfo|object{ + if (!tx) { + throw new SdkError('tx can not be empty'); + } + if (returnProtobufModel) { + return types.tx_tx_pb.Tx.deserializeBinary(tx); + }else{ + let txObj = types.tx_tx_pb.Tx.deserializeBinary(tx).toObject(); + if (txObj.body && txObj.body.messagesList) { + txObj.body.messagesList = txObj.body.messagesList.map((msg:{typeUrl:string,value:string})=>{ + return this.unpackMsg(msg); + }); + } + return txObj; + } + } + + /** + * Unpack protobuffer tx msg + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} message object + */ + unpackMsg(msg:{typeUrl:string,value:string}, returnProtobufModel?:boolean):types.ValidatorSigningInfo|object|null{ + if (!msg) { + throw new SdkError('message can not be empty'); + } + let messageModelClass:any; + let typeUrl = msg.typeUrl.replace(/^\//,''); + switch (typeUrl) { + //bank + case types.TxType.MsgSend: { + messageModelClass = types.MsgSend.getModelClass(); + break; + } + case types.TxType.MsgMultiSend: { + messageModelClass = types.MsgMultiSend.getModelClass(); + break; + } + //staking + case types.TxType.MsgDelegate: { + messageModelClass = types.MsgDelegate.getModelClass(); + break; + } + case types.TxType.MsgUndelegate: { + messageModelClass = types.MsgUndelegate.getModelClass(); + break; + } + case types.TxType.MsgBeginRedelegate: { + messageModelClass = types.MsgRedelegate.getModelClass(); + break; + } + //distribution + case types.TxType.MsgWithdrawDelegatorReward: { + messageModelClass = types.MsgWithdrawDelegatorReward.getModelClass(); + break; + } + case types.TxType.MsgSetWithdrawAddress: { + messageModelClass = types.MsgSetWithdrawAddress.getModelClass(); + break; + } + case types.TxType.MsgWithdrawValidatorCommission: { + messageModelClass = types.MsgWithdrawValidatorCommission.getModelClass(); + break; + } + case types.TxType.MsgFundCommunityPool: { + messageModelClass = types.MsgFundCommunityPool.getModelClass(); + break; + } + //token + case types.TxType.MsgIssueToken: { + messageModelClass = types.MsgIssueToken.getModelClass(); + break; + } + case types.TxType.MsgEditToken: { + messageModelClass = types.MsgEditToken.getModelClass(); + break; + } + case types.TxType.MsgMintToken: { + messageModelClass = types.MsgMintToken.getModelClass(); + break; + } + case types.TxType.MsgTransferTokenOwner: { + messageModelClass = types.MsgTransferTokenOwner.getModelClass(); + break; + } + + //coinswap + case types.TxType.MsgAddLiquidity: { + + break; + } + case types.TxType.MsgRemoveLiquidity: { + + break; + } + case types.TxType.MsgSwapOrder: { + + break; + } + //nft + case types.TxType.MsgIssueDenom: { + messageModelClass = types.MsgIssueDenom.getModelClass(); + break; + } + case types.TxType.MsgMintNFT: { + messageModelClass = types.MsgMintNFT.getModelClass(); + break; + } + case types.TxType.MsgEditNFT: { + messageModelClass = types.MsgEditNFT.getModelClass(); + break; + } + case types.TxType.MsgTransferNFT: { + messageModelClass = types.MsgTransferNFT.getModelClass(); + break; + } + case types.TxType.MsgBurnNFT: { + messageModelClass = types.MsgBurnNFT.getModelClass(); + break; + } + default: { + throw new SdkError("not exist tx type",CODES.InvalidType); + } + } + if (messageModelClass && messageModelClass.deserializeBinary) { + let messageObj = messageModelClass.deserializeBinary(msg.value); + if (!returnProtobufModel) { + messageObj = messageObj.toObject(); + messageObj.type = typeUrl; + } + return messageObj; + }else{ + return null; + } + } + + /** + * deserialize SignDoc + * @param {[type]} signDoc:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} signDoc object + */ + deserializeSignDoc(signDoc:string, returnProtobufModel?:boolean):types.ValidatorSigningInfo|object{ + if (!signDoc) { + throw new SdkError('signDoc can not be empty'); + } + if (returnProtobufModel) { + return types.tx_tx_pb.SignDoc.deserializeBinary(signDoc); + }else{ + return types.tx_tx_pb.SignDoc.deserializeBinary(signDoc).toObject(); + } + } + + /** + * deserialize txRaw + * @param {[type]} txRaw:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} txRaw object + */ + deserializeTxRaw(txRaw:string, returnProtobufModel?:boolean):types.ValidatorSigningInfo|object{ + if (!txRaw) { + throw new SdkError('txRaw can not be empty'); + } + if (returnProtobufModel) { + return types.tx_tx_pb.TxRaw.deserializeBinary(txRaw); + }else{ + return types.tx_tx_pb.TxRaw.deserializeBinary(txRaw).toObject(); + } + } + + /** + * deserialize Signing Info + * @param {[type]} signingInfo:string base64 string + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} Signing Info object + */ + deserializeSigningInfo(signingInfo:string, returnProtobufModel?:boolean):types.ValidatorSigningInfo|object{ + if (!signingInfo) { + throw new SdkError('signing info can not be empty'); + } + if (returnProtobufModel) { + return slashing_pb.ValidatorSigningInfo.deserializeBinary(signingInfo); + }else{ + return slashing_pb.ValidatorSigningInfo.deserializeBinary(signingInfo).toObject(); + } + } + + /** + * deserialize Pubkey + * @param {[type]} pubKey:{typeUrl:string, value:string} + * @param {[type]} returnProtobufModel:bool If true, return the Protobuf model + * @return {[type]} pubKey object + */ + deserializePubkey(pubKey:{typeUrl:string, value:string}, returnProtobufModel?:boolean):types.ValidatorSigningInfo|object{ + if (!pubKey) { + throw new SdkError('pubKey can not be empty'); + } + let result:{typeUrl:string, value:any} = {...pubKey}; + switch(pubKey.typeUrl){ + case '/cosmos.crypto.ed25519.PubKey': + result.value = types.crypto_ed25519_keys_pb.PubKey.deserializeBinary(pubKey.value); + break; + case '/cosmos.crypto.secp256k1.PubKey': + result.value = types.crypto_secp256k1_keys_pb.PubKey.deserializeBinary(pubKey.value); + break; + } + if (!returnProtobufModel && result.value && result.value.toObject) { + result.value = result.value.toObject(); + } + return result; + } +} diff --git a/src/modules/random.ts b/src/modules/random.ts index cca45d46..03d42dcc 100644 --- a/src/modules/random.ts +++ b/src/modules/random.ts @@ -1,7 +1,7 @@ import { Client } from '../client'; import * as types from '../types'; import { MsgRequestRand } from '../types/random'; -import { SdkError } from '../errors'; +import { SdkError, CODES } from '../errors'; import { EventQueryBuilder, EventKey } from '../types'; /** @@ -69,39 +69,4 @@ export class Random { return this.client.tx.buildAndSend(msgs, baseTx); } - - /** - * Subscribe notification when the random is generated - * @param requestID The request id of the random number - * @param callback A function to receive notifications - * @since v0.17 - */ - subscribeRandom( - requestID: string, - callback: (error?: SdkError, data?: types.RandomInfo) => void - ): types.EventSubscription { - const condition = new EventQueryBuilder().addCondition( - new types.Condition(EventKey.RequestID).eq(requestID) - ); - const subscription = this.client.eventListener.subscribeNewBlock( - (error?: SdkError, data?: types.EventDataNewBlock) => { - if (error) { - callback(error); - return; - } - - const tags = data?.result_begin_block.tags; - if (!tags) return; - tags.forEach(tag => { - if (tag.key === 'request-id' && tag.value === requestID) { - this.queryRandom(requestID).then(random => { - callback(undefined, random); - }); - } - }); - }, - condition - ); - return subscription; - } } diff --git a/src/modules/service.ts b/src/modules/service.ts index 1929e37c..73da3d0c 100644 --- a/src/modules/service.ts +++ b/src/modules/service.ts @@ -15,7 +15,7 @@ import { MsgWithdrawEarnedFees, MsgWithdrawTax, } from '../types/service'; -import { SdkError } from '../errors'; +import { SdkError, CODES } from '../errors'; import { Utils } from '../utils'; import { Coin } from '../types'; @@ -389,7 +389,7 @@ export class Service { // ]; // return this.client.tx.buildAndSend(msgs, baseTx); - throw new SdkError('Not supported'); + throw new SdkError('Not supported',CODES.Internal); } /** diff --git a/src/modules/slashing.ts b/src/modules/slashing.ts index 66441c33..16db20fc 100644 --- a/src/modules/slashing.ts +++ b/src/modules/slashing.ts @@ -1,14 +1,9 @@ import { Client } from '../client'; import * as types from '../types'; import { MsgUnjail } from '../types/slashing'; -import { SdkError } from '../errors'; +import { SdkError, CODES } from '../errors'; import { StoreKeys } from '../utils'; -import { - unmarshalValidatorSigningInfo, - encodeBech32, - decodeBech32, -} from '@irisnet/amino-js'; -import { base64ToBytes } from '@tendermint/belt'; +import * as Bech32 from 'bech32'; /** * In Proof-of-Stake blockchain, validators will get block provisions by staking their token. @@ -38,7 +33,7 @@ export class Slashing { // 'custom/slashing/parameters' // ); - throw new SdkError('Not supported'); + throw new SdkError('Not supported',CODES.Internal); } /** @@ -59,9 +54,7 @@ export class Slashing { if (!res || !res.response || !res.response.value) { throw new SdkError('Validator not found'); } - return unmarshalValidatorSigningInfo( - base64ToBytes(res.response.value) - ) as types.ValidatorSigningInfo; + return this.client.protobuf.deserializeSigningInfo(res.response.value) as types.ValidatorSigningInfo; }); } @@ -73,10 +66,10 @@ export class Slashing { */ async unjail(baseTx: types.BaseTx): Promise { const val = this.client.keys.show(baseTx.from); - const [hrp, bytes] = decodeBech32(val); - const validatorAddr = encodeBech32( + const words = Bech32.decode(val).words; + const validatorAddr = Bech32.encode( this.client.config.bech32Prefix.ValAddr, - bytes + words ); const msgs: types.Msg[] = [new MsgUnjail(validatorAddr)]; diff --git a/src/modules/staking.ts b/src/modules/staking.ts index 55e08c34..b1f13780 100644 --- a/src/modules/staking.ts +++ b/src/modules/staking.ts @@ -1,10 +1,10 @@ -import { Client } from '../client'; +import {Client} from '../client'; import * as types from '../types'; -import { SdkError } from '../errors'; -import { MsgDelegate, MsgUndelegate, MsgRedelegate } from '../types/staking'; -import { EventQueryBuilder, EventKey, EventAction } from '../types'; -import { Utils, Crypto } from '../utils'; -import { marshalPubKey } from '@irisnet/amino-js'; +import { SdkError, CODES } from '../errors'; +import {EventQueryBuilder, EventKey, EventAction} from '../types'; +import {Utils, Crypto} from '../utils'; +import * as is from 'is_js'; +import { ModelCreator } from "../helper"; /** * This module provides staking functionalities for validators and delegators @@ -12,426 +12,504 @@ import { marshalPubKey } from '@irisnet/amino-js'; * [More Details](https://www.irisnet.org/docs/features/stake.html) * * @category Modules - * @since v0.17 + * @since */ export class Staking { /** @hidden */ private client: Client; + /** @hidden */ constructor(client: Client) { this.client = client; } /** - * Query a delegation based on delegator address and validator address + * Delegate liquid tokens to an validator * - * @param delegatorAddr Bech32 delegator address * @param validatorAddr Bech32 validator address + * @param amount Amount to be delegated to the validator + * @param baseTx * @returns * @since v0.17 */ - queryDelegation( - delegatorAddr: string, - validatorAddr: string - ): Promise { - return this.client.rpcClient.abciQuery( - 'custom/stake/delegation', + delegate( + validatorAddr: string, + amount: types.Coin, + baseTx: types.BaseTx + ): Promise { + const delegatorAddr = this.client.keys.show(baseTx.from); + const msgs: any[] = [ { - DelegatorAddr: delegatorAddr, - ValidatorAddr: validatorAddr, + type: types.TxType.MsgDelegate, + value: { + delegator_address: delegatorAddr, + validator_address: validatorAddr, + amount + } } - ); + ]; + return this.client.tx.buildAndSend(msgs, baseTx); } /** - * Query all delegations made from one delegator - * - * @param delegatorAddr Bech32 delegator address + * Undelegate from a validator + * @param validatorAddr Bech32 validator address + * @param amount Amount to be undelegated from the validator + * @param baseTx * @returns * @since v0.17 */ - queryDelegations(delegatorAddr: string): Promise { - return this.client.rpcClient.abciQuery( - 'custom/stake/delegatorDelegations', + async undelegate( + validatorAddr: string, + amount: types.Coin, + baseTx: types.BaseTx + ): Promise { + const delegatorAddr = this.client.keys.show(baseTx.from); + const msgs: any[] = [ { - DelegatorAddr: delegatorAddr, + type: types.TxType.MsgUndelegate, + value: { + delegator_address: delegatorAddr, + validator_address: validatorAddr, + amount + } } - ); + ]; + return this.client.tx.buildAndSend(msgs, baseTx); } /** - * Query an unbonding-delegation record based on delegator and validator address - * - * @param delegatorAddr Bech32 delegator address - * @param validatorAddr Bech32 validator address - * @returns + * Redelegate illiquid tokens from one validator to another + * @param validatorSrcAddr Bech32 source validator address + * @param validatorDstAddr Bech32 destination validator address + * @param amount Amount to be redelegated + * @param baseTx * @since v0.17 */ - queryUnbondingDelegation( - delegatorAddr: string, - validatorAddr: string - ): Promise { - return this.client.rpcClient.abciQuery( - 'custom/stake/unbondingDelegation', + async redelegate( + validatorSrcAddr: string, + validatorDstAddr: string, + amount: types.Coin, + baseTx: types.BaseTx + ): Promise { + const delegatorAddr = this.client.keys.show(baseTx.from); + const msgs: any[] = [ { - DelegatorAddr: delegatorAddr, - ValidatorAddr: validatorAddr, + type: types.TxType.MsgBeginRedelegate, + value: { + delegator_address: delegatorAddr, + validator_src_address: validatorSrcAddr, + validator_dst_address: validatorDstAddr, + amount + } } - ); + ]; + return this.client.tx.buildAndSend(msgs, baseTx); } /** - * Query all unbonding-delegations records for one delegator + * Query a delegation based on delegator address and validator address * - * @param delegatorAddr Bech32 delegator address + * @param delegator_addr Bech32 delegator address + * @param validator_addr Bech32 validator address * @returns - * @since v0.17 + * @since */ - queryUnbondingDelegations( - delegatorAddr: string - ): Promise { - return this.client.rpcClient.abciQuery( - 'custom/stake/delegatorUnbondingDelegations', - { - DelegatorAddr: delegatorAddr, - } + queryDelegation( + delegator_addr: string, + validator_addr: string + ): Promise { + if (is.undefined(validator_addr)) { + throw new SdkError('validator address can not be empty'); + } + if (is.undefined(delegator_addr)) { + throw new SdkError('delegator address can not be empty'); + } + + const request = new types.staking_query_pb.QueryDelegationRequest() + .setValidatorAddr(validator_addr) + .setDelegatorAddr(delegator_addr); + + return this.client.rpcClient.protoQuery( + '/cosmos.staking.v1beta1.Query/Delegation', + request, + types.staking_query_pb.QueryDelegationResponse ); } /** - * Query a redelegation record based on delegator and a source and destination validator address + * Query all delegations made from one delegator * - * @param delegatorAddr Bech32 delegator address - * @param srcValidatorAddr Bech32 source validator address - * @param dstValidatorAddr Bech32 destination validator address + * @param pagination page info + * @param delegator_addr Bech32 delegator address * @returns - * @since v0.17 + * @since */ - queryRedelegation( - delegatorAddr: string, - srcValidatorAddr: string, - dstValidatorAddr: string - ): Promise { - return this.client.rpcClient.abciQuery( - 'custom/stake/redelegation', - { - DelegatorAddr: delegatorAddr, - ValSrcAddr: srcValidatorAddr, - ValDstAddr: dstValidatorAddr, - } + queryDelegations( + query: { + key?: string, + page?: number; + size?: number; + count_total?: boolean; + delegator_addr: string; + } + ): Promise { + const {key, page, size, count_total, delegator_addr} = query; + if (is.undefined(delegator_addr)) { + throw new SdkError('delegator address can not be empty'); + } + const request = new types.staking_query_pb.QueryDelegatorDelegationsRequest() + .setDelegatorAddr(delegator_addr) + .setPagination(ModelCreator.createPaginationModel(page, size, count_total, key)); + return this.client.rpcClient.protoQuery( + '/cosmos.staking.v1beta1.Query/DelegatorDelegations', + request, + types.staking_query_pb.QueryDelegatorDelegationsResponse ); } /** - * Query all redelegations records for one delegator + * Query an unbonding-delegation record based on delegator and validator address * - * @param delegatorAddr Bech32 delegator address + * @param delegator_addr Bech32 delegator address + * @param validator_addr Bech32 validator address * @returns - * @since v0.17 + * @since */ - queryRedelegations(delegatorAddr: string): Promise { - return this.client.rpcClient.abciQuery( - 'custom/stake/delegatorRedelegations', - { - DelegatorAddr: delegatorAddr, - } + queryUnbondingDelegation( + delegator_addr: string, + validator_addr: string + ): Promise { + if (is.undefined(validator_addr)) { + throw new SdkError('validator address can not be empty'); + } + if (is.undefined(delegator_addr)) { + throw new SdkError('delegator address can not be empty'); + } + + const request = new types.staking_query_pb.QueryUnbondingDelegationRequest() + .setValidatorAddr(validator_addr) + .setDelegatorAddr(delegator_addr); + + return this.client.rpcClient.protoQuery( + '/cosmos.staking.v1beta1.Query/UnbondingDelegation', + request, + types.staking_query_pb.QueryUnbondingDelegationResponse ); } /** - * Query all delegations to one validator + * Query all unbonding-delegations records for one delegator * - * @param validatorAddr Bech32 validator address + * @param pagination page info + * @param delegator_addr Bech32 delegator address * @returns - * @since v0.17 + * @since */ - queryDelegationsTo(validatorAddr: string): Promise { - return this.client.rpcClient.abciQuery( - 'custom/stake/validatorDelegations', - { - ValidatorAddr: validatorAddr, - } + queryDelegatorUnbondingDelegations( + query: { + key?: string, + page?: number; + size?: number; + count_total?: boolean; + delegator_addr: string; + } + ): Promise { + const {key, page, size, count_total, delegator_addr} = query; + if (is.undefined(delegator_addr)) { + throw new SdkError('delegator address can not be empty'); + } + const request = new types.staking_query_pb.QueryDelegatorUnbondingDelegationsRequest() + .setDelegatorAddr(delegator_addr) + .setPagination(ModelCreator.createPaginationModel(page, size, count_total, key)); + return this.client.rpcClient.protoQuery( + '/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations', + request, + types.staking_query_pb.QueryDelegatorUnbondingDelegationsResponse ); } /** - * Query all unbonding delegatations from a validator + * Query a redelegation record based on delegator and a source and destination validator address * - * @param validatorAddr Bech32 validator address + * @param delegator_addr Bech32 delegator address + * @param src_validator_addr (optional) Bech32 source validator address + * @param dst_validator_addr (optional) Bech32 destination validator address * @returns - * @since v0.17 + * @since */ - queryUnbondingDelegationsFrom( - validatorAddr: string - ): Promise { - return this.client.rpcClient.abciQuery( - 'custom/stake/validatorUnbondingDelegations', - { - ValidatorAddr: validatorAddr, - } + queryRedelegation( + query: { + key?: string, + page?: number; + size?: number; + count_total?: boolean; + delegator_addr: string; + src_validator_addr?: string; + dst_validator_addr?:string; + } + ): Promise { + const {key, page, size, count_total, delegator_addr,src_validator_addr, dst_validator_addr} = query; + if (is.undefined(delegator_addr)) { + throw new SdkError('delegator address can not be empty'); + } + const request = new types.staking_query_pb.QueryRedelegationsRequest() + .setDelegatorAddr(delegator_addr) + .setPagination(ModelCreator.createPaginationModel(page, size, count_total, key)); + if (is.not.undefined(src_validator_addr)) { + request.setSrcValidatorAddr(src_validator_addr) + } + if (is.not.undefined(dst_validator_addr)) { + request.setDstValidatorAddr(dst_validator_addr); + } + return this.client.rpcClient.protoQuery( + '/cosmos.staking.v1beta1.Query/Redelegations', + request, + types.staking_query_pb.QueryRedelegationsResponse ); } /** - * Query all outgoing redelegatations from a validator + * Query all validators info for given delegator * - * @param validatorAddr Bech32 validator address + * @param delegator_addr Bech32 delegator address + * @param pagination page info * @returns - * @since v0.17 + * @since */ - queryRedelegationsFrom(validatorAddr: string): Promise { - return this.client.rpcClient.abciQuery( - 'custom/stake/validatorRedelegations', - { - ValidatorAddr: validatorAddr, - } + queryDelegatorValidators( + query: { + key?: string, + page?: number; + size?: number; + count_total?: boolean; + delegator_addr: string; + } + ): Promise { + const {key, page, size, count_total, delegator_addr} = query; + if (is.undefined(delegator_addr)) { + throw new SdkError('delegator address can not be empty'); + } + const request = new types.staking_query_pb.QueryDelegatorValidatorsRequest() + .setDelegatorAddr(delegator_addr) + .setPagination(ModelCreator.createPaginationModel(page, size, count_total, key)); + return this.client.rpcClient.protoQuery( + '/cosmos.staking.v1beta1.Query/DelegatorValidators', + request, + types.staking_query_pb.QueryDelegatorValidatorsResponse ); } /** - * Query a validator + * Query validator info for given delegator validator * - * @param address Bech32 validator address + * @param delegator_addr Bech32 delegator address + * @param validator_addr Bech32 validator address * @returns - * @since v0.17 + * @since */ - queryValidator(address: string): Promise { - return this.client.rpcClient.abciQuery( - 'custom/stake/validator', - { - ValidatorAddr: address, - } + queryDelegatorValidator( + query: { + delegator_addr: string; + validator_addr: string; + } + ): Promise { + const { delegator_addr, validator_addr} = query; + if (is.undefined(delegator_addr)) { + throw new SdkError('delegator address can not be empty'); + } + if (is.undefined(validator_addr)) { + throw new SdkError('validator address can not be empty'); + } + + const request = new types.staking_query_pb.QueryDelegatorValidatorRequest() + .setDelegatorAddr(delegator_addr) + .setValidatorAddr(validator_addr); + return this.client.rpcClient.protoQuery( + '/cosmos.staking.v1beta1.Query/DelegatorValidator', + request, + types.staking_query_pb.QueryDelegatorValidatorResponse ); } /** - * Query for all validators - * @param page Page number - * @param size Page size + * Query the historical info for given height. + * + * @param height defines at which height to query the historical info * @returns - * @since v0.17 + * @since */ - queryValidators(page: number, size?: 100): Promise { - return this.client.rpcClient.abciQuery( - 'custom/stake/validators', - { - Page: page, - Size: size, - } + queryHistoricalInfo( + query: { + height: number; + } + ): Promise { + const { height} = query; + if (is.undefined(height)) { + throw new SdkError('block height can not be empty'); + } + const request = new types.staking_query_pb.QueryHistoricalInfoRequest() + .setHeight(height); + return this.client.rpcClient.protoQuery( + '/cosmos.staking.v1beta1.Query/HistoricalInfo', + request, + types.staking_query_pb.QueryHistoricalInfoResponse ); } /** - * Query the current staking pool values + * Query all delegations to one validator + * + * @param validator_addr Bech32 validator address + * @param pagination page info * @returns - * @since v0.17 + * @since */ - queryPool(): Promise { - return this.client.rpcClient.abciQuery( - 'custom/stake/pool' + queryValidatorDelegations( + query: { + key?: string, + page?: number; + size?: number; + count_total?: boolean; + validator_addr: string; + } + ): Promise { + const {key, page, size, count_total, validator_addr} = query; + if (is.undefined(validator_addr)) { + throw new SdkError('validator address can not be empty'); + } + const request = new types.staking_query_pb.QueryValidatorDelegationsRequest() + .setValidatorAddr(validator_addr) + .setPagination(ModelCreator.createPaginationModel(page, size, count_total, key)); + return this.client.rpcClient.protoQuery( + '/cosmos.staking.v1beta1.Query/ValidatorDelegations', + request, + types.staking_query_pb.QueryValidatorDelegationsResponse ); } /** - * Query the current staking parameters information + * Query all unbonding delegatations from a validator + * + * @param validator_addr Bech32 validator address + * @param pagination page info * @returns - * @since v0.17 + * @since */ - queryParams(): Promise { - return this.client.rpcClient.abciQuery( - 'custom/stake/parameters' + queryValidatorUnbondingDelegations( + query: { + key?: string, + page?: number; + size?: number; + count_total?: boolean; + validator_addr: string; + } + ): Promise { + const {key, page, size, count_total, validator_addr} = query; + if (is.undefined(validator_addr)) { + throw new SdkError('validator address can not be empty'); + } + const request = new types.staking_query_pb.QueryValidatorUnbondingDelegationsRequest() + .setValidatorAddr(validator_addr) + .setPagination(ModelCreator.createPaginationModel(page, size, count_total, key)); + return this.client.rpcClient.protoQuery( + '/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations', + request, + types.staking_query_pb.QueryValidatorUnbondingDelegationsResponse ); } /** - * Delegate liquid tokens to an validator + * Query a validator * - * @param validatorAddr Bech32 validator address - * @param amount Amount to be delegated to the validator - * @param baseTx + * @param address Bech32 validator address * @returns - * @since v0.17 + * @since */ - delegate( - validatorAddr: string, - amount: types.Coin, - baseTx: types.BaseTx - ): Promise { - const delegatorAddr = this.client.keys.show(baseTx.from); - const msgs: types.Msg[] = [ - new MsgDelegate(delegatorAddr, validatorAddr, amount), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); + queryValidator(address: string): Promise { + if (is.undefined(address)) { + throw new SdkError('validator address can not be empty'); + } + const request = new types.staking_query_pb.QueryValidatorRequest().setValidatorAddr(address); + return this.client.rpcClient.protoQuery( + '/cosmos.staking.v1beta1.Query/Validator', + request, + types.staking_query_pb.QueryValidatorResponse + ).then(res=>{ + let result = {...res}; + if (res.validator && res.validator.consensusPubkey && res.validator.consensusPubkey.value) { + result.validator.consensusPubkey = this.client.protobuf.deserializePubkey(res.validator.consensusPubkey); + } + return result; + }); } /** - * Undelegate from a validator - * @param validatorAddr Bech32 validator address - * @param amount Amount to be unbonded from the validator - * @param baseTx + * Query for all validators + * @param pagination page info + * @param status validator status * @returns - * @since v0.17 + * @since */ - async undelegate( - validatorAddr: string, - amount: string, - baseTx: types.BaseTx - ): Promise { - const delegatorAddr = this.client.keys.show(baseTx.from); - const validator = await this.queryValidator(validatorAddr); - - const shares = - Number(amount) * - (Number(validator.tokens) / Number(validator.delegator_shares)); - const msgs: types.Msg[] = [ - new MsgUndelegate( - delegatorAddr, - validatorAddr, - this.appendZero(String(shares), 10) - ), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); - } - - /** - * Redelegate illiquid tokens from one validator to another - * @param validatorSrcAddr Bech32 source validator address - * @param validatorDstAddr Bech32 destination validator address - * @param amount Amount to be redelegated - * @param baseTx - * @since v0.17 - */ - async redelegate( - validatorSrcAddr: string, - validatorDstAddr: string, - amount: string, - baseTx: types.BaseTx - ): Promise { - const delegatorAddr = this.client.keys.show(baseTx.from); - const srcValidator = await this.queryValidator(validatorSrcAddr); - - const shares = - Number(amount) * - (Number(srcValidator.tokens) / Number(srcValidator.delegator_shares)); - const msgs: types.Msg[] = [ - new MsgRedelegate( - delegatorAddr, - validatorSrcAddr, - validatorDstAddr, - this.appendZero(String(shares), 10) - ), - ]; - return this.client.tx.buildAndSend(msgs, baseTx); + queryValidators( + query: { + key?: string, + page?: number; + size?: number; + count_total?: boolean; + status?: string; + } + ): Promise { + const {key, page, size, count_total, status} = query; + const request = new types.staking_query_pb.QueryValidatorsRequest() + .setPagination(ModelCreator.createPaginationModel(page, size, count_total, key)); + if (is.not.undefined(status)) { + request.setStatus(status); + } + return this.client.rpcClient.protoQuery( + '/cosmos.staking.v1beta1.Query/Validators', + request, + types.staking_query_pb.QueryValidatorsResponse + ).then(res=>{ + let result:any = {...res}; + if (res.validatorsList && res.validatorsList.length) { + result.validatorsList = res.validatorsList.map((val:any)=>{ + if (val.consensusPubkey && val.consensusPubkey.value) { + val.consensusPubkey = this.client.protobuf.deserializePubkey(val.consensusPubkey); + } + return val; + }); + } + return result; + }); } /** - * Subscribe validator information updates - * @param conditions Query conditions for the subscription { validatorAddress: string - The `iva` (or `fva` on testnets) prefixed bech32 validator address } - * @param callback A function to receive notifications + * Query the current staking pool values * @returns - * @since v0.17 + * @since */ - subscribeValidatorInfoUpdates( - conditions: { validatorAddress?: string }, - callback: (error?: SdkError, data?: types.EventDataMsgEditValidator) => void - ): types.EventSubscription { - const queryBuilder = new EventQueryBuilder().addCondition( - new types.Condition(EventKey.Action).eq(EventAction.EditValidator) - ); - - if (conditions.validatorAddress) { - queryBuilder.addCondition( - new types.Condition(EventKey.DestinationValidator).eq( - conditions.validatorAddress - ) - ); - } - - const subscription = this.client.eventListener.subscribeTx( - queryBuilder, - (error, data) => { - if (error) { - callback(error); - return; - } - data?.tx.value.msg.forEach(msg => { - if (msg.type !== 'irishub/stake/MsgEditValidator') return; - const msgEditValidator = msg as types.MsgEditValidator; - const height = data.height; - const hash = data.hash; - const description = msgEditValidator.value.Description; - const address = msgEditValidator.value.address; - const commission_rate = msgEditValidator.value.commission_rate; - callback(undefined, { - height, - hash, - description, - address, - commission_rate, - }); - }); - } + queryPool(): Promise { + const request = new types.staking_query_pb.QueryPoolRequest(); + return this.client.rpcClient.protoQuery( + '/cosmos.staking.v1beta1.Query/Pool', + request, + types.staking_query_pb.QueryPoolResponse ); - return subscription; } /** - * Subscribe validator set updates - * @param conditions Query conditions for the subscription { validatorPubKeys: string[] - The `icp` (or `fcp` on testnets) prefixed bech32 validator consensus pubkey } - * @param callback A function to receive notifications + * Query the current staking parameters information * @returns - * @since v0.17 + * @since */ - subscribeValidatorSetUpdates( - conditions: { validatorConsPubKeys?: string[] }, - callback: ( - error?: SdkError, - data?: types.ExtendedEventDataValidatorSetUpdates - ) => void - ): types.EventSubscription { - // Add pubkeys to the set - const listeningSet = new Set(); - if (conditions.validatorConsPubKeys) { - conditions.validatorConsPubKeys.forEach(pubkey => { - listeningSet.add(pubkey); - }); - } - - // Subscribe notifications from blockchain - const subscription = this.client.eventListener.subscribeValidatorSetUpdates( - (error, data) => { - if (error) { - callback(error); - } - - data?.forEach(event => { - const bech32Address = Crypto.encodeAddress( - event.address, - this.client.config.bech32Prefix.ConsAddr - ); - const bech32Pubkey = Crypto.encodeAddress( - Utils.ab2hexstring(marshalPubKey(event.pub_key, false)), - this.client.config.bech32Prefix.ConsPub - ); - const update: types.ExtendedEventDataValidatorSetUpdates = { - address: event.address, - pub_key: event.pub_key, - voting_power: event.voting_power, - proposer_priority: event.proposer_priority, - bech32_address: bech32Address, - bech32_pubkey: bech32Pubkey, - }; - if (listeningSet.size > 0) { - if (listeningSet.has(update.bech32_pubkey)) { - callback(undefined, update); - } - } else { - callback(undefined, update); - } - }); - } + queryParams(): Promise { + const request = new types.staking_query_pb.QueryParamsRequest(); + return this.client.rpcClient.protoQuery( + '/cosmos.staking.v1beta1.Query/Params', + request, + types.staking_query_pb.QueryParamsResponse ); - return subscription; } /** @@ -459,6 +537,6 @@ export class Staking { * ** Not Supported ** */ createValidator() { - throw new SdkError('Not supported'); + throw new SdkError('Not supported',CODES.Internal); } } diff --git a/src/modules/tendermint.ts b/src/modules/tendermint.ts index df2dbc2d..548ad3a7 100644 --- a/src/modules/tendermint.ts +++ b/src/modules/tendermint.ts @@ -1,11 +1,10 @@ import { Client } from '../client'; import * as types from '../types'; import { RpcMethods } from '../types'; -import { unmarshalTx, marshalPubKey } from '@irisnet/amino-js'; -import { base64ToBytes } from '@tendermint/belt'; import { Utils, Crypto } from '../utils'; import * as hexEncoding from 'crypto-js/enc-hex'; import * as base64Encoding from 'crypto-js/enc-base64'; +import { SdkError, CODES } from '../errors'; /** * Tendermint module provides tendermint rpc queriers implementation @@ -35,10 +34,10 @@ export class Tendermint { // Decode txs if (res.block && res.block.data && res.block.data.txs) { const txs: string[] = res.block.data.txs; - const decodedTxs = new Array>(); + const decodedTxs = new Array(); txs.forEach(msg => { decodedTxs.push( - unmarshalTx(base64ToBytes(msg)) as types.Tx + this.client.protobuf.deserializeTx(msg) ); }); res.block.data.txs = decodedTxs; @@ -98,7 +97,7 @@ export class Tendermint { .then(res => { // Decode tags and tx res.tx_result.tags = Utils.decodeTags(res.tx_result.tags); - res.tx = unmarshalTx(base64ToBytes(res.tx)) as types.Tx; + res.tx = this.client.protobuf.deserializeTx(res.tx); return res as types.QueryTxResult; }); } @@ -109,8 +108,15 @@ export class Tendermint { * @returns * @since v0.17 */ - queryValidators(height?: number): Promise { - const params = height ? { height: String(height) } : {}; + queryValidators( + height?: number, + page?: number, + size?: number + ): Promise { + const params:any = {}; + if (height) { params.height = String(height) } + if (page) { params.page = String(page) } + if (size) { params.per_page = String(size) } return this.client.rpcClient .request(RpcMethods.Validators, params) .then(res => { @@ -125,7 +131,7 @@ export class Tendermint { this.client.config.bech32Prefix.ConsAddr ); const bech32Pubkey = Crypto.encodeAddress( - Utils.ab2hexstring(marshalPubKey(v.pub_key, false)), + Crypto.aminoMarshalPubKey(v.pub_key, false), this.client.config.bech32Prefix.ConsPub ); result.validators.push({ @@ -167,7 +173,7 @@ export class Tendermint { // Decode tags and txs res.txs.forEach((tx: any) => { tx.tx_result.tags = Utils.decodeTags(tx.tx_result.tags); - tx.tx = unmarshalTx(base64ToBytes(tx.tx)); + tx.tx = this.client.protobuf.deserializeTx(tx.tx); txs.push(tx); }); res.txs = txs; @@ -175,4 +181,19 @@ export class Tendermint { return res as types.SearchTxsResult; }); } + + /** + * query Net Info + * + * @returns + * @since v0.17 + */ + queryNetInfo(): Promise<{ + listening:boolean, + listeners:string[], + n_peers:string, + peers:any[] + }> { + return this.client.rpcClient.request(RpcMethods.NetInfo, {}); + } } diff --git a/src/modules/token.ts b/src/modules/token.ts new file mode 100644 index 00000000..f796b73c --- /dev/null +++ b/src/modules/token.ts @@ -0,0 +1,208 @@ +import {Client} from '../client'; +import * as types from '../types'; +import * as is from 'is_js'; +import { SdkError, CODES } from '../errors'; + +/** + * IRISHub allows individuals and companies to create and issue their own tokens. + * + * [More Details](https://www.irisnet.org/docs/features/asset.html) + * + * @category Modules + * @since v0.17 + */ +export class Token { + /** @hidden */ + private client: Client; + + /** @hidden */ + constructor(client: Client) { + this.client = client; + } + + /** + * issue a new token + * @param IssueTokenTxParam + * @returns + */ + async issueToken( + token: { + symbol: string; + name: string; + min_unit: string; + scale?: number; + initial_supply?: number; + max_supply?: number; + mintable?: boolean; + }, + baseTx: types.BaseTx + ): Promise { + const owner = this.client.keys.show(baseTx.from); + const msgs: any[] = [ + { + type: types.TxType.MsgIssueToken, + value: Object.assign({owner}, token) + } + ]; + return this.client.tx.buildAndSend(msgs, baseTx); + } + + /** + * edit a token existed + * @param EditTokenTxParam + * @returns + */ + async editToken( + token: { + symbol: string; + name?: string; + max_supply?: number; + mintable?: string; + }, + baseTx: types.BaseTx + ): Promise { + const owner = this.client.keys.show(baseTx.from); + const msgs: any[] = [ + { + type: types.TxType.MsgEditToken, + value: Object.assign({owner}, token) + } + ]; + return this.client.tx.buildAndSend(msgs, baseTx); + } + + /** + * mint some amount of token + * @param MintTokenTxParam + * @returns + */ + async mintToken( + token: { + symbol: string; + amount: number; + owner?: string; + to?: string; + }, + baseTx: types.BaseTx + ): Promise { + const owner = this.client.keys.show(baseTx.from); + const msgs: any[] = [ + { + type: types.TxType.MsgMintToken, + value: Object.assign({owner}, token) + } + ]; + return this.client.tx.buildAndSend(msgs, baseTx); + } + + /** + * transfer owner of token + * @param TransferTokenOwnerTxParam + * @returns + */ + async transferTokenOwner( + token: { + symbol: string; + dst_owner: string; + }, + baseTx: types.BaseTx + ): Promise { + const owner = this.client.keys.show(baseTx.from); + const msgs: any[] = [ + { + type: types.TxType.MsgTransferTokenOwner, + value: Object.assign({src_owner: owner}, token) + } + ]; + return this.client.tx.buildAndSend(msgs, baseTx); + } + + + /** + * Query all tokens + * @param owner The optional token owner address + * @returns Token[] + */ + queryTokens(owner?: string): Promise { + const request = new types.token_query_pb.QueryTokensRequest(); + if(is.not.undefined(owner)){ + request.setOwner(owner); + } + return new Promise(async (resolve)=>{ + const res = await this.client.rpcClient.protoQuery( + '/irismod.token.Query/Tokens', + request, + types.token_query_pb.QueryTokensResponse + ); + let deserializedData: types.Token[] = []; + if(res && res.tokensList && is.array(res.tokensList)){ + deserializedData = res.tokensList.map((item: {typeUrl: string, value: string})=>{ + return types.token_token_pb.Token.deserializeBinary(item.value).toObject() + }) + } + resolve(deserializedData); + }) + + } + + /** + * Query details of a group of tokens + * @param denom symbol of token + * @returns + * @since + */ + + queryToken(denom: string): Promise { + if(is.undefined(denom)){ + throw new SdkError('denom can not be empty') + } + const request = new types.token_query_pb.QueryTokenRequest(); + request.setDenom(denom); + return new Promise(async (resolve)=>{ + const res = await this.client.rpcClient.protoQuery( + '/irismod.token.Query/Token', + request, + types.token_query_pb.QueryTokenResponse + ); + let deserializedData: types.Token | null = null; + if(res && res.token && res.token.value){ + deserializedData = types.token_token_pb.Token.deserializeBinary(res.token.value).toObject() + } + resolve(deserializedData); + }) + } + + /** + * Query the token related fees + * @param symbol The token symbol + * @returns + * @since + */ + queryFees(symbol: string): Promise { + if (is.undefined(symbol)) { + throw new SdkError('symbol can not be empty') + } + const request = new types.token_query_pb.QueryFeesRequest(); + request.setSymbol(symbol); + return this.client.rpcClient.protoQuery( + '/irismod.token.Query/Fees', + request, + types.token_query_pb.QueryFeesResponse + ); + } + + /** + * Query parameters of token tx + * @param null + * @returns + * @since + */ + queryParameters(): Promise { + const request = new types.token_query_pb.QueryParamsRequest(); + return this.client.rpcClient.protoQuery( + '/irismod.token.Query/Params', + request, + types.token_query_pb.QueryParamsResponse + ); + } +} diff --git a/src/modules/tx.ts b/src/modules/tx.ts index 0b752961..df15c473 100644 --- a/src/modules/tx.ts +++ b/src/modules/tx.ts @@ -1,10 +1,8 @@ -import { Client } from '../client'; +import {Client} from '../client'; import * as is from 'is_js'; import * as types from '../types'; -import { SdkError } from '../errors'; -import { Utils, Crypto } from '../utils'; -import { marshalTx } from '@irisnet/amino-js'; -import { bytesToBase64 } from '@tendermint/belt'; +import { SdkError, CODES } from '../errors'; +import {Utils, Crypto} from '../utils'; /** * Tx module allows you to sign or broadcast transactions @@ -15,11 +13,49 @@ import { bytesToBase64 } from '@tendermint/belt'; export class Tx { /** @hidden */ private client: Client; + /** @hidden */ constructor(client: Client) { this.client = client; } + /** + * Build Tx + * @param msgs Msgs to be sent + * @param baseTx + * @returns unsignedTx + * @since v0.17 + */ + buildTx( + msgs: any[], + baseTx: types.BaseTx, + ): types.ProtoTx { + let msgList: types.Msg[] = msgs.map(msg => { + return this.createMsg(msg); + }); + const unsignedTx: types.ProtoTx = this.client.auth.newStdTx(msgList, baseTx); + return unsignedTx; + } + + /** + * generate StdTx from protoTxModel + * @param {[type]} protoTxModel:any instance of cosmos.tx.v1beta1.Tx + * @return {[type]} unsignedTx + */ + newStdTxFromProtoTxModel(protoTxModel:any):types.ProtoTx{ + return types.ProtoTx.newStdTxFromProtoTxModel(protoTxModel); + } + + /** + * generate StdTx from Tx Data + * @param {[type]} TxData:string base64 string form txBytes + * @return {[type]} unsignedTx + */ + newStdTxFromTxData(TxDataString:string):types.ProtoTx{ + const protoTxModel = this.client.protobuf.deserializeTx(TxDataString, true) + return types.ProtoTx.newStdTxFromProtoTxModel(protoTxModel); + } + /** * Build, sign and broadcast the msgs * @param msgs Msgs to be sent @@ -28,17 +64,14 @@ export class Tx { * @since v0.17 */ async buildAndSend( - msgs: types.Msg[], + msgs: any[], baseTx: types.BaseTx - ): Promise { + ) { // Build Unsigned Tx - const unsignedTx = this.client.auth.newStdTx(msgs, baseTx); - - const fee = await this.client.utils.toMinCoins(unsignedTx.value.fee.amount); - unsignedTx.value.fee.amount = fee; + const unsignedTx: types.ProtoTx = this.buildTx(msgs, baseTx); // Sign Tx - const signedTx = await this.sign(unsignedTx, baseTx.from, baseTx.password); + const signedTx = await this.sign(unsignedTx, baseTx); // Broadcast Tx return this.broadcast(signedTx, baseTx.mode); } @@ -51,11 +84,11 @@ export class Tx { * @since v0.17 */ broadcast( - signedTx: types.Tx, + signedTx: types.ProtoTx, mode?: types.BroadcastMode ): Promise { - signedTx = this.marshal(signedTx); - const txBytes = marshalTx(signedTx); + const txBytes = signedTx.getData(); + switch (mode) { case types.BroadcastMode.Commit: return this.broadcastTxCommit(txBytes); @@ -74,18 +107,67 @@ export class Tx { * Single sign a transaction * * @param stdTx StdTx with no signatures - * @param name Name of the key to sign the tx - * @param password Password of the key - * @param offline Offline signing, default `false` + * @param baseTx baseTx.from && baseTx.password is requred * @returns The signed tx * @since v0.17 */ async sign( - stdTx: types.Tx, + stdTx: types.ProtoTx, + baseTx: types.BaseTx, + ): Promise { + if (is.empty(baseTx.from)) { + throw new SdkError(`baseTx.from of the key can not be empty`); + } + if (is.empty(baseTx.password)) { + throw new SdkError(`baseTx.password of the key can not be empty`); + } + if (!this.client.config.keyDAO.decrypt) { + throw new SdkError(`Decrypt method of KeyDAO not implemented`,CODES.Panic); + } + + const keyObj = this.client.config.keyDAO.read(baseTx.from); + if (!keyObj) { + throw new SdkError(`Key with name '${baseTx.from}' not found`,CODES.KeyNotFound); + } + + let accountNumber = baseTx.account_number??'0'; + let sequence = baseTx.sequence || '0'; + + if (!baseTx.account_number || !baseTx.sequence) { + const account = await this.client.auth.queryAccount(keyObj.address); + if ( account.accountNumber ) { accountNumber = String(account.accountNumber) || '0' } + if ( account.sequence ) { sequence = String(account.sequence) || '0' } + } + // Query account info from block chain + const privKey = this.client.config.keyDAO.decrypt(keyObj.privateKey, baseTx.password); + if (!privKey) { + throw new SdkError(`decrypto the private key error`,CODES.InvalidPassword); + } + if (!stdTx.hasPubKey()) { + const pubKey = Crypto.getPublicKeyFromPrivateKey(privKey, baseTx.pubkeyType); + stdTx.setPubKey(pubKey, sequence || undefined); + } + const signature = Crypto.generateSignature(stdTx.getSignDoc(accountNumber || undefined, this.client.config.chainId).serializeBinary(), privKey, baseTx.pubkeyType); + stdTx.addSignature(signature); + return stdTx; + } + + /** + * Single sign a transaction with signDoc + * + * @param signDoc from protobuf + * @param name Name of the key to sign the tx + * @param password Password of the key + * @param type pubkey Type + * @returns signature + * @since v0.17 + */ + sign_signDoc( + signDoc: Uint8Array, name: string, password: string, - offline = false - ): Promise> { + type:types.PubkeyType = types.PubkeyType.secp256k1 + ): string { if (is.empty(name)) { throw new SdkError(`Name of the key can not be empty`); } @@ -95,62 +177,15 @@ export class Tx { if (!this.client.config.keyDAO.decrypt) { throw new SdkError(`Decrypt method of KeyDAO not implemented`); } - if ( - is.undefined(stdTx) || - is.undefined(stdTx.value) || - is.undefined(stdTx.value.msg) - ) { - throw new SdkError(`Msgs can not be empty`); - } + const keyObj = this.client.config.keyDAO.read(name); if (!keyObj) { - throw new SdkError(`Key with name '${name}' not found`); - } - - const msgs: object[] = []; - stdTx.value.msg.forEach(msg => { - if (msg.getSignBytes) { - msgs.push(msg.getSignBytes()); - } - }); - - if (!offline) { - // Query account info from block chain - const addr = keyObj.address; - const account = await this.client.bank.queryAccount(addr); - const sigs: types.StdSignature[] = [ - { - pub_key: account.public_key, - account_number: account.account_number, - sequence: account.sequence, - signature: '', - }, - ]; - - stdTx.value.signatures = sigs; + throw new SdkError(`Key with name '${name}' not found`,CODES.KeyNotFound); } - // Build msg to sign - const sig: types.StdSignature = stdTx.value.signatures[0]; - const signMsg: types.StdSignMsg = { - account_number: sig.account_number, - chain_id: this.client.config.chainId, - fee: stdTx.value.fee, - memo: stdTx.value.memo, - msgs, - sequence: sig.sequence, - }; - - // Signing - const privKey = this.client.config.keyDAO.decrypt(keyObj.privKey, password); - const signature = Crypto.generateSignature( - Utils.str2hexstring(JSON.stringify(Utils.sortObject(signMsg))), - privKey - ); - sig.signature = signature.toString('base64'); - sig.pub_key = Crypto.getPublicKeySecp256k1FromPrivateKey(privKey); - stdTx.value.signatures[0] = sig; - return stdTx; + const privKey = this.client.config.keyDAO.decrypt(keyObj.privateKey, password); + const signature = Crypto.generateSignature(signDoc, privKey, type); + return signature; } /** @@ -183,16 +218,18 @@ export class Tx { private broadcastTxCommit(txBytes: Uint8Array): Promise { return this.client.rpcClient .request(types.RpcMethods.BroadcastTxCommit, { - tx: bytesToBase64(txBytes), + tx: Utils.bytesToBase64(txBytes), }) .then(response => { // Check tx error if (response.check_tx && response.check_tx.code > 0) { + console.error(response.check_tx); throw new SdkError(response.check_tx.log, response.check_tx.code); } // Deliver tx error if (response.deliver_tx && response.deliver_tx.code > 0) { + console.error(response.deliver_tx); throw new SdkError(response.deliver_tx.log, response.deliver_tx.code); } @@ -227,32 +264,32 @@ export class Tx { types.RpcMethods.BroadcastTxAsync, ]) ) { - throw new SdkError(`Unsupported broadcast method: ${method}`); + throw new SdkError(`Unsupported broadcast method: ${method}`,CODES.Internal); } return this.client.rpcClient .request(method, { - tx: bytesToBase64(txBytes), + tx: Utils.bytesToBase64(txBytes), }) .then(response => { if (response.code && response.code > 0) { - throw new SdkError(response.data, response.code); + throw new SdkError(response.log, response.code); } return response; }); } - private marshal(stdTx: types.Tx): types.Tx { - const copyStdTx: types.Tx = stdTx; - Object.assign(copyStdTx, stdTx); - stdTx.value.msg.forEach((msg, idx) => { - if (msg.marshal) { - copyStdTx.value.msg[idx] = msg.marshal(); - } - }); - return copyStdTx; - } + // private marshal(stdTx: types.Tx): types.Tx { + // const copyStdTx: types.Tx = stdTx; + // Object.assign(copyStdTx, stdTx); + // stdTx.value.msg.forEach((msg, idx) => { + // if (msg.marshal) { + // copyStdTx.value.msg[idx] = msg.marshal(); + // } + // }); + // return copyStdTx; + // } private newTxResult( hash: string, @@ -268,4 +305,109 @@ export class Tx { tags: deliverTx?.tags, }; } -} + + /** + * create message + * @param {[type]} txMsg:{type:string, value:any} message + * @return {[type]} message instance of types.Msg + */ + createMsg(txMsg: { type: string, value: any }) { + let msg: any = {}; + switch (txMsg.type) { + //bank + case types.TxType.MsgSend: { + msg = new types.MsgSend(txMsg.value) + break; + } + case types.TxType.MsgMultiSend: { + msg = new types.MsgMultiSend(txMsg.value) + break; + } + //staking + case types.TxType.MsgDelegate: { + msg = new types.MsgDelegate(txMsg.value); + break; + } + case types.TxType.MsgUndelegate: { + msg = new types.MsgUndelegate(txMsg.value); + break; + } + case types.TxType.MsgBeginRedelegate: { + msg = new types.MsgRedelegate(txMsg.value); + break; + } + //distribution + case types.TxType.MsgWithdrawDelegatorReward: { + msg = new types.MsgWithdrawDelegatorReward(txMsg.value); + break; + } + case types.TxType.MsgSetWithdrawAddress: { + msg = new types.MsgSetWithdrawAddress(txMsg.value); + break; + } + case types.TxType.MsgWithdrawValidatorCommission: { + msg = new types.MsgWithdrawValidatorCommission(txMsg.value); + break; + } + case types.TxType.MsgFundCommunityPool: { + msg = new types.MsgFundCommunityPool(txMsg.value); + break; + } + //token + case types.TxType.MsgIssueToken: { + msg = new types.MsgIssueToken(txMsg.value); + break; + } + case types.TxType.MsgEditToken: { + msg = new types.MsgEditToken(txMsg.value); + break; + } + case types.TxType.MsgMintToken: { + msg = new types.MsgMintToken(txMsg.value); + break; + } + case types.TxType.MsgTransferTokenOwner: { + msg = new types.MsgTransferTokenOwner(txMsg.value); + break; + } + //coinswap + case types.TxType.MsgAddLiquidity: { + + break; + } + case types.TxType.MsgRemoveLiquidity: { + + break; + } + case types.TxType.MsgSwapOrder: { + + break; + } + //nft + case types.TxType.MsgIssueDenom: { + msg = new types.MsgIssueDenom(txMsg.value) + break; + } + case types.TxType.MsgMintNFT: { + msg = new types.MsgMintNFT(txMsg.value) + break; + } + case types.TxType.MsgEditNFT: { + msg = new types.MsgEditNFT(txMsg.value) + break; + } + case types.TxType.MsgTransferNFT: { + msg = new types.MsgTransferNFT(txMsg.value) + break; + } + case types.TxType.MsgBurnNFT: { + msg = new types.MsgBurnNFT(txMsg.value) + break; + } + default: { + throw new SdkError("not exist tx type",CODES.InvalidType); + } + } + return msg; + } +} \ No newline at end of file diff --git a/src/modules/utils.ts b/src/modules/utils.ts index bc5bc6af..b4808845 100644 --- a/src/modules/utils.ts +++ b/src/modules/utils.ts @@ -1,6 +1,7 @@ import { Client } from '../client'; import * as types from '../types'; import * as mathjs from 'mathjs'; +import { SdkError, CODES } from '../errors'; /** * Utils for the IRISHub SDK @@ -10,11 +11,14 @@ import * as mathjs from 'mathjs'; export class Utils { /** @hidden */ private client: Client; + /** @hidden */ private tokenMap: Map; + /** @hidden */ private mathConfig = { number: 'BigNumber', // Choose 'number' (default), 'BigNumber', or 'Fraction' precision: 64, // 64 by default, only applicable for BigNumbers }; + /** @hidden */ private math: Partial; /** @hidden */ @@ -35,19 +39,21 @@ export class Utils { const amt = this.math.bignumber!(coin.amount); const token = this.tokenMap.get(coin.denom); if (token) { - if (coin.denom === token.min_unit_alias) return coin; + if (coin.denom === token.min_unit) return coin; return { - denom: token.min_unit_alias, + denom: token.min_unit, amount: this.math.multiply!( amt, - this.math.pow!(10, token.decimal) + this.math.pow!(10, token.scale) ).toString(), }; } // If token not found in local memory, then query from the blockchain - return this.client.asset.queryToken(coin.denom).then(token => { - this.tokenMap.set(coin.denom, token.base_token); + return this.client.token.queryToken(coin.denom).then(token => { + if (token) { + this.tokenMap.set(coin.denom, token!); + } return this.toMinCoin(coin); }); } @@ -84,14 +90,16 @@ export class Utils { denom: token.symbol, amount: this.math.divide!( amt, - this.math.pow!(10, token.decimal) + this.math.pow!(10, token.scale) ).toString(), }; } // If token not found in local memory, then query from the blockchain - return this.client.asset.queryToken(coin.denom).then(token => { - this.tokenMap.set(coin.denom, token.base_token); + return this.client.token.queryToken(coin.denom).then(token => { + if (token) { + this.tokenMap.set(coin.denom, token!); + } return this.toMainCoin(coin); }); } diff --git a/src/nets/event-listener.ts b/src/nets/event-listener.ts index ce219f00..42335683 100644 --- a/src/nets/event-listener.ts +++ b/src/nets/event-listener.ts @@ -1,12 +1,9 @@ -import { unmarshalTx } from '@irisnet/amino-js'; -import { base64ToBytes } from '@tendermint/belt'; -import { SdkError } from '../errors'; +import { SdkError, CODES } from '../errors'; import * as types from '../types'; import { Utils, Crypto } from '../utils'; import * as is from 'is_js'; import { WsClient } from './ws-client'; import { EventQueryBuilder, EventKey } from '../types'; -import { marshalPubKey } from '@irisnet/amino-js'; import { Client } from '../client'; /** Internal subscription interface */ @@ -324,10 +321,10 @@ export class EventListener { // Decode txs if (blockData.block && blockData.block.data && blockData.block.data.txs) { const txs: string[] = blockData.block.data.txs; - const decodedTxs = new Array>(); + const decodedTxs = new Array(); txs.forEach(msg => { decodedTxs.push( - unmarshalTx(base64ToBytes(msg)) as types.Tx + this.client.protobuf.deserializeTx(msg) ); }); blockData.block.data.txs = decodedTxs; @@ -358,25 +355,25 @@ export class EventListener { if (blockData.result_end_block.validator_updates) { const validators: types.EventDataValidatorUpdate[] = []; blockData.result_end_block.validator_updates.forEach((v: any) => { - let type = ''; + let type = types.PubkeyType.secp256k1; switch (v.pub_key.type) { case 'secp256k1': { - type = 'tendermint/PubKeySecp256k1'; + type = types.PubkeyType.secp256k1; break; } case 'ed25519': { - type = 'tendermint/PubKeyEd25519'; + type = types.PubkeyType.ed25519; break; } default: - throw new SdkError(`Unsupported pubkey type: ${v.pub_key.type}`); + throw new SdkError(`Unsupported pubkey type: ${v.pub_key.type}`,CODES.InvalidPubkey); } const valPubkey: types.Pubkey = { type, value: v.pub_key.data, }; const bech32Pubkey = Crypto.encodeAddress( - Utils.ab2hexstring(marshalPubKey(valPubkey, false)), + Crypto.aminoMarshalPubKey(valPubkey, false), this.client.config.bech32Prefix.ConsPub ); validators.push({ @@ -432,14 +429,14 @@ export class EventListener { blockHeader.result_end_block.validator_updates.forEach((v: any) => { const type = v.pub_key.type === 'secp256k1' - ? 'tendermint/PubKeySecp256k1' - : 'tendermint/PubKeyEd25519'; + ? types.PubkeyType.secp256k1 + : types.PubkeyType.ed25519; const valPubkey: types.Pubkey = { type, value: v.pub_key.data, }; const bech32Pubkey = Crypto.encodeAddress( - Utils.ab2hexstring(marshalPubKey(valPubkey, false)), + Crypto.aminoMarshalPubKey(valPubkey, false), this.client.config.bech32Prefix.ConsPub ); validators.push({ @@ -489,9 +486,7 @@ export class EventListener { } const txResult = data.data.value.TxResult; - txResult.tx = unmarshalTx(base64ToBytes(txResult.tx)); - - // Decode tags from base64 + txResult.tx = this.client.protobuf.deserializeTx(txResult.tx); if (txResult.result.tags) { const tags = txResult.result.tags as types.Tag[]; const decodedTags = new Array(); diff --git a/src/nets/rpc-client.ts b/src/nets/rpc-client.ts index 15ae1f1b..7c0555c0 100644 --- a/src/nets/rpc-client.ts +++ b/src/nets/rpc-client.ts @@ -1,6 +1,6 @@ import axios, { AxiosInstance, AxiosRequestConfig } from 'axios'; import { Utils } from '../utils'; -import { SdkError } from '../errors'; +import { SdkError, CODES } from '../errors'; import * as is from 'is_js'; import * as types from '../types'; @@ -10,7 +10,9 @@ import * as types from '../types'; */ export class RpcClient { /** @hidden */ - instance: AxiosInstance; + private instance: AxiosInstance; + /** @hidden */ + private config: AxiosRequestConfig; /** * Initialize Tendermint JSON RPC Client @@ -32,6 +34,7 @@ export class RpcClient { config.url = '/'; // Fixed url + this.config = config; this.instance = axios.create(config); } @@ -51,15 +54,12 @@ export class RpcClient { params, }; return this.instance - .request>({ - data, - }) + .post>(this.config.baseURL!, data) .then(response => { const res = response.data; - // Internal error if (res.error) { - console.log(res.error); + console.error(res.error); throw new SdkError(res.error.message, res.error.code); } @@ -67,6 +67,48 @@ export class RpcClient { }); } + /** + * Tendermint ABCI protobuf Query + * + * @param path Querier path + * @param protoRequest protobuf Request + * @param protoResponse protobuf Response so if "protoResponse" exists, well deserialize "ABCI Response" with "protoResponse" and return json object, else return base64 string + * @returns + * @since v0.17 + */ + protoQuery(path: string, protoRequest?: any, protoResponse?: any): Promise { + const params: types.AbciQueryRequest = { + path, + }; + if (protoRequest && protoRequest.serializeBinary) { + params.data = Buffer.from(protoRequest.serializeBinary()).toString('hex'); + } + return this.request( + types.RpcMethods.AbciQuery, + params + ).then(response => { + if (response && response.response) { + if (response.response.value) { + if (protoResponse) { + try{ + return protoResponse.deserializeBinary(response.response.value).toObject(); + }catch(err){ + console.error(`protobuf deserialize error from ${path}`); + return response.response.value; + } + }else{ + return response.response.value; + } + } else if (response.response.code) { + throw new SdkError(response.response.log, response.response.code); + } else{ + return null; + } + } + throw new SdkError(`Internal Error from ${path}:${response.response.log}`); + }); + } + /** * Tendermint ABCI Query * @@ -84,30 +126,35 @@ export class RpcClient { params.data = Utils.obj2hexstring(data); } if (height) { - params.height = height; + params.height = String(height); } return this.request( types.RpcMethods.AbciQuery, params ).then(response => { - if (response.response) { + if (response && response.response) { if (response.response.value) { const value = Buffer.from( response.response.value, 'base64' ).toString(); - const res = JSON.parse(value); - - if (!res) return {}; - if (res.type && res.value) return res.value; - return res; + try{ + return JSON.parse(value).value; + }catch(err){ + return value; + } + // const res = JSON.parse(value); + // if (!res) return {}; + // if (res.type && res.value) return res.value; + // return res; } else if (response.response.code) { - throw new SdkError('Bad Request', response.response.code); + throw new SdkError(response.response.log, response.response.code); + } else{ + return null; } } - console.log(response); - throw new SdkError('Bad Request'); + throw new SdkError(`Internal Error from ${path}:${response.response.log}`); }); } diff --git a/src/nets/ws-client.ts b/src/nets/ws-client.ts index e50184a6..1f793492 100644 --- a/src/nets/ws-client.ts +++ b/src/nets/ws-client.ts @@ -1,7 +1,7 @@ import * as types from '../types'; -import * as EventEmitter from 'events'; -import * as Websocket from 'isomorphic-ws'; -import { SdkError } from '../errors'; +import EventEmitter from 'events'; +import Websocket from 'isomorphic-ws'; +import { SdkError, CODES } from '../errors'; /** * IRISHub Websocket Client @@ -27,7 +27,7 @@ export class WsClient { connect(): void { this.ws = new Websocket(this.url + '/websocket'); if (!this.ws) { - throw new SdkError('Websocket client not initialized'); // Should not happen + throw new SdkError('Websocket client not initialized',CODES.Internal); // Should not happen } this.ws.onopen = () => { @@ -69,11 +69,11 @@ export class WsClient { this.send(types.RpcMethods.UnsubscribeAll, id); this.eventEmitter.on(id, error => { if (error) { - throw new SdkError(error.message); + throw new SdkError(error.message,CODES.Internal); } if (!this.ws) { - throw new SdkError('Websocket client not initialized'); // Should not happen + throw new SdkError('Websocket client not initialized',CODES.Internal); // Should not happen } // Remove all listeners @@ -103,7 +103,7 @@ export class WsClient { */ send(method: string, id: string, query?: string): void { if (!this.ws) { - throw new SdkError('Websocket client not initialized'); // Should not happen + throw new SdkError('Websocket client not initialized',CODES.Internal); // Should not happen } this.ws.send( JSON.stringify({ diff --git a/src/types/abci-query.ts b/src/types/abci-query.ts index 129d342b..c3cd72a2 100644 --- a/src/types/abci-query.ts +++ b/src/types/abci-query.ts @@ -8,7 +8,7 @@ export interface AbciQueryRequest { /** Input params */ data?: string; /** Use a specific height to query state at (this can error if the node is pruning state) */ - height?: number; + height?: string; /** TODO */ prove?: boolean; } diff --git a/src/types/asset.ts b/src/types/asset.ts deleted file mode 100644 index 024c43ed..00000000 --- a/src/types/asset.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Coin } from './types'; - -export interface Token { - symbol: string; - name: string; - decimal: number; - min_unit_alias: string; - initial_supply: string; - max_supply: string; - mintable: boolean; - owner: string; -} - -export interface fToken { - base_token: { - id: string; - family: string; - source: string; - gateway: string; - symbol: string; - name: string; - decimal: number; - canonical_symbol: string; - min_unit_alias: string; - initial_supply: string; - max_supply: string; - mintable: boolean; - owner: string; - } -} - -export interface TokenFees { - exist: boolean; - issue_fee: Coin; - mint_fee: Coin; -} diff --git a/src/types/auth.ts b/src/types/auth.ts index ba4699c5..24fdc80c 100644 --- a/src/types/auth.ts +++ b/src/types/auth.ts @@ -1,5 +1,4 @@ -import { PubKey } from '@irisnet/amino-js/types'; -import { Coin, Msg, TxValue } from './types'; +import { Coin, Msg, TxValue, PubkeyType } from './types'; /** Standard Tx */ export interface StdTx extends TxValue { @@ -12,17 +11,20 @@ export interface StdTx extends TxValue { /** Standard Fee */ export interface StdFee { amount: Coin[]; - gas: string; + gasLimit: string; } /** Standard Signature */ export interface StdSignature { - pub_key?: PubKey; + pub_key?: string; signature?: string; - account_number: string; - sequence: string; + + // To support ibc-alpha + // account_number: string; + // sequence: string; } + /** Base params for the transaction */ export interface BaseTx { /** Name of the key */ @@ -32,6 +34,11 @@ export interface BaseTx { gas?: string | undefined; fee?: Coin | undefined; memo?: string | undefined; + /** Account_number required for offline signatures */ + account_number?: string | undefined; + /** Sequence required for offline signatures */ + sequence?: string | undefined; + pubkeyType?: PubkeyType; /** default secp256k1 */ mode?: BroadcastMode | undefined; } @@ -49,10 +56,17 @@ export enum BroadcastMode { /** Standard Msg to sign */ export interface StdSignMsg { + // To support ibc-alpha account_number: string; + sequence: string; chain_id: string; fee: StdFee; memo: string; msgs: object[]; - sequence: string; } + +export interface BaseAccount { + address:string, + pubKey:{key:string}, + accountNumber:number, + sequence:number} diff --git a/src/types/bank.ts b/src/types/bank.ts index 14b12b92..047b0a74 100644 --- a/src/types/bank.ts +++ b/src/types/bank.ts @@ -1,73 +1,99 @@ -import { Coin, Msg, Pubkey } from './types'; - +import { Coin, Msg, Pubkey, TxType } from './types'; +import { TxModelCreator } from '../helper'; +import * as pbs from "./proto"; +import { SdkError, CODES } from '../errors'; /** * Msg for sending coins * * @hidden */ -export class MsgSend implements Msg { - type: string; +export class MsgSend extends Msg { value: { - inputs: Input[]; - outputs: Output[]; + from_address: string, + to_address: string, + amount:Coin[], }; - constructor(inputs: Input[], outputs: Output[]) { - this.type = 'irishub/bank/Send'; - this.value = { - inputs, - outputs, - }; + constructor(msg:{from_address: string, to_address: string, amount:Coin[]}) { + super(TxType.MsgSend); + this.value = msg; + } + + static getModelClass():any{ + return pbs.bank_tx_pb.MsgSend; + } + + getModel():any{ + let msg = new ((this.constructor as any).getModelClass())(); + msg.setFromAddress(this.value.from_address); + msg.setToAddress(this.value.to_address); + this.value.amount.forEach((item)=>{ + msg.addAmount(TxModelCreator.createCoinModel(item.denom, item.amount)); + }); + return msg; } - getSignBytes(): object { - return this.value; + validate() { + if (!this.value.from_address) { + throw new SdkError("from_address is empty"); + } + if (!this.value.to_address) { + throw new SdkError("to_address is empty"); + } + if (!(this.value.amount && this.value.amount.length)) { + throw new SdkError("amount is empty"); + } } } /** - * Msg for burning coins + * Msg for sending coins * * @hidden */ -export class MsgBurn implements Msg { - type: string; +export class MsgMultiSend extends Msg { value: { - owner: string; - coins: Coin[]; + inputs: Input[]; + outputs: Output[]; }; - constructor(owner: string, coins: Coin[]) { - this.type = 'irishub/bank/Burn'; - this.value = { - owner, - coins, - }; + constructor(msg:{inputs: Input[], outputs: Output[]}) { + super(TxType.MsgMultiSend); + this.value = msg; } - getSignBytes(): object { - return this; + static getModelClass(){ + return pbs.bank_tx_pb.MsgMultiSend; } -} -/** - * Msg for setting memo regexp for an address - * - * @hidden - */ -export class MsgSetMemoRegexp implements Msg { - type: string; - value: { owner: string; memo_regexp: string }; - constructor(owner: string, memoRegexp: string) { - this.type = 'irishub/bank/SetMemoRegexp'; - this.value = { - owner, - memo_regexp: memoRegexp, - }; + getModel():any{ + let msg = new ((this.constructor as any).getModelClass())(); + this.value.inputs.forEach((item)=>{ + let input = new pbs.bank_tx_pb.Input(); + input.setAddress(item.address); + item.coins.forEach((coin)=>{ + input.addCoins(TxModelCreator.createCoinModel(coin.denom, coin.amount)); + }); + msg.addInputs(input); + }); + this.value.outputs.forEach((item)=>{ + let output = new pbs.bank_tx_pb.Output(); + output.setAddress(item.address); + item.coins.forEach((coin)=>{ + output.addCoins(TxModelCreator.createCoinModel(coin.denom, coin.amount)); + }); + msg.addOutputs(output); + }); + return msg; } - getSignBytes(): object { - return this; + validate() { + if (!this.value.inputs) { + throw new SdkError("inputs is empty"); + } + if (!this.value.outputs) { + throw new SdkError("outputs is empty"); + } } } @@ -84,17 +110,6 @@ export interface Input extends InputOutput {} /** Output implemention of [[InputOutput]] */ export interface Output extends InputOutput {} -/** Token statistics */ -export interface TokenStats { - /** Non bonded tokens */ - loose_tokens: Coin[]; - /** Bonded tokens */ - bonded_tokens: Coin[]; - /** Burned tokens */ - burned_tokens: Coin[]; - /** Total supply */ - total_supply: Coin[]; -} export interface EventDataMsgSend { height: string; @@ -104,7 +119,7 @@ export interface EventDataMsgSend { amount: Coin[]; } -export interface BaseAccount { +export interface Account { /** Bech32 account address */ address: string; coins: Coin[]; diff --git a/src/types/coinswap.ts b/src/types/coinswap.ts new file mode 100644 index 00000000..e08f70f6 --- /dev/null +++ b/src/types/coinswap.ts @@ -0,0 +1,93 @@ +import { Coin, Msg } from './types'; + +export interface Liquidity { + standard: Coin; + token: Coin; + liquidity: Coin; + fee: string; +} + +export interface DepositRequest { + max_token: Coin; + exact_standard_amt: number; + min_liquidity: number; + deadline: number; +} + +export interface WithdrawRequest { + min_token: number; + withdraw_liquidity: Coin; + min_standard_amt: number; + deadline: number; +} + +export interface SwapOrderRequest { + input: { + address: string; + coin: Coin; + }; + output: { + address: string; + coin: Coin; + }; + deadline: number; +} + +export class MsgAddLiquidity extends Msg { + value: object; + constructor(request: DepositRequest, sender: string) { + super('irismod/coinswap/MsgAddLiquidity'); + const deadline = new Date(); + deadline.setTime(deadline.getTime() + request.deadline); + this.value = { + max_token: request.max_token, + exact_standard_amt: String(request.exact_standard_amt), + min_liquidity: String(request.min_liquidity), + deadline: deadline.getTime().toString(), + sender, + }; + } + + getSignBytes(): object { + return this; + } +} + +export class MsgRemoveLiquidity extends Msg { + value: object; + constructor(request: WithdrawRequest, sender: string) { + super('irismod/coinswap/MsgRemoveLiquidity') + const deadline = new Date(); + deadline.setMilliseconds(deadline.getTime() + request.deadline); + this.value = { + min_token: String(request.min_token), + withdraw_liquidity: request.withdraw_liquidity, + min_standard_amt: String(request.min_standard_amt), + deadline: deadline.getTime().toString(), + sender, + }; + } + + getSignBytes(): object { + return this; + } +} + +export class MsgSwapOrder extends Msg { + value: object; + constructor(request: SwapOrderRequest, isBuyOrder: boolean) { + super('irismod/coinswap/MsgSwapOrder') + const deadline = new Date(); + deadline.setTime(deadline.getTime() + request.deadline); + this.value = { + input: request.input, + output: request.output, + deadline: deadline.getTime().toString(), + is_buy_order: isBuyOrder, + }; + } + + getSignBytes(): object { + return this; + } +} diff --git a/src/types/constants.ts b/src/types/constants.ts index aecf8f6f..880f7989 100644 --- a/src/types/constants.ts +++ b/src/types/constants.ts @@ -18,9 +18,12 @@ export enum RpcMethods { Tx = 'tx', TxSearch = 'tx_search', Validators = 'validators', + NetInfo = 'net_info', } -export const IRIS = 'iris', +export const doNotModify = '[do-not-modify]'; + +export const STD_DENOM = 'tiris', IRIS_ATTO = 'iris-atto', MIN_UNIT_SUFFIX = '-min'; diff --git a/src/types/distribution.ts b/src/types/distribution.ts index 8b3928bb..a13219f9 100644 --- a/src/types/distribution.ts +++ b/src/types/distribution.ts @@ -1,26 +1,63 @@ -import { Coin, Msg } from './types'; +import {Coin, Msg, TxType} from './types'; +import * as pbs from "./proto"; +import * as is from 'is_js'; +import { TxModelCreator } from '../helper'; +import { SdkError, CODES } from "../errors"; + +/** + * param struct for set withdraw address tx + */ +export interface SetWithdrawAddressTxParam { + delegator_address: string; + withdraw_address: string; +} + + +/** + * param struct for withdraw delegator reward tx + */ +export interface WithdrawDelegatorRewardTxParam { + delegator_address: string; + validator_address: string; +} /** * Msg struct for changing the withdraw address for a delegator (or validator self-delegation) * @hidden */ -export class MsgSetWithdrawAddress implements Msg { - type: string; - value: { - delegator_addr: string; - withdraw_addr: string; - }; +export class MsgSetWithdrawAddress extends Msg { + value: SetWithdrawAddressTxParam; - constructor(delegatorAddr: string, withdrawAddr: string) { - this.type = 'irishub/distr/MsgModifyWithdrawAddress'; - this.value = { - delegator_addr: delegatorAddr, - withdraw_addr: withdrawAddr, - }; + constructor(msg: SetWithdrawAddressTxParam) { + super(TxType.MsgSetWithdrawAddress); + this.value = msg; } - getSignBytes(): object { - return this; + static getModelClass():any{ + return pbs.distribution_tx_pb.MsgSetWithdrawAddress; + } + + getModel(): any { + return new ((this.constructor as any).getModelClass())() + .setDelegatorAddress(this.value.delegator_address) + .setWithdrawAddress(this.value.withdraw_address); + } + + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean { + if (is.empty(this.value.delegator_address)) { + throw new SdkError(`delegator address can not be empty`); + } + if (is.empty(this.value.withdraw_address)) { + throw new SdkError(`withdraw address can not be empty`); + } + + return true; } } @@ -28,14 +65,13 @@ export class MsgSetWithdrawAddress implements Msg { * Msg struct for delegation withdraw for all of the delegator's delegations * @hidden */ -export class MsgWithdrawDelegatorRewardsAll implements Msg { - type: string; +export class MsgWithdrawDelegatorRewardsAll extends Msg { value: { delegator_addr: string; }; constructor(delegatorAddr: string) { - this.type = 'irishub/distr/MsgWithdrawDelegationRewardsAll'; + super('irishub/distr/MsgWithdrawDelegationRewardsAll') this.value = { delegator_addr: delegatorAddr, }; @@ -50,48 +86,139 @@ export class MsgWithdrawDelegatorRewardsAll implements Msg { * Msg struct for delegation withdraw from a single validator * @hidden */ -export class MsgWithdrawDelegatorReward implements Msg { - type: string; - value: { - delegator_addr: string; - validator_addr: string; - }; +export class MsgWithdrawDelegatorReward extends Msg { + value: WithdrawDelegatorRewardTxParam; - constructor(delegatorAddr: string, validatorAddr: string) { - this.type = 'irishub/distr/MsgWithdrawDelegationReward'; - this.value = { - delegator_addr: delegatorAddr, - validator_addr: validatorAddr, - }; + constructor(msg: WithdrawDelegatorRewardTxParam) { + super(TxType.MsgWithdrawDelegatorReward); + this.value = msg; } - getSignBytes(): object { - return this; + getModel(): any { + return new ((this.constructor as any).getModelClass())() + .setDelegatorAddress(this.value.delegator_address) + .setValidatorAddress(this.value.validator_address); + } + + static getModelClass():any{ + return pbs.distribution_tx_pb.MsgWithdrawDelegatorReward; + } + + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean { + if (is.empty(this.value.delegator_address)) { + throw new SdkError(`delegator address can not be empty`); + } + if (is.empty(this.value.validator_address)) { + throw new SdkError(`validator address can not be empty`); + } + return true; } } /** - * Msg struct for validator withdraw + * Msg struct forWithdraw Validator Commission. * @hidden */ -export class MsgWithdrawValidatorRewardsAll implements Msg { - type: string; - value: { - validator_addr: string; - }; +export class MsgWithdrawValidatorCommission extends Msg { + value: {validator_address:string}; - constructor(validatorAddr: string) { - this.type = 'irishub/distr/MsgWithdrawValidatorRewardsAll'; - this.value = { - validator_addr: validatorAddr, - }; + constructor(msg: {validator_address:string}) { + super(TxType.MsgWithdrawValidatorCommission); + this.value = msg; } - getSignBytes(): object { - return this; + static getModelClass():any{ + return pbs.distribution_tx_pb.MsgWithdrawValidatorCommission; + } + + getModel(): any { + return new ((this.constructor as any).getModelClass())() + .setValidatorAddress(this.value.validator_address); + } + + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean { + if (is.empty(this.value.validator_address)) { + throw new SdkError(`validator address can not be empty`); + } + return true; + } +} + +/** + * Msg struct Msg Fund Community Pool. + * @hidden + */ +export class MsgFundCommunityPool extends Msg { + value: {amount:Coin[], depositor:string}; + + constructor(msg: {amount:Coin[], depositor:string}) { + super(TxType.MsgFundCommunityPool); + this.value = msg; + } + + static getModelClass():any{ + return pbs.distribution_tx_pb.MsgFundCommunityPool; + } + + getModel(): any { + let msg = new ((this.constructor as any).getModelClass())(); + msg.setDepositor(this.value.depositor); + this.value.amount.forEach((item)=>{ + msg.addAmount(TxModelCreator.createCoinModel(item.denom, item.amount)); + }); + return msg; + } + + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean { + if (is.empty(this.value.depositor)) { + throw new SdkError(`depositor can not be empty`); + } + if (!(this.value.amount && this.value.amount.length)) { + throw new SdkError(`amount can not be empty`); + } + return true; } } +// /** +// * Msg struct for validator withdraw +// * @hidden +// */ +// export class MsgWithdrawValidatorRewardsAll extends Msg { +// value: { +// validator_addr: string; +// }; + +// constructor(validatorAddr: string) { +// super('irishub/distr/MsgWithdrawValidatorRewardsAll') +// this.value = { +// validator_addr: validatorAddr, +// }; +// } + +// getSignBytes(): object { +// return this; +// } +// } + /** Common rewards struct */ export interface Rewards { /** Total rewards */ diff --git a/src/types/gov.ts b/src/types/gov.ts index 40e57b67..87f42b8c 100644 --- a/src/types/gov.ts +++ b/src/types/gov.ts @@ -1,5 +1,5 @@ import { Coin, Msg } from './types'; - +import { SdkError, CODES } from '../errors'; /** * Proposal Types * @hidden @@ -159,12 +159,11 @@ export interface ParameterChangeProposal extends BaseProposal {} * Msg struct for submitting a ParameterChangeProposal * @hidden */ -export class MsgSubmitParameterChangeProposal implements Msg { - type: string; +export class MsgSubmitParameterChangeProposal extends Msg { value: ParameterChangeProposal; constructor(params: ParameterChangeProposal) { - this.type = 'irishub/gov/MsgSubmitProposal'; + super('irishub/gov/MsgSubmitProposal'); params.proposal_type = ProposalType[ProposalType.Parameter]; this.value = params; } @@ -184,7 +183,7 @@ export class MsgSubmitParameterChangeProposal implements Msg { initial_deposit: this.value.initial_deposit, params: this.value.params, }, - }; + } as Msg; } } @@ -200,12 +199,11 @@ export interface PlainTextProposal extends BaseProposal {} * Msg struct for submitting a PlainTextProposal * @hidden */ -export class MsgSubmitPlainTextProposal implements Msg { - type: string; +export class MsgSubmitPlainTextProposal extends Msg { value: PlainTextProposal; constructor(params: PlainTextProposal) { - this.type = 'irishub/gov/MsgSubmitProposal'; + super('irishub/gov/MsgSubmitProposal'); params.proposal_type = ProposalType[ProposalType.PlainText]; params.params = null; // TODO: Historical issue: Proposals except `ParameterChange` must specify the `params` to be null this.value = params; @@ -225,7 +223,7 @@ export class MsgSubmitPlainTextProposal implements Msg { proposer: this.value.proposer, initial_deposit: this.value.initial_deposit, }, - }; + } as Msg; } } @@ -245,12 +243,11 @@ export interface CommunityTaxUsageProposal extends BaseProposal { * Msg struct for submitting a CommunityTaxUsageProposal * @hidden */ -export class MsgSubmitCommunityTaxUsageProposal implements Msg { - type: string; +export class MsgSubmitCommunityTaxUsageProposal extends Msg { value: CommunityTaxUsageProposal; constructor(params: CommunityTaxUsageProposal) { - this.type = 'irishub/gov/MsgSubmitCommunityTaxUsageProposal'; + super('irishub/gov/MsgSubmitCommunityTaxUsageProposal') params.proposal_type = ProposalType[ProposalType.CommunityTaxUsage]; params.params = null; // TODO: Historical issue: Proposals except `ParameterChange` must specify the `params` to be null this.value = params; @@ -270,7 +267,7 @@ export class MsgSubmitCommunityTaxUsageProposal implements Msg { proposer: this.value.proposer, initial_deposit: this.value.initial_deposit, }, - }; + } as Msg; } } @@ -278,8 +275,7 @@ export class MsgSubmitCommunityTaxUsageProposal implements Msg { * Msg struct for depositing to an active proposal in `depositing` period * @hidden */ -export class MsgDeposit implements Msg { - type: string; +export class MsgDeposit extends Msg { value: { proposal_id: string; depositor: string; @@ -287,11 +283,11 @@ export class MsgDeposit implements Msg { }; constructor(proposalID: string, depositor: string, amount: Coin[]) { - this.type = 'irishub/gov/MsgDeposit'; + super('irishub/gov/MsgDeposit'); this.value = { proposal_id: proposalID, - depositor: depositor, - amount: amount, + depositor, + amount, }; } @@ -304,8 +300,7 @@ export class MsgDeposit implements Msg { * Msg struct for voting to an active proposal in `voting` period * @hidden */ -export class MsgVote implements Msg { - type: string; +export class MsgVote extends Msg { value: { proposal_id: string; voter: string; @@ -313,10 +308,10 @@ export class MsgVote implements Msg { }; constructor(proposalID: string, voter: string, option: VoteOption) { - this.type = 'irishub/gov/MsgVote'; + super('irishub/gov/MsgVote'); this.value = { proposal_id: proposalID, - voter: voter, + voter, option: VoteOption[option], }; } @@ -331,8 +326,8 @@ export class MsgVote implements Msg { value: { proposal_id: this.value.proposal_id, voter: this.value.voter, - option: (VoteOption)[this.value.option], + option: (VoteOption as any)[this.value.option], }, - }; + } as Msg; } } diff --git a/src/types/htlc.ts b/src/types/htlc.ts deleted file mode 100644 index 05c627b5..00000000 --- a/src/types/htlc.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { Coin, Msg, Tag } from './types'; - -/** @TODO document */ -export class MsgCreateHTLC implements Msg { - type: string; - value: { - sender: string, - to: string, - receiver_on_other_chain: string, - amount: Coin[], - time_lock: string, - hash_lock: string, - timestamp: string, - }; - constructor( - sender: string, - to: string, - receiverOnOtherChain: string, - amount: Coin[], - lockTime: string, - hashLock: string, - timestamp: string, - ) { - this.type = 'irishub/htlc/MsgCreateHTLC'; - this.value = { - sender: sender, - to: to, - receiver_on_other_chain: receiverOnOtherChain, - amount: amount, - time_lock: lockTime, - hash_lock: hashLock, - timestamp: timestamp, - }; - } - getSignBytes(): object { - return this; - } -} - -export class MsgClaimHTLC implements Msg { - type: string; - value: { - sender: string, - secret: string - hash_lock: string, - }; - constructor(sender: string, secret: string, hashLock: string) { - this.type = 'irishub/htlc/MsgClaimHTLC'; - this.value = { - sender: sender, - secret: secret, - hash_lock: hashLock - }; - } - getSignBytes(): object { - return this; - } -} - -export class MsgRefundHTLC implements Msg { - type: string; - value: { - sender: string, - hash_lock: string, - }; - constructor(sender: string, hashLock: string) { - this.type = 'irishub/htlc/MsgRefundHTLC'; - this.value = { - sender: sender, - hash_lock: hashLock - }; - } - getSignBytes(): object { - return this; - } -} - -export interface queryHTLCResult { - sender: string; - to: string; - receiver_on_other_chain: string; - amount: Coin[]; - secret: string; - timestamp: number; - expire_height: number; - state: string; -} - -export interface CreateHTLCResult { - hash: string; - tags?: Tag[]; - height?: number; - secret?: string; - hashLock?: string; -} \ No newline at end of file diff --git a/src/types/index.ts b/src/types/index.ts index 14cbef1f..2459aea7 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -14,9 +14,12 @@ export * from './service'; export * from './oracle'; export * from './random'; export * from './events'; -export * from './asset'; +export * from './token'; export * from './block'; export * from './block-result'; export * from './validator'; export * from './query-builder'; -export * from './htlc'; \ No newline at end of file +export * from './coinswap'; +export * from './protoTx'; +export * from './nft'; +export * from './proto'; \ No newline at end of file diff --git a/src/types/keystore.ts b/src/types/keystore.ts index 97d2b56e..f7e113e3 100644 --- a/src/types/keystore.ts +++ b/src/types/keystore.ts @@ -20,6 +20,25 @@ export interface Key { privKey: string; } +/** + * Key struct + * @hidden + */ + +interface KeyPair{ + privateKey: string; + publicKey: string; +} + +/** + * wallet struct + */ +export interface Wallet extends KeyPair{ + address: string; + mnemonic?: string; +} + + /** * Crypto struct * @hidden diff --git a/src/types/nft.ts b/src/types/nft.ts new file mode 100644 index 00000000..5a8ce68e --- /dev/null +++ b/src/types/nft.ts @@ -0,0 +1,309 @@ +import { Coin, Msg, Pubkey, TxType, doNotModify } from './index'; +import { TxModelCreator } from '../helper'; +import * as is from 'is_js'; +import * as pbs from "./proto"; +import { SdkError, CODES } from '../errors'; + +/** + * param struct for issue denom tx + */ +export interface IssueDenomParam { + id:string; + name:string; + schema:string; + sender:string; +} +/** + * Msg for issue denom + * + * @hidden + */ +export class MsgIssueDenom extends Msg { + value: IssueDenomParam; + + constructor(msg:IssueDenomParam) { + super(TxType.MsgIssueDenom); + this.value = msg; + } + + static getModelClass():any{ + return pbs.nft_tx_pb.MsgIssueDenom; + } + + getModel():any{ + let msg = new ((this.constructor as any).getModelClass())(); + msg.setId(this.value.id); + msg.setName(this.value.name); + msg.setSchema(this.value.schema); + msg.setSender(this.value.sender); + return msg; + } + + Validate() { + if (!this.value.id) { + throw new SdkError("id can not be empty"); + } + if (!this.value.name) { + throw new SdkError("name can not be empty"); + } + if (!this.value.schema) { + throw new SdkError("schema can not be empty"); + } + if (!this.value.sender) { + throw new SdkError("sender can not be empty"); + } + } +} + +/** + * param struct for Mint NFT + */ +export interface MintNFTParam { + id:string; + denom_id:string; + name:string; + uri:string; + data:string; + sender:string; + recipient:string; +} + +/** + * Msg for Mint NFT + * + * @hidden + */ +export class MsgMintNFT extends Msg { + value: MintNFTParam; + + constructor(msg:MintNFTParam) { + super(TxType.MsgMintNFT); + this.value = msg; + } + + static getModelClass():any{ + return pbs.nft_tx_pb.MsgMintNFT; + } + + getModel():any{ + let msg = new ((this.constructor as any).getModelClass())(); + msg.setId(this.value.id); + msg.setDenomId(this.value.denom_id); + msg.setName(this.value.name); + msg.setUri(this.value.uri); + msg.setData(this.value.data); + msg.setSender(this.value.sender); + msg.setRecipient(this.value.recipient); + return msg; + } + + Validate() { + if (!this.value.id) { + throw new SdkError("id can not be empty"); + } + if (!this.value.denom_id) { + throw new SdkError("denom_id can not be empty"); + } + if (!this.value.name) { + throw new SdkError("name can not be empty"); + } + if (!this.value.uri) { + throw new SdkError("uri can not be empty"); + } + if (!this.value.data) { + throw new SdkError("data can not be empty"); + } + if (!this.value.sender) { + throw new SdkError("sender can not be empty"); + } + if (!this.value.recipient) { + throw new SdkError("recipient can not be empty"); + } + } +} + +/** + * param struct for Edit NFT tx + */ +export interface EditNFTParam { + id:string; + denom_id:string; + name?:string; + uri?:string; + data?:string; + sender:string; +} +/** + * Msg for Edit NFT + * + * @hidden + */ +export class MsgEditNFT extends Msg { + value: EditNFTParam; + + constructor(msg:EditNFTParam) { + super(TxType.MsgEditNFT); + this.value = msg; + } + + static getModelClass():any{ + return pbs.nft_tx_pb.MsgEditNFT; + } + + getModel():any{ + let msg = new ((this.constructor as any).getModelClass())(); + msg.setId(this.value.id); + msg.setDenomId(this.value.denom_id); + msg.setSender(this.value.sender); + if (typeof this.value.name === 'undefined') { + msg.setName(doNotModify); + }else{ + msg.setName(this.value.name); + } + if (typeof this.value.uri === 'undefined') { + msg.setUri(doNotModify); + }else{ + msg.setUri(this.value.uri); + } + if (typeof this.value.data === 'undefined') { + msg.setData(doNotModify); + }else{ + msg.setData(this.value.data); + } + return msg; + } + + Validate() { + if (!this.value.id) { + throw new SdkError("id can not be empty"); + } + if (!this.value.denom_id) { + throw new SdkError("denom_id can not be empty"); + } + if (!this.value.sender) { + throw new SdkError("sender can not be empty"); + } + } +} + +/** + * param struct for Transfer NFT tx + */ +export interface TransferNFTParam { + id:string; + denom_id:string; + name?:string; + uri?:string; + data?:string; + sender:string; + recipient:string; +} +/** + * Msg for Transfer NFT + * + * @hidden + */ +export class MsgTransferNFT extends Msg { + value: TransferNFTParam; + + constructor(msg:TransferNFTParam) { + super(TxType.MsgTransferNFT); + this.value = msg; + } + + static getModelClass():any{ + return pbs.nft_tx_pb.MsgTransferNFT; + } + + getModel():any{ + let msg = new ((this.constructor as any).getModelClass())(); + msg.setId(this.value.id); + msg.setDenomId(this.value.denom_id); + msg.setSender(this.value.sender); + msg.setRecipient(this.value.recipient); + if (typeof this.value.name === 'undefined') { + msg.setName(doNotModify); + }else{ + msg.setName(this.value.name); + } + if (typeof this.value.uri === 'undefined') { + msg.setUri(doNotModify); + }else{ + msg.setUri(this.value.uri); + } + if (typeof this.value.data === 'undefined') { + msg.setData(doNotModify); + }else{ + msg.setData(this.value.data); + } + return msg; + } + + Validate() { + if (!this.value.id) { + throw new SdkError("id can not be empty"); + } + if (!this.value.denom_id) { + throw new SdkError("denom_id can not be empty"); + } + if (!this.value.sender) { + throw new SdkError("sender can not be empty"); + } + if (!this.value.recipient) { + throw new SdkError("recipient can not be empty"); + } + } +} + +/** + * param struct for Burn NFT tx + */ +export interface BurnNFTParam { + id:string; + denom_id:string; + sender:string; +} +/** + * Msg for Burn NFT + * + * @hidden + */ +export class MsgBurnNFT extends Msg { + value: BurnNFTParam; + + constructor(msg:BurnNFTParam) { + super(TxType.MsgBurnNFT); + this.value = msg; + } + + static getModelClass():any{ + return pbs.nft_tx_pb.MsgBurnNFT; + } + + getModel():any{ + let msg = new ((this.constructor as any).getModelClass())(); + msg.setId(this.value.id); + msg.setDenomId(this.value.denom_id); + msg.setSender(this.value.sender); + return msg; + } + + Validate() { + if (!this.value.id) { + throw new SdkError("id can not be empty"); + } + if (!this.value.denom_id) { + throw new SdkError("denom_id can not be empty"); + } + if (!this.value.sender) { + throw new SdkError("sender can not be empty"); + } + } +} + +export interface Denom { + id:string; + name:string; + schema:string; + creator:string; +} diff --git a/src/types/proto-types/confio/proofs_pb.js b/src/types/proto-types/confio/proofs_pb.js new file mode 100644 index 00000000..7be46dea --- /dev/null +++ b/src/types/proto-types/confio/proofs_pb.js @@ -0,0 +1,3744 @@ +// source: confio/proofs.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 value = /** @type {!Array} */ (reader.readPackedInt32()); + msg.setChildOrderList(value); + 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 value = /** @type {!Array} */ (reader.readPackedInt32()); + msg.setPathList(value); + 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/src/types/proto-types/cosmos/auth/v1beta1/auth_pb.js b/src/types/proto-types/cosmos/auth/v1beta1/auth_pb.js new file mode 100644 index 00000000..f9b97d44 --- /dev/null +++ b/src/types/proto-types/cosmos/auth/v1beta1/auth_pb.js @@ -0,0 +1,815 @@ +// source: cosmos/auth/v1beta1/auth.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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); +goog.exportSymbol('proto.cosmos.auth.v1beta1.BaseAccount', null, global); +goog.exportSymbol('proto.cosmos.auth.v1beta1.ModuleAccount', null, global); +goog.exportSymbol('proto.cosmos.auth.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.cosmos.auth.v1beta1.BaseAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.BaseAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.BaseAccount.displayName = 'proto.cosmos.auth.v1beta1.BaseAccount'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.auth.v1beta1.ModuleAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.auth.v1beta1.ModuleAccount.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.ModuleAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.ModuleAccount.displayName = 'proto.cosmos.auth.v1beta1.ModuleAccount'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.auth.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.Params.displayName = 'proto.cosmos.auth.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.cosmos.auth.v1beta1.BaseAccount.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.v1beta1.BaseAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.auth.v1beta1.BaseAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.BaseAccount.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + pubKey: (f = msg.getPubKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + accountNumber: jspb.Message.getFieldWithDefault(msg, 3, 0), + sequence: 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.auth.v1beta1.BaseAccount} + */ +proto.cosmos.auth.v1beta1.BaseAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.BaseAccount; + return proto.cosmos.auth.v1beta1.BaseAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.BaseAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.BaseAccount} + */ +proto.cosmos.auth.v1beta1.BaseAccount.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 google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setPubKey(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAccountNumber(value); + break; + case 4: + 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.cosmos.auth.v1beta1.BaseAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.v1beta1.BaseAccount.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.auth.v1beta1.BaseAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.BaseAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPubKey(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getAccountNumber(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.auth.v1beta1.BaseAccount} returns this + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any pub_key = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.getPubKey = 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.cosmos.auth.v1beta1.BaseAccount} returns this +*/ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.setPubKey = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.auth.v1beta1.BaseAccount} returns this + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.clearPubKey = function() { + return this.setPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.hasPubKey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 account_number = 3; + * @return {number} + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.getAccountNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.auth.v1beta1.BaseAccount} returns this + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.setAccountNumber = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 sequence = 4; + * @return {number} + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.auth.v1beta1.BaseAccount} returns this + */ +proto.cosmos.auth.v1beta1.BaseAccount.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.auth.v1beta1.ModuleAccount.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.auth.v1beta1.ModuleAccount.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.v1beta1.ModuleAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.auth.v1beta1.ModuleAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.ModuleAccount.toObject = function(includeInstance, msg) { + var f, obj = { + baseAccount: (f = msg.getBaseAccount()) && proto.cosmos.auth.v1beta1.BaseAccount.toObject(includeInstance, f), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + permissionsList: (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.auth.v1beta1.ModuleAccount} + */ +proto.cosmos.auth.v1beta1.ModuleAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.ModuleAccount; + return proto.cosmos.auth.v1beta1.ModuleAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.ModuleAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.ModuleAccount} + */ +proto.cosmos.auth.v1beta1.ModuleAccount.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.auth.v1beta1.BaseAccount; + reader.readMessage(value,proto.cosmos.auth.v1beta1.BaseAccount.deserializeBinaryFromReader); + msg.setBaseAccount(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addPermissions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.v1beta1.ModuleAccount.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.auth.v1beta1.ModuleAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.ModuleAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBaseAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.auth.v1beta1.BaseAccount.serializeBinaryToWriter + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPermissionsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } +}; + + +/** + * optional BaseAccount base_account = 1; + * @return {?proto.cosmos.auth.v1beta1.BaseAccount} + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.getBaseAccount = function() { + return /** @type{?proto.cosmos.auth.v1beta1.BaseAccount} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.auth.v1beta1.BaseAccount, 1)); +}; + + +/** + * @param {?proto.cosmos.auth.v1beta1.BaseAccount|undefined} value + * @return {!proto.cosmos.auth.v1beta1.ModuleAccount} returns this +*/ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.setBaseAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.auth.v1beta1.ModuleAccount} returns this + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.clearBaseAccount = function() { + return this.setBaseAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.hasBaseAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.auth.v1beta1.ModuleAccount} returns this + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated string permissions = 3; + * @return {!Array} + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.getPermissionsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.auth.v1beta1.ModuleAccount} returns this + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.setPermissionsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.auth.v1beta1.ModuleAccount} returns this + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.addPermissions = 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.auth.v1beta1.ModuleAccount} returns this + */ +proto.cosmos.auth.v1beta1.ModuleAccount.prototype.clearPermissionsList = function() { + return this.setPermissionsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.auth.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.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.cosmos.auth.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + maxMemoCharacters: jspb.Message.getFieldWithDefault(msg, 1, 0), + txSigLimit: jspb.Message.getFieldWithDefault(msg, 2, 0), + txSizeCostPerByte: jspb.Message.getFieldWithDefault(msg, 3, 0), + sigVerifyCostEd25519: jspb.Message.getFieldWithDefault(msg, 4, 0), + sigVerifyCostSecp256k1: 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.cosmos.auth.v1beta1.Params} + */ +proto.cosmos.auth.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.Params; + return proto.cosmos.auth.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.Params} + */ +proto.cosmos.auth.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.setMaxMemoCharacters(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTxSigLimit(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTxSizeCostPerByte(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSigVerifyCostEd25519(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setSigVerifyCostSecp256k1(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.auth.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.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.cosmos.auth.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxMemoCharacters(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getTxSigLimit(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getTxSizeCostPerByte(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getSigVerifyCostEd25519(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getSigVerifyCostSecp256k1(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } +}; + + +/** + * optional uint64 max_memo_characters = 1; + * @return {number} + */ +proto.cosmos.auth.v1beta1.Params.prototype.getMaxMemoCharacters = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.auth.v1beta1.Params} returns this + */ +proto.cosmos.auth.v1beta1.Params.prototype.setMaxMemoCharacters = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 tx_sig_limit = 2; + * @return {number} + */ +proto.cosmos.auth.v1beta1.Params.prototype.getTxSigLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.auth.v1beta1.Params} returns this + */ +proto.cosmos.auth.v1beta1.Params.prototype.setTxSigLimit = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 tx_size_cost_per_byte = 3; + * @return {number} + */ +proto.cosmos.auth.v1beta1.Params.prototype.getTxSizeCostPerByte = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.auth.v1beta1.Params} returns this + */ +proto.cosmos.auth.v1beta1.Params.prototype.setTxSizeCostPerByte = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 sig_verify_cost_ed25519 = 4; + * @return {number} + */ +proto.cosmos.auth.v1beta1.Params.prototype.getSigVerifyCostEd25519 = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.auth.v1beta1.Params} returns this + */ +proto.cosmos.auth.v1beta1.Params.prototype.setSigVerifyCostEd25519 = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 sig_verify_cost_secp256k1 = 5; + * @return {number} + */ +proto.cosmos.auth.v1beta1.Params.prototype.getSigVerifyCostSecp256k1 = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.auth.v1beta1.Params} returns this + */ +proto.cosmos.auth.v1beta1.Params.prototype.setSigVerifyCostSecp256k1 = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +goog.object.extend(exports, proto.cosmos.auth.v1beta1); diff --git a/src/types/proto-types/cosmos/auth/v1beta1/genesis_pb.js b/src/types/proto-types/cosmos/auth/v1beta1/genesis_pb.js new file mode 100644 index 00000000..23761428 --- /dev/null +++ b/src/types/proto-types/cosmos/auth/v1beta1/genesis_pb.js @@ -0,0 +1,254 @@ +// source: cosmos/auth/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_auth_v1beta1_auth_pb = require('../../../cosmos/auth/v1beta1/auth_pb.js'); +goog.object.extend(proto, cosmos_auth_v1beta1_auth_pb); +goog.exportSymbol('proto.cosmos.auth.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.cosmos.auth.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.auth.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.GenesisState.displayName = 'proto.cosmos.auth.v1beta1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.auth.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.cosmos.auth.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.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.cosmos.auth.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_auth_v1beta1_auth_pb.Params.toObject(includeInstance, f), + accountsList: jspb.Message.toObjectList(msg.getAccountsList(), + 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.cosmos.auth.v1beta1.GenesisState} + */ +proto.cosmos.auth.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.GenesisState; + return proto.cosmos.auth.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.GenesisState} + */ +proto.cosmos.auth.v1beta1.GenesisState.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.Params; + reader.readMessage(value,cosmos_auth_v1beta1_auth_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addAccounts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.auth.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.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.cosmos.auth.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_auth_v1beta1_auth_pb.Params.serializeBinaryToWriter + ); + } + f = message.getAccountsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.auth.v1beta1.Params} + */ +proto.cosmos.auth.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.cosmos.auth.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_auth_v1beta1_auth_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.auth.v1beta1.Params|undefined} value + * @return {!proto.cosmos.auth.v1beta1.GenesisState} returns this +*/ +proto.cosmos.auth.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.auth.v1beta1.GenesisState} returns this + */ +proto.cosmos.auth.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.auth.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated google.protobuf.Any accounts = 2; + * @return {!Array} + */ +proto.cosmos.auth.v1beta1.GenesisState.prototype.getAccountsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.auth.v1beta1.GenesisState} returns this +*/ +proto.cosmos.auth.v1beta1.GenesisState.prototype.setAccountsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.cosmos.auth.v1beta1.GenesisState.prototype.addAccounts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.auth.v1beta1.GenesisState} returns this + */ +proto.cosmos.auth.v1beta1.GenesisState.prototype.clearAccountsList = function() { + return this.setAccountsList([]); +}; + + +goog.object.extend(exports, proto.cosmos.auth.v1beta1); diff --git a/src/types/proto-types/cosmos/auth/v1beta1/query_grpc_web_pb.js b/src/types/proto-types/cosmos/auth/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..8806d0cb --- /dev/null +++ b/src/types/proto-types/cosmos/auth/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,246 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.auth.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_auth_v1beta1_auth_pb = require('../../../cosmos/auth/v1beta1/auth_pb.js') + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.auth = {}; +proto.cosmos.auth.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.auth.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.auth.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.auth.v1beta1.QueryAccountRequest, + * !proto.cosmos.auth.v1beta1.QueryAccountResponse>} + */ +const methodDescriptor_Query_Account = new grpc.web.MethodDescriptor( + '/cosmos.auth.v1beta1.Query/Account', + grpc.web.MethodType.UNARY, + proto.cosmos.auth.v1beta1.QueryAccountRequest, + proto.cosmos.auth.v1beta1.QueryAccountResponse, + /** + * @param {!proto.cosmos.auth.v1beta1.QueryAccountRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.auth.v1beta1.QueryAccountResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.auth.v1beta1.QueryAccountRequest, + * !proto.cosmos.auth.v1beta1.QueryAccountResponse>} + */ +const methodInfo_Query_Account = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.auth.v1beta1.QueryAccountResponse, + /** + * @param {!proto.cosmos.auth.v1beta1.QueryAccountRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.auth.v1beta1.QueryAccountResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.auth.v1beta1.QueryAccountRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.auth.v1beta1.QueryAccountResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.auth.v1beta1.QueryClient.prototype.account = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.auth.v1beta1.Query/Account', + request, + metadata || {}, + methodDescriptor_Query_Account, + callback); +}; + + +/** + * @param {!proto.cosmos.auth.v1beta1.QueryAccountRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.auth.v1beta1.QueryPromiseClient.prototype.account = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.auth.v1beta1.Query/Account', + request, + metadata || {}, + methodDescriptor_Query_Account); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.auth.v1beta1.QueryParamsRequest, + * !proto.cosmos.auth.v1beta1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/cosmos.auth.v1beta1.Query/Params', + grpc.web.MethodType.UNARY, + proto.cosmos.auth.v1beta1.QueryParamsRequest, + proto.cosmos.auth.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.auth.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.auth.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.auth.v1beta1.QueryParamsRequest, + * !proto.cosmos.auth.v1beta1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.auth.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.auth.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.auth.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.auth.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.auth.v1beta1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.auth.v1beta1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.auth.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.cosmos.auth.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.auth.v1beta1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.auth.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +module.exports = proto.cosmos.auth.v1beta1; + diff --git a/src/types/proto-types/cosmos/auth/v1beta1/query_pb.js b/src/types/proto-types/cosmos/auth/v1beta1/query_pb.js new file mode 100644 index 00000000..160afd51 --- /dev/null +++ b/src/types/proto-types/cosmos/auth/v1beta1/query_pb.js @@ -0,0 +1,646 @@ +// source: cosmos/auth/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_auth_v1beta1_auth_pb = require('../../../cosmos/auth/v1beta1/auth_pb.js'); +goog.object.extend(proto, cosmos_auth_v1beta1_auth_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +goog.exportSymbol('proto.cosmos.auth.v1beta1.QueryAccountRequest', null, global); +goog.exportSymbol('proto.cosmos.auth.v1beta1.QueryAccountResponse', null, global); +goog.exportSymbol('proto.cosmos.auth.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryAccountRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.QueryAccountRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.QueryAccountRequest.displayName = 'proto.cosmos.auth.v1beta1.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.auth.v1beta1.QueryAccountResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.QueryAccountResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.QueryAccountResponse.displayName = 'proto.cosmos.auth.v1beta1.QueryAccountResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.auth.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.QueryParamsRequest.displayName = 'proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.auth.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.auth.v1beta1.QueryParamsResponse.displayName = 'proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryAccountRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.v1beta1.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.auth.v1beta1.QueryAccountRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.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.auth.v1beta1.QueryAccountRequest} + */ +proto.cosmos.auth.v1beta1.QueryAccountRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.QueryAccountRequest; + return proto.cosmos.auth.v1beta1.QueryAccountRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.QueryAccountRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.QueryAccountRequest} + */ +proto.cosmos.auth.v1beta1.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.auth.v1beta1.QueryAccountRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.v1beta1.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.auth.v1beta1.QueryAccountRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.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.auth.v1beta1.QueryAccountRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.auth.v1beta1.QueryAccountRequest} returns this + */ +proto.cosmos.auth.v1beta1.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.auth.v1beta1.QueryAccountResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.v1beta1.QueryAccountResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.auth.v1beta1.QueryAccountResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.QueryAccountResponse.toObject = function(includeInstance, msg) { + var f, obj = { + account: (f = msg.getAccount()) && 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.cosmos.auth.v1beta1.QueryAccountResponse} + */ +proto.cosmos.auth.v1beta1.QueryAccountResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.QueryAccountResponse; + return proto.cosmos.auth.v1beta1.QueryAccountResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.QueryAccountResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.QueryAccountResponse} + */ +proto.cosmos.auth.v1beta1.QueryAccountResponse.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.setAccount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.auth.v1beta1.QueryAccountResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.v1beta1.QueryAccountResponse.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.auth.v1beta1.QueryAccountResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.QueryAccountResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Any account = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.auth.v1beta1.QueryAccountResponse.prototype.getAccount = 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.cosmos.auth.v1beta1.QueryAccountResponse} returns this +*/ +proto.cosmos.auth.v1beta1.QueryAccountResponse.prototype.setAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.auth.v1beta1.QueryAccountResponse} returns this + */ +proto.cosmos.auth.v1beta1.QueryAccountResponse.prototype.clearAccount = function() { + return this.setAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.auth.v1beta1.QueryAccountResponse.prototype.hasAccount = 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.auth.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryParamsRequest} + */ +proto.cosmos.auth.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.QueryParamsRequest; + return proto.cosmos.auth.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.QueryParamsRequest} + */ +proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_auth_v1beta1_auth_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.cosmos.auth.v1beta1.QueryParamsResponse} + */ +proto.cosmos.auth.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.auth.v1beta1.QueryParamsResponse; + return proto.cosmos.auth.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.auth.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.auth.v1beta1.QueryParamsResponse} + */ +proto.cosmos.auth.v1beta1.QueryParamsResponse.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.Params; + reader.readMessage(value,cosmos_auth_v1beta1_auth_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.cosmos.auth.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.auth.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.cosmos.auth.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.auth.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_auth_v1beta1_auth_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.auth.v1beta1.Params} + */ +proto.cosmos.auth.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.cosmos.auth.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_auth_v1beta1_auth_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.auth.v1beta1.Params|undefined} value + * @return {!proto.cosmos.auth.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.auth.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.auth.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.auth.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.auth.v1beta1.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.cosmos.auth.v1beta1); diff --git a/src/types/proto-types/cosmos/bank/v1beta1/bank_pb.js b/src/types/proto-types/cosmos/bank/v1beta1/bank_pb.js new file mode 100644 index 00000000..82261386 --- /dev/null +++ b/src/types/proto-types/cosmos/bank/v1beta1/bank_pb.js @@ -0,0 +1,1531 @@ +// source: cosmos/bank/v1beta1/bank.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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.cosmos.bank.v1beta1.DenomUnit', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.Input', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.Metadata', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.Output', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.Params', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.SendEnabled', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.Supply', 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.bank.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.Params.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.Params.displayName = 'proto.cosmos.bank.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.cosmos.bank.v1beta1.SendEnabled = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.SendEnabled, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.SendEnabled.displayName = 'proto.cosmos.bank.v1beta1.SendEnabled'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Input = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.Input.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.Input, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.Input.displayName = 'proto.cosmos.bank.v1beta1.Input'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Output = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.Output.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.Output, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.Output.displayName = 'proto.cosmos.bank.v1beta1.Output'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Supply = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.Supply.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.Supply, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.Supply.displayName = 'proto.cosmos.bank.v1beta1.Supply'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.DenomUnit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.DenomUnit.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.DenomUnit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.DenomUnit.displayName = 'proto.cosmos.bank.v1beta1.DenomUnit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Metadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.Metadata.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.Metadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.Metadata.displayName = 'proto.cosmos.bank.v1beta1.Metadata'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.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.cosmos.bank.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.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.cosmos.bank.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + sendEnabledList: jspb.Message.toObjectList(msg.getSendEnabledList(), + proto.cosmos.bank.v1beta1.SendEnabled.toObject, includeInstance), + defaultSendEnabled: 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.cosmos.bank.v1beta1.Params} + */ +proto.cosmos.bank.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.Params; + return proto.cosmos.bank.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.Params} + */ +proto.cosmos.bank.v1beta1.Params.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.SendEnabled; + reader.readMessage(value,proto.cosmos.bank.v1beta1.SendEnabled.deserializeBinaryFromReader); + msg.addSendEnabled(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDefaultSendEnabled(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.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.cosmos.bank.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSendEnabledList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.bank.v1beta1.SendEnabled.serializeBinaryToWriter + ); + } + f = message.getDefaultSendEnabled(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * repeated SendEnabled send_enabled = 1; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.Params.prototype.getSendEnabledList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.bank.v1beta1.SendEnabled, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.Params} returns this +*/ +proto.cosmos.bank.v1beta1.Params.prototype.setSendEnabledList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.SendEnabled=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.bank.v1beta1.SendEnabled} + */ +proto.cosmos.bank.v1beta1.Params.prototype.addSendEnabled = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.bank.v1beta1.SendEnabled, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.bank.v1beta1.Params} returns this + */ +proto.cosmos.bank.v1beta1.Params.prototype.clearSendEnabledList = function() { + return this.setSendEnabledList([]); +}; + + +/** + * optional bool default_send_enabled = 2; + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.Params.prototype.getDefaultSendEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.bank.v1beta1.Params} returns this + */ +proto.cosmos.bank.v1beta1.Params.prototype.setDefaultSendEnabled = 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.cosmos.bank.v1beta1.SendEnabled.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.SendEnabled.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.SendEnabled} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.SendEnabled.toObject = function(includeInstance, msg) { + var f, obj = { + denom: jspb.Message.getFieldWithDefault(msg, 1, ""), + enabled: 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.cosmos.bank.v1beta1.SendEnabled} + */ +proto.cosmos.bank.v1beta1.SendEnabled.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.SendEnabled; + return proto.cosmos.bank.v1beta1.SendEnabled.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.SendEnabled} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.SendEnabled} + */ +proto.cosmos.bank.v1beta1.SendEnabled.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 {boolean} */ (reader.readBool()); + msg.setEnabled(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.SendEnabled.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.SendEnabled.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.SendEnabled} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.SendEnabled.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenom(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getEnabled(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional string denom = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.SendEnabled.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.SendEnabled} returns this + */ +proto.cosmos.bank.v1beta1.SendEnabled.prototype.setDenom = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bool enabled = 2; + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.SendEnabled.prototype.getEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.bank.v1beta1.SendEnabled} returns this + */ +proto.cosmos.bank.v1beta1.SendEnabled.prototype.setEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.Input.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.bank.v1beta1.Input.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.Input.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Input} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Input.toObject = function(includeInstance, msg) { + var f, obj = { + address: 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.cosmos.bank.v1beta1.Input} + */ +proto.cosmos.bank.v1beta1.Input.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.Input; + return proto.cosmos.bank.v1beta1.Input.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.Input} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.Input} + */ +proto.cosmos.bank.v1beta1.Input.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.addCoins(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.Input.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.Input.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.Input} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Input.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + 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 address = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.Input.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.Input} returns this + */ +proto.cosmos.bank.v1beta1.Input.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin coins = 2; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.Input.prototype.getCoinsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.Input} returns this +*/ +proto.cosmos.bank.v1beta1.Input.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.cosmos.bank.v1beta1.Input.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.cosmos.bank.v1beta1.Input} returns this + */ +proto.cosmos.bank.v1beta1.Input.prototype.clearCoinsList = function() { + return this.setCoinsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.Output.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.bank.v1beta1.Output.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.Output.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Output} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Output.toObject = function(includeInstance, msg) { + var f, obj = { + address: 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.cosmos.bank.v1beta1.Output} + */ +proto.cosmos.bank.v1beta1.Output.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.Output; + return proto.cosmos.bank.v1beta1.Output.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.Output} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.Output} + */ +proto.cosmos.bank.v1beta1.Output.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.addCoins(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.Output.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.Output.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.Output} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Output.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + 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 address = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.Output.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.Output} returns this + */ +proto.cosmos.bank.v1beta1.Output.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin coins = 2; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.Output.prototype.getCoinsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.Output} returns this +*/ +proto.cosmos.bank.v1beta1.Output.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.cosmos.bank.v1beta1.Output.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.cosmos.bank.v1beta1.Output} returns this + */ +proto.cosmos.bank.v1beta1.Output.prototype.clearCoinsList = function() { + return this.setCoinsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.Supply.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.Supply.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.Supply.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Supply} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Supply.toObject = function(includeInstance, msg) { + var f, obj = { + totalList: jspb.Message.toObjectList(msg.getTotalList(), + 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.bank.v1beta1.Supply} + */ +proto.cosmos.bank.v1beta1.Supply.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.Supply; + return proto.cosmos.bank.v1beta1.Supply.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.Supply} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.Supply} + */ +proto.cosmos.bank.v1beta1.Supply.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.addTotal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.Supply.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.Supply.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.Supply} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Supply.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotalList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin total = 1; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.Supply.prototype.getTotalList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.Supply} returns this +*/ +proto.cosmos.bank.v1beta1.Supply.prototype.setTotalList = 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.cosmos.bank.v1beta1.Supply.prototype.addTotal = 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.cosmos.bank.v1beta1.Supply} returns this + */ +proto.cosmos.bank.v1beta1.Supply.prototype.clearTotalList = function() { + return this.setTotalList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.DenomUnit.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.bank.v1beta1.DenomUnit.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.DenomUnit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.DenomUnit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.DenomUnit.toObject = function(includeInstance, msg) { + var f, obj = { + denom: jspb.Message.getFieldWithDefault(msg, 1, ""), + exponent: jspb.Message.getFieldWithDefault(msg, 2, 0), + aliasesList: (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.bank.v1beta1.DenomUnit} + */ +proto.cosmos.bank.v1beta1.DenomUnit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.DenomUnit; + return proto.cosmos.bank.v1beta1.DenomUnit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.DenomUnit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.DenomUnit} + */ +proto.cosmos.bank.v1beta1.DenomUnit.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.readUint32()); + msg.setExponent(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addAliases(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.DenomUnit.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.DenomUnit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.DenomUnit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenom(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExponent(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getAliasesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } +}; + + +/** + * optional string denom = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.DenomUnit} returns this + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.setDenom = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint32 exponent = 2; + * @return {number} + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.getExponent = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.bank.v1beta1.DenomUnit} returns this + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.setExponent = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated string aliases = 3; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.getAliasesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.DenomUnit} returns this + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.setAliasesList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.bank.v1beta1.DenomUnit} returns this + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.addAliases = 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.v1beta1.DenomUnit} returns this + */ +proto.cosmos.bank.v1beta1.DenomUnit.prototype.clearAliasesList = function() { + return this.setAliasesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.Metadata.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.bank.v1beta1.Metadata.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.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.bank.v1beta1.Metadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Metadata.toObject = function(includeInstance, msg) { + var f, obj = { + description: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomUnitsList: jspb.Message.toObjectList(msg.getDenomUnitsList(), + proto.cosmos.bank.v1beta1.DenomUnit.toObject, includeInstance), + base: jspb.Message.getFieldWithDefault(msg, 3, ""), + display: 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.cosmos.bank.v1beta1.Metadata} + */ +proto.cosmos.bank.v1beta1.Metadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.Metadata; + return proto.cosmos.bank.v1beta1.Metadata.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.Metadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.Metadata} + */ +proto.cosmos.bank.v1beta1.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.setDescription(value); + break; + case 2: + var value = new proto.cosmos.bank.v1beta1.DenomUnit; + reader.readMessage(value,proto.cosmos.bank.v1beta1.DenomUnit.deserializeBinaryFromReader); + msg.addDenomUnits(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBase(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setDisplay(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.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.bank.v1beta1.Metadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Metadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomUnitsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.bank.v1beta1.DenomUnit.serializeBinaryToWriter + ); + } + f = message.getBase(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDisplay(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string description = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.Metadata} returns this + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated DenomUnit denom_units = 2; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.getDenomUnitsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.bank.v1beta1.DenomUnit, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.Metadata} returns this +*/ +proto.cosmos.bank.v1beta1.Metadata.prototype.setDenomUnitsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.DenomUnit=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.bank.v1beta1.DenomUnit} + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.addDenomUnits = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.bank.v1beta1.DenomUnit, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.bank.v1beta1.Metadata} returns this + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.clearDenomUnitsList = function() { + return this.setDenomUnitsList([]); +}; + + +/** + * optional string base = 3; + * @return {string} + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.getBase = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.Metadata} returns this + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.setBase = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string display = 4; + * @return {string} + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.getDisplay = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.Metadata} returns this + */ +proto.cosmos.bank.v1beta1.Metadata.prototype.setDisplay = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +goog.object.extend(exports, proto.cosmos.bank.v1beta1); diff --git a/src/types/proto-types/cosmos/bank/v1beta1/genesis_pb.js b/src/types/proto-types/cosmos/bank/v1beta1/genesis_pb.js new file mode 100644 index 00000000..024ead7a --- /dev/null +++ b/src/types/proto-types/cosmos/bank/v1beta1/genesis_pb.js @@ -0,0 +1,572 @@ +// source: cosmos/bank/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var cosmos_bank_v1beta1_bank_pb = require('../../../cosmos/bank/v1beta1/bank_pb.js'); +goog.object.extend(proto, cosmos_bank_v1beta1_bank_pb); +goog.exportSymbol('proto.cosmos.bank.v1beta1.Balance', null, global); +goog.exportSymbol('proto.cosmos.bank.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.cosmos.bank.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.GenesisState.displayName = 'proto.cosmos.bank.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.cosmos.bank.v1beta1.Balance = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.Balance.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.Balance, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.Balance.displayName = 'proto.cosmos.bank.v1beta1.Balance'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.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.cosmos.bank.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.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.cosmos.bank.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_bank_v1beta1_bank_pb.Params.toObject(includeInstance, f), + balancesList: jspb.Message.toObjectList(msg.getBalancesList(), + proto.cosmos.bank.v1beta1.Balance.toObject, includeInstance), + supplyList: jspb.Message.toObjectList(msg.getSupplyList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + denomMetadataList: jspb.Message.toObjectList(msg.getDenomMetadataList(), + cosmos_bank_v1beta1_bank_pb.Metadata.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.bank.v1beta1.GenesisState} + */ +proto.cosmos.bank.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.GenesisState; + return proto.cosmos.bank.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.GenesisState} + */ +proto.cosmos.bank.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_bank_v1beta1_bank_pb.Params; + reader.readMessage(value,cosmos_bank_v1beta1_bank_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new proto.cosmos.bank.v1beta1.Balance; + reader.readMessage(value,proto.cosmos.bank.v1beta1.Balance.deserializeBinaryFromReader); + msg.addBalances(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addSupply(value); + break; + case 4: + var value = new cosmos_bank_v1beta1_bank_pb.Metadata; + reader.readMessage(value,cosmos_bank_v1beta1_bank_pb.Metadata.deserializeBinaryFromReader); + msg.addDenomMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.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.cosmos.bank.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_bank_v1beta1_bank_pb.Params.serializeBinaryToWriter + ); + } + f = message.getBalancesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.bank.v1beta1.Balance.serializeBinaryToWriter + ); + } + f = message.getSupplyList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getDenomMetadataList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_bank_v1beta1_bank_pb.Metadata.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.bank.v1beta1.Params} + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.cosmos.bank.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_bank_v1beta1_bank_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.bank.v1beta1.Params|undefined} value + * @return {!proto.cosmos.bank.v1beta1.GenesisState} returns this +*/ +proto.cosmos.bank.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.GenesisState} returns this + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Balance balances = 2; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.getBalancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.bank.v1beta1.Balance, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.GenesisState} returns this +*/ +proto.cosmos.bank.v1beta1.GenesisState.prototype.setBalancesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.Balance=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.bank.v1beta1.Balance} + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.addBalances = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.bank.v1beta1.Balance, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.bank.v1beta1.GenesisState} returns this + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.clearBalancesList = function() { + return this.setBalancesList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin supply = 3; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.getSupplyList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.GenesisState} returns this +*/ +proto.cosmos.bank.v1beta1.GenesisState.prototype.setSupplyList = 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.bank.v1beta1.GenesisState.prototype.addSupply = 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.bank.v1beta1.GenesisState} returns this + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.clearSupplyList = function() { + return this.setSupplyList([]); +}; + + +/** + * repeated Metadata denom_metadata = 4; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.getDenomMetadataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_bank_v1beta1_bank_pb.Metadata, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.GenesisState} returns this +*/ +proto.cosmos.bank.v1beta1.GenesisState.prototype.setDenomMetadataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.Metadata=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.bank.v1beta1.Metadata} + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.addDenomMetadata = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.bank.v1beta1.Metadata, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.bank.v1beta1.GenesisState} returns this + */ +proto.cosmos.bank.v1beta1.GenesisState.prototype.clearDenomMetadataList = function() { + return this.setDenomMetadataList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.Balance.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.bank.v1beta1.Balance.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.Balance.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Balance} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Balance.toObject = function(includeInstance, msg) { + var f, obj = { + address: 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.cosmos.bank.v1beta1.Balance} + */ +proto.cosmos.bank.v1beta1.Balance.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.Balance; + return proto.cosmos.bank.v1beta1.Balance.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.Balance} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.Balance} + */ +proto.cosmos.bank.v1beta1.Balance.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.addCoins(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.Balance.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.Balance.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.Balance} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.Balance.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + 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 address = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.Balance.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.Balance} returns this + */ +proto.cosmos.bank.v1beta1.Balance.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin coins = 2; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.Balance.prototype.getCoinsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.Balance} returns this +*/ +proto.cosmos.bank.v1beta1.Balance.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.cosmos.bank.v1beta1.Balance.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.cosmos.bank.v1beta1.Balance} returns this + */ +proto.cosmos.bank.v1beta1.Balance.prototype.clearCoinsList = function() { + return this.setCoinsList([]); +}; + + +goog.object.extend(exports, proto.cosmos.bank.v1beta1); diff --git a/src/types/proto-types/cosmos/bank/v1beta1/query_grpc_web_pb.js b/src/types/proto-types/cosmos/bank/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..46575ede --- /dev/null +++ b/src/types/proto-types/cosmos/bank/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,486 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.bank.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_bank_v1beta1_bank_pb = require('../../../cosmos/bank/v1beta1/bank_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.bank = {}; +proto.cosmos.bank.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.bank.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.bank.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.bank.v1beta1.QueryBalanceRequest, + * !proto.cosmos.bank.v1beta1.QueryBalanceResponse>} + */ +const methodDescriptor_Query_Balance = new grpc.web.MethodDescriptor( + '/cosmos.bank.v1beta1.Query/Balance', + grpc.web.MethodType.UNARY, + proto.cosmos.bank.v1beta1.QueryBalanceRequest, + proto.cosmos.bank.v1beta1.QueryBalanceResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QueryBalanceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QueryBalanceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.bank.v1beta1.QueryBalanceRequest, + * !proto.cosmos.bank.v1beta1.QueryBalanceResponse>} + */ +const methodInfo_Query_Balance = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.bank.v1beta1.QueryBalanceResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QueryBalanceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QueryBalanceResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.bank.v1beta1.QueryBalanceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.bank.v1beta1.QueryBalanceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.bank.v1beta1.QueryClient.prototype.balance = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/Balance', + request, + metadata || {}, + methodDescriptor_Query_Balance, + callback); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.QueryBalanceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.bank.v1beta1.QueryPromiseClient.prototype.balance = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/Balance', + request, + metadata || {}, + methodDescriptor_Query_Balance); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.bank.v1beta1.QueryAllBalancesRequest, + * !proto.cosmos.bank.v1beta1.QueryAllBalancesResponse>} + */ +const methodDescriptor_Query_AllBalances = new grpc.web.MethodDescriptor( + '/cosmos.bank.v1beta1.Query/AllBalances', + grpc.web.MethodType.UNARY, + proto.cosmos.bank.v1beta1.QueryAllBalancesRequest, + proto.cosmos.bank.v1beta1.QueryAllBalancesResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.bank.v1beta1.QueryAllBalancesRequest, + * !proto.cosmos.bank.v1beta1.QueryAllBalancesResponse>} + */ +const methodInfo_Query_AllBalances = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.bank.v1beta1.QueryAllBalancesResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.bank.v1beta1.QueryAllBalancesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.bank.v1beta1.QueryClient.prototype.allBalances = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/AllBalances', + request, + metadata || {}, + methodDescriptor_Query_AllBalances, + callback); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.bank.v1beta1.QueryPromiseClient.prototype.allBalances = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/AllBalances', + request, + metadata || {}, + methodDescriptor_Query_AllBalances); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest, + * !proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse>} + */ +const methodDescriptor_Query_TotalSupply = new grpc.web.MethodDescriptor( + '/cosmos.bank.v1beta1.Query/TotalSupply', + grpc.web.MethodType.UNARY, + proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest, + proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest, + * !proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse>} + */ +const methodInfo_Query_TotalSupply = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.bank.v1beta1.QueryClient.prototype.totalSupply = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/TotalSupply', + request, + metadata || {}, + methodDescriptor_Query_TotalSupply, + callback); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.bank.v1beta1.QueryPromiseClient.prototype.totalSupply = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/TotalSupply', + request, + metadata || {}, + methodDescriptor_Query_TotalSupply); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.bank.v1beta1.QuerySupplyOfRequest, + * !proto.cosmos.bank.v1beta1.QuerySupplyOfResponse>} + */ +const methodDescriptor_Query_SupplyOf = new grpc.web.MethodDescriptor( + '/cosmos.bank.v1beta1.Query/SupplyOf', + grpc.web.MethodType.UNARY, + proto.cosmos.bank.v1beta1.QuerySupplyOfRequest, + proto.cosmos.bank.v1beta1.QuerySupplyOfResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QuerySupplyOfRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.bank.v1beta1.QuerySupplyOfRequest, + * !proto.cosmos.bank.v1beta1.QuerySupplyOfResponse>} + */ +const methodInfo_Query_SupplyOf = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.bank.v1beta1.QuerySupplyOfResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QuerySupplyOfRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.bank.v1beta1.QuerySupplyOfRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.bank.v1beta1.QuerySupplyOfResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.bank.v1beta1.QueryClient.prototype.supplyOf = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/SupplyOf', + request, + metadata || {}, + methodDescriptor_Query_SupplyOf, + callback); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.QuerySupplyOfRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.bank.v1beta1.QueryPromiseClient.prototype.supplyOf = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/SupplyOf', + request, + metadata || {}, + methodDescriptor_Query_SupplyOf); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.bank.v1beta1.QueryParamsRequest, + * !proto.cosmos.bank.v1beta1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/cosmos.bank.v1beta1.Query/Params', + grpc.web.MethodType.UNARY, + proto.cosmos.bank.v1beta1.QueryParamsRequest, + proto.cosmos.bank.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.bank.v1beta1.QueryParamsRequest, + * !proto.cosmos.bank.v1beta1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.bank.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.bank.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.bank.v1beta1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.bank.v1beta1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.bank.v1beta1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.bank.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +module.exports = proto.cosmos.bank.v1beta1; + diff --git a/src/types/proto-types/cosmos/bank/v1beta1/query_pb.js b/src/types/proto-types/cosmos/bank/v1beta1/query_pb.js new file mode 100644 index 00000000..bb1ec404 --- /dev/null +++ b/src/types/proto-types/cosmos/bank/v1beta1/query_pb.js @@ -0,0 +1,1742 @@ +// source: cosmos/bank/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_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_bank_v1beta1_bank_pb = require('../../../cosmos/bank/v1beta1/bank_pb.js'); +goog.object.extend(proto, cosmos_bank_v1beta1_bank_pb); +goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryAllBalancesRequest', null, global); +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.QueryParamsRequest', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.QuerySupplyOfRequest', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.QuerySupplyOfResponse', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse', 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.bank.v1beta1.QueryBalanceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryBalanceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryBalanceRequest.displayName = 'proto.cosmos.bank.v1beta1.QueryBalanceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryBalanceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryBalanceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryBalanceResponse.displayName = 'proto.cosmos.bank.v1beta1.QueryBalanceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryAllBalancesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryAllBalancesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.displayName = 'proto.cosmos.bank.v1beta1.QueryAllBalancesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryAllBalancesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryAllBalancesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.displayName = 'proto.cosmos.bank.v1beta1.QueryAllBalancesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryTotalSupplyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.displayName = 'proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryTotalSupplyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.displayName = 'proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QuerySupplyOfRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QuerySupplyOfRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.displayName = 'proto.cosmos.bank.v1beta1.QuerySupplyOfRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QuerySupplyOfResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QuerySupplyOfResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.displayName = 'proto.cosmos.bank.v1beta1.QuerySupplyOfResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryParamsRequest.displayName = 'proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.QueryParamsResponse.displayName = 'proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryBalanceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryBalanceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryBalanceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + denom: 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.bank.v1beta1.QueryBalanceRequest} + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryBalanceRequest; + return proto.cosmos.bank.v1beta1.QueryBalanceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryBalanceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryBalanceRequest} + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.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.setDenom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QueryBalanceRequest.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.QueryBalanceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenom(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.QueryBalanceRequest} returns this + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom = 2; + * @return {string} + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.QueryBalanceRequest} returns this + */ +proto.cosmos.bank.v1beta1.QueryBalanceRequest.prototype.setDenom = 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.bank.v1beta1.QueryBalanceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryBalanceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryBalanceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryBalanceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + 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.QueryBalanceResponse} + */ +proto.cosmos.bank.v1beta1.QueryBalanceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryBalanceResponse; + return proto.cosmos.bank.v1beta1.QueryBalanceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryBalanceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryBalanceResponse} + */ +proto.cosmos.bank.v1beta1.QueryBalanceResponse.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.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.QueryBalanceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QueryBalanceResponse.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.QueryBalanceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryBalanceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBalance(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin balance = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.bank.v1beta1.QueryBalanceResponse.prototype.getBalance = 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.cosmos.bank.v1beta1.QueryBalanceResponse} returns this +*/ +proto.cosmos.bank.v1beta1.QueryBalanceResponse.prototype.setBalance = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QueryBalanceResponse} returns this + */ +proto.cosmos.bank.v1beta1.QueryBalanceResponse.prototype.clearBalance = function() { + return this.setBalance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QueryBalanceResponse.prototype.hasBalance = 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.bank.v1beta1.QueryAllBalancesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryAllBalancesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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) + }; + + 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.QueryAllBalancesRequest} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryAllBalancesRequest; + return proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.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_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.QueryAllBalancesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.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.QueryAllBalancesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + 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 string address = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} returns this + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.prototype.setAddress = 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.QueryAllBalancesRequest.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.QueryAllBalancesRequest} returns this +*/ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QueryAllBalancesRequest} returns this + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesRequest.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.QueryAllBalancesResponse.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.QueryAllBalancesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryAllBalancesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + balancesList: jspb.Message.toObjectList(msg.getBalancesList(), + cosmos_base_v1beta1_coin_pb.Coin.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.QueryAllBalancesResponse} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryAllBalancesResponse; + return proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryAllBalancesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryAllBalancesResponse} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.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.addBalances(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.QueryAllBalancesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.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.QueryAllBalancesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBalancesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin balances = 1; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.prototype.getBalancesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.QueryAllBalancesResponse} returns this +*/ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.prototype.setBalancesList = 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.cosmos.bank.v1beta1.QueryAllBalancesResponse.prototype.addBalances = 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.cosmos.bank.v1beta1.QueryAllBalancesResponse} returns this + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.prototype.clearBalancesList = function() { + return this.setBalancesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.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.QueryAllBalancesResponse} returns this +*/ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QueryAllBalancesResponse} returns this + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QueryAllBalancesResponse.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.QueryTotalSupplyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryTotalSupplyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.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.bank.v1beta1.QueryTotalSupplyRequest} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest; + return proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.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.bank.v1beta1.QueryTotalSupplyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.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.QueryTotalSupplyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.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.QueryTotalSupplyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryTotalSupplyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + supplyList: jspb.Message.toObjectList(msg.getSupplyList(), + 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.bank.v1beta1.QueryTotalSupplyResponse} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse; + return proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.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.addSupply(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.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.QueryTotalSupplyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSupplyList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin supply = 1; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.getSupplyList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse} returns this +*/ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.setSupplyList = 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.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.addSupply = 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.cosmos.bank.v1beta1.QueryTotalSupplyResponse} returns this + */ +proto.cosmos.bank.v1beta1.QueryTotalSupplyResponse.prototype.clearSupplyList = function() { + return this.setSupplyList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.QuerySupplyOfRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QuerySupplyOfRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.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.cosmos.bank.v1beta1.QuerySupplyOfRequest} + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QuerySupplyOfRequest; + return proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QuerySupplyOfRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QuerySupplyOfRequest} + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.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.cosmos.bank.v1beta1.QuerySupplyOfRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.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.QuerySupplyOfRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.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.cosmos.bank.v1beta1.QuerySupplyOfRequest.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.QuerySupplyOfRequest} returns this + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfRequest.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.cosmos.bank.v1beta1.QuerySupplyOfResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QuerySupplyOfResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.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.cosmos.bank.v1beta1.QuerySupplyOfResponse} + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QuerySupplyOfResponse; + return proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QuerySupplyOfResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QuerySupplyOfResponse} + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.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.cosmos.bank.v1beta1.QuerySupplyOfResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.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.QuerySupplyOfResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.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.cosmos.bank.v1beta1.QuerySupplyOfResponse.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.cosmos.bank.v1beta1.QuerySupplyOfResponse} returns this +*/ +proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.prototype.setAmount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QuerySupplyOfResponse} returns this + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QuerySupplyOfResponse.prototype.hasAmount = 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.bank.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryParamsRequest} + */ +proto.cosmos.bank.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryParamsRequest; + return proto.cosmos.bank.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryParamsRequest} + */ +proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_bank_v1beta1_bank_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.cosmos.bank.v1beta1.QueryParamsResponse} + */ +proto.cosmos.bank.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.QueryParamsResponse; + return proto.cosmos.bank.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.QueryParamsResponse} + */ +proto.cosmos.bank.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_bank_v1beta1_bank_pb.Params; + reader.readMessage(value,cosmos_bank_v1beta1_bank_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.cosmos.bank.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.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.cosmos.bank.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_bank_v1beta1_bank_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.bank.v1beta1.Params} + */ +proto.cosmos.bank.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.cosmos.bank.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_bank_v1beta1_bank_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.bank.v1beta1.Params|undefined} value + * @return {!proto.cosmos.bank.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.bank.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.bank.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.bank.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.bank.v1beta1.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.cosmos.bank.v1beta1); diff --git a/src/types/proto-types/cosmos/bank/v1beta1/tx_grpc_web_pb.js b/src/types/proto-types/cosmos/bank/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..2eecc972 --- /dev/null +++ b/src/types/proto-types/cosmos/bank/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,242 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.bank.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_bank_v1beta1_bank_pb = require('../../../cosmos/bank/v1beta1/bank_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.bank = {}; +proto.cosmos.bank.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.bank.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.bank.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.bank.v1beta1.MsgSend, + * !proto.cosmos.bank.v1beta1.MsgSendResponse>} + */ +const methodDescriptor_Msg_Send = new grpc.web.MethodDescriptor( + '/cosmos.bank.v1beta1.Msg/Send', + grpc.web.MethodType.UNARY, + proto.cosmos.bank.v1beta1.MsgSend, + proto.cosmos.bank.v1beta1.MsgSendResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.MsgSend} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.MsgSendResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.bank.v1beta1.MsgSend, + * !proto.cosmos.bank.v1beta1.MsgSendResponse>} + */ +const methodInfo_Msg_Send = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.bank.v1beta1.MsgSendResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.MsgSend} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.MsgSendResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.bank.v1beta1.MsgSend} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.bank.v1beta1.MsgSendResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.bank.v1beta1.MsgClient.prototype.send = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.bank.v1beta1.Msg/Send', + request, + metadata || {}, + methodDescriptor_Msg_Send, + callback); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.MsgSend} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.bank.v1beta1.MsgPromiseClient.prototype.send = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.bank.v1beta1.Msg/Send', + request, + metadata || {}, + methodDescriptor_Msg_Send); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.bank.v1beta1.MsgMultiSend, + * !proto.cosmos.bank.v1beta1.MsgMultiSendResponse>} + */ +const methodDescriptor_Msg_MultiSend = new grpc.web.MethodDescriptor( + '/cosmos.bank.v1beta1.Msg/MultiSend', + grpc.web.MethodType.UNARY, + proto.cosmos.bank.v1beta1.MsgMultiSend, + proto.cosmos.bank.v1beta1.MsgMultiSendResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.MsgMultiSend} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.MsgMultiSendResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.bank.v1beta1.MsgMultiSend, + * !proto.cosmos.bank.v1beta1.MsgMultiSendResponse>} + */ +const methodInfo_Msg_MultiSend = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.bank.v1beta1.MsgMultiSendResponse, + /** + * @param {!proto.cosmos.bank.v1beta1.MsgMultiSend} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.bank.v1beta1.MsgMultiSendResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.bank.v1beta1.MsgMultiSend} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.bank.v1beta1.MsgMultiSendResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.bank.v1beta1.MsgClient.prototype.multiSend = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.bank.v1beta1.Msg/MultiSend', + request, + metadata || {}, + methodDescriptor_Msg_MultiSend, + callback); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.MsgMultiSend} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.bank.v1beta1.MsgPromiseClient.prototype.multiSend = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.bank.v1beta1.Msg/MultiSend', + request, + metadata || {}, + methodDescriptor_Msg_MultiSend); +}; + + +module.exports = proto.cosmos.bank.v1beta1; + diff --git a/src/types/proto-types/cosmos/bank/v1beta1/tx_pb.js b/src/types/proto-types/cosmos/bank/v1beta1/tx_pb.js new file mode 100644 index 00000000..e7082b16 --- /dev/null +++ b/src/types/proto-types/cosmos/bank/v1beta1/tx_pb.js @@ -0,0 +1,744 @@ +// source: cosmos/bank/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var cosmos_bank_v1beta1_bank_pb = require('../../../cosmos/bank/v1beta1/bank_pb.js'); +goog.object.extend(proto, cosmos_bank_v1beta1_bank_pb); +goog.exportSymbol('proto.cosmos.bank.v1beta1.MsgMultiSend', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.MsgMultiSendResponse', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.MsgSend', null, global); +goog.exportSymbol('proto.cosmos.bank.v1beta1.MsgSendResponse', 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.bank.v1beta1.MsgSend = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.MsgSend.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.MsgSend, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.MsgSend.displayName = 'proto.cosmos.bank.v1beta1.MsgSend'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgSendResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.MsgSendResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.MsgSendResponse.displayName = 'proto.cosmos.bank.v1beta1.MsgSendResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgMultiSend = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.bank.v1beta1.MsgMultiSend.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.MsgMultiSend, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.MsgMultiSend.displayName = 'proto.cosmos.bank.v1beta1.MsgMultiSend'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgMultiSendResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.bank.v1beta1.MsgMultiSendResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.bank.v1beta1.MsgMultiSendResponse.displayName = 'proto.cosmos.bank.v1beta1.MsgMultiSendResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.MsgSend.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.bank.v1beta1.MsgSend.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.MsgSend.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgSend} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.MsgSend.toObject = function(includeInstance, msg) { + var f, obj = { + fromAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + toAddress: 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.bank.v1beta1.MsgSend} + */ +proto.cosmos.bank.v1beta1.MsgSend.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.MsgSend; + return proto.cosmos.bank.v1beta1.MsgSend.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.MsgSend} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.MsgSend} + */ +proto.cosmos.bank.v1beta1.MsgSend.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.setFromAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setToAddress(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.bank.v1beta1.MsgSend.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.MsgSend.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.MsgSend} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.MsgSend.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFromAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getToAddress(); + 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 from_address = 1; + * @return {string} + */ +proto.cosmos.bank.v1beta1.MsgSend.prototype.getFromAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.MsgSend} returns this + */ +proto.cosmos.bank.v1beta1.MsgSend.prototype.setFromAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string to_address = 2; + * @return {string} + */ +proto.cosmos.bank.v1beta1.MsgSend.prototype.getToAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.bank.v1beta1.MsgSend} returns this + */ +proto.cosmos.bank.v1beta1.MsgSend.prototype.setToAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 3; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.MsgSend.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.MsgSend} returns this +*/ +proto.cosmos.bank.v1beta1.MsgSend.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.bank.v1beta1.MsgSend.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.bank.v1beta1.MsgSend} returns this + */ +proto.cosmos.bank.v1beta1.MsgSend.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.bank.v1beta1.MsgSendResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.MsgSendResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgSendResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.MsgSendResponse.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.bank.v1beta1.MsgSendResponse} + */ +proto.cosmos.bank.v1beta1.MsgSendResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.MsgSendResponse; + return proto.cosmos.bank.v1beta1.MsgSendResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.MsgSendResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.MsgSendResponse} + */ +proto.cosmos.bank.v1beta1.MsgSendResponse.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.bank.v1beta1.MsgSendResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.MsgSendResponse.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.MsgSendResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.MsgSendResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.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.bank.v1beta1.MsgMultiSend.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.MsgMultiSend.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgMultiSend} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.toObject = function(includeInstance, msg) { + var f, obj = { + inputsList: jspb.Message.toObjectList(msg.getInputsList(), + cosmos_bank_v1beta1_bank_pb.Input.toObject, includeInstance), + outputsList: jspb.Message.toObjectList(msg.getOutputsList(), + cosmos_bank_v1beta1_bank_pb.Output.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.bank.v1beta1.MsgMultiSend} + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.MsgMultiSend; + return proto.cosmos.bank.v1beta1.MsgMultiSend.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.MsgMultiSend} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.MsgMultiSend} + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_bank_v1beta1_bank_pb.Input; + reader.readMessage(value,cosmos_bank_v1beta1_bank_pb.Input.deserializeBinaryFromReader); + msg.addInputs(value); + break; + case 2: + var value = new cosmos_bank_v1beta1_bank_pb.Output; + reader.readMessage(value,cosmos_bank_v1beta1_bank_pb.Output.deserializeBinaryFromReader); + msg.addOutputs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.MsgMultiSend.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.MsgMultiSend} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInputsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_bank_v1beta1_bank_pb.Input.serializeBinaryToWriter + ); + } + f = message.getOutputsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_bank_v1beta1_bank_pb.Output.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Input inputs = 1; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.getInputsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_bank_v1beta1_bank_pb.Input, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.MsgMultiSend} returns this +*/ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.setInputsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.Input=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.bank.v1beta1.Input} + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.addInputs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.bank.v1beta1.Input, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.bank.v1beta1.MsgMultiSend} returns this + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.clearInputsList = function() { + return this.setInputsList([]); +}; + + +/** + * repeated Output outputs = 2; + * @return {!Array} + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.getOutputsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_bank_v1beta1_bank_pb.Output, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.bank.v1beta1.MsgMultiSend} returns this +*/ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.setOutputsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.bank.v1beta1.Output=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.bank.v1beta1.Output} + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.addOutputs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.bank.v1beta1.Output, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.bank.v1beta1.MsgMultiSend} returns this + */ +proto.cosmos.bank.v1beta1.MsgMultiSend.prototype.clearOutputsList = function() { + return this.setOutputsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.MsgMultiSendResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.bank.v1beta1.MsgMultiSendResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgMultiSendResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.MsgMultiSendResponse.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.bank.v1beta1.MsgMultiSendResponse} + */ +proto.cosmos.bank.v1beta1.MsgMultiSendResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.bank.v1beta1.MsgMultiSendResponse; + return proto.cosmos.bank.v1beta1.MsgMultiSendResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.bank.v1beta1.MsgMultiSendResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.bank.v1beta1.MsgMultiSendResponse} + */ +proto.cosmos.bank.v1beta1.MsgMultiSendResponse.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.bank.v1beta1.MsgMultiSendResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.bank.v1beta1.MsgMultiSendResponse.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.MsgMultiSendResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.bank.v1beta1.MsgMultiSendResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cosmos.bank.v1beta1); diff --git a/src/types/proto-types/cosmos/base/abci/v1beta1/abci_pb.js b/src/types/proto-types/cosmos/base/abci/v1beta1/abci_pb.js new file mode 100644 index 00000000..69e19465 --- /dev/null +++ b/src/types/proto-types/cosmos/base/abci/v1beta1/abci_pb.js @@ -0,0 +1,2582 @@ +// source: cosmos/base/abci/v1beta1/abci.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 tendermint_abci_types_pb = require('../../../../tendermint/abci/types_pb.js'); +goog.object.extend(proto, tendermint_abci_types_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); +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.SearchTxsResult', null, global); +goog.exportSymbol('proto.cosmos.base.abci.v1beta1.SimulationResponse', null, global); +goog.exportSymbol('proto.cosmos.base.abci.v1beta1.StringEvent', null, global); +goog.exportSymbol('proto.cosmos.base.abci.v1beta1.TxMsgData', null, global); +goog.exportSymbol('proto.cosmos.base.abci.v1beta1.TxResponse', 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.abci.v1beta1.TxResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.abci.v1beta1.TxResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.TxResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.TxResponse.displayName = 'proto.cosmos.base.abci.v1beta1.TxResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ABCIMessageLog = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.abci.v1beta1.ABCIMessageLog.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.ABCIMessageLog, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.ABCIMessageLog.displayName = 'proto.cosmos.base.abci.v1beta1.ABCIMessageLog'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.StringEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.abci.v1beta1.StringEvent.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.StringEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.StringEvent.displayName = 'proto.cosmos.base.abci.v1beta1.StringEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Attribute = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.Attribute, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.Attribute.displayName = 'proto.cosmos.base.abci.v1beta1.Attribute'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.GasInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.GasInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.GasInfo.displayName = 'proto.cosmos.base.abci.v1beta1.GasInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Result = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.abci.v1beta1.Result.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.Result, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.Result.displayName = 'proto.cosmos.base.abci.v1beta1.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.cosmos.base.abci.v1beta1.SimulationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.SimulationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.SimulationResponse.displayName = 'proto.cosmos.base.abci.v1beta1.SimulationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.MsgData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.MsgData.displayName = 'proto.cosmos.base.abci.v1beta1.MsgData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.TxMsgData = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.abci.v1beta1.TxMsgData.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.TxMsgData, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.TxMsgData.displayName = 'proto.cosmos.base.abci.v1beta1.TxMsgData'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.SearchTxsResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.abci.v1beta1.SearchTxsResult.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.abci.v1beta1.SearchTxsResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.abci.v1beta1.SearchTxsResult.displayName = 'proto.cosmos.base.abci.v1beta1.SearchTxsResult'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.abci.v1beta1.TxResponse.repeatedFields_ = [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.cosmos.base.abci.v1beta1.TxResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.TxResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.TxResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.TxResponse.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + txhash: jspb.Message.getFieldWithDefault(msg, 2, ""), + codespace: jspb.Message.getFieldWithDefault(msg, 3, ""), + code: jspb.Message.getFieldWithDefault(msg, 4, 0), + data: jspb.Message.getFieldWithDefault(msg, 5, ""), + rawLog: jspb.Message.getFieldWithDefault(msg, 6, ""), + logsList: jspb.Message.toObjectList(msg.getLogsList(), + proto.cosmos.base.abci.v1beta1.ABCIMessageLog.toObject, includeInstance), + info: jspb.Message.getFieldWithDefault(msg, 8, ""), + gasWanted: jspb.Message.getFieldWithDefault(msg, 9, 0), + gasUsed: jspb.Message.getFieldWithDefault(msg, 10, 0), + tx: (f = msg.getTx()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + timestamp: jspb.Message.getFieldWithDefault(msg, 12, "") + }; + + 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.TxResponse} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.TxResponse; + return proto.cosmos.base.abci.v1beta1.TxResponse.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.TxResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.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 = /** @type {string} */ (reader.readString()); + msg.setTxhash(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setCodespace(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setCode(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setRawLog(value); + break; + case 7: + var value = new proto.cosmos.base.abci.v1beta1.ABCIMessageLog; + reader.readMessage(value,proto.cosmos.base.abci.v1beta1.ABCIMessageLog.deserializeBinaryFromReader); + msg.addLogs(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGasWanted(value); + break; + case 10: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGasUsed(value); + break; + case 11: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setTx(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setTimestamp(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.TxResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.TxResponse.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.TxResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.TxResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getTxhash(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCodespace(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getRawLog(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getLogsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.cosmos.base.abci.v1beta1.ABCIMessageLog.serializeBinaryToWriter + ); + } + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } + f = message.getGasWanted(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getGasUsed(); + if (f !== 0) { + writer.writeInt64( + 10, + f + ); + } + f = message.getTx(); + if (f != null) { + writer.writeMessage( + 11, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getTimestamp(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string txhash = 2; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getTxhash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setTxhash = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string codespace = 3; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getCodespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setCodespace = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint32 code = 4; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string data = 5; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string raw_log = 6; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getRawLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setRawLog = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * repeated ABCIMessageLog logs = 7; + * @return {!Array} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getLogsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.abci.v1beta1.ABCIMessageLog, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this +*/ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setLogsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.cosmos.base.abci.v1beta1.ABCIMessageLog=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.abci.v1beta1.ABCIMessageLog} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.addLogs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.cosmos.base.abci.v1beta1.ABCIMessageLog, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.clearLogsList = function() { + return this.setLogsList([]); +}; + + +/** + * optional string info = 8; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setInfo = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + +/** + * optional int64 gas_wanted = 9; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getGasWanted = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setGasWanted = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional int64 gas_used = 10; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getGasUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setGasUsed = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional google.protobuf.Any tx = 11; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getTx = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 11)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this +*/ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setTx = function(value) { + return jspb.Message.setWrapperField(this, 11, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.clearTx = function() { + return this.setTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.hasTx = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional string timestamp = 12; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.getTimestamp = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.TxResponse.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.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.abci.v1beta1.ABCIMessageLog.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.ABCIMessageLog.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ABCIMessageLog} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.toObject = function(includeInstance, msg) { + var f, obj = { + msgIndex: jspb.Message.getFieldWithDefault(msg, 1, 0), + log: jspb.Message.getFieldWithDefault(msg, 2, ""), + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.cosmos.base.abci.v1beta1.StringEvent.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.ABCIMessageLog} + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.ABCIMessageLog; + return proto.cosmos.base.abci.v1beta1.ABCIMessageLog.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.ABCIMessageLog} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.ABCIMessageLog} + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.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.setMsgIndex(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLog(value); + break; + case 3: + var value = new proto.cosmos.base.abci.v1beta1.StringEvent; + reader.readMessage(value,proto.cosmos.base.abci.v1beta1.StringEvent.deserializeBinaryFromReader); + msg.addEvents(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.ABCIMessageLog.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.ABCIMessageLog.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.ABCIMessageLog} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMsgIndex(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getLog(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.base.abci.v1beta1.StringEvent.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint32 msg_index = 1; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.prototype.getMsgIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.ABCIMessageLog} returns this + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.prototype.setMsgIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string log = 2; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.ABCIMessageLog} returns this + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated StringEvent events = 3; + * @return {!Array} + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.abci.v1beta1.StringEvent, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.abci.v1beta1.ABCIMessageLog} returns this +*/ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.base.abci.v1beta1.StringEvent=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.abci.v1beta1.StringEvent} + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.base.abci.v1beta1.StringEvent, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.abci.v1beta1.ABCIMessageLog} returns this + */ +proto.cosmos.base.abci.v1beta1.ABCIMessageLog.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.abci.v1beta1.StringEvent.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.base.abci.v1beta1.StringEvent.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.StringEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.StringEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.StringEvent.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + attributesList: jspb.Message.toObjectList(msg.getAttributesList(), + proto.cosmos.base.abci.v1beta1.Attribute.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.StringEvent} + */ +proto.cosmos.base.abci.v1beta1.StringEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.StringEvent; + return proto.cosmos.base.abci.v1beta1.StringEvent.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.StringEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.StringEvent} + */ +proto.cosmos.base.abci.v1beta1.StringEvent.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.setType(value); + break; + case 2: + var value = new proto.cosmos.base.abci.v1beta1.Attribute; + reader.readMessage(value,proto.cosmos.base.abci.v1beta1.Attribute.deserializeBinaryFromReader); + msg.addAttributes(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.StringEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.StringEvent.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.StringEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.StringEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAttributesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.base.abci.v1beta1.Attribute.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.StringEvent.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.StringEvent} returns this + */ +proto.cosmos.base.abci.v1beta1.StringEvent.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated Attribute attributes = 2; + * @return {!Array} + */ +proto.cosmos.base.abci.v1beta1.StringEvent.prototype.getAttributesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.abci.v1beta1.Attribute, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.abci.v1beta1.StringEvent} returns this +*/ +proto.cosmos.base.abci.v1beta1.StringEvent.prototype.setAttributesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.abci.v1beta1.Attribute=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.abci.v1beta1.Attribute} + */ +proto.cosmos.base.abci.v1beta1.StringEvent.prototype.addAttributes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.abci.v1beta1.Attribute, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.abci.v1beta1.StringEvent} returns this + */ +proto.cosmos.base.abci.v1beta1.StringEvent.prototype.clearAttributesList = function() { + return this.setAttributesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.Attribute.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.Attribute.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Attribute} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.Attribute.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + value: 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.base.abci.v1beta1.Attribute} + */ +proto.cosmos.base.abci.v1beta1.Attribute.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.Attribute; + return proto.cosmos.base.abci.v1beta1.Attribute.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.Attribute} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.Attribute} + */ +proto.cosmos.base.abci.v1beta1.Attribute.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.abci.v1beta1.Attribute.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.Attribute.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.Attribute} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.Attribute.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 + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.Attribute.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.Attribute} returns this + */ +proto.cosmos.base.abci.v1beta1.Attribute.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string value = 2; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.Attribute.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.Attribute} returns this + */ +proto.cosmos.base.abci.v1beta1.Attribute.prototype.setValue = 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.base.abci.v1beta1.GasInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.GasInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.GasInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.GasInfo.toObject = function(includeInstance, msg) { + var f, obj = { + gasWanted: jspb.Message.getFieldWithDefault(msg, 1, 0), + gasUsed: 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.abci.v1beta1.GasInfo} + */ +proto.cosmos.base.abci.v1beta1.GasInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.GasInfo; + return proto.cosmos.base.abci.v1beta1.GasInfo.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.GasInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.GasInfo} + */ +proto.cosmos.base.abci.v1beta1.GasInfo.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.setGasWanted(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGasUsed(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.GasInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.GasInfo.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.GasInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.GasInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGasWanted(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getGasUsed(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 gas_wanted = 1; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.GasInfo.prototype.getGasWanted = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.GasInfo} returns this + */ +proto.cosmos.base.abci.v1beta1.GasInfo.prototype.setGasWanted = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 gas_used = 2; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.GasInfo.prototype.getGasUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.GasInfo} returns this + */ +proto.cosmos.base.abci.v1beta1.GasInfo.prototype.setGasUsed = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.abci.v1beta1.Result.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.abci.v1beta1.Result.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.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.cosmos.base.abci.v1beta1.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.Result.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64(), + log: jspb.Message.getFieldWithDefault(msg, 2, ""), + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + tendermint_abci_types_pb.Event.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.Result} + */ +proto.cosmos.base.abci.v1beta1.Result.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.Result; + return proto.cosmos.base.abci.v1beta1.Result.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.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.Result} + */ +proto.cosmos.base.abci.v1beta1.Result.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 {string} */ (reader.readString()); + msg.setLog(value); + break; + case 3: + var value = new tendermint_abci_types_pb.Event; + reader.readMessage(value,tendermint_abci_types_pb.Event.deserializeBinaryFromReader); + msg.addEvents(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.Result.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.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.cosmos.base.abci.v1beta1.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.Result.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getLog(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + tendermint_abci_types_pb.Event.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.abci.v1beta1.Result.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.cosmos.base.abci.v1beta1.Result.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.cosmos.base.abci.v1beta1.Result.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.abci.v1beta1.Result} returns this + */ +proto.cosmos.base.abci.v1beta1.Result.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string log = 2; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.Result.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.Result} returns this + */ +proto.cosmos.base.abci.v1beta1.Result.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated tendermint.abci.Event events = 3; + * @return {!Array} + */ +proto.cosmos.base.abci.v1beta1.Result.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, tendermint_abci_types_pb.Event, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.abci.v1beta1.Result} returns this +*/ +proto.cosmos.base.abci.v1beta1.Result.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.tendermint.abci.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Event} + */ +proto.cosmos.base.abci.v1beta1.Result.prototype.addEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.tendermint.abci.Event, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.abci.v1beta1.Result} returns this + */ +proto.cosmos.base.abci.v1beta1.Result.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.SimulationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.SimulationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.SimulationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + gasInfo: (f = msg.getGasInfo()) && proto.cosmos.base.abci.v1beta1.GasInfo.toObject(includeInstance, f), + result: (f = msg.getResult()) && proto.cosmos.base.abci.v1beta1.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.cosmos.base.abci.v1beta1.SimulationResponse} + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.SimulationResponse; + return proto.cosmos.base.abci.v1beta1.SimulationResponse.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.SimulationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.SimulationResponse} + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.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.abci.v1beta1.GasInfo; + reader.readMessage(value,proto.cosmos.base.abci.v1beta1.GasInfo.deserializeBinaryFromReader); + msg.setGasInfo(value); + break; + case 2: + var value = new proto.cosmos.base.abci.v1beta1.Result; + reader.readMessage(value,proto.cosmos.base.abci.v1beta1.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.cosmos.base.abci.v1beta1.SimulationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.SimulationResponse.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.SimulationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGasInfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.abci.v1beta1.GasInfo.serializeBinaryToWriter + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.base.abci.v1beta1.Result.serializeBinaryToWriter + ); + } +}; + + +/** + * optional GasInfo gas_info = 1; + * @return {?proto.cosmos.base.abci.v1beta1.GasInfo} + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.prototype.getGasInfo = function() { + return /** @type{?proto.cosmos.base.abci.v1beta1.GasInfo} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.abci.v1beta1.GasInfo, 1)); +}; + + +/** + * @param {?proto.cosmos.base.abci.v1beta1.GasInfo|undefined} value + * @return {!proto.cosmos.base.abci.v1beta1.SimulationResponse} returns this +*/ +proto.cosmos.base.abci.v1beta1.SimulationResponse.prototype.setGasInfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.abci.v1beta1.SimulationResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.prototype.clearGasInfo = function() { + return this.setGasInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.prototype.hasGasInfo = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Result result = 2; + * @return {?proto.cosmos.base.abci.v1beta1.Result} + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.prototype.getResult = function() { + return /** @type{?proto.cosmos.base.abci.v1beta1.Result} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.abci.v1beta1.Result, 2)); +}; + + +/** + * @param {?proto.cosmos.base.abci.v1beta1.Result|undefined} value + * @return {!proto.cosmos.base.abci.v1beta1.SimulationResponse} returns this +*/ +proto.cosmos.base.abci.v1beta1.SimulationResponse.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.abci.v1beta1.SimulationResponse} returns this + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.prototype.clearResult = function() { + return this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.abci.v1beta1.SimulationResponse.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.cosmos.base.abci.v1beta1.MsgData.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.MsgData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.MsgData.toObject = function(includeInstance, msg) { + var f, obj = { + msgType: 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.cosmos.base.abci.v1beta1.MsgData} + */ +proto.cosmos.base.abci.v1beta1.MsgData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.MsgData; + return proto.cosmos.base.abci.v1beta1.MsgData.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.MsgData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.MsgData} + */ +proto.cosmos.base.abci.v1beta1.MsgData.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.setMsgType(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.cosmos.base.abci.v1beta1.MsgData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.MsgData.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.MsgData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.MsgData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMsgType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string msg_type = 1; + * @return {string} + */ +proto.cosmos.base.abci.v1beta1.MsgData.prototype.getMsgType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.abci.v1beta1.MsgData} returns this + */ +proto.cosmos.base.abci.v1beta1.MsgData.prototype.setMsgType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.abci.v1beta1.MsgData.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.cosmos.base.abci.v1beta1.MsgData.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.cosmos.base.abci.v1beta1.MsgData.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.abci.v1beta1.MsgData} returns this + */ +proto.cosmos.base.abci.v1beta1.MsgData.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.abci.v1beta1.TxMsgData.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.abci.v1beta1.TxMsgData.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.TxMsgData.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.TxMsgData} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.TxMsgData.toObject = function(includeInstance, msg) { + var f, obj = { + dataList: jspb.Message.toObjectList(msg.getDataList(), + proto.cosmos.base.abci.v1beta1.MsgData.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.TxMsgData} + */ +proto.cosmos.base.abci.v1beta1.TxMsgData.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.TxMsgData; + return proto.cosmos.base.abci.v1beta1.TxMsgData.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.TxMsgData} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.TxMsgData} + */ +proto.cosmos.base.abci.v1beta1.TxMsgData.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.abci.v1beta1.MsgData; + reader.readMessage(value,proto.cosmos.base.abci.v1beta1.MsgData.deserializeBinaryFromReader); + msg.addData(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.TxMsgData.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.TxMsgData.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.TxMsgData} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.TxMsgData.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.base.abci.v1beta1.MsgData.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated MsgData data = 1; + * @return {!Array} + */ +proto.cosmos.base.abci.v1beta1.TxMsgData.prototype.getDataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.abci.v1beta1.MsgData, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.abci.v1beta1.TxMsgData} returns this +*/ +proto.cosmos.base.abci.v1beta1.TxMsgData.prototype.setDataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.abci.v1beta1.MsgData=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.abci.v1beta1.MsgData} + */ +proto.cosmos.base.abci.v1beta1.TxMsgData.prototype.addData = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.abci.v1beta1.MsgData, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.abci.v1beta1.TxMsgData} returns this + */ +proto.cosmos.base.abci.v1beta1.TxMsgData.prototype.clearDataList = function() { + return this.setDataList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.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.SearchTxsResult.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.abci.v1beta1.SearchTxsResult.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.SearchTxsResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.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), + txsList: jspb.Message.toObjectList(msg.getTxsList(), + proto.cosmos.base.abci.v1beta1.TxResponse.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.SearchTxsResult} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.abci.v1beta1.SearchTxsResult; + return proto.cosmos.base.abci.v1beta1.SearchTxsResult.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.SearchTxsResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.abci.v1beta1.SearchTxsResult} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.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.setTotalCount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCount(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPageNumber(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPageTotal(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLimit(value); + break; + case 6: + var value = new proto.cosmos.base.abci.v1beta1.TxResponse; + reader.readMessage(value,proto.cosmos.base.abci.v1beta1.TxResponse.deserializeBinaryFromReader); + msg.addTxs(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.SearchTxsResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.abci.v1beta1.SearchTxsResult.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.SearchTxsResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotalCount(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getCount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getPageNumber(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getPageTotal(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getTxsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.cosmos.base.abci.v1beta1.TxResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 total_count = 1; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.getTotalCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchTxsResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.setTotalCount = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 count = 2; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.getCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchTxsResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.setCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 page_number = 3; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.getPageNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchTxsResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.setPageNumber = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 page_total = 4; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.getPageTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchTxsResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.setPageTotal = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional uint64 limit = 5; + * @return {number} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchTxsResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.setLimit = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * repeated TxResponse txs = 6; + * @return {!Array} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.getTxsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.abci.v1beta1.TxResponse, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.abci.v1beta1.SearchTxsResult} returns this +*/ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.setTxsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.cosmos.base.abci.v1beta1.TxResponse=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.addTxs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cosmos.base.abci.v1beta1.TxResponse, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.abci.v1beta1.SearchTxsResult} returns this + */ +proto.cosmos.base.abci.v1beta1.SearchTxsResult.prototype.clearTxsList = function() { + return this.setTxsList([]); +}; + + +goog.object.extend(exports, proto.cosmos.base.abci.v1beta1); diff --git a/src/types/proto-types/cosmos/base/kv/v1beta1/kv_pb.js b/src/types/proto-types/cosmos/base/kv/v1beta1/kv_pb.js new file mode 100644 index 00000000..abe89db1 --- /dev/null +++ b/src/types/proto-types/cosmos/base/kv/v1beta1/kv_pb.js @@ -0,0 +1,429 @@ +// source: cosmos/base/kv/v1beta1/kv.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.base.kv.v1beta1.Pair', null, global); +goog.exportSymbol('proto.cosmos.base.kv.v1beta1.Pairs', 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.kv.v1beta1.Pairs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.kv.v1beta1.Pairs.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.kv.v1beta1.Pairs, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.kv.v1beta1.Pairs.displayName = 'proto.cosmos.base.kv.v1beta1.Pairs'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.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); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.kv.v1beta1.Pair.displayName = 'proto.cosmos.base.kv.v1beta1.Pair'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.kv.v1beta1.Pairs.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.kv.v1beta1.Pairs.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.kv.v1beta1.Pairs.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.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) { + var f, obj = { + pairsList: jspb.Message.toObjectList(msg.getPairsList(), + proto.cosmos.base.kv.v1beta1.Pair.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.kv.v1beta1.Pairs} + */ +proto.cosmos.base.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.kv.v1beta1.Pairs} + */ +proto.cosmos.base.kv.v1beta1.Pairs.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.kv.v1beta1.Pair; + reader.readMessage(value,proto.cosmos.base.kv.v1beta1.Pair.deserializeBinaryFromReader); + msg.addPairs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.kv.v1beta1.Pairs.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.kv.v1beta1.Pairs.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.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) { + var f = undefined; + f = message.getPairsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.base.kv.v1beta1.Pair.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Pair pairs = 1; + * @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)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.kv.v1beta1.Pairs} returns this +*/ +proto.cosmos.base.kv.v1beta1.Pairs.prototype.setPairsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.base.kv.v1beta1.Pair=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.kv.v1beta1.Pairs} returns this + */ +proto.cosmos.base.kv.v1beta1.Pairs.prototype.clearPairsList = function() { + return this.setPairsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.kv.v1beta1.Pair.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.kv.v1beta1.Pair.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.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) { + 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.kv.v1beta1.Pair} + */ +proto.cosmos.base.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.kv.v1beta1.Pair} + */ +proto.cosmos.base.kv.v1beta1.Pair.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.kv.v1beta1.Pair.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.kv.v1beta1.Pair.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.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) { + 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.kv.v1beta1.Pair.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.kv.v1beta1.Pair.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.kv.v1beta1.Pair.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.kv.v1beta1.Pair} returns this + */ +proto.cosmos.base.kv.v1beta1.Pair.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes value = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.kv.v1beta1.Pair.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.kv.v1beta1.Pair.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.kv.v1beta1.Pair.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.kv.v1beta1.Pair} returns this + */ +proto.cosmos.base.kv.v1beta1.Pair.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.kv.v1beta1); diff --git a/src/types/proto-types/cosmos/base/query/v1beta1/pagination_pb.js b/src/types/proto-types/cosmos/base/query/v1beta1/pagination_pb.js new file mode 100644 index 00000000..42631712 --- /dev/null +++ b/src/types/proto-types/cosmos/base/query/v1beta1/pagination_pb.js @@ -0,0 +1,487 @@ +// source: cosmos/base/query/v1beta1/pagination.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.cosmos.base.query.v1beta1.PageRequest', null, global); +goog.exportSymbol('proto.cosmos.base.query.v1beta1.PageResponse', 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.query.v1beta1.PageRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.query.v1beta1.PageRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.query.v1beta1.PageRequest.displayName = 'proto.cosmos.base.query.v1beta1.PageRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.query.v1beta1.PageResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.query.v1beta1.PageResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.query.v1beta1.PageResponse.displayName = 'proto.cosmos.base.query.v1beta1.PageResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.query.v1beta1.PageRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.query.v1beta1.PageRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.query.v1beta1.PageRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.query.v1beta1.PageRequest.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_asB64(), + offset: jspb.Message.getFieldWithDefault(msg, 2, 0), + limit: jspb.Message.getFieldWithDefault(msg, 3, 0), + countTotal: 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.cosmos.base.query.v1beta1.PageRequest} + */ +proto.cosmos.base.query.v1beta1.PageRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.query.v1beta1.PageRequest; + return proto.cosmos.base.query.v1beta1.PageRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.query.v1beta1.PageRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.cosmos.base.query.v1beta1.PageRequest.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 {number} */ (reader.readUint64()); + msg.setOffset(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLimit(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCountTotal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.query.v1beta1.PageRequest.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.query.v1beta1.PageRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.query.v1beta1.PageRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getOffset(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getCountTotal(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.query.v1beta1.PageRequest.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.query.v1beta1.PageRequest.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.query.v1beta1.PageRequest.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.query.v1beta1.PageRequest} returns this + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 offset = 2; + * @return {number} + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.getOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.query.v1beta1.PageRequest} returns this + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.setOffset = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 limit = 3; + * @return {number} + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.getLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.query.v1beta1.PageRequest} returns this + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.setLimit = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bool count_total = 4; + * @return {boolean} + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.getCountTotal = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.base.query.v1beta1.PageRequest} returns this + */ +proto.cosmos.base.query.v1beta1.PageRequest.prototype.setCountTotal = 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.cosmos.base.query.v1beta1.PageResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.query.v1beta1.PageResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.query.v1beta1.PageResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.query.v1beta1.PageResponse.toObject = function(includeInstance, msg) { + var f, obj = { + nextKey: msg.getNextKey_asB64(), + total: 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.query.v1beta1.PageResponse} + */ +proto.cosmos.base.query.v1beta1.PageResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.query.v1beta1.PageResponse; + return proto.cosmos.base.query.v1beta1.PageResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.query.v1beta1.PageResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.base.query.v1beta1.PageResponse.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.setNextKey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTotal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.query.v1beta1.PageResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.query.v1beta1.PageResponse.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.query.v1beta1.PageResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.query.v1beta1.PageResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNextKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getTotal(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional bytes next_key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.query.v1beta1.PageResponse.prototype.getNextKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes next_key = 1; + * This is a type-conversion wrapper around `getNextKey()` + * @return {string} + */ +proto.cosmos.base.query.v1beta1.PageResponse.prototype.getNextKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNextKey())); +}; + + +/** + * optional bytes next_key = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getNextKey()` + * @return {!Uint8Array} + */ +proto.cosmos.base.query.v1beta1.PageResponse.prototype.getNextKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNextKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.query.v1beta1.PageResponse} returns this + */ +proto.cosmos.base.query.v1beta1.PageResponse.prototype.setNextKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional uint64 total = 2; + * @return {number} + */ +proto.cosmos.base.query.v1beta1.PageResponse.prototype.getTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.query.v1beta1.PageResponse} returns this + */ +proto.cosmos.base.query.v1beta1.PageResponse.prototype.setTotal = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.query.v1beta1); diff --git a/src/types/proto-types/cosmos/base/reflection/v1beta1/reflection_grpc_web_pb.js b/src/types/proto-types/cosmos/base/reflection/v1beta1/reflection_grpc_web_pb.js new file mode 100644 index 00000000..2076bb10 --- /dev/null +++ b/src/types/proto-types/cosmos/base/reflection/v1beta1/reflection_grpc_web_pb.js @@ -0,0 +1,239 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.base.reflection.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.base = {}; +proto.cosmos.base.reflection = {}; +proto.cosmos.base.reflection.v1beta1 = require('./reflection_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.base.reflection.v1beta1.ReflectionServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.base.reflection.v1beta1.ReflectionServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest, + * !proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse>} + */ +const methodDescriptor_ReflectionService_ListAllInterfaces = new grpc.web.MethodDescriptor( + '/cosmos.base.reflection.v1beta1.ReflectionService/ListAllInterfaces', + grpc.web.MethodType.UNARY, + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest, + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse, + /** + * @param {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest, + * !proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse>} + */ +const methodInfo_ReflectionService_ListAllInterfaces = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse, + /** + * @param {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.reflection.v1beta1.ReflectionServiceClient.prototype.listAllInterfaces = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.reflection.v1beta1.ReflectionService/ListAllInterfaces', + request, + metadata || {}, + methodDescriptor_ReflectionService_ListAllInterfaces, + callback); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.reflection.v1beta1.ReflectionServicePromiseClient.prototype.listAllInterfaces = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.reflection.v1beta1.ReflectionService/ListAllInterfaces', + request, + metadata || {}, + methodDescriptor_ReflectionService_ListAllInterfaces); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest, + * !proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse>} + */ +const methodDescriptor_ReflectionService_ListImplementations = new grpc.web.MethodDescriptor( + '/cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations', + grpc.web.MethodType.UNARY, + proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest, + proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse, + /** + * @param {!proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest, + * !proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse>} + */ +const methodInfo_ReflectionService_ListImplementations = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse, + /** + * @param {!proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.reflection.v1beta1.ReflectionServiceClient.prototype.listImplementations = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations', + request, + metadata || {}, + methodDescriptor_ReflectionService_ListImplementations, + callback); +}; + + +/** + * @param {!proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.reflection.v1beta1.ReflectionServicePromiseClient.prototype.listImplementations = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations', + request, + metadata || {}, + methodDescriptor_ReflectionService_ListImplementations); +}; + + +module.exports = proto.cosmos.base.reflection.v1beta1; + diff --git a/src/types/proto-types/cosmos/base/reflection/v1beta1/reflection_pb.js b/src/types/proto-types/cosmos/base/reflection/v1beta1/reflection_pb.js new file mode 100644 index 00000000..b8a60fa8 --- /dev/null +++ b/src/types/proto-types/cosmos/base/reflection/v1beta1/reflection_pb.js @@ -0,0 +1,648 @@ +// source: cosmos/base/reflection/v1beta1/reflection.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest', null, global); +goog.exportSymbol('proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse', 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.reflection.v1beta1.ListAllInterfacesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.displayName = 'proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.reflection.v1beta1.ListAllInterfacesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.displayName = 'proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.reflection.v1beta1.ListImplementationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.displayName = 'proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.reflection.v1beta1.ListImplementationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.displayName = 'proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.reflection.v1beta1.ListAllInterfacesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.reflection.v1beta1.ListAllInterfacesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.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.reflection.v1beta1.ListAllInterfacesRequest} + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest; + return proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest} + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.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.reflection.v1beta1.ListAllInterfacesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.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.reflection.v1beta1.ListAllInterfacesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.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.reflection.v1beta1.ListAllInterfacesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.reflection.v1beta1.ListAllInterfacesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + interfaceNamesList: (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.base.reflection.v1beta1.ListAllInterfacesResponse} + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse; + return proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse} + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.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.addInterfaceNames(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.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.reflection.v1beta1.ListAllInterfacesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInterfaceNamesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string interface_names = 1; + * @return {!Array} + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.prototype.getInterfaceNamesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse} returns this + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.prototype.setInterfaceNamesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse} returns this + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.prototype.addInterfaceNames = 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.reflection.v1beta1.ListAllInterfacesResponse} returns this + */ +proto.cosmos.base.reflection.v1beta1.ListAllInterfacesResponse.prototype.clearInterfaceNamesList = function() { + return this.setInterfaceNamesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.reflection.v1beta1.ListImplementationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.reflection.v1beta1.ListImplementationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + interfaceName: 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.reflection.v1beta1.ListImplementationsRequest} + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest; + return proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest} + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.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.setInterfaceName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.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.reflection.v1beta1.ListImplementationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInterfaceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string interface_name = 1; + * @return {string} + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.prototype.getInterfaceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest} returns this + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsRequest.prototype.setInterfaceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.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.reflection.v1beta1.ListImplementationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.reflection.v1beta1.ListImplementationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + implementationMessageNamesList: (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.base.reflection.v1beta1.ListImplementationsResponse} + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse; + return proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse} + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.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.addImplementationMessageNames(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.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.reflection.v1beta1.ListImplementationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getImplementationMessageNamesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string implementation_message_names = 1; + * @return {!Array} + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.prototype.getImplementationMessageNamesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse} returns this + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.prototype.setImplementationMessageNamesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse} returns this + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.prototype.addImplementationMessageNames = 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.reflection.v1beta1.ListImplementationsResponse} returns this + */ +proto.cosmos.base.reflection.v1beta1.ListImplementationsResponse.prototype.clearImplementationMessageNamesList = function() { + return this.setImplementationMessageNamesList([]); +}; + + +goog.object.extend(exports, proto.cosmos.base.reflection.v1beta1); diff --git a/src/types/proto-types/cosmos/base/snapshots/v1beta1/snapshot_pb.js b/src/types/proto-types/cosmos/base/snapshots/v1beta1/snapshot_pb.js new file mode 100644 index 00000000..909320a7 --- /dev/null +++ b/src/types/proto-types/cosmos/base/snapshots/v1beta1/snapshot_pb.js @@ -0,0 +1,536 @@ +// source: cosmos/base/snapshots/v1beta1/snapshot.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.base.snapshots.v1beta1.Metadata', null, global); +goog.exportSymbol('proto.cosmos.base.snapshots.v1beta1.Snapshot', 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'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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([]); +}; + + +goog.object.extend(exports, proto.cosmos.base.snapshots.v1beta1); diff --git a/src/types/proto-types/cosmos/base/store/v1beta1/commit_info_pb.js b/src/types/proto-types/cosmos/base/store/v1beta1/commit_info_pb.js new file mode 100644 index 00000000..2d4b90af --- /dev/null +++ b/src/types/proto-types/cosmos/base/store/v1beta1/commit_info_pb.js @@ -0,0 +1,638 @@ +// source: cosmos/base/store/v1beta1/commit_info.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +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); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.CommitInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.store.v1beta1.CommitInfo.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.store.v1beta1.CommitInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.store.v1beta1.CommitInfo.displayName = 'proto.cosmos.base.store.v1beta1.CommitInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.StoreInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.store.v1beta1.StoreInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.store.v1beta1.StoreInfo.displayName = 'proto.cosmos.base.store.v1beta1.StoreInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.CommitID = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.store.v1beta1.CommitID, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.store.v1beta1.CommitID.displayName = 'proto.cosmos.base.store.v1beta1.CommitID'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.store.v1beta1.CommitInfo.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.base.store.v1beta1.CommitInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.store.v1beta1.CommitInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.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) { + var f, obj = { + version: jspb.Message.getFieldWithDefault(msg, 1, 0), + storeInfosList: jspb.Message.toObjectList(msg.getStoreInfosList(), + proto.cosmos.base.store.v1beta1.StoreInfo.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.store.v1beta1.CommitInfo} + */ +proto.cosmos.base.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.store.v1beta1.CommitInfo} + */ +proto.cosmos.base.store.v1beta1.CommitInfo.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.setVersion(value); + break; + case 2: + var value = new proto.cosmos.base.store.v1beta1.StoreInfo; + reader.readMessage(value,proto.cosmos.base.store.v1beta1.StoreInfo.deserializeBinaryFromReader); + msg.addStoreInfos(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.CommitInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.store.v1beta1.CommitInfo.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.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) { + var f = undefined; + f = message.getVersion(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getStoreInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.base.store.v1beta1.StoreInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 version = 1; + * @return {number} + */ +proto.cosmos.base.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 + */ +proto.cosmos.base.store.v1beta1.CommitInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated StoreInfo store_infos = 2; + * @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)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.store.v1beta1.CommitInfo} returns this +*/ +proto.cosmos.base.store.v1beta1.CommitInfo.prototype.setStoreInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.store.v1beta1.StoreInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.store.v1beta1.CommitInfo} returns this + */ +proto.cosmos.base.store.v1beta1.CommitInfo.prototype.clearStoreInfosList = function() { + return this.setStoreInfosList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.StoreInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.store.v1beta1.StoreInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.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) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + commitId: (f = msg.getCommitId()) && proto.cosmos.base.store.v1beta1.CommitID.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.StoreInfo} + */ +proto.cosmos.base.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.store.v1beta1.StoreInfo} + */ +proto.cosmos.base.store.v1beta1.StoreInfo.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 = new proto.cosmos.base.store.v1beta1.CommitID; + reader.readMessage(value,proto.cosmos.base.store.v1beta1.CommitID.deserializeBinaryFromReader); + msg.setCommitId(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.StoreInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.store.v1beta1.StoreInfo.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.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) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCommitId(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.base.store.v1beta1.CommitID.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cosmos.base.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 + */ +proto.cosmos.base.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} + */ +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)); +}; + + +/** + * @param {?proto.cosmos.base.store.v1beta1.CommitID|undefined} value + * @return {!proto.cosmos.base.store.v1beta1.StoreInfo} returns this +*/ +proto.cosmos.base.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 + */ +proto.cosmos.base.store.v1beta1.StoreInfo.prototype.clearCommitId = function() { + return this.setCommitId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.store.v1beta1.StoreInfo.prototype.hasCommitId = 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.base.store.v1beta1.CommitID.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.store.v1beta1.CommitID.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.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) { + var f, obj = { + version: jspb.Message.getFieldWithDefault(msg, 1, 0), + hash: msg.getHash_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.CommitID} + */ +proto.cosmos.base.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.store.v1beta1.CommitID} + */ +proto.cosmos.base.store.v1beta1.CommitID.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.setVersion(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(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.CommitID.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.store.v1beta1.CommitID.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.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) { + var f = undefined; + f = message.getVersion(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional int64 version = 1; + * @return {number} + */ +proto.cosmos.base.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 + */ +proto.cosmos.base.store.v1beta1.CommitID.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.store.v1beta1.CommitID.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes hash = 2; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.cosmos.base.store.v1beta1.CommitID.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 2; + * 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.store.v1beta1.CommitID.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.store.v1beta1.CommitID} returns this + */ +proto.cosmos.base.store.v1beta1.CommitID.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.store.v1beta1); diff --git a/src/types/proto-types/cosmos/base/store/v1beta1/snapshot_pb.js b/src/types/proto-types/cosmos/base/store/v1beta1/snapshot_pb.js new file mode 100644 index 00000000..58fc7ddd --- /dev/null +++ b/src/types/proto-types/cosmos/base/store/v1beta1/snapshot_pb.js @@ -0,0 +1,710 @@ +// source: cosmos/base/store/v1beta1/snapshot.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.base.store.v1beta1.SnapshotIAVLItem', null, global); +goog.exportSymbol('proto.cosmos.base.store.v1beta1.SnapshotItem', null, global); +goog.exportSymbol('proto.cosmos.base.store.v1beta1.SnapshotItem.ItemCase', null, global); +goog.exportSymbol('proto.cosmos.base.store.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.store.v1beta1.SnapshotItem = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cosmos.base.store.v1beta1.SnapshotItem.oneofGroups_); +}; +goog.inherits(proto.cosmos.base.store.v1beta1.SnapshotItem, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.store.v1beta1.SnapshotItem.displayName = 'proto.cosmos.base.store.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.store.v1beta1.SnapshotStoreItem = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.store.v1beta1.SnapshotStoreItem, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.store.v1beta1.SnapshotStoreItem.displayName = 'proto.cosmos.base.store.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.store.v1beta1.SnapshotIAVLItem = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.store.v1beta1.SnapshotIAVLItem, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.displayName = 'proto.cosmos.base.store.v1beta1.SnapshotIAVLItem'; +} + +/** + * 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.store.v1beta1.SnapshotItem.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.ItemCase = { + ITEM_NOT_SET: 0, + STORE: 1, + IAVL: 2 +}; + +/** + * @return {proto.cosmos.base.store.v1beta1.SnapshotItem.ItemCase} + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.getItemCase = function() { + return /** @type {proto.cosmos.base.store.v1beta1.SnapshotItem.ItemCase} */(jspb.Message.computeOneofCase(this, proto.cosmos.base.store.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.store.v1beta1.SnapshotItem.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.store.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.store.v1beta1.SnapshotItem} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.toObject = function(includeInstance, msg) { + var f, obj = { + store: (f = msg.getStore()) && proto.cosmos.base.store.v1beta1.SnapshotStoreItem.toObject(includeInstance, f), + iavl: (f = msg.getIavl()) && proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.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.SnapshotItem} + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.store.v1beta1.SnapshotItem; + return proto.cosmos.base.store.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.store.v1beta1.SnapshotItem} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.store.v1beta1.SnapshotItem} + */ +proto.cosmos.base.store.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.store.v1beta1.SnapshotStoreItem; + reader.readMessage(value,proto.cosmos.base.store.v1beta1.SnapshotStoreItem.deserializeBinaryFromReader); + msg.setStore(value); + break; + case 2: + var value = new proto.cosmos.base.store.v1beta1.SnapshotIAVLItem; + reader.readMessage(value,proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.deserializeBinaryFromReader); + msg.setIavl(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.SnapshotItem.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.store.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.store.v1beta1.SnapshotItem} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStore(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.base.store.v1beta1.SnapshotStoreItem.serializeBinaryToWriter + ); + } + f = message.getIavl(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.serializeBinaryToWriter + ); + } +}; + + +/** + * optional SnapshotStoreItem store = 1; + * @return {?proto.cosmos.base.store.v1beta1.SnapshotStoreItem} + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.getStore = function() { + return /** @type{?proto.cosmos.base.store.v1beta1.SnapshotStoreItem} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.store.v1beta1.SnapshotStoreItem, 1)); +}; + + +/** + * @param {?proto.cosmos.base.store.v1beta1.SnapshotStoreItem|undefined} value + * @return {!proto.cosmos.base.store.v1beta1.SnapshotItem} returns this +*/ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.setStore = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.cosmos.base.store.v1beta1.SnapshotItem.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.store.v1beta1.SnapshotItem} returns this + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.clearStore = function() { + return this.setStore(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.hasStore = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional SnapshotIAVLItem iavl = 2; + * @return {?proto.cosmos.base.store.v1beta1.SnapshotIAVLItem} + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.getIavl = function() { + return /** @type{?proto.cosmos.base.store.v1beta1.SnapshotIAVLItem} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.store.v1beta1.SnapshotIAVLItem, 2)); +}; + + +/** + * @param {?proto.cosmos.base.store.v1beta1.SnapshotIAVLItem|undefined} value + * @return {!proto.cosmos.base.store.v1beta1.SnapshotItem} returns this +*/ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.setIavl = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.cosmos.base.store.v1beta1.SnapshotItem.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.store.v1beta1.SnapshotItem} returns this + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.clearIavl = function() { + return this.setIavl(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.store.v1beta1.SnapshotItem.prototype.hasIavl = 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.base.store.v1beta1.SnapshotStoreItem.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.store.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.store.v1beta1.SnapshotStoreItem} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.store.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.store.v1beta1.SnapshotStoreItem} + */ +proto.cosmos.base.store.v1beta1.SnapshotStoreItem.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.store.v1beta1.SnapshotStoreItem; + return proto.cosmos.base.store.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.store.v1beta1.SnapshotStoreItem} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.store.v1beta1.SnapshotStoreItem} + */ +proto.cosmos.base.store.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.store.v1beta1.SnapshotStoreItem.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.store.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.store.v1beta1.SnapshotStoreItem} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.store.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.store.v1beta1.SnapshotStoreItem.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.store.v1beta1.SnapshotStoreItem} returns this + */ +proto.cosmos.base.store.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.store.v1beta1.SnapshotIAVLItem.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.store.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.store.v1beta1.SnapshotIAVLItem} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.store.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.store.v1beta1.SnapshotIAVLItem} + */ +proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.store.v1beta1.SnapshotIAVLItem; + return proto.cosmos.base.store.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.store.v1beta1.SnapshotIAVLItem} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.store.v1beta1.SnapshotIAVLItem} + */ +proto.cosmos.base.store.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.store.v1beta1.SnapshotIAVLItem.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.store.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.store.v1beta1.SnapshotIAVLItem} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.store.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.store.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.store.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.store.v1beta1.SnapshotIAVLItem.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.store.v1beta1.SnapshotIAVLItem} returns this + */ +proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes value = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.base.store.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.store.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.store.v1beta1.SnapshotIAVLItem.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.base.store.v1beta1.SnapshotIAVLItem} returns this + */ +proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional int64 version = 3; + * @return {number} + */ +proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.prototype.getVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.store.v1beta1.SnapshotIAVLItem} returns this + */ +proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.prototype.setVersion = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 height = 4; + * @return {number} + */ +proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.store.v1beta1.SnapshotIAVLItem} returns this + */ +proto.cosmos.base.store.v1beta1.SnapshotIAVLItem.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.store.v1beta1); diff --git a/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_grpc_web_pb.js b/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..fe7add89 --- /dev/null +++ b/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,571 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.base.tendermint_1.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js') + +var tendermint_p2p_types_pb = require('../../../../tendermint/p2p/types_pb.js') + +var tendermint_types_block_pb = require('../../../../tendermint/types/block_pb.js') + +var tendermint_types_types_pb = require('../../../../tendermint/types/types_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../../cosmos/base/query/v1beta1/pagination_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.base = {}; +proto.cosmos.base.tendermint_1 = {}; +proto.cosmos.base.tendermint_1.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.base.tendermint_1.v1beta1.ServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.base.tendermint_1.v1beta1.ServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse>} + */ +const methodDescriptor_Service_GetNodeInfo = new grpc.web.MethodDescriptor( + '/cosmos.base.tendermint_1.v1beta1.Service/GetNodeInfo', + grpc.web.MethodType.UNARY, + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest, + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse>} + */ +const methodInfo_Service_GetNodeInfo = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.tendermint_1.v1beta1.ServiceClient.prototype.getNodeInfo = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetNodeInfo', + request, + metadata || {}, + methodDescriptor_Service_GetNodeInfo, + callback); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.tendermint_1.v1beta1.ServicePromiseClient.prototype.getNodeInfo = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetNodeInfo', + request, + metadata || {}, + methodDescriptor_Service_GetNodeInfo); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse>} + */ +const methodDescriptor_Service_GetSyncing = new grpc.web.MethodDescriptor( + '/cosmos.base.tendermint_1.v1beta1.Service/GetSyncing', + grpc.web.MethodType.UNARY, + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest, + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse>} + */ +const methodInfo_Service_GetSyncing = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.tendermint_1.v1beta1.ServiceClient.prototype.getSyncing = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetSyncing', + request, + metadata || {}, + methodDescriptor_Service_GetSyncing, + callback); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.tendermint_1.v1beta1.ServicePromiseClient.prototype.getSyncing = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetSyncing', + request, + metadata || {}, + methodDescriptor_Service_GetSyncing); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse>} + */ +const methodDescriptor_Service_GetLatestBlock = new grpc.web.MethodDescriptor( + '/cosmos.base.tendermint_1.v1beta1.Service/GetLatestBlock', + grpc.web.MethodType.UNARY, + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest, + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse>} + */ +const methodInfo_Service_GetLatestBlock = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.tendermint_1.v1beta1.ServiceClient.prototype.getLatestBlock = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetLatestBlock', + request, + metadata || {}, + methodDescriptor_Service_GetLatestBlock, + callback); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.tendermint_1.v1beta1.ServicePromiseClient.prototype.getLatestBlock = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetLatestBlock', + request, + metadata || {}, + methodDescriptor_Service_GetLatestBlock); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse>} + */ +const methodDescriptor_Service_GetBlockByHeight = new grpc.web.MethodDescriptor( + '/cosmos.base.tendermint_1.v1beta1.Service/GetBlockByHeight', + grpc.web.MethodType.UNARY, + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest, + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse>} + */ +const methodInfo_Service_GetBlockByHeight = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.tendermint_1.v1beta1.ServiceClient.prototype.getBlockByHeight = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetBlockByHeight', + request, + metadata || {}, + methodDescriptor_Service_GetBlockByHeight, + callback); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.tendermint_1.v1beta1.ServicePromiseClient.prototype.getBlockByHeight = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetBlockByHeight', + request, + metadata || {}, + methodDescriptor_Service_GetBlockByHeight); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse>} + */ +const methodDescriptor_Service_GetLatestValidatorSet = new grpc.web.MethodDescriptor( + '/cosmos.base.tendermint_1.v1beta1.Service/GetLatestValidatorSet', + grpc.web.MethodType.UNARY, + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest, + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse>} + */ +const methodInfo_Service_GetLatestValidatorSet = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.tendermint_1.v1beta1.ServiceClient.prototype.getLatestValidatorSet = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetLatestValidatorSet', + request, + metadata || {}, + methodDescriptor_Service_GetLatestValidatorSet, + callback); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.tendermint_1.v1beta1.ServicePromiseClient.prototype.getLatestValidatorSet = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetLatestValidatorSet', + request, + metadata || {}, + methodDescriptor_Service_GetLatestValidatorSet); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse>} + */ +const methodDescriptor_Service_GetValidatorSetByHeight = new grpc.web.MethodDescriptor( + '/cosmos.base.tendermint_1.v1beta1.Service/GetValidatorSetByHeight', + grpc.web.MethodType.UNARY, + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest, + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest, + * !proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse>} + */ +const methodInfo_Service_GetValidatorSetByHeight = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse, + /** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.base.tendermint_1.v1beta1.ServiceClient.prototype.getValidatorSetByHeight = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetValidatorSetByHeight', + request, + metadata || {}, + methodDescriptor_Service_GetValidatorSetByHeight, + callback); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.base.tendermint_1.v1beta1.ServicePromiseClient.prototype.getValidatorSetByHeight = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.base.tendermint_1.v1beta1.Service/GetValidatorSetByHeight', + request, + metadata || {}, + methodDescriptor_Service_GetValidatorSetByHeight); +}; + + +module.exports = proto.cosmos.base.tendermint_1.v1beta1; + diff --git a/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_pb.js b/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_pb.js new file mode 100644 index 00000000..29fa9747 --- /dev/null +++ b/src/types/proto-types/cosmos/base/tendermint/v1beta1/query_pb.js @@ -0,0 +1,3113 @@ +// source: cosmos/base/tendermint/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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'); +goog.object.extend(proto, google_api_annotations_pb); +var tendermint_p2p_types_pb = require('../../../../tendermint/p2p/types_pb.js'); +goog.object.extend(proto, tendermint_p2p_types_pb); +var tendermint_types_block_pb = require('../../../../tendermint/types/block_pb.js'); +goog.object.extend(proto, tendermint_types_block_pb); +var tendermint_types_types_pb = require('../../../../tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_types_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.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.Module', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.Validator', null, global); +goog.exportSymbol('proto.cosmos.base.tendermint_1.v1beta1.VersionInfo', 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.tendermint_1.v1beta1.GetValidatorSetByHeightRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetValidatorSetByHeightResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetLatestValidatorSetRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetLatestValidatorSetResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.Validator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.Validator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.Validator.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.Validator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetBlockByHeightRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetBlockByHeightResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetLatestBlockRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetLatestBlockResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetSyncingRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetSyncingResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetNodeInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.GetNodeInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.VersionInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.VersionInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.VersionInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tendermint_1.v1beta1.Module = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.tendermint_1.v1beta1.Module, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.tendermint_1.v1beta1.Module.displayName = 'proto.cosmos.base.tendermint_1.v1beta1.Module'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.toObject = function(includeInstance, msg) { + var f, obj = { + height: 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.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest; + return proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.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 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.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.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.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.prototype.setHeight = 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.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.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.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.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.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.toObject = function(includeInstance, msg) { + var f, obj = { + blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + proto.cosmos.base.tendermint_1.v1beta1.Validator.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.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse; + return proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.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.cosmos.base.tendermint_1.v1beta1.Validator; + reader.readMessage(value,proto.cosmos.base.tendermint_1.v1beta1.Validator.deserializeBinaryFromReader); + msg.addValidators(value); + break; + case 3: + 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.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.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.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.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.cosmos.base.tendermint_1.v1beta1.Validator.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 block_height = 1; + * @return {number} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated Validator validators = 2; + * @return {!Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.tendermint_1.v1beta1.Validator, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Validator} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.tendermint_1.v1beta1.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetValidatorSetByHeightResponse.prototype.hasPagination = 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.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetLatestValidatorSetRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.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.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest; + return proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.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.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.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.tendermint_1.v1beta1.GetLatestValidatorSetRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.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.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.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.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.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.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetLatestValidatorSetResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.toObject = function(includeInstance, msg) { + var f, obj = { + blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + proto.cosmos.base.tendermint_1.v1beta1.Validator.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.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse; + return proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.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.cosmos.base.tendermint_1.v1beta1.Validator; + reader.readMessage(value,proto.cosmos.base.tendermint_1.v1beta1.Validator.deserializeBinaryFromReader); + msg.addValidators(value); + break; + case 3: + 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.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.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.tendermint_1.v1beta1.GetLatestValidatorSetResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.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.cosmos.base.tendermint_1.v1beta1.Validator.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 block_height = 1; + * @return {number} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.getBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated Validator validators = 2; + * @return {!Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.tendermint_1.v1beta1.Validator, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Validator} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.tendermint_1.v1beta1.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestValidatorSetResponse.prototype.hasPagination = 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.base.tendermint_1.v1beta1.Validator.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.Validator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.Validator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + pubKey: (f = msg.getPubKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + votingPower: jspb.Message.getFieldWithDefault(msg, 3, 0), + proposerPriority: 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.tendermint_1.v1beta1.Validator} + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.Validator; + return proto.cosmos.base.tendermint_1.v1beta1.Validator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.Validator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Validator} + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.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 google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setPubKey(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setVotingPower(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setProposerPriority(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.Validator.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.tendermint_1.v1beta1.Validator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPubKey(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getVotingPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getProposerPriority(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Validator} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any pub_key = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.getPubKey = 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.cosmos.base.tendermint_1.v1beta1.Validator} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.setPubKey = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Validator} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.clearPubKey = function() { + return this.setPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.hasPubKey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 voting_power = 3; + * @return {number} + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.getVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Validator} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.setVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 proposer_priority = 4; + * @return {number} + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.getProposerPriority = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Validator} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.Validator.prototype.setProposerPriority = 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.tendermint_1.v1beta1.GetBlockByHeightRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetBlockByHeightRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.toObject = function(includeInstance, msg) { + var f, obj = { + height: 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.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest; + return proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.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.tendermint_1.v1beta1.GetBlockByHeightRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightRequest.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.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetBlockByHeightResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.toObject = function(includeInstance, msg) { + var f, obj = { + blockId: (f = msg.getBlockId()) && tendermint_types_types_pb.BlockID.toObject(includeInstance, f), + block: (f = msg.getBlock()) && tendermint_types_block_pb.Block.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.tendermint_1.v1beta1.GetBlockByHeightResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse; + return proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.BlockID; + reader.readMessage(value,tendermint_types_types_pb.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 2: + var value = new tendermint_types_block_pb.Block; + reader.readMessage(value,tendermint_types_block_pb.Block.deserializeBinaryFromReader); + msg.setBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.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.tendermint_1.v1beta1.GetBlockByHeightResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.BlockID.serializeBinaryToWriter + ); + } + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_block_pb.Block.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.types.BlockID block_id = 1; + * @return {?proto.tendermint.types.BlockID} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.BlockID, 1)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional tendermint.types.Block block = 2; + * @return {?proto.tendermint.types.Block} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.getBlock = function() { + return /** @type{?proto.tendermint.types.Block} */ ( + jspb.Message.getWrapperField(this, tendermint_types_block_pb.Block, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Block|undefined} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.setBlock = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.clearBlock = function() { + return this.setBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetBlockByHeightResponse.prototype.hasBlock = 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.base.tendermint_1.v1beta1.GetLatestBlockRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetLatestBlockRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest.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.tendermint_1.v1beta1.GetLatestBlockRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest; + return proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest.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.tendermint_1.v1beta1.GetLatestBlockRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest.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.tendermint_1.v1beta1.GetLatestBlockRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockRequest.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.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetLatestBlockResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.toObject = function(includeInstance, msg) { + var f, obj = { + blockId: (f = msg.getBlockId()) && tendermint_types_types_pb.BlockID.toObject(includeInstance, f), + block: (f = msg.getBlock()) && tendermint_types_block_pb.Block.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.tendermint_1.v1beta1.GetLatestBlockResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse; + return proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.BlockID; + reader.readMessage(value,tendermint_types_types_pb.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 2: + var value = new tendermint_types_block_pb.Block; + reader.readMessage(value,tendermint_types_block_pb.Block.deserializeBinaryFromReader); + msg.setBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.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.tendermint_1.v1beta1.GetLatestBlockResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.BlockID.serializeBinaryToWriter + ); + } + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_block_pb.Block.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.types.BlockID block_id = 1; + * @return {?proto.tendermint.types.BlockID} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.BlockID, 1)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional tendermint.types.Block block = 2; + * @return {?proto.tendermint.types.Block} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.getBlock = function() { + return /** @type{?proto.tendermint.types.Block} */ ( + jspb.Message.getWrapperField(this, tendermint_types_block_pb.Block, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Block|undefined} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.setBlock = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.clearBlock = function() { + return this.setBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetLatestBlockResponse.prototype.hasBlock = 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.base.tendermint_1.v1beta1.GetSyncingRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetSyncingRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest.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.tendermint_1.v1beta1.GetSyncingRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest; + return proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest.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.tendermint_1.v1beta1.GetSyncingRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest.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.tendermint_1.v1beta1.GetSyncingRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingRequest.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.tendermint_1.v1beta1.GetSyncingResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetSyncingResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.toObject = function(includeInstance, msg) { + var f, obj = { + syncing: 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.base.tendermint_1.v1beta1.GetSyncingResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse; + return proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.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.setSyncing(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.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.tendermint_1.v1beta1.GetSyncingResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSyncing(); + if (f) { + writer.writeBool( + 1, + f + ); + } +}; + + +/** + * optional bool syncing = 1; + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.prototype.getSyncing = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetSyncingResponse.prototype.setSyncing = 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.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetNodeInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.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.tendermint_1.v1beta1.GetNodeInfoRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest; + return proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.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.tendermint_1.v1beta1.GetNodeInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.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.tendermint_1.v1beta1.GetNodeInfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoRequest.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.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.GetNodeInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + defaultNodeInfo: (f = msg.getDefaultNodeInfo()) && tendermint_p2p_types_pb.DefaultNodeInfo.toObject(includeInstance, f), + applicationVersion: (f = msg.getApplicationVersion()) && proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.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.tendermint_1.v1beta1.GetNodeInfoResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse; + return proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_p2p_types_pb.DefaultNodeInfo; + reader.readMessage(value,tendermint_p2p_types_pb.DefaultNodeInfo.deserializeBinaryFromReader); + msg.setDefaultNodeInfo(value); + break; + case 2: + var value = new proto.cosmos.base.tendermint_1.v1beta1.VersionInfo; + reader.readMessage(value,proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.deserializeBinaryFromReader); + msg.setApplicationVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.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.tendermint_1.v1beta1.GetNodeInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDefaultNodeInfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_p2p_types_pb.DefaultNodeInfo.serializeBinaryToWriter + ); + } + f = message.getApplicationVersion(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.p2p.DefaultNodeInfo default_node_info = 1; + * @return {?proto.tendermint.p2p.DefaultNodeInfo} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.getDefaultNodeInfo = function() { + return /** @type{?proto.tendermint.p2p.DefaultNodeInfo} */ ( + jspb.Message.getWrapperField(this, tendermint_p2p_types_pb.DefaultNodeInfo, 1)); +}; + + +/** + * @param {?proto.tendermint.p2p.DefaultNodeInfo|undefined} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.setDefaultNodeInfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.clearDefaultNodeInfo = function() { + return this.setDefaultNodeInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.hasDefaultNodeInfo = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional VersionInfo application_version = 2; + * @return {?proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.getApplicationVersion = function() { + return /** @type{?proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.base.tendermint_1.v1beta1.VersionInfo, 2)); +}; + + +/** + * @param {?proto.cosmos.base.tendermint_1.v1beta1.VersionInfo|undefined} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.setApplicationVersion = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.clearApplicationVersion = function() { + return this.setApplicationVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.base.tendermint_1.v1beta1.GetNodeInfoResponse.prototype.hasApplicationVersion = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.repeatedFields_ = [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.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.VersionInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + appName: jspb.Message.getFieldWithDefault(msg, 2, ""), + version: jspb.Message.getFieldWithDefault(msg, 3, ""), + gitCommit: jspb.Message.getFieldWithDefault(msg, 4, ""), + buildTags: jspb.Message.getFieldWithDefault(msg, 5, ""), + goVersion: jspb.Message.getFieldWithDefault(msg, 6, ""), + buildDepsList: jspb.Message.toObjectList(msg.getBuildDepsList(), + proto.cosmos.base.tendermint_1.v1beta1.Module.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.tendermint_1.v1beta1.VersionInfo} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.VersionInfo; + return proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.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.setAppName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setGitCommit(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setBuildTags(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setGoVersion(value); + break; + case 7: + var value = new proto.cosmos.base.tendermint_1.v1beta1.Module; + reader.readMessage(value,proto.cosmos.base.tendermint_1.v1beta1.Module.deserializeBinaryFromReader); + msg.addBuildDeps(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.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.tendermint_1.v1beta1.VersionInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAppName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getGitCommit(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getBuildTags(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getGoVersion(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getBuildDepsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.cosmos.base.tendermint_1.v1beta1.Module.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string app_name = 2; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.getAppName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.setAppName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string version = 3; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string git_commit = 4; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.getGitCommit = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.setGitCommit = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string build_tags = 5; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.getBuildTags = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.setBuildTags = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string go_version = 6; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.getGoVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.setGoVersion = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * repeated Module build_deps = 7; + * @return {!Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.getBuildDepsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.base.tendermint_1.v1beta1.Module, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} returns this +*/ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.setBuildDepsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.cosmos.base.tendermint_1.v1beta1.Module=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Module} + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.addBuildDeps = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.cosmos.base.tendermint_1.v1beta1.Module, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.VersionInfo} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.VersionInfo.prototype.clearBuildDepsList = function() { + return this.setBuildDepsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.tendermint_1.v1beta1.Module.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.tendermint_1.v1beta1.Module.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint_1.v1beta1.Module} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.toObject = function(includeInstance, msg) { + var f, obj = { + path: jspb.Message.getFieldWithDefault(msg, 1, ""), + version: jspb.Message.getFieldWithDefault(msg, 2, ""), + sum: 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.cosmos.base.tendermint_1.v1beta1.Module} + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.tendermint_1.v1beta1.Module; + return proto.cosmos.base.tendermint_1.v1beta1.Module.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.tendermint_1.v1beta1.Module} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Module} + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.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 {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSum(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.tendermint_1.v1beta1.Module.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.tendermint_1.v1beta1.Module} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSum(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string path = 1; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Module} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string version = 2; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Module} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string sum = 3; + * @return {string} + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.prototype.getSum = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.tendermint_1.v1beta1.Module} returns this + */ +proto.cosmos.base.tendermint_1.v1beta1.Module.prototype.setSum = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.tendermint_1.v1beta1); diff --git a/src/types/proto-types/cosmos/base/v1beta1/coin_pb.js b/src/types/proto-types/cosmos/base/v1beta1/coin_pb.js new file mode 100644 index 00000000..b5ccfd9f --- /dev/null +++ b/src/types/proto-types/cosmos/base/v1beta1/coin_pb.js @@ -0,0 +1,685 @@ +// source: cosmos/base/v1beta1/coin.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.base.v1beta1.Coin', null, global); +goog.exportSymbol('proto.cosmos.base.v1beta1.DecCoin', null, global); +goog.exportSymbol('proto.cosmos.base.v1beta1.DecProto', null, global); +goog.exportSymbol('proto.cosmos.base.v1beta1.IntProto', 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.v1beta1.Coin = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.v1beta1.Coin, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.v1beta1.Coin.displayName = 'proto.cosmos.base.v1beta1.Coin'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.DecCoin = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.v1beta1.DecCoin, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.v1beta1.DecCoin.displayName = 'proto.cosmos.base.v1beta1.DecCoin'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.IntProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.v1beta1.IntProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.v1beta1.IntProto.displayName = 'proto.cosmos.base.v1beta1.IntProto'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.DecProto = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.base.v1beta1.DecProto, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.base.v1beta1.DecProto.displayName = 'proto.cosmos.base.v1beta1.DecProto'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.v1beta1.Coin.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.v1beta1.Coin.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.Coin} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.v1beta1.Coin.toObject = function(includeInstance, msg) { + var f, obj = { + denom: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: 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.base.v1beta1.Coin} + */ +proto.cosmos.base.v1beta1.Coin.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.v1beta1.Coin; + return proto.cosmos.base.v1beta1.Coin.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.v1beta1.Coin} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.base.v1beta1.Coin.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.v1beta1.Coin.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.v1beta1.Coin.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.v1beta1.Coin} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.v1beta1.Coin.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 + ); + } +}; + + +/** + * optional string denom = 1; + * @return {string} + */ +proto.cosmos.base.v1beta1.Coin.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.v1beta1.Coin} returns this + */ +proto.cosmos.base.v1beta1.Coin.prototype.setDenom = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string amount = 2; + * @return {string} + */ +proto.cosmos.base.v1beta1.Coin.prototype.getAmount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.v1beta1.Coin} returns this + */ +proto.cosmos.base.v1beta1.Coin.prototype.setAmount = 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.base.v1beta1.DecCoin.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.v1beta1.DecCoin.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.DecCoin} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.v1beta1.DecCoin.toObject = function(includeInstance, msg) { + var f, obj = { + denom: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: 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.base.v1beta1.DecCoin} + */ +proto.cosmos.base.v1beta1.DecCoin.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.v1beta1.DecCoin; + return proto.cosmos.base.v1beta1.DecCoin.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.v1beta1.DecCoin} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.v1beta1.DecCoin} + */ +proto.cosmos.base.v1beta1.DecCoin.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.v1beta1.DecCoin.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.v1beta1.DecCoin.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.v1beta1.DecCoin} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.v1beta1.DecCoin.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 + ); + } +}; + + +/** + * optional string denom = 1; + * @return {string} + */ +proto.cosmos.base.v1beta1.DecCoin.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.v1beta1.DecCoin} returns this + */ +proto.cosmos.base.v1beta1.DecCoin.prototype.setDenom = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string amount = 2; + * @return {string} + */ +proto.cosmos.base.v1beta1.DecCoin.prototype.getAmount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.v1beta1.DecCoin} returns this + */ +proto.cosmos.base.v1beta1.DecCoin.prototype.setAmount = 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.base.v1beta1.IntProto.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.v1beta1.IntProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.IntProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.v1beta1.IntProto.toObject = function(includeInstance, msg) { + var f, obj = { + pb_int: 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.v1beta1.IntProto} + */ +proto.cosmos.base.v1beta1.IntProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.v1beta1.IntProto; + return proto.cosmos.base.v1beta1.IntProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.v1beta1.IntProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.v1beta1.IntProto} + */ +proto.cosmos.base.v1beta1.IntProto.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.setInt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.v1beta1.IntProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.v1beta1.IntProto.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.v1beta1.IntProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.v1beta1.IntProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInt(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string int = 1; + * @return {string} + */ +proto.cosmos.base.v1beta1.IntProto.prototype.getInt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.v1beta1.IntProto} returns this + */ +proto.cosmos.base.v1beta1.IntProto.prototype.setInt = 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.v1beta1.DecProto.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.base.v1beta1.DecProto.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.DecProto} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.v1beta1.DecProto.toObject = function(includeInstance, msg) { + var f, obj = { + dec: 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.v1beta1.DecProto} + */ +proto.cosmos.base.v1beta1.DecProto.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.base.v1beta1.DecProto; + return proto.cosmos.base.v1beta1.DecProto.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.base.v1beta1.DecProto} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.base.v1beta1.DecProto} + */ +proto.cosmos.base.v1beta1.DecProto.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.setDec(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.base.v1beta1.DecProto.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.base.v1beta1.DecProto.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.v1beta1.DecProto} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.base.v1beta1.DecProto.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDec(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string dec = 1; + * @return {string} + */ +proto.cosmos.base.v1beta1.DecProto.prototype.getDec = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.base.v1beta1.DecProto} returns this + */ +proto.cosmos.base.v1beta1.DecProto.prototype.setDec = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +goog.object.extend(exports, proto.cosmos.base.v1beta1); diff --git a/src/types/proto-types/cosmos/capability/v1beta1/capability_pb.js b/src/types/proto-types/cosmos/capability/v1beta1/capability_pb.js new file mode 100644 index 00000000..89e8a906 --- /dev/null +++ b/src/types/proto-types/cosmos/capability/v1beta1/capability_pb.js @@ -0,0 +1,533 @@ +// source: cosmos/capability/v1beta1/capability.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +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); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.capability.v1beta1.Capability = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.capability.v1beta1.Capability, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.capability.v1beta1.Capability.displayName = 'proto.cosmos.capability.v1beta1.Capability'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.capability.v1beta1.Owner = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.capability.v1beta1.Owner, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.capability.v1beta1.Owner.displayName = 'proto.cosmos.capability.v1beta1.Owner'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.capability.v1beta1.CapabilityOwners = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.capability.v1beta1.CapabilityOwners.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.capability.v1beta1.CapabilityOwners, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.capability.v1beta1.CapabilityOwners.displayName = 'proto.cosmos.capability.v1beta1.CapabilityOwners'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.capability.v1beta1.Capability.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.capability.v1beta1.Capability.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.capability.v1beta1.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) { + var f, obj = { + index: 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.cosmos.capability.v1beta1.Capability} + */ +proto.cosmos.capability.v1beta1.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.capability.v1beta1.Capability} + */ +proto.cosmos.capability.v1beta1.Capability.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.setIndex(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.capability.v1beta1.Capability.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.capability.v1beta1.Capability.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.capability.v1beta1.Capability} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.capability.v1beta1.Capability.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIndex(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 index = 1; + * @return {number} + */ +proto.cosmos.capability.v1beta1.Capability.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.capability.v1beta1.Capability} returns this + */ +proto.cosmos.capability.v1beta1.Capability.prototype.setIndex = 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.cosmos.capability.v1beta1.Owner.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.capability.v1beta1.Owner.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.capability.v1beta1.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) { + var f, obj = { + module: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: 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.capability.v1beta1.Owner} + */ +proto.cosmos.capability.v1beta1.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.capability.v1beta1.Owner} + */ +proto.cosmos.capability.v1beta1.Owner.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.setModule(value); + break; + case 2: + 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.capability.v1beta1.Owner.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.capability.v1beta1.Owner.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.capability.v1beta1.Owner} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.capability.v1beta1.Owner.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getModule(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string module = 1; + * @return {string} + */ +proto.cosmos.capability.v1beta1.Owner.prototype.getModule = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.capability.v1beta1.Owner} returns this + */ +proto.cosmos.capability.v1beta1.Owner.prototype.setModule = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.cosmos.capability.v1beta1.Owner.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.capability.v1beta1.Owner} returns this + */ +proto.cosmos.capability.v1beta1.Owner.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.capability.v1beta1.CapabilityOwners.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.capability.v1beta1.CapabilityOwners.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.capability.v1beta1.CapabilityOwners.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.capability.v1beta1.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) { + var f, obj = { + ownersList: jspb.Message.toObjectList(msg.getOwnersList(), + proto.cosmos.capability.v1beta1.Owner.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.capability.v1beta1.CapabilityOwners} + */ +proto.cosmos.capability.v1beta1.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.capability.v1beta1.CapabilityOwners} + */ +proto.cosmos.capability.v1beta1.CapabilityOwners.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + 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); + msg.addOwners(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.capability.v1beta1.CapabilityOwners.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.capability.v1beta1.CapabilityOwners.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.capability.v1beta1.CapabilityOwners} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.capability.v1beta1.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 + ); + } +}; + + +/** + * repeated Owner owners = 1; + * @return {!Array} + */ +proto.cosmos.capability.v1beta1.CapabilityOwners.prototype.getOwnersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.capability.v1beta1.Owner, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.capability.v1beta1.CapabilityOwners} returns this +*/ +proto.cosmos.capability.v1beta1.CapabilityOwners.prototype.setOwnersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.capability.v1beta1.Owner=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.capability.v1beta1.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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.capability.v1beta1.CapabilityOwners} returns this + */ +proto.cosmos.capability.v1beta1.CapabilityOwners.prototype.clearOwnersList = function() { + return this.setOwnersList([]); +}; + + +goog.object.extend(exports, proto.cosmos.capability.v1beta1); diff --git a/src/types/proto-types/cosmos/capability/v1beta1/genesis_pb.js b/src/types/proto-types/cosmos/capability/v1beta1/genesis_pb.js new file mode 100644 index 00000000..dbd0d6cd --- /dev/null +++ b/src/types/proto-types/cosmos/capability/v1beta1/genesis_pb.js @@ -0,0 +1,434 @@ +// source: cosmos/capability/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_capability_v1beta1_capability_pb = require('../../../cosmos/capability/v1beta1/capability_pb.js'); +goog.object.extend(proto, cosmos_capability_v1beta1_capability_pb); +goog.exportSymbol('proto.cosmos.capability.v1beta1.GenesisOwners', null, global); +goog.exportSymbol('proto.cosmos.capability.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.cosmos.capability.v1beta1.GenesisOwners = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.capability.v1beta1.GenesisOwners, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.capability.v1beta1.GenesisOwners.displayName = 'proto.cosmos.capability.v1beta1.GenesisOwners'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.capability.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.capability.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.capability.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.capability.v1beta1.GenesisState.displayName = 'proto.cosmos.capability.v1beta1.GenesisState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.capability.v1beta1.GenesisOwners.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.capability.v1beta1.GenesisOwners.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.capability.v1beta1.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) { + var f, obj = { + index: jspb.Message.getFieldWithDefault(msg, 1, 0), + indexOwners: (f = msg.getIndexOwners()) && cosmos_capability_v1beta1_capability_pb.CapabilityOwners.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.capability.v1beta1.GenesisOwners} + */ +proto.cosmos.capability.v1beta1.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.capability.v1beta1.GenesisOwners} + */ +proto.cosmos.capability.v1beta1.GenesisOwners.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.setIndex(value); + break; + case 2: + var value = new cosmos_capability_v1beta1_capability_pb.CapabilityOwners; + reader.readMessage(value,cosmos_capability_v1beta1_capability_pb.CapabilityOwners.deserializeBinaryFromReader); + msg.setIndexOwners(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.capability.v1beta1.GenesisOwners.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.capability.v1beta1.GenesisOwners.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.capability.v1beta1.GenesisOwners} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.capability.v1beta1.GenesisOwners.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIndex(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getIndexOwners(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_capability_v1beta1_capability_pb.CapabilityOwners.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 index = 1; + * @return {number} + */ +proto.cosmos.capability.v1beta1.GenesisOwners.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.capability.v1beta1.GenesisOwners} returns this + */ +proto.cosmos.capability.v1beta1.GenesisOwners.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional CapabilityOwners index_owners = 2; + * @return {?proto.cosmos.capability.v1beta1.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)); +}; + + +/** + * @param {?proto.cosmos.capability.v1beta1.CapabilityOwners|undefined} value + * @return {!proto.cosmos.capability.v1beta1.GenesisOwners} returns this +*/ +proto.cosmos.capability.v1beta1.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 + */ +proto.cosmos.capability.v1beta1.GenesisOwners.prototype.clearIndexOwners = function() { + return this.setIndexOwners(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.capability.v1beta1.GenesisOwners.prototype.hasIndexOwners = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.capability.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.cosmos.capability.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.capability.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.cosmos.capability.v1beta1.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) { + var f, obj = { + index: jspb.Message.getFieldWithDefault(msg, 1, 0), + ownersList: jspb.Message.toObjectList(msg.getOwnersList(), + proto.cosmos.capability.v1beta1.GenesisOwners.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.capability.v1beta1.GenesisState} + */ +proto.cosmos.capability.v1beta1.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.capability.v1beta1.GenesisState} + */ +proto.cosmos.capability.v1beta1.GenesisState.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.setIndex(value); + break; + case 2: + var value = new proto.cosmos.capability.v1beta1.GenesisOwners; + reader.readMessage(value,proto.cosmos.capability.v1beta1.GenesisOwners.deserializeBinaryFromReader); + msg.addOwners(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.capability.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.capability.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.cosmos.capability.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.capability.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIndex(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getOwnersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.capability.v1beta1.GenesisOwners.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 index = 1; + * @return {number} + */ +proto.cosmos.capability.v1beta1.GenesisState.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.capability.v1beta1.GenesisState} returns this + */ +proto.cosmos.capability.v1beta1.GenesisState.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated GenesisOwners owners = 2; + * @return {!Array} + */ +proto.cosmos.capability.v1beta1.GenesisState.prototype.getOwnersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.capability.v1beta1.GenesisOwners, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.capability.v1beta1.GenesisState} returns this +*/ +proto.cosmos.capability.v1beta1.GenesisState.prototype.setOwnersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.capability.v1beta1.GenesisOwners=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.capability.v1beta1.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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.capability.v1beta1.GenesisState} returns this + */ +proto.cosmos.capability.v1beta1.GenesisState.prototype.clearOwnersList = function() { + return this.setOwnersList([]); +}; + + +goog.object.extend(exports, proto.cosmos.capability.v1beta1); diff --git a/src/types/proto-types/cosmos/crisis/v1beta1/genesis_pb.js b/src/types/proto-types/cosmos/crisis/v1beta1/genesis_pb.js new file mode 100644 index 00000000..4ecc9b0a --- /dev/null +++ b/src/types/proto-types/cosmos/crisis/v1beta1/genesis_pb.js @@ -0,0 +1,192 @@ +// source: cosmos/crisis/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.cosmos.crisis.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.cosmos.crisis.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crisis.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crisis.v1beta1.GenesisState.displayName = 'proto.cosmos.crisis.v1beta1.GenesisState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.crisis.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crisis.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.cosmos.crisis.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crisis.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + constantFee: (f = msg.getConstantFee()) && 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.crisis.v1beta1.GenesisState} + */ +proto.cosmos.crisis.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crisis.v1beta1.GenesisState; + return proto.cosmos.crisis.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crisis.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crisis.v1beta1.GenesisState} + */ +proto.cosmos.crisis.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setConstantFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crisis.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crisis.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.cosmos.crisis.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crisis.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConstantFee(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin constant_fee = 3; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.crisis.v1beta1.GenesisState.prototype.getConstantFee = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.cosmos.crisis.v1beta1.GenesisState} returns this +*/ +proto.cosmos.crisis.v1beta1.GenesisState.prototype.setConstantFee = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.crisis.v1beta1.GenesisState} returns this + */ +proto.cosmos.crisis.v1beta1.GenesisState.prototype.clearConstantFee = function() { + return this.setConstantFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.crisis.v1beta1.GenesisState.prototype.hasConstantFee = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +goog.object.extend(exports, proto.cosmos.crisis.v1beta1); diff --git a/src/types/proto-types/cosmos/crisis/v1beta1/tx_grpc_web_pb.js b/src/types/proto-types/cosmos/crisis/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..6abc2fdb --- /dev/null +++ b/src/types/proto-types/cosmos/crisis/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,158 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.crisis.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.crisis = {}; +proto.cosmos.crisis.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.crisis.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.crisis.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.crisis.v1beta1.MsgVerifyInvariant, + * !proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse>} + */ +const methodDescriptor_Msg_VerifyInvariant = new grpc.web.MethodDescriptor( + '/cosmos.crisis.v1beta1.Msg/VerifyInvariant', + grpc.web.MethodType.UNARY, + proto.cosmos.crisis.v1beta1.MsgVerifyInvariant, + proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse, + /** + * @param {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.crisis.v1beta1.MsgVerifyInvariant, + * !proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse>} + */ +const methodInfo_Msg_VerifyInvariant = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse, + /** + * @param {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.crisis.v1beta1.MsgClient.prototype.verifyInvariant = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.crisis.v1beta1.Msg/VerifyInvariant', + request, + metadata || {}, + methodDescriptor_Msg_VerifyInvariant, + callback); +}; + + +/** + * @param {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.crisis.v1beta1.MsgPromiseClient.prototype.verifyInvariant = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.crisis.v1beta1.Msg/VerifyInvariant', + request, + metadata || {}, + methodDescriptor_Msg_VerifyInvariant); +}; + + +module.exports = proto.cosmos.crisis.v1beta1; + diff --git a/src/types/proto-types/cosmos/crisis/v1beta1/tx_pb.js b/src/types/proto-types/cosmos/crisis/v1beta1/tx_pb.js new file mode 100644 index 00000000..b94043e4 --- /dev/null +++ b/src/types/proto-types/cosmos/crisis/v1beta1/tx_pb.js @@ -0,0 +1,352 @@ +// source: cosmos/crisis/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.crisis.v1beta1.MsgVerifyInvariant', null, global); +goog.exportSymbol('proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse', 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.crisis.v1beta1.MsgVerifyInvariant = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crisis.v1beta1.MsgVerifyInvariant, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.displayName = 'proto.cosmos.crisis.v1beta1.MsgVerifyInvariant'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crisis.v1beta1.MsgVerifyInvariantResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.displayName = 'proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.crisis.v1beta1.MsgVerifyInvariant.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crisis.v1beta1.MsgVerifyInvariant} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + invariantModuleName: jspb.Message.getFieldWithDefault(msg, 2, ""), + invariantRoute: 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.cosmos.crisis.v1beta1.MsgVerifyInvariant} + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crisis.v1beta1.MsgVerifyInvariant; + return proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.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 {string} */ (reader.readString()); + msg.setInvariantModuleName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setInvariantRoute(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.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.crisis.v1beta1.MsgVerifyInvariant} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getInvariantModuleName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getInvariantRoute(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} returns this + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string invariant_module_name = 2; + * @return {string} + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.prototype.getInvariantModuleName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} returns this + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.prototype.setInvariantModuleName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string invariant_route = 3; + * @return {string} + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.prototype.getInvariantRoute = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariant} returns this + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariant.prototype.setInvariantRoute = 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.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crisis.v1beta1.MsgVerifyInvariantResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.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.crisis.v1beta1.MsgVerifyInvariantResponse} + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse; + return proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse} + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.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.crisis.v1beta1.MsgVerifyInvariantResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.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.crisis.v1beta1.MsgVerifyInvariantResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crisis.v1beta1.MsgVerifyInvariantResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cosmos.crisis.v1beta1); diff --git a/src/types/proto-types/cosmos/crypto/ed25519/keys_pb.js b/src/types/proto-types/cosmos/crypto/ed25519/keys_pb.js new file mode 100644 index 00000000..9f7de8b9 --- /dev/null +++ b/src/types/proto-types/cosmos/crypto/ed25519/keys_pb.js @@ -0,0 +1,369 @@ +// source: cosmos/crypto/ed25519/keys.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.crypto.ed25519.PrivKey', null, global); +goog.exportSymbol('proto.cosmos.crypto.ed25519.PubKey', 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.crypto.ed25519.PubKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.ed25519.PubKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.ed25519.PubKey.displayName = 'proto.cosmos.crypto.ed25519.PubKey'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crypto.ed25519.PrivKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.ed25519.PrivKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.ed25519.PrivKey.displayName = 'proto.cosmos.crypto.ed25519.PrivKey'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.crypto.ed25519.PubKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.ed25519.PubKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.ed25519.PubKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.ed25519.PubKey.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_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.crypto.ed25519.PubKey} + */ +proto.cosmos.crypto.ed25519.PubKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.ed25519.PubKey; + return proto.cosmos.crypto.ed25519.PubKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.ed25519.PubKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.ed25519.PubKey} + */ +proto.cosmos.crypto.ed25519.PubKey.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.ed25519.PubKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.ed25519.PubKey.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.crypto.ed25519.PubKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.ed25519.PubKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.ed25519.PubKey.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.crypto.ed25519.PubKey.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.crypto.ed25519.PubKey.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.ed25519.PubKey} returns this + */ +proto.cosmos.crypto.ed25519.PubKey.prototype.setKey = 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.crypto.ed25519.PrivKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.ed25519.PrivKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.ed25519.PrivKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.ed25519.PrivKey.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_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.crypto.ed25519.PrivKey} + */ +proto.cosmos.crypto.ed25519.PrivKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.ed25519.PrivKey; + return proto.cosmos.crypto.ed25519.PrivKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.ed25519.PrivKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.ed25519.PrivKey} + */ +proto.cosmos.crypto.ed25519.PrivKey.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.ed25519.PrivKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.ed25519.PrivKey.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.crypto.ed25519.PrivKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.ed25519.PrivKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.ed25519.PrivKey.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.crypto.ed25519.PrivKey.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.crypto.ed25519.PrivKey.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.ed25519.PrivKey} returns this + */ +proto.cosmos.crypto.ed25519.PrivKey.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +goog.object.extend(exports, proto.cosmos.crypto.ed25519); diff --git a/src/types/proto-types/cosmos/crypto/multisig/keys_pb.js b/src/types/proto-types/cosmos/crypto/multisig/keys_pb.js new file mode 100644 index 00000000..a15694f2 --- /dev/null +++ b/src/types/proto-types/cosmos/crypto/multisig/keys_pb.js @@ -0,0 +1,231 @@ +// source: cosmos/crypto/multisig/keys.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +goog.exportSymbol('proto.cosmos.crypto.multisig.LegacyAminoPubKey', 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.crypto.multisig.LegacyAminoPubKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.crypto.multisig.LegacyAminoPubKey.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.crypto.multisig.LegacyAminoPubKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.multisig.LegacyAminoPubKey.displayName = 'proto.cosmos.crypto.multisig.LegacyAminoPubKey'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.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.crypto.multisig.LegacyAminoPubKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.multisig.LegacyAminoPubKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.multisig.LegacyAminoPubKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.toObject = function(includeInstance, msg) { + var f, obj = { + threshold: jspb.Message.getFieldWithDefault(msg, 1, 0), + publicKeysList: jspb.Message.toObjectList(msg.getPublicKeysList(), + 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.cosmos.crypto.multisig.LegacyAminoPubKey} + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.multisig.LegacyAminoPubKey; + return proto.cosmos.crypto.multisig.LegacyAminoPubKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.multisig.LegacyAminoPubKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.multisig.LegacyAminoPubKey} + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.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.setThreshold(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addPublicKeys(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.multisig.LegacyAminoPubKey.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.crypto.multisig.LegacyAminoPubKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getThreshold(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getPublicKeysList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint32 threshold = 1; + * @return {number} + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.prototype.getThreshold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.crypto.multisig.LegacyAminoPubKey} returns this + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.prototype.setThreshold = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated google.protobuf.Any public_keys = 2; + * @return {!Array} + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.prototype.getPublicKeysList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.crypto.multisig.LegacyAminoPubKey} returns this +*/ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.prototype.setPublicKeysList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.prototype.addPublicKeys = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.crypto.multisig.LegacyAminoPubKey} returns this + */ +proto.cosmos.crypto.multisig.LegacyAminoPubKey.prototype.clearPublicKeysList = function() { + return this.setPublicKeysList([]); +}; + + +goog.object.extend(exports, proto.cosmos.crypto.multisig); diff --git a/src/types/proto-types/cosmos/crypto/multisig/v1beta1/multisig_pb.js b/src/types/proto-types/cosmos/crypto/multisig/v1beta1/multisig_pb.js new file mode 100644 index 00000000..25cdd8c5 --- /dev/null +++ b/src/types/proto-types/cosmos/crypto/multisig/v1beta1/multisig_pb.js @@ -0,0 +1,425 @@ +// source: cosmos/crypto/multisig/v1beta1/multisig.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.crypto.multisig.v1beta1.CompactBitArray', null, global); +goog.exportSymbol('proto.cosmos.crypto.multisig.v1beta1.MultiSignature', 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.crypto.multisig.v1beta1.MultiSignature = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.crypto.multisig.v1beta1.MultiSignature.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.crypto.multisig.v1beta1.MultiSignature, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.multisig.v1beta1.MultiSignature.displayName = 'proto.cosmos.crypto.multisig.v1beta1.MultiSignature'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crypto.multisig.v1beta1.CompactBitArray = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.multisig.v1beta1.CompactBitArray, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.displayName = 'proto.cosmos.crypto.multisig.v1beta1.CompactBitArray'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.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.crypto.multisig.v1beta1.MultiSignature.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.multisig.v1beta1.MultiSignature.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.multisig.v1beta1.MultiSignature} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.toObject = function(includeInstance, msg) { + var f, obj = { + signaturesList: msg.getSignaturesList_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.crypto.multisig.v1beta1.MultiSignature} + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.multisig.v1beta1.MultiSignature; + return proto.cosmos.crypto.multisig.v1beta1.MultiSignature.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.multisig.v1beta1.MultiSignature} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.multisig.v1beta1.MultiSignature} + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.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.addSignatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.multisig.v1beta1.MultiSignature.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.crypto.multisig.v1beta1.MultiSignature} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignaturesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes signatures = 1; + * @return {!(Array|Array)} + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.prototype.getSignaturesList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes signatures = 1; + * This is a type-conversion wrapper around `getSignaturesList()` + * @return {!Array} + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.prototype.getSignaturesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getSignaturesList())); +}; + + +/** + * repeated bytes signatures = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignaturesList()` + * @return {!Array} + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.prototype.getSignaturesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getSignaturesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.cosmos.crypto.multisig.v1beta1.MultiSignature} returns this + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.prototype.setSignaturesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.cosmos.crypto.multisig.v1beta1.MultiSignature} returns this + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.prototype.addSignatures = 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.crypto.multisig.v1beta1.MultiSignature} returns this + */ +proto.cosmos.crypto.multisig.v1beta1.MultiSignature.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.cosmos.crypto.multisig.v1beta1.CompactBitArray.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.multisig.v1beta1.CompactBitArray} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.toObject = function(includeInstance, msg) { + var f, obj = { + extraBitsStored: jspb.Message.getFieldWithDefault(msg, 1, 0), + elems: msg.getElems_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.crypto.multisig.v1beta1.CompactBitArray} + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.multisig.v1beta1.CompactBitArray; + return proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.multisig.v1beta1.CompactBitArray} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.multisig.v1beta1.CompactBitArray} + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.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.setExtraBitsStored(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setElems(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.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.crypto.multisig.v1beta1.CompactBitArray} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExtraBitsStored(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getElems_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional uint32 extra_bits_stored = 1; + * @return {number} + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.prototype.getExtraBitsStored = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.crypto.multisig.v1beta1.CompactBitArray} returns this + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.prototype.setExtraBitsStored = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes elems = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.prototype.getElems = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes elems = 2; + * This is a type-conversion wrapper around `getElems()` + * @return {string} + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.prototype.getElems_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getElems())); +}; + + +/** + * optional bytes elems = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getElems()` + * @return {!Uint8Array} + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.prototype.getElems_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getElems())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.multisig.v1beta1.CompactBitArray} returns this + */ +proto.cosmos.crypto.multisig.v1beta1.CompactBitArray.prototype.setElems = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cosmos.crypto.multisig.v1beta1); diff --git a/src/types/proto-types/cosmos/crypto/secp256k1/keys_pb.js b/src/types/proto-types/cosmos/crypto/secp256k1/keys_pb.js new file mode 100644 index 00000000..1a9e42b9 --- /dev/null +++ b/src/types/proto-types/cosmos/crypto/secp256k1/keys_pb.js @@ -0,0 +1,369 @@ +// source: cosmos/crypto/secp256k1/keys.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.crypto.secp256k1.PrivKey', null, global); +goog.exportSymbol('proto.cosmos.crypto.secp256k1.PubKey', 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.crypto.secp256k1.PubKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.secp256k1.PubKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.secp256k1.PubKey.displayName = 'proto.cosmos.crypto.secp256k1.PubKey'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crypto.secp256k1.PrivKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.secp256k1.PrivKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.secp256k1.PrivKey.displayName = 'proto.cosmos.crypto.secp256k1.PrivKey'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.crypto.secp256k1.PubKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.secp256k1.PubKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.secp256k1.PubKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.secp256k1.PubKey.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_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.crypto.secp256k1.PubKey} + */ +proto.cosmos.crypto.secp256k1.PubKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.secp256k1.PubKey; + return proto.cosmos.crypto.secp256k1.PubKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.secp256k1.PubKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.secp256k1.PubKey} + */ +proto.cosmos.crypto.secp256k1.PubKey.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.secp256k1.PubKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.secp256k1.PubKey.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.crypto.secp256k1.PubKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.secp256k1.PubKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.secp256k1.PubKey.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.crypto.secp256k1.PubKey.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.crypto.secp256k1.PubKey.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.secp256k1.PubKey} returns this + */ +proto.cosmos.crypto.secp256k1.PubKey.prototype.setKey = 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.crypto.secp256k1.PrivKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.secp256k1.PrivKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.secp256k1.PrivKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.secp256k1.PrivKey.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_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.crypto.secp256k1.PrivKey} + */ +proto.cosmos.crypto.secp256k1.PrivKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.secp256k1.PrivKey; + return proto.cosmos.crypto.secp256k1.PrivKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.secp256k1.PrivKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.secp256k1.PrivKey} + */ +proto.cosmos.crypto.secp256k1.PrivKey.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.secp256k1.PrivKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.secp256k1.PrivKey.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.crypto.secp256k1.PrivKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.secp256k1.PrivKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.secp256k1.PrivKey.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.crypto.secp256k1.PrivKey.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.crypto.secp256k1.PrivKey.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.secp256k1.PrivKey} returns this + */ +proto.cosmos.crypto.secp256k1.PrivKey.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +goog.object.extend(exports, proto.cosmos.crypto.secp256k1); diff --git a/src/types/proto-types/cosmos/crypto/sm2/keys_pb.js b/src/types/proto-types/cosmos/crypto/sm2/keys_pb.js new file mode 100644 index 00000000..2e36d672 --- /dev/null +++ b/src/types/proto-types/cosmos/crypto/sm2/keys_pb.js @@ -0,0 +1,369 @@ +// source: cosmos/crypto/sm2/keys.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.crypto.sm2.PrivKey', null, global); +goog.exportSymbol('proto.cosmos.crypto.sm2.PubKey', 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.crypto.sm2.PubKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.sm2.PubKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.sm2.PubKey.displayName = 'proto.cosmos.crypto.sm2.PubKey'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crypto.sm2.PrivKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.crypto.sm2.PrivKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.crypto.sm2.PrivKey.displayName = 'proto.cosmos.crypto.sm2.PrivKey'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.crypto.sm2.PubKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.sm2.PubKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.sm2.PubKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.sm2.PubKey.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_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.crypto.sm2.PubKey} + */ +proto.cosmos.crypto.sm2.PubKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.sm2.PubKey; + return proto.cosmos.crypto.sm2.PubKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.sm2.PubKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.sm2.PubKey} + */ +proto.cosmos.crypto.sm2.PubKey.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.sm2.PubKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.sm2.PubKey.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.crypto.sm2.PubKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.sm2.PubKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.sm2.PubKey.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.crypto.sm2.PubKey.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.crypto.sm2.PubKey.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.sm2.PubKey} returns this + */ +proto.cosmos.crypto.sm2.PubKey.prototype.setKey = 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.crypto.sm2.PrivKey.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.crypto.sm2.PrivKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.sm2.PrivKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.sm2.PrivKey.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_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.crypto.sm2.PrivKey} + */ +proto.cosmos.crypto.sm2.PrivKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.crypto.sm2.PrivKey; + return proto.cosmos.crypto.sm2.PrivKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.crypto.sm2.PrivKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.crypto.sm2.PrivKey} + */ +proto.cosmos.crypto.sm2.PrivKey.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.crypto.sm2.PrivKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.crypto.sm2.PrivKey.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.crypto.sm2.PrivKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.crypto.sm2.PrivKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.crypto.sm2.PrivKey.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.crypto.sm2.PrivKey.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.crypto.sm2.PrivKey.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.crypto.sm2.PrivKey} returns this + */ +proto.cosmos.crypto.sm2.PrivKey.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +goog.object.extend(exports, proto.cosmos.crypto.sm2); diff --git a/src/types/proto-types/cosmos/distribution/v1beta1/distribution_pb.js b/src/types/proto-types/cosmos/distribution/v1beta1/distribution_pb.js new file mode 100644 index 00000000..e49a84bb --- /dev/null +++ b/src/types/proto-types/cosmos/distribution/v1beta1/distribution_pb.js @@ -0,0 +1,2563 @@ +// source: cosmos/distribution/v1beta1/distribution.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.DelegationDelegatorReward', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.DelegatorStartingInfo', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.FeePool', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.Params', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorSlashEvent', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorSlashEvents', 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.distribution.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.Params.displayName = 'proto.cosmos.distribution.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.cosmos.distribution.v1beta1.ValidatorHistoricalRewards = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorCurrentRewards = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorAccumulatedCommission = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorOutstandingRewards = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorSlashEvent = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorSlashEvent, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorSlashEvent'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorSlashEvents = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorSlashEvents, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorSlashEvents'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.FeePool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.FeePool.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.FeePool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.FeePool.displayName = 'proto.cosmos.distribution.v1beta1.FeePool'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.CommunityPoolSpendProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.displayName = 'proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.DelegatorStartingInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.DelegatorStartingInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.displayName = 'proto.cosmos.distribution.v1beta1.DelegatorStartingInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.DelegationDelegatorReward = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.DelegationDelegatorReward, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.displayName = 'proto.cosmos.distribution.v1beta1.DelegationDelegatorReward'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.CommunityPoolSpendProposalWithDeposit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.displayName = 'proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.Params.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.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.cosmos.distribution.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + communityTax: jspb.Message.getFieldWithDefault(msg, 1, ""), + baseProposerReward: jspb.Message.getFieldWithDefault(msg, 2, ""), + bonusProposerReward: jspb.Message.getFieldWithDefault(msg, 3, ""), + withdrawAddrEnabled: 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.cosmos.distribution.v1beta1.Params} + */ +proto.cosmos.distribution.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.Params; + return proto.cosmos.distribution.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.Params} + */ +proto.cosmos.distribution.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.setCommunityTax(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBaseProposerReward(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBonusProposerReward(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setWithdrawAddrEnabled(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.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.cosmos.distribution.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCommunityTax(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBaseProposerReward(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getBonusProposerReward(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getWithdrawAddrEnabled(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional string community_tax = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.Params.prototype.getCommunityTax = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.Params} returns this + */ +proto.cosmos.distribution.v1beta1.Params.prototype.setCommunityTax = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string base_proposer_reward = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.Params.prototype.getBaseProposerReward = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.Params} returns this + */ +proto.cosmos.distribution.v1beta1.Params.prototype.setBaseProposerReward = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string bonus_proposer_reward = 3; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.Params.prototype.getBonusProposerReward = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.Params} returns this + */ +proto.cosmos.distribution.v1beta1.Params.prototype.setBonusProposerReward = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bool withdraw_addr_enabled = 4; + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.Params.prototype.getWithdrawAddrEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.distribution.v1beta1.Params} returns this + */ +proto.cosmos.distribution.v1beta1.Params.prototype.setWithdrawAddrEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.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.distribution.v1beta1.ValidatorHistoricalRewards.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorHistoricalRewards} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.toObject = function(includeInstance, msg) { + var f, obj = { + cumulativeRewardRatioList: jspb.Message.toObjectList(msg.getCumulativeRewardRatioList(), + cosmos_base_v1beta1_coin_pb.DecCoin.toObject, includeInstance), + referenceCount: 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.distribution.v1beta1.ValidatorHistoricalRewards} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards; + return proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.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.addCumulativeRewardRatio(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setReferenceCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.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.ValidatorHistoricalRewards} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCumulativeRewardRatioList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } + f = message.getReferenceCount(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin cumulative_reward_ratio = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.prototype.getCumulativeRewardRatioList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.prototype.setCumulativeRewardRatioList = 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.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.prototype.addCumulativeRewardRatio = 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.cosmos.distribution.v1beta1.ValidatorHistoricalRewards} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.prototype.clearCumulativeRewardRatioList = function() { + return this.setCumulativeRewardRatioList([]); +}; + + +/** + * optional uint32 reference_count = 2; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.prototype.getReferenceCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards.prototype.setReferenceCount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.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.distribution.v1beta1.ValidatorCurrentRewards.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorCurrentRewards} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.toObject = function(includeInstance, msg) { + var f, obj = { + rewardsList: jspb.Message.toObjectList(msg.getRewardsList(), + cosmos_base_v1beta1_coin_pb.DecCoin.toObject, includeInstance), + period: 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.distribution.v1beta1.ValidatorCurrentRewards} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards; + return proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.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.addRewards(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPeriod(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.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.ValidatorCurrentRewards} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } + f = message.getPeriod(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin rewards = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.prototype.getRewardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.prototype.setRewardsList = 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.cosmos.distribution.v1beta1.ValidatorCurrentRewards.prototype.addRewards = 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.cosmos.distribution.v1beta1.ValidatorCurrentRewards} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.prototype.clearRewardsList = function() { + return this.setRewardsList([]); +}; + + +/** + * optional uint64 period = 2; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.prototype.getPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards.prototype.setPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.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.distribution.v1beta1.ValidatorAccumulatedCommission.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorAccumulatedCommission} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.toObject = function(includeInstance, msg) { + var f, obj = { + commissionList: jspb.Message.toObjectList(msg.getCommissionList(), + 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.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission; + return proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.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.addCommission(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.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.ValidatorAccumulatedCommission} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCommissionList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin commission = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.prototype.getCommissionList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.prototype.setCommissionList = 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.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.prototype.addCommission = 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.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission.prototype.clearCommissionList = function() { + return this.setCommissionList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.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.distribution.v1beta1.ValidatorOutstandingRewards.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorOutstandingRewards} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.toObject = function(includeInstance, msg) { + var f, obj = { + rewardsList: jspb.Message.toObjectList(msg.getRewardsList(), + 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.cosmos.distribution.v1beta1.ValidatorOutstandingRewards} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards; + return proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.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.addRewards(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.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.ValidatorOutstandingRewards} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin rewards = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.prototype.getRewardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.prototype.setRewardsList = 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.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.prototype.addRewards = 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.cosmos.distribution.v1beta1.ValidatorOutstandingRewards} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards.prototype.clearRewardsList = function() { + return this.setRewardsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.ValidatorSlashEvent.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorSlashEvent} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.toObject = function(includeInstance, msg) { + var f, obj = { + validatorPeriod: jspb.Message.getFieldWithDefault(msg, 1, 0), + fraction: 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.distribution.v1beta1.ValidatorSlashEvent} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorSlashEvent; + return proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvent} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvent} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.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.setValidatorPeriod(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFraction(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.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.ValidatorSlashEvent} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorPeriod(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getFraction(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint64 validator_period = 1; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.prototype.getValidatorPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvent} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.prototype.setValidatorPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string fraction = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.prototype.getFraction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvent} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.prototype.setFraction = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.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.distribution.v1beta1.ValidatorSlashEvents.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorSlashEvents} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.toObject = function(includeInstance, msg) { + var f, obj = { + validatorSlashEventsList: jspb.Message.toObjectList(msg.getValidatorSlashEventsList(), + proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.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.ValidatorSlashEvents} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorSlashEvents; + return proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvents} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvents} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.distribution.v1beta1.ValidatorSlashEvent; + reader.readMessage(value,proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.deserializeBinaryFromReader); + msg.addValidatorSlashEvents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.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.ValidatorSlashEvents} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorSlashEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.distribution.v1beta1.ValidatorSlashEvent.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ValidatorSlashEvent validator_slash_events = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.prototype.getValidatorSlashEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.distribution.v1beta1.ValidatorSlashEvent, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvents} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.prototype.setValidatorSlashEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvent=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvent} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.prototype.addValidatorSlashEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.distribution.v1beta1.ValidatorSlashEvent, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvents} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEvents.prototype.clearValidatorSlashEventsList = function() { + return this.setValidatorSlashEventsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.FeePool.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.distribution.v1beta1.FeePool.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.FeePool.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.FeePool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.FeePool.toObject = function(includeInstance, msg) { + var f, obj = { + communityPoolList: jspb.Message.toObjectList(msg.getCommunityPoolList(), + 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.cosmos.distribution.v1beta1.FeePool} + */ +proto.cosmos.distribution.v1beta1.FeePool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.FeePool; + return proto.cosmos.distribution.v1beta1.FeePool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.FeePool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.FeePool} + */ +proto.cosmos.distribution.v1beta1.FeePool.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.addCommunityPool(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.FeePool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.FeePool.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.FeePool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.FeePool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCommunityPoolList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin community_pool = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.FeePool.prototype.getCommunityPoolList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.FeePool} returns this +*/ +proto.cosmos.distribution.v1beta1.FeePool.prototype.setCommunityPoolList = 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.cosmos.distribution.v1beta1.FeePool.prototype.addCommunityPool = 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.cosmos.distribution.v1beta1.FeePool} returns this + */ +proto.cosmos.distribution.v1beta1.FeePool.prototype.clearCommunityPoolList = function() { + return this.setCommunityPoolList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.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.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.CommunityPoolSpendProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + recipient: jspb.Message.getFieldWithDefault(msg, 3, ""), + 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.CommunityPoolSpendProposal} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal; + return proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.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.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRecipient(value); + break; + case 4: + 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.CommunityPoolSpendProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.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.CommunityPoolSpendProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRecipient(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAmountList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string recipient = 3; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.getRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.setRecipient = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 4; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal} returns this +*/ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.setAmountList = 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.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.prototype.addAmount = 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.cosmos.distribution.v1beta1.CommunityPoolSpendProposal} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposal.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.DelegatorStartingInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.DelegatorStartingInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.toObject = function(includeInstance, msg) { + var f, obj = { + previousPeriod: jspb.Message.getFieldWithDefault(msg, 1, 0), + stake: jspb.Message.getFieldWithDefault(msg, 2, ""), + height: 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.distribution.v1beta1.DelegatorStartingInfo} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.DelegatorStartingInfo; + return proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfo} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.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.setPreviousPeriod(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setStake(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.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.DelegatorStartingInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPreviousPeriod(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getStake(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional uint64 previous_period = 1; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.prototype.getPreviousPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfo} returns this + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.prototype.setPreviousPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string stake = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.prototype.getStake = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfo} returns this + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.prototype.setStake = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 height = 3; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfo} returns this + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfo.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.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.distribution.v1beta1.DelegationDelegatorReward.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.DelegationDelegatorReward} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + rewardList: jspb.Message.toObjectList(msg.getRewardList(), + 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.cosmos.distribution.v1beta1.DelegationDelegatorReward} + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.DelegationDelegatorReward; + return proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.DelegationDelegatorReward} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.DelegationDelegatorReward} + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.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 = new cosmos_base_v1beta1_coin_pb.DecCoin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.DecCoin.deserializeBinaryFromReader); + msg.addReward(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.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.DelegationDelegatorReward} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRewardList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.DelegationDelegatorReward} returns this + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin reward = 2; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.prototype.getRewardList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.DelegationDelegatorReward} returns this +*/ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.prototype.setRewardList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.DecCoin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.DecCoin} + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.prototype.addReward = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.DecCoin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.DelegationDelegatorReward} returns this + */ +proto.cosmos.distribution.v1beta1.DelegationDelegatorReward.prototype.clearRewardList = function() { + return this.setRewardList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.CommunityPoolSpendProposalWithDeposit.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.CommunityPoolSpendProposalWithDeposit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + recipient: jspb.Message.getFieldWithDefault(msg, 3, ""), + amount: jspb.Message.getFieldWithDefault(msg, 4, ""), + deposit: 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.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit; + return proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.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.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setRecipient(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setAmount(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDeposit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.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.CommunityPoolSpendProposalWithDeposit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getRecipient(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAmount(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getDeposit(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string recipient = 3; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.getRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.setRecipient = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string amount = 4; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.getAmount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.setAmount = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string deposit = 5; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.getDeposit = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit} returns this + */ +proto.cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit.prototype.setDeposit = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +goog.object.extend(exports, proto.cosmos.distribution.v1beta1); diff --git a/src/types/proto-types/cosmos/distribution/v1beta1/genesis_pb.js b/src/types/proto-types/cosmos/distribution/v1beta1/genesis_pb.js new file mode 100644 index 00000000..062008a8 --- /dev/null +++ b/src/types/proto-types/cosmos/distribution/v1beta1/genesis_pb.js @@ -0,0 +1,2182 @@ +// source: cosmos/distribution/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var cosmos_distribution_v1beta1_distribution_pb = require('../../../cosmos/distribution/v1beta1/distribution_pb.js'); +goog.object.extend(proto, cosmos_distribution_v1beta1_distribution_pb); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.GenesisState', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord', 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.distribution.v1beta1.DelegatorWithdrawInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.displayName = 'proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorOutstandingRewardsRecord = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorAccumulatedCommissionRecord = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorHistoricalRewardsRecord = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorCurrentRewardsRecord = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.DelegatorStartingInfoRecord = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.displayName = 'proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorSlashEventRecord = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.displayName = 'proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.GenesisState.displayName = 'proto.cosmos.distribution.v1beta1.GenesisState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.DelegatorWithdrawInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.DelegatorWithdrawInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + withdrawAddress: 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.distribution.v1beta1.DelegatorWithdrawInfo} + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo; + return proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo} + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.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.setDelegatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setWithdrawAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.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.DelegatorWithdrawInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getWithdrawAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo} returns this + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string withdraw_address = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.prototype.getWithdrawAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo} returns this + */ +proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.prototype.setWithdrawAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.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.distribution.v1beta1.ValidatorOutstandingRewardsRecord.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorOutstandingRewardsRecord} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + outstandingRewardsList: jspb.Message.toObjectList(msg.getOutstandingRewardsList(), + 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.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord; + return proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.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 = new cosmos_base_v1beta1_coin_pb.DecCoin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.DecCoin.deserializeBinaryFromReader); + msg.addOutstandingRewards(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.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.ValidatorOutstandingRewardsRecord} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOutstandingRewardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.prototype.getOutstandingRewardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.prototype.setOutstandingRewardsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.DecCoin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.DecCoin} + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.prototype.addOutstandingRewards = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.DecCoin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.prototype.clearOutstandingRewardsList = function() { + return this.setOutstandingRewardsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.ValidatorAccumulatedCommissionRecord.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorAccumulatedCommissionRecord} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + accumulated: (f = msg.getAccumulated()) && cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission.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.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord; + return proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.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 = new cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission.deserializeBinaryFromReader); + msg.setAccumulated(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.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.ValidatorAccumulatedCommissionRecord} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAccumulated(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional ValidatorAccumulatedCommission accumulated = 2; + * @return {?proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.prototype.getAccumulated = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission, 2)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.prototype.setAccumulated = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.prototype.clearAccumulated = function() { + return this.setAccumulated(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.prototype.hasAccumulated = 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.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorHistoricalRewardsRecord} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + period: jspb.Message.getFieldWithDefault(msg, 2, 0), + rewards: (f = msg.getRewards()) && cosmos_distribution_v1beta1_distribution_pb.ValidatorHistoricalRewards.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.distribution.v1beta1.ValidatorHistoricalRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord; + return proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.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 {number} */ (reader.readUint64()); + msg.setPeriod(value); + break; + case 3: + var value = new cosmos_distribution_v1beta1_distribution_pb.ValidatorHistoricalRewards; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.ValidatorHistoricalRewards.deserializeBinaryFromReader); + msg.setRewards(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.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.ValidatorHistoricalRewardsRecord} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPeriod(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getRewards(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_distribution_v1beta1_distribution_pb.ValidatorHistoricalRewards.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 period = 2; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.getPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.setPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional ValidatorHistoricalRewards rewards = 3; + * @return {?proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.getRewards = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.ValidatorHistoricalRewards, 3)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewards|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.setRewards = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.clearRewards = function() { + return this.setRewards(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.prototype.hasRewards = 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.distribution.v1beta1.ValidatorCurrentRewardsRecord.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorCurrentRewardsRecord} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + rewards: (f = msg.getRewards()) && cosmos_distribution_v1beta1_distribution_pb.ValidatorCurrentRewards.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.distribution.v1beta1.ValidatorCurrentRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord; + return proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.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 = new cosmos_distribution_v1beta1_distribution_pb.ValidatorCurrentRewards; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.ValidatorCurrentRewards.deserializeBinaryFromReader); + msg.setRewards(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.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.ValidatorCurrentRewardsRecord} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRewards(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_distribution_v1beta1_distribution_pb.ValidatorCurrentRewards.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional ValidatorCurrentRewards rewards = 2; + * @return {?proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.prototype.getRewards = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.ValidatorCurrentRewards, 2)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.ValidatorCurrentRewards|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.prototype.setRewards = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.prototype.clearRewards = function() { + return this.setRewards(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.prototype.hasRewards = 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.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.DelegatorStartingInfoRecord} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + startingInfo: (f = msg.getStartingInfo()) && cosmos_distribution_v1beta1_distribution_pb.DelegatorStartingInfo.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.distribution.v1beta1.DelegatorStartingInfoRecord} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord; + return proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.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.setDelegatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + case 3: + var value = new cosmos_distribution_v1beta1_distribution_pb.DelegatorStartingInfo; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.DelegatorStartingInfo.deserializeBinaryFromReader); + msg.setStartingInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.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.DelegatorStartingInfoRecord} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getStartingInfo(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_distribution_v1beta1_distribution_pb.DelegatorStartingInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} returns this + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} returns this + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional DelegatorStartingInfo starting_info = 3; + * @return {?proto.cosmos.distribution.v1beta1.DelegatorStartingInfo} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.getStartingInfo = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.DelegatorStartingInfo} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.DelegatorStartingInfo, 3)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.DelegatorStartingInfo|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} returns this +*/ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.setStartingInfo = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} returns this + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.clearStartingInfo = function() { + return this.setStartingInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.prototype.hasStartingInfo = 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.distribution.v1beta1.ValidatorSlashEventRecord.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorSlashEventRecord} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + period: jspb.Message.getFieldWithDefault(msg, 3, 0), + validatorSlashEvent: (f = msg.getValidatorSlashEvent()) && cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent.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.distribution.v1beta1.ValidatorSlashEventRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord; + return proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.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 {number} */ (reader.readUint64()); + msg.setHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPeriod(value); + break; + case 4: + var value = new cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent.deserializeBinaryFromReader); + msg.setValidatorSlashEvent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.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.ValidatorSlashEventRecord} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getPeriod(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getValidatorSlashEvent(); + if (f != null) { + writer.writeMessage( + 4, + f, + cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 height = 2; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 period = 3; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.getPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.setPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional ValidatorSlashEvent validator_slash_event = 4; + * @return {?proto.cosmos.distribution.v1beta1.ValidatorSlashEvent} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.getValidatorSlashEvent = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.ValidatorSlashEvent} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent, 4)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.ValidatorSlashEvent|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord} returns this +*/ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.setValidatorSlashEvent = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord} returns this + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.clearValidatorSlashEvent = function() { + return this.setValidatorSlashEvent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.prototype.hasValidatorSlashEvent = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.GenesisState.repeatedFields_ = [3,5,6,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.cosmos.distribution.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.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.cosmos.distribution.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_distribution_v1beta1_distribution_pb.Params.toObject(includeInstance, f), + feePool: (f = msg.getFeePool()) && cosmos_distribution_v1beta1_distribution_pb.FeePool.toObject(includeInstance, f), + delegatorWithdrawInfosList: jspb.Message.toObjectList(msg.getDelegatorWithdrawInfosList(), + proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.toObject, includeInstance), + previousProposer: jspb.Message.getFieldWithDefault(msg, 4, ""), + outstandingRewardsList: jspb.Message.toObjectList(msg.getOutstandingRewardsList(), + proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.toObject, includeInstance), + validatorAccumulatedCommissionsList: jspb.Message.toObjectList(msg.getValidatorAccumulatedCommissionsList(), + proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.toObject, includeInstance), + validatorHistoricalRewardsList: jspb.Message.toObjectList(msg.getValidatorHistoricalRewardsList(), + proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.toObject, includeInstance), + validatorCurrentRewardsList: jspb.Message.toObjectList(msg.getValidatorCurrentRewardsList(), + proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.toObject, includeInstance), + delegatorStartingInfosList: jspb.Message.toObjectList(msg.getDelegatorStartingInfosList(), + proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.toObject, includeInstance), + validatorSlashEventsList: jspb.Message.toObjectList(msg.getValidatorSlashEventsList(), + proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.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.GenesisState} + */ +proto.cosmos.distribution.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.GenesisState; + return proto.cosmos.distribution.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} + */ +proto.cosmos.distribution.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_distribution_v1beta1_distribution_pb.Params; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new cosmos_distribution_v1beta1_distribution_pb.FeePool; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.FeePool.deserializeBinaryFromReader); + msg.setFeePool(value); + break; + case 3: + var value = new proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo; + reader.readMessage(value,proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.deserializeBinaryFromReader); + msg.addDelegatorWithdrawInfos(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPreviousProposer(value); + break; + case 5: + var value = new proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord; + reader.readMessage(value,proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.deserializeBinaryFromReader); + msg.addOutstandingRewards(value); + break; + case 6: + var value = new proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord; + reader.readMessage(value,proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.deserializeBinaryFromReader); + msg.addValidatorAccumulatedCommissions(value); + break; + case 7: + var value = new proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord; + reader.readMessage(value,proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.deserializeBinaryFromReader); + msg.addValidatorHistoricalRewards(value); + break; + case 8: + var value = new proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord; + reader.readMessage(value,proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.deserializeBinaryFromReader); + msg.addValidatorCurrentRewards(value); + break; + case 9: + var value = new proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord; + reader.readMessage(value,proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.deserializeBinaryFromReader); + msg.addDelegatorStartingInfos(value); + break; + case 10: + var value = new proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord; + reader.readMessage(value,proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.deserializeBinaryFromReader); + msg.addValidatorSlashEvents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.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.cosmos.distribution.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_distribution_v1beta1_distribution_pb.Params.serializeBinaryToWriter + ); + } + f = message.getFeePool(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_distribution_v1beta1_distribution_pb.FeePool.serializeBinaryToWriter + ); + } + f = message.getDelegatorWithdrawInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo.serializeBinaryToWriter + ); + } + f = message.getPreviousProposer(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getOutstandingRewardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord.serializeBinaryToWriter + ); + } + f = message.getValidatorAccumulatedCommissionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord.serializeBinaryToWriter + ); + } + f = message.getValidatorHistoricalRewardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord.serializeBinaryToWriter + ); + } + f = message.getValidatorCurrentRewardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord.serializeBinaryToWriter + ); + } + f = message.getDelegatorStartingInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord.serializeBinaryToWriter + ); + } + f = message.getValidatorSlashEventsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 10, + f, + proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.distribution.v1beta1.Params} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.Params|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional FeePool fee_pool = 2; + * @return {?proto.cosmos.distribution.v1beta1.FeePool} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getFeePool = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.FeePool} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.FeePool, 2)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.FeePool|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setFeePool = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearFeePool = function() { + return this.setFeePool(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.hasFeePool = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getDelegatorWithdrawInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setDelegatorWithdrawInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.addDelegatorWithdrawInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.distribution.v1beta1.DelegatorWithdrawInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearDelegatorWithdrawInfosList = function() { + return this.setDelegatorWithdrawInfosList([]); +}; + + +/** + * optional string previous_proposer = 4; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getPreviousProposer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setPreviousProposer = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getOutstandingRewardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setOutstandingRewardsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.addOutstandingRewards = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewardsRecord, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearOutstandingRewardsList = function() { + return this.setOutstandingRewardsList([]); +}; + + +/** + * repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getValidatorAccumulatedCommissionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setValidatorAccumulatedCommissionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.addValidatorAccumulatedCommissions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommissionRecord, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearValidatorAccumulatedCommissionsList = function() { + return this.setValidatorAccumulatedCommissionsList([]); +}; + + +/** + * repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getValidatorHistoricalRewardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setValidatorHistoricalRewardsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.addValidatorHistoricalRewards = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.cosmos.distribution.v1beta1.ValidatorHistoricalRewardsRecord, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearValidatorHistoricalRewardsList = function() { + return this.setValidatorHistoricalRewardsList([]); +}; + + +/** + * repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getValidatorCurrentRewardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setValidatorCurrentRewardsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.addValidatorCurrentRewards = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.cosmos.distribution.v1beta1.ValidatorCurrentRewardsRecord, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearValidatorCurrentRewardsList = function() { + return this.setValidatorCurrentRewardsList([]); +}; + + +/** + * repeated DelegatorStartingInfoRecord delegator_starting_infos = 9; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getDelegatorStartingInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setDelegatorStartingInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.addDelegatorStartingInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.cosmos.distribution.v1beta1.DelegatorStartingInfoRecord, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearDelegatorStartingInfosList = function() { + return this.setDelegatorStartingInfosList([]); +}; + + +/** + * repeated ValidatorSlashEventRecord validator_slash_events = 10; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.getValidatorSlashEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord, 10)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this +*/ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.setValidatorSlashEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 10, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord} + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.addValidatorSlashEvents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.cosmos.distribution.v1beta1.ValidatorSlashEventRecord, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.GenesisState} returns this + */ +proto.cosmos.distribution.v1beta1.GenesisState.prototype.clearValidatorSlashEventsList = function() { + return this.setValidatorSlashEventsList([]); +}; + + +goog.object.extend(exports, proto.cosmos.distribution.v1beta1); diff --git a/src/types/proto-types/cosmos/distribution/v1beta1/query_grpc_web_pb.js b/src/types/proto-types/cosmos/distribution/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..216343c8 --- /dev/null +++ b/src/types/proto-types/cosmos/distribution/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,806 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.distribution.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_distribution_v1beta1_distribution_pb = require('../../../cosmos/distribution/v1beta1/distribution_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.distribution = {}; +proto.cosmos.distribution.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.distribution.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryParamsRequest, + * !proto.cosmos.distribution.v1beta1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/Params', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryParamsRequest, + proto.cosmos.distribution.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryParamsRequest, + * !proto.cosmos.distribution.v1beta1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest, + * !proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse>} + */ +const methodDescriptor_Query_ValidatorOutstandingRewards = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest, + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest, + * !proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse>} + */ +const methodInfo_Query_ValidatorOutstandingRewards = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.validatorOutstandingRewards = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards', + request, + metadata || {}, + methodDescriptor_Query_ValidatorOutstandingRewards, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.validatorOutstandingRewards = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards', + request, + metadata || {}, + methodDescriptor_Query_ValidatorOutstandingRewards); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest, + * !proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse>} + */ +const methodDescriptor_Query_ValidatorCommission = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/ValidatorCommission', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest, + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest, + * !proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse>} + */ +const methodInfo_Query_ValidatorCommission = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.validatorCommission = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/ValidatorCommission', + request, + metadata || {}, + methodDescriptor_Query_ValidatorCommission, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.validatorCommission = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/ValidatorCommission', + request, + metadata || {}, + methodDescriptor_Query_ValidatorCommission); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest, + * !proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse>} + */ +const methodDescriptor_Query_ValidatorSlashes = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/ValidatorSlashes', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest, + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest, + * !proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse>} + */ +const methodInfo_Query_ValidatorSlashes = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.validatorSlashes = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/ValidatorSlashes', + request, + metadata || {}, + methodDescriptor_Query_ValidatorSlashes, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.validatorSlashes = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/ValidatorSlashes', + request, + metadata || {}, + methodDescriptor_Query_ValidatorSlashes); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest, + * !proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse>} + */ +const methodDescriptor_Query_DelegationRewards = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/DelegationRewards', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest, + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest, + * !proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse>} + */ +const methodInfo_Query_DelegationRewards = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.delegationRewards = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/DelegationRewards', + request, + metadata || {}, + methodDescriptor_Query_DelegationRewards, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.delegationRewards = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/DelegationRewards', + request, + metadata || {}, + methodDescriptor_Query_DelegationRewards); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest, + * !proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse>} + */ +const methodDescriptor_Query_DelegationTotalRewards = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/DelegationTotalRewards', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest, + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest, + * !proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse>} + */ +const methodInfo_Query_DelegationTotalRewards = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.delegationTotalRewards = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/DelegationTotalRewards', + request, + metadata || {}, + methodDescriptor_Query_DelegationTotalRewards, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.delegationTotalRewards = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/DelegationTotalRewards', + request, + metadata || {}, + methodDescriptor_Query_DelegationTotalRewards); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest, + * !proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse>} + */ +const methodDescriptor_Query_DelegatorValidators = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/DelegatorValidators', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest, + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest, + * !proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse>} + */ +const methodInfo_Query_DelegatorValidators = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.delegatorValidators = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/DelegatorValidators', + request, + metadata || {}, + methodDescriptor_Query_DelegatorValidators, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.delegatorValidators = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/DelegatorValidators', + request, + metadata || {}, + methodDescriptor_Query_DelegatorValidators); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest, + * !proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse>} + */ +const methodDescriptor_Query_DelegatorWithdrawAddress = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest, + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest, + * !proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse>} + */ +const methodInfo_Query_DelegatorWithdrawAddress = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.delegatorWithdrawAddress = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress', + request, + metadata || {}, + methodDescriptor_Query_DelegatorWithdrawAddress, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.delegatorWithdrawAddress = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress', + request, + metadata || {}, + methodDescriptor_Query_DelegatorWithdrawAddress); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest, + * !proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse>} + */ +const methodDescriptor_Query_CommunityPool = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Query/CommunityPool', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest, + proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest, + * !proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse>} + */ +const methodInfo_Query_CommunityPool = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.QueryClient.prototype.communityPool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/CommunityPool', + request, + metadata || {}, + methodDescriptor_Query_CommunityPool, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.QueryPromiseClient.prototype.communityPool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Query/CommunityPool', + request, + metadata || {}, + methodDescriptor_Query_CommunityPool); +}; + + +module.exports = proto.cosmos.distribution.v1beta1; + diff --git a/src/types/proto-types/cosmos/distribution/v1beta1/query_pb.js b/src/types/proto-types/cosmos/distribution/v1beta1/query_pb.js new file mode 100644 index 00000000..bac37555 --- /dev/null +++ b/src/types/proto-types/cosmos/distribution/v1beta1/query_pb.js @@ -0,0 +1,3157 @@ +// source: cosmos/distribution/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_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_distribution_v1beta1_distribution_pb = require('../../../cosmos/distribution/v1beta1/distribution_pb.js'); +goog.object.extend(proto, cosmos_distribution_v1beta1_distribution_pb); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse', 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.distribution.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryParamsRequest.displayName = 'proto.cosmos.distribution.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.cosmos.distribution.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryParamsResponse.displayName = 'proto.cosmos.distribution.v1beta1.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.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.displayName = 'proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryValidatorOutstandingRewardsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.displayName = 'proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryValidatorCommissionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.displayName = 'proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryValidatorCommissionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.displayName = 'proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryValidatorSlashesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.displayName = 'proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryValidatorSlashesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.displayName = 'proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDelegationRewardsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.displayName = 'proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDelegationRewardsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.displayName = 'proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDelegationTotalRewardsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.displayName = 'proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDelegationTotalRewardsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.displayName = 'proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDelegatorValidatorsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.displayName = 'proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDelegatorValidatorsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.displayName = 'proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDelegatorWithdrawAddressRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.displayName = 'proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDelegatorWithdrawAddressResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.displayName = 'proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryCommunityPoolRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest.displayName = 'proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryCommunityPoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.displayName = 'proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.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.cosmos.distribution.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.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.cosmos.distribution.v1beta1.QueryParamsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryParamsRequest; + return proto.cosmos.distribution.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryParamsRequest} + */ +proto.cosmos.distribution.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.cosmos.distribution.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.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.cosmos.distribution.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.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.cosmos.distribution.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.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.cosmos.distribution.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_distribution_v1beta1_distribution_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.cosmos.distribution.v1beta1.QueryParamsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryParamsResponse; + return proto.cosmos.distribution.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryParamsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_distribution_v1beta1_distribution_pb.Params; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_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.cosmos.distribution.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.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.cosmos.distribution.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_distribution_v1beta1_distribution_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.distribution.v1beta1.Params} + */ +proto.cosmos.distribution.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.Params|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.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.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryValidatorOutstandingRewardsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.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.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest; + return proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.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.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.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.QueryValidatorOutstandingRewardsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.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.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsRequest.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.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryValidatorOutstandingRewardsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + rewards: (f = msg.getRewards()) && cosmos_distribution_v1beta1_distribution_pb.ValidatorOutstandingRewards.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.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse; + return proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_distribution_v1beta1_distribution_pb.ValidatorOutstandingRewards; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.ValidatorOutstandingRewards.deserializeBinaryFromReader); + msg.setRewards(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.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.QueryValidatorOutstandingRewardsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewards(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_distribution_v1beta1_distribution_pb.ValidatorOutstandingRewards.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ValidatorOutstandingRewards rewards = 1; + * @return {?proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.prototype.getRewards = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.ValidatorOutstandingRewards, 1)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.ValidatorOutstandingRewards|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.prototype.setRewards = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.prototype.clearRewards = function() { + return this.setRewards(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse.prototype.hasRewards = 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.distribution.v1beta1.QueryValidatorCommissionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryValidatorCommissionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.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.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest; + return proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.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.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.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.QueryValidatorCommissionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.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.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionRequest.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.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryValidatorCommissionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + commission: (f = msg.getCommission()) && cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission.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.distribution.v1beta1.QueryValidatorCommissionResponse} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse; + return proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission.deserializeBinaryFromReader); + msg.setCommission(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.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.QueryValidatorCommissionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCommission(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ValidatorAccumulatedCommission commission = 1; + * @return {?proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.prototype.getCommission = function() { + return /** @type{?proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission} */ ( + jspb.Message.getWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.ValidatorAccumulatedCommission, 1)); +}; + + +/** + * @param {?proto.cosmos.distribution.v1beta1.ValidatorAccumulatedCommission|undefined} value + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.prototype.setCommission = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.prototype.clearCommission = function() { + return this.setCommission(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorCommissionResponse.prototype.hasCommission = 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.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryValidatorSlashesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + startingHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + endingHeight: jspb.Message.getFieldWithDefault(msg, 3, 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.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest; + return proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.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 {number} */ (reader.readUint64()); + msg.setStartingHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setEndingHeight(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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.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.QueryValidatorSlashesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getStartingHeight(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getEndingHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 4, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string validator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 starting_height = 2; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.getStartingHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.setStartingHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 ending_height = 3; + * @return {number} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.getEndingHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.setEndingHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 4; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.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.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.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.distribution.v1beta1.QueryValidatorSlashesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryValidatorSlashesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + slashesList: jspb.Message.toObjectList(msg.getSlashesList(), + cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent.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.distribution.v1beta1.QueryValidatorSlashesResponse} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse; + return proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent.deserializeBinaryFromReader); + msg.addSlashes(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.distribution.v1beta1.QueryValidatorSlashesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.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.QueryValidatorSlashesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSlashesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ValidatorSlashEvent slashes = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.prototype.getSlashesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.ValidatorSlashEvent, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.prototype.setSlashesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvent=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.ValidatorSlashEvent} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.prototype.addSlashes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.distribution.v1beta1.ValidatorSlashEvent, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.prototype.clearSlashesList = function() { + return this.setSlashesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.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.distribution.v1beta1.QueryValidatorSlashesResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.distribution.v1beta1.QueryValidatorSlashesResponse.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.distribution.v1beta1.QueryDelegationRewardsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDelegationRewardsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: 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.distribution.v1beta1.QueryDelegationRewardsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest; + return proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.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.setDelegatorAddress(value); + break; + case 2: + 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.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.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.QueryDelegationRewardsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsRequest.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.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.distribution.v1beta1.QueryDelegationRewardsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDelegationRewardsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + rewardsList: jspb.Message.toObjectList(msg.getRewardsList(), + 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.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse; + return proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.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.addRewards(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.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.QueryDelegationRewardsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin rewards = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.prototype.getRewardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.prototype.setRewardsList = 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.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.prototype.addRewards = 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.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegationRewardsResponse.prototype.clearRewardsList = function() { + return this.setRewardsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.QueryDelegationTotalRewardsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDelegationTotalRewardsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: 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.distribution.v1beta1.QueryDelegationTotalRewardsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest; + return proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.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.setDelegatorAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.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.QueryDelegationTotalRewardsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsRequest.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.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.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDelegationTotalRewardsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + rewardsList: jspb.Message.toObjectList(msg.getRewardsList(), + cosmos_distribution_v1beta1_distribution_pb.DelegationDelegatorReward.toObject, includeInstance), + totalList: jspb.Message.toObjectList(msg.getTotalList(), + 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.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse; + return proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_distribution_v1beta1_distribution_pb.DelegationDelegatorReward; + reader.readMessage(value,cosmos_distribution_v1beta1_distribution_pb.DelegationDelegatorReward.deserializeBinaryFromReader); + msg.addRewards(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.DecCoin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.DecCoin.deserializeBinaryFromReader); + msg.addTotal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.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.QueryDelegationTotalRewardsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRewardsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_distribution_v1beta1_distribution_pb.DelegationDelegatorReward.serializeBinaryToWriter + ); + } + f = message.getTotalList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DelegationDelegatorReward rewards = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.getRewardsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_distribution_v1beta1_distribution_pb.DelegationDelegatorReward, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.setRewardsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.DelegationDelegatorReward=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.DelegationDelegatorReward} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.addRewards = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.distribution.v1beta1.DelegationDelegatorReward, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.clearRewardsList = function() { + return this.setRewardsList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin total = 2; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.getTotalList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.setTotalList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.DecCoin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.DecCoin} + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.addTotal = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.DecCoin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse.prototype.clearTotalList = function() { + return this.setTotalList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.QueryDelegatorValidatorsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDelegatorValidatorsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: 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.distribution.v1beta1.QueryDelegatorValidatorsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest; + return proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.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.setDelegatorAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.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.QueryDelegatorValidatorsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsRequest.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.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.distribution.v1beta1.QueryDelegatorValidatorsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDelegatorValidatorsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + validatorsList: (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.distribution.v1beta1.QueryDelegatorValidatorsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse; + return proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.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.addValidators(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.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.QueryDelegatorValidatorsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string validators = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.prototype.getValidatorsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.prototype.setValidatorsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.prototype.addValidators = 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.distribution.v1beta1.QueryDelegatorValidatorsResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse.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.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDelegatorWithdrawAddressRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: 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.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest; + return proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.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.setDelegatorAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.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.QueryDelegatorWithdrawAddressRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressRequest.prototype.setDelegatorAddress = 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.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDelegatorWithdrawAddressResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.toObject = function(includeInstance, msg) { + var f, obj = { + withdrawAddress: 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.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse; + return proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.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.setWithdrawAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.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.QueryDelegatorWithdrawAddressResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWithdrawAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string withdraw_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.prototype.getWithdrawAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse.prototype.setWithdrawAddress = 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.distribution.v1beta1.QueryCommunityPoolRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryCommunityPoolRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest.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.QueryCommunityPoolRequest} + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest; + return proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest} + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest.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.QueryCommunityPoolRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest.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.QueryCommunityPoolRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.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.distribution.v1beta1.QueryCommunityPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryCommunityPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.toObject = function(includeInstance, msg) { + var f, obj = { + poolList: jspb.Message.toObjectList(msg.getPoolList(), + 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.cosmos.distribution.v1beta1.QueryCommunityPoolResponse} + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse; + return proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse} + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.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.addPool(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.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.QueryCommunityPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPoolList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.DecCoin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.DecCoin pool = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.prototype.getPoolList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.DecCoin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse} returns this +*/ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.prototype.setPoolList = 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.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.prototype.addPool = 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.cosmos.distribution.v1beta1.QueryCommunityPoolResponse} returns this + */ +proto.cosmos.distribution.v1beta1.QueryCommunityPoolResponse.prototype.clearPoolList = function() { + return this.setPoolList([]); +}; + + +goog.object.extend(exports, proto.cosmos.distribution.v1beta1); diff --git a/src/types/proto-types/cosmos/distribution/v1beta1/tx_grpc_web_pb.js b/src/types/proto-types/cosmos/distribution/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..26909c33 --- /dev/null +++ b/src/types/proto-types/cosmos/distribution/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,400 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.distribution.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.distribution = {}; +proto.cosmos.distribution.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.distribution.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.distribution.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress, + * !proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse>} + */ +const methodDescriptor_Msg_SetWithdrawAddress = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress, + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress, + * !proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse>} + */ +const methodInfo_Msg_SetWithdrawAddress = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.MsgClient.prototype.setWithdrawAddress = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress', + request, + metadata || {}, + methodDescriptor_Msg_SetWithdrawAddress, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.MsgPromiseClient.prototype.setWithdrawAddress = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Msg/SetWithdrawAddress', + request, + metadata || {}, + methodDescriptor_Msg_SetWithdrawAddress); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward, + * !proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse>} + */ +const methodDescriptor_Msg_WithdrawDelegatorReward = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward, + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward, + * !proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse>} + */ +const methodInfo_Msg_WithdrawDelegatorReward = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.MsgClient.prototype.withdrawDelegatorReward = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward', + request, + metadata || {}, + methodDescriptor_Msg_WithdrawDelegatorReward, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.MsgPromiseClient.prototype.withdrawDelegatorReward = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward', + request, + metadata || {}, + methodDescriptor_Msg_WithdrawDelegatorReward); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission, + * !proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse>} + */ +const methodDescriptor_Msg_WithdrawValidatorCommission = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission, + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission, + * !proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse>} + */ +const methodInfo_Msg_WithdrawValidatorCommission = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.MsgClient.prototype.withdrawValidatorCommission = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission', + request, + metadata || {}, + methodDescriptor_Msg_WithdrawValidatorCommission, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.MsgPromiseClient.prototype.withdrawValidatorCommission = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission', + request, + metadata || {}, + methodDescriptor_Msg_WithdrawValidatorCommission); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.distribution.v1beta1.MsgFundCommunityPool, + * !proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse>} + */ +const methodDescriptor_Msg_FundCommunityPool = new grpc.web.MethodDescriptor( + '/cosmos.distribution.v1beta1.Msg/FundCommunityPool', + grpc.web.MethodType.UNARY, + proto.cosmos.distribution.v1beta1.MsgFundCommunityPool, + proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.distribution.v1beta1.MsgFundCommunityPool, + * !proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse>} + */ +const methodInfo_Msg_FundCommunityPool = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse, + /** + * @param {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPool} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.distribution.v1beta1.MsgClient.prototype.fundCommunityPool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Msg/FundCommunityPool', + request, + metadata || {}, + methodDescriptor_Msg_FundCommunityPool, + callback); +}; + + +/** + * @param {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPool} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.distribution.v1beta1.MsgPromiseClient.prototype.fundCommunityPool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.distribution.v1beta1.Msg/FundCommunityPool', + request, + metadata || {}, + methodDescriptor_Msg_FundCommunityPool); +}; + + +module.exports = proto.cosmos.distribution.v1beta1; + diff --git a/src/types/proto-types/cosmos/distribution/v1beta1/tx_pb.js b/src/types/proto-types/cosmos/distribution/v1beta1/tx_pb.js new file mode 100644 index 00000000..c59ec285 --- /dev/null +++ b/src/types/proto-types/cosmos/distribution/v1beta1/tx_pb.js @@ -0,0 +1,1239 @@ +// source: cosmos/distribution/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +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); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission', null, global); +goog.exportSymbol('proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse', 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.distribution.v1beta1.MsgSetWithdrawAddress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.displayName = 'proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgSetWithdrawAddressResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.displayName = 'proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgWithdrawDelegatorReward = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.displayName = 'proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgWithdrawDelegatorRewardResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.displayName = 'proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgWithdrawValidatorCommission = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.displayName = 'proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgWithdrawValidatorCommissionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.displayName = 'proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgFundCommunityPool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgFundCommunityPool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.displayName = 'proto.cosmos.distribution.v1beta1.MsgFundCommunityPool'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgFundCommunityPoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.displayName = 'proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.MsgSetWithdrawAddress.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgSetWithdrawAddress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + withdrawAddress: 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.distribution.v1beta1.MsgSetWithdrawAddress} + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress; + return proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress} + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.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.setDelegatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setWithdrawAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.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.MsgSetWithdrawAddress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getWithdrawAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress} returns this + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string withdraw_address = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.prototype.getWithdrawAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress} returns this + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddress.prototype.setWithdrawAddress = 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.distribution.v1beta1.MsgSetWithdrawAddressResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgSetWithdrawAddressResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.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.MsgSetWithdrawAddressResponse} + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse; + return proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse} + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.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.MsgSetWithdrawAddressResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.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.MsgSetWithdrawAddressResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse.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.distribution.v1beta1.MsgWithdrawDelegatorReward.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgWithdrawDelegatorReward} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: 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.distribution.v1beta1.MsgWithdrawDelegatorReward} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward; + return proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.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.setDelegatorAddress(value); + break; + case 2: + 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.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.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.MsgWithdrawDelegatorReward} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} returns this + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward} returns this + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward.prototype.setValidatorAddress = 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.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgWithdrawDelegatorRewardResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.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.MsgWithdrawDelegatorRewardResponse} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse; + return proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.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.MsgWithdrawDelegatorRewardResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.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.MsgWithdrawDelegatorRewardResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse.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.distribution.v1beta1.MsgWithdrawValidatorCommission.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgWithdrawValidatorCommission} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.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.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission; + return proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.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.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.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.MsgWithdrawValidatorCommission} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.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.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission} returns this + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission.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.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgWithdrawValidatorCommissionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.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.MsgWithdrawValidatorCommissionResponse} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse; + return proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse} + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.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.MsgWithdrawValidatorCommissionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.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.MsgWithdrawValidatorCommissionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.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.distribution.v1beta1.MsgFundCommunityPool.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgFundCommunityPool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.toObject = function(includeInstance, msg) { + var f, obj = { + amountList: jspb.Message.toObjectList(msg.getAmountList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + 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.cosmos.distribution.v1beta1.MsgFundCommunityPool} + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgFundCommunityPool; + return proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPool} + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.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.addAmount(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.cosmos.distribution.v1beta1.MsgFundCommunityPool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.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.MsgFundCommunityPool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmountList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getDepositor(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 1; + * @return {!Array} + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPool} returns this +*/ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.prototype.setAmountList = 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.cosmos.distribution.v1beta1.MsgFundCommunityPool.prototype.addAmount = 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.cosmos.distribution.v1beta1.MsgFundCommunityPool} returns this + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + +/** + * optional string depositor = 2; + * @return {string} + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.prototype.getDepositor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPool} returns this + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPool.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.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgFundCommunityPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.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.MsgFundCommunityPoolResponse} + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse; + return proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse} + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.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.MsgFundCommunityPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.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.MsgFundCommunityPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cosmos.distribution.v1beta1); diff --git a/src/types/proto-types/cosmos/evidence/v1beta1/evidence_pb.js b/src/types/proto-types/cosmos/evidence/v1beta1/evidence_pb.js new file mode 100644 index 00000000..e9f58409 --- /dev/null +++ b/src/types/proto-types/cosmos/evidence/v1beta1/evidence_pb.js @@ -0,0 +1,282 @@ +// source: cosmos/evidence/v1beta1/evidence.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.cosmos.evidence.v1beta1.Equivocation', 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.evidence.v1beta1.Equivocation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.evidence.v1beta1.Equivocation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.evidence.v1beta1.Equivocation.displayName = 'proto.cosmos.evidence.v1beta1.Equivocation'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.evidence.v1beta1.Equivocation.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.evidence.v1beta1.Equivocation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.evidence.v1beta1.Equivocation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.Equivocation.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + power: jspb.Message.getFieldWithDefault(msg, 3, 0), + consensusAddress: 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.cosmos.evidence.v1beta1.Equivocation} + */ +proto.cosmos.evidence.v1beta1.Equivocation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.evidence.v1beta1.Equivocation; + return proto.cosmos.evidence.v1beta1.Equivocation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.evidence.v1beta1.Equivocation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.evidence.v1beta1.Equivocation} + */ +proto.cosmos.evidence.v1beta1.Equivocation.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 google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPower(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setConsensusAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.evidence.v1beta1.Equivocation.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.evidence.v1beta1.Equivocation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.Equivocation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getConsensusAddress(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.evidence.v1beta1.Equivocation} returns this + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.getTime = 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.evidence.v1beta1.Equivocation} returns this +*/ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.evidence.v1beta1.Equivocation} returns this + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.hasTime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 power = 3; + * @return {number} + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.evidence.v1beta1.Equivocation} returns this + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.setPower = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string consensus_address = 4; + * @return {string} + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.getConsensusAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.evidence.v1beta1.Equivocation} returns this + */ +proto.cosmos.evidence.v1beta1.Equivocation.prototype.setConsensusAddress = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +goog.object.extend(exports, proto.cosmos.evidence.v1beta1); diff --git a/src/types/proto-types/cosmos/evidence/v1beta1/genesis_pb.js b/src/types/proto-types/cosmos/evidence/v1beta1/genesis_pb.js new file mode 100644 index 00000000..b4ec69cc --- /dev/null +++ b/src/types/proto-types/cosmos/evidence/v1beta1/genesis_pb.js @@ -0,0 +1,199 @@ +// source: cosmos/evidence/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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.evidence.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.cosmos.evidence.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.evidence.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.evidence.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.evidence.v1beta1.GenesisState.displayName = 'proto.cosmos.evidence.v1beta1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.evidence.v1beta1.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.cosmos.evidence.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.evidence.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.cosmos.evidence.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + evidenceList: jspb.Message.toObjectList(msg.getEvidenceList(), + 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.cosmos.evidence.v1beta1.GenesisState} + */ +proto.cosmos.evidence.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.evidence.v1beta1.GenesisState; + return proto.cosmos.evidence.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.evidence.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.evidence.v1beta1.GenesisState} + */ +proto.cosmos.evidence.v1beta1.GenesisState.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.addEvidence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.evidence.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.evidence.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.cosmos.evidence.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEvidenceList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated google.protobuf.Any evidence = 1; + * @return {!Array} + */ +proto.cosmos.evidence.v1beta1.GenesisState.prototype.getEvidenceList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.evidence.v1beta1.GenesisState} returns this +*/ +proto.cosmos.evidence.v1beta1.GenesisState.prototype.setEvidenceList = 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.cosmos.evidence.v1beta1.GenesisState.prototype.addEvidence = 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.cosmos.evidence.v1beta1.GenesisState} returns this + */ +proto.cosmos.evidence.v1beta1.GenesisState.prototype.clearEvidenceList = function() { + return this.setEvidenceList([]); +}; + + +goog.object.extend(exports, proto.cosmos.evidence.v1beta1); diff --git a/src/types/proto-types/cosmos/evidence/v1beta1/query_grpc_web_pb.js b/src/types/proto-types/cosmos/evidence/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..c50f9f50 --- /dev/null +++ b/src/types/proto-types/cosmos/evidence/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,244 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.evidence.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.evidence = {}; +proto.cosmos.evidence.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.evidence.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.evidence.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.evidence.v1beta1.QueryEvidenceRequest, + * !proto.cosmos.evidence.v1beta1.QueryEvidenceResponse>} + */ +const methodDescriptor_Query_Evidence = new grpc.web.MethodDescriptor( + '/cosmos.evidence.v1beta1.Query/Evidence', + grpc.web.MethodType.UNARY, + proto.cosmos.evidence.v1beta1.QueryEvidenceRequest, + proto.cosmos.evidence.v1beta1.QueryEvidenceResponse, + /** + * @param {!proto.cosmos.evidence.v1beta1.QueryEvidenceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.evidence.v1beta1.QueryEvidenceRequest, + * !proto.cosmos.evidence.v1beta1.QueryEvidenceResponse>} + */ +const methodInfo_Query_Evidence = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.evidence.v1beta1.QueryEvidenceResponse, + /** + * @param {!proto.cosmos.evidence.v1beta1.QueryEvidenceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.evidence.v1beta1.QueryEvidenceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.evidence.v1beta1.QueryEvidenceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.evidence.v1beta1.QueryClient.prototype.evidence = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.evidence.v1beta1.Query/Evidence', + request, + metadata || {}, + methodDescriptor_Query_Evidence, + callback); +}; + + +/** + * @param {!proto.cosmos.evidence.v1beta1.QueryEvidenceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.evidence.v1beta1.QueryPromiseClient.prototype.evidence = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.evidence.v1beta1.Query/Evidence', + request, + metadata || {}, + methodDescriptor_Query_Evidence); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest, + * !proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse>} + */ +const methodDescriptor_Query_AllEvidence = new grpc.web.MethodDescriptor( + '/cosmos.evidence.v1beta1.Query/AllEvidence', + grpc.web.MethodType.UNARY, + proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest, + proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse, + /** + * @param {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest, + * !proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse>} + */ +const methodInfo_Query_AllEvidence = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse, + /** + * @param {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.evidence.v1beta1.QueryClient.prototype.allEvidence = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.evidence.v1beta1.Query/AllEvidence', + request, + metadata || {}, + methodDescriptor_Query_AllEvidence, + callback); +}; + + +/** + * @param {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.evidence.v1beta1.QueryPromiseClient.prototype.allEvidence = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.evidence.v1beta1.Query/AllEvidence', + request, + metadata || {}, + methodDescriptor_Query_AllEvidence); +}; + + +module.exports = proto.cosmos.evidence.v1beta1; + diff --git a/src/types/proto-types/cosmos/evidence/v1beta1/query_pb.js b/src/types/proto-types/cosmos/evidence/v1beta1/query_pb.js new file mode 100644 index 00000000..52c6433d --- /dev/null +++ b/src/types/proto-types/cosmos/evidence/v1beta1/query_pb.js @@ -0,0 +1,778 @@ +// source: cosmos/evidence/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest', null, global); +goog.exportSymbol('proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse', null, global); +goog.exportSymbol('proto.cosmos.evidence.v1beta1.QueryEvidenceRequest', null, global); +goog.exportSymbol('proto.cosmos.evidence.v1beta1.QueryEvidenceResponse', 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.evidence.v1beta1.QueryEvidenceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.evidence.v1beta1.QueryEvidenceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.displayName = 'proto.cosmos.evidence.v1beta1.QueryEvidenceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.evidence.v1beta1.QueryEvidenceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.evidence.v1beta1.QueryEvidenceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.displayName = 'proto.cosmos.evidence.v1beta1.QueryEvidenceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.evidence.v1beta1.QueryAllEvidenceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.displayName = 'proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.evidence.v1beta1.QueryAllEvidenceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.displayName = 'proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.evidence.v1beta1.QueryEvidenceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.evidence.v1beta1.QueryEvidenceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + evidenceHash: msg.getEvidenceHash_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.evidence.v1beta1.QueryEvidenceRequest} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.evidence.v1beta1.QueryEvidenceRequest; + return proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.evidence.v1beta1.QueryEvidenceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.evidence.v1beta1.QueryEvidenceRequest} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.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.setEvidenceHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.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.evidence.v1beta1.QueryEvidenceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEvidenceHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes evidence_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.prototype.getEvidenceHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes evidence_hash = 1; + * This is a type-conversion wrapper around `getEvidenceHash()` + * @return {string} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.prototype.getEvidenceHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEvidenceHash())); +}; + + +/** + * optional bytes evidence_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEvidenceHash()` + * @return {!Uint8Array} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.prototype.getEvidenceHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEvidenceHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.evidence.v1beta1.QueryEvidenceRequest} returns this + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceRequest.prototype.setEvidenceHash = 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.evidence.v1beta1.QueryEvidenceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.evidence.v1beta1.QueryEvidenceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + evidence: (f = msg.getEvidence()) && 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.cosmos.evidence.v1beta1.QueryEvidenceResponse} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.evidence.v1beta1.QueryEvidenceResponse; + return proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.evidence.v1beta1.QueryEvidenceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.evidence.v1beta1.QueryEvidenceResponse} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.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.setEvidence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.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.evidence.v1beta1.QueryEvidenceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEvidence(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Any evidence = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.prototype.getEvidence = 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.cosmos.evidence.v1beta1.QueryEvidenceResponse} returns this +*/ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.prototype.setEvidence = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.evidence.v1beta1.QueryEvidenceResponse} returns this + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.prototype.clearEvidence = function() { + return this.setEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.evidence.v1beta1.QueryEvidenceResponse.prototype.hasEvidence = 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.evidence.v1beta1.QueryAllEvidenceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.evidence.v1beta1.QueryAllEvidenceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.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.evidence.v1beta1.QueryAllEvidenceRequest} + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest; + return proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest} + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.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.evidence.v1beta1.QueryAllEvidenceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.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.evidence.v1beta1.QueryAllEvidenceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.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.evidence.v1beta1.QueryAllEvidenceRequest.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.evidence.v1beta1.QueryAllEvidenceRequest} returns this +*/ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest} returns this + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.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.evidence.v1beta1.QueryAllEvidenceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.evidence.v1beta1.QueryAllEvidenceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + evidenceList: jspb.Message.toObjectList(msg.getEvidenceList(), + google_protobuf_any_pb.Any.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.evidence.v1beta1.QueryAllEvidenceResponse} + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse; + return proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse} + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.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.addEvidence(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.evidence.v1beta1.QueryAllEvidenceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.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.evidence.v1beta1.QueryAllEvidenceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEvidenceList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated google.protobuf.Any evidence = 1; + * @return {!Array} + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.prototype.getEvidenceList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse} returns this +*/ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.prototype.setEvidenceList = 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.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.prototype.addEvidence = 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.cosmos.evidence.v1beta1.QueryAllEvidenceResponse} returns this + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.prototype.clearEvidenceList = function() { + return this.setEvidenceList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.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.evidence.v1beta1.QueryAllEvidenceResponse} returns this +*/ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse} returns this + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.evidence.v1beta1.QueryAllEvidenceResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.cosmos.evidence.v1beta1); diff --git a/src/types/proto-types/cosmos/evidence/v1beta1/tx_grpc_web_pb.js b/src/types/proto-types/cosmos/evidence/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..ad4a084a --- /dev/null +++ b/src/types/proto-types/cosmos/evidence/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,162 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.evidence.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.evidence = {}; +proto.cosmos.evidence.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.evidence.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.evidence.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.evidence.v1beta1.MsgSubmitEvidence, + * !proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse>} + */ +const methodDescriptor_Msg_SubmitEvidence = new grpc.web.MethodDescriptor( + '/cosmos.evidence.v1beta1.Msg/SubmitEvidence', + grpc.web.MethodType.UNARY, + proto.cosmos.evidence.v1beta1.MsgSubmitEvidence, + proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse, + /** + * @param {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidence} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.evidence.v1beta1.MsgSubmitEvidence, + * !proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse>} + */ +const methodInfo_Msg_SubmitEvidence = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse, + /** + * @param {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidence} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidence} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.evidence.v1beta1.MsgClient.prototype.submitEvidence = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.evidence.v1beta1.Msg/SubmitEvidence', + request, + metadata || {}, + methodDescriptor_Msg_SubmitEvidence, + callback); +}; + + +/** + * @param {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidence} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.evidence.v1beta1.MsgPromiseClient.prototype.submitEvidence = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.evidence.v1beta1.Msg/SubmitEvidence', + request, + metadata || {}, + methodDescriptor_Msg_SubmitEvidence); +}; + + +module.exports = proto.cosmos.evidence.v1beta1; + diff --git a/src/types/proto-types/cosmos/evidence/v1beta1/tx_pb.js b/src/types/proto-types/cosmos/evidence/v1beta1/tx_pb.js new file mode 100644 index 00000000..33ba10b5 --- /dev/null +++ b/src/types/proto-types/cosmos/evidence/v1beta1/tx_pb.js @@ -0,0 +1,400 @@ +// source: cosmos/evidence/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); +goog.object.extend(proto, cosmos_proto_cosmos_pb); +goog.exportSymbol('proto.cosmos.evidence.v1beta1.MsgSubmitEvidence', null, global); +goog.exportSymbol('proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse', 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.evidence.v1beta1.MsgSubmitEvidence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.evidence.v1beta1.MsgSubmitEvidence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.displayName = 'proto.cosmos.evidence.v1beta1.MsgSubmitEvidence'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.evidence.v1beta1.MsgSubmitEvidenceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.displayName = 'proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.evidence.v1beta1.MsgSubmitEvidence.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.evidence.v1beta1.MsgSubmitEvidence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.toObject = function(includeInstance, msg) { + var f, obj = { + submitter: jspb.Message.getFieldWithDefault(msg, 1, ""), + evidence: (f = msg.getEvidence()) && 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.cosmos.evidence.v1beta1.MsgSubmitEvidence} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.evidence.v1beta1.MsgSubmitEvidence; + return proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidence} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.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.setSubmitter(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setEvidence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.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.evidence.v1beta1.MsgSubmitEvidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSubmitter(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getEvidence(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string submitter = 1; + * @return {string} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.prototype.getSubmitter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidence} returns this + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.prototype.setSubmitter = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any evidence = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.prototype.getEvidence = 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.cosmos.evidence.v1beta1.MsgSubmitEvidence} returns this +*/ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.prototype.setEvidence = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidence} returns this + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.prototype.clearEvidence = function() { + return this.setEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidence.prototype.hasEvidence = 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.evidence.v1beta1.MsgSubmitEvidenceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.evidence.v1beta1.MsgSubmitEvidenceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + hash: msg.getHash_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.evidence.v1beta1.MsgSubmitEvidenceResponse} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse; + return proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.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.evidence.v1beta1.MsgSubmitEvidenceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional bytes hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.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.evidence.v1beta1.MsgSubmitEvidenceResponse.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.evidence.v1beta1.MsgSubmitEvidenceResponse.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse} returns this + */ +proto.cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +goog.object.extend(exports, proto.cosmos.evidence.v1beta1); diff --git a/src/types/proto-types/cosmos/genutil/v1beta1/genesis_pb.js b/src/types/proto-types/cosmos/genutil/v1beta1/genesis_pb.js new file mode 100644 index 00000000..e03a3e08 --- /dev/null +++ b/src/types/proto-types/cosmos/genutil/v1beta1/genesis_pb.js @@ -0,0 +1,219 @@ +// source: cosmos/genutil/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.genutil.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.cosmos.genutil.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.genutil.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.genutil.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.genutil.v1beta1.GenesisState.displayName = 'proto.cosmos.genutil.v1beta1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.genutil.v1beta1.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.cosmos.genutil.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.genutil.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.cosmos.genutil.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.genutil.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + genTxsList: msg.getGenTxsList_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.genutil.v1beta1.GenesisState} + */ +proto.cosmos.genutil.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.genutil.v1beta1.GenesisState; + return proto.cosmos.genutil.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.genutil.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.genutil.v1beta1.GenesisState} + */ +proto.cosmos.genutil.v1beta1.GenesisState.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.addGenTxs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.genutil.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.genutil.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.cosmos.genutil.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.genutil.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGenTxsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes gen_txs = 1; + * @return {!(Array|Array)} + */ +proto.cosmos.genutil.v1beta1.GenesisState.prototype.getGenTxsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * repeated bytes gen_txs = 1; + * This is a type-conversion wrapper around `getGenTxsList()` + * @return {!Array} + */ +proto.cosmos.genutil.v1beta1.GenesisState.prototype.getGenTxsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getGenTxsList())); +}; + + +/** + * repeated bytes gen_txs = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getGenTxsList()` + * @return {!Array} + */ +proto.cosmos.genutil.v1beta1.GenesisState.prototype.getGenTxsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getGenTxsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.cosmos.genutil.v1beta1.GenesisState} returns this + */ +proto.cosmos.genutil.v1beta1.GenesisState.prototype.setGenTxsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.cosmos.genutil.v1beta1.GenesisState} returns this + */ +proto.cosmos.genutil.v1beta1.GenesisState.prototype.addGenTxs = 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.genutil.v1beta1.GenesisState} returns this + */ +proto.cosmos.genutil.v1beta1.GenesisState.prototype.clearGenTxsList = function() { + return this.setGenTxsList([]); +}; + + +goog.object.extend(exports, proto.cosmos.genutil.v1beta1); diff --git a/src/types/proto-types/cosmos/gov/v1beta1/genesis_pb.js b/src/types/proto-types/cosmos/gov/v1beta1/genesis_pb.js new file mode 100644 index 00000000..e46d9cef --- /dev/null +++ b/src/types/proto-types/cosmos/gov/v1beta1/genesis_pb.js @@ -0,0 +1,490 @@ +// source: cosmos/gov/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_gov_v1beta1_gov_pb = require('../../../cosmos/gov/v1beta1/gov_pb.js'); +goog.object.extend(proto, cosmos_gov_v1beta1_gov_pb); +goog.exportSymbol('proto.cosmos.gov.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.cosmos.gov.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.GenesisState.displayName = 'proto.cosmos.gov.v1beta1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + startingProposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), + depositsList: jspb.Message.toObjectList(msg.getDepositsList(), + cosmos_gov_v1beta1_gov_pb.Deposit.toObject, includeInstance), + votesList: jspb.Message.toObjectList(msg.getVotesList(), + cosmos_gov_v1beta1_gov_pb.Vote.toObject, includeInstance), + proposalsList: jspb.Message.toObjectList(msg.getProposalsList(), + cosmos_gov_v1beta1_gov_pb.Proposal.toObject, includeInstance), + depositParams: (f = msg.getDepositParams()) && cosmos_gov_v1beta1_gov_pb.DepositParams.toObject(includeInstance, f), + votingParams: (f = msg.getVotingParams()) && cosmos_gov_v1beta1_gov_pb.VotingParams.toObject(includeInstance, f), + tallyParams: (f = msg.getTallyParams()) && cosmos_gov_v1beta1_gov_pb.TallyParams.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.gov.v1beta1.GenesisState} + */ +proto.cosmos.gov.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.GenesisState; + return proto.cosmos.gov.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.GenesisState} + */ +proto.cosmos.gov.v1beta1.GenesisState.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.setStartingProposalId(value); + break; + case 2: + var value = new cosmos_gov_v1beta1_gov_pb.Deposit; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.Deposit.deserializeBinaryFromReader); + msg.addDeposits(value); + break; + case 3: + var value = new cosmos_gov_v1beta1_gov_pb.Vote; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.Vote.deserializeBinaryFromReader); + msg.addVotes(value); + break; + case 4: + var value = new cosmos_gov_v1beta1_gov_pb.Proposal; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.Proposal.deserializeBinaryFromReader); + msg.addProposals(value); + break; + case 5: + var value = new cosmos_gov_v1beta1_gov_pb.DepositParams; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.DepositParams.deserializeBinaryFromReader); + msg.setDepositParams(value); + break; + case 6: + var value = new cosmos_gov_v1beta1_gov_pb.VotingParams; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.VotingParams.deserializeBinaryFromReader); + msg.setVotingParams(value); + break; + case 7: + var value = new cosmos_gov_v1beta1_gov_pb.TallyParams; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.TallyParams.deserializeBinaryFromReader); + msg.setTallyParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartingProposalId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getDepositsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_gov_v1beta1_gov_pb.Deposit.serializeBinaryToWriter + ); + } + f = message.getVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_gov_v1beta1_gov_pb.Vote.serializeBinaryToWriter + ); + } + f = message.getProposalsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_gov_v1beta1_gov_pb.Proposal.serializeBinaryToWriter + ); + } + f = message.getDepositParams(); + if (f != null) { + writer.writeMessage( + 5, + f, + cosmos_gov_v1beta1_gov_pb.DepositParams.serializeBinaryToWriter + ); + } + f = message.getVotingParams(); + if (f != null) { + writer.writeMessage( + 6, + f, + cosmos_gov_v1beta1_gov_pb.VotingParams.serializeBinaryToWriter + ); + } + f = message.getTallyParams(); + if (f != null) { + writer.writeMessage( + 7, + f, + cosmos_gov_v1beta1_gov_pb.TallyParams.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 starting_proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.getStartingProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.setStartingProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated Deposit deposits = 2; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.getDepositsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_gov_v1beta1_gov_pb.Deposit, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this +*/ +proto.cosmos.gov.v1beta1.GenesisState.prototype.setDepositsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.Deposit=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.gov.v1beta1.Deposit} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.addDeposits = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.gov.v1beta1.Deposit, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.clearDepositsList = function() { + return this.setDepositsList([]); +}; + + +/** + * repeated Vote votes = 3; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.getVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_gov_v1beta1_gov_pb.Vote, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this +*/ +proto.cosmos.gov.v1beta1.GenesisState.prototype.setVotesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.Vote=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.gov.v1beta1.Vote} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.addVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.gov.v1beta1.Vote, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.clearVotesList = function() { + return this.setVotesList([]); +}; + + +/** + * repeated Proposal proposals = 4; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.getProposalsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_gov_v1beta1_gov_pb.Proposal, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this +*/ +proto.cosmos.gov.v1beta1.GenesisState.prototype.setProposalsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.Proposal=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.gov.v1beta1.Proposal} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.addProposals = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.gov.v1beta1.Proposal, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.clearProposalsList = function() { + return this.setProposalsList([]); +}; + + +/** + * optional DepositParams deposit_params = 5; + * @return {?proto.cosmos.gov.v1beta1.DepositParams} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.getDepositParams = function() { + return /** @type{?proto.cosmos.gov.v1beta1.DepositParams} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.DepositParams, 5)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.DepositParams|undefined} value + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this +*/ +proto.cosmos.gov.v1beta1.GenesisState.prototype.setDepositParams = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.clearDepositParams = function() { + return this.setDepositParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.hasDepositParams = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional VotingParams voting_params = 6; + * @return {?proto.cosmos.gov.v1beta1.VotingParams} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.getVotingParams = function() { + return /** @type{?proto.cosmos.gov.v1beta1.VotingParams} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.VotingParams, 6)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.VotingParams|undefined} value + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this +*/ +proto.cosmos.gov.v1beta1.GenesisState.prototype.setVotingParams = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.clearVotingParams = function() { + return this.setVotingParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.hasVotingParams = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional TallyParams tally_params = 7; + * @return {?proto.cosmos.gov.v1beta1.TallyParams} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.getTallyParams = function() { + return /** @type{?proto.cosmos.gov.v1beta1.TallyParams} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.TallyParams, 7)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.TallyParams|undefined} value + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this +*/ +proto.cosmos.gov.v1beta1.GenesisState.prototype.setTallyParams = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.GenesisState} returns this + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.clearTallyParams = function() { + return this.setTallyParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.GenesisState.prototype.hasTallyParams = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +goog.object.extend(exports, proto.cosmos.gov.v1beta1); diff --git a/src/types/proto-types/cosmos/gov/v1beta1/gov_pb.js b/src/types/proto-types/cosmos/gov/v1beta1/gov_pb.js new file mode 100644 index 00000000..d2fc0985 --- /dev/null +++ b/src/types/proto-types/cosmos/gov/v1beta1/gov_pb.js @@ -0,0 +1,2168 @@ +// source: cosmos/gov/v1beta1/gov.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 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 google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_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.cosmos.gov.v1beta1.Deposit', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.DepositParams', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.Proposal', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.ProposalStatus', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.TallyParams', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.TallyResult', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.TextProposal', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.Vote', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.VoteOption', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.VotingParams', 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.v1beta1.TextProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.TextProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.TextProposal.displayName = 'proto.cosmos.gov.v1beta1.TextProposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.Deposit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.Deposit.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.Deposit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.Deposit.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.Proposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.Proposal.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.Proposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.Proposal.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.TallyResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.TallyResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.TallyResult.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.Vote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.Vote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.Vote.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.DepositParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.DepositParams.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.DepositParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.DepositParams.displayName = 'proto.cosmos.gov.v1beta1.DepositParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.VotingParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.VotingParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.VotingParams.displayName = 'proto.cosmos.gov.v1beta1.VotingParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.TallyParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.TallyParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.TallyParams.displayName = 'proto.cosmos.gov.v1beta1.TallyParams'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.v1beta1.TextProposal.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.TextProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.TextProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.TextProposal.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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.cosmos.gov.v1beta1.TextProposal} + */ +proto.cosmos.gov.v1beta1.TextProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.TextProposal; + return proto.cosmos.gov.v1beta1.TextProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.TextProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.TextProposal} + */ +proto.cosmos.gov.v1beta1.TextProposal.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.setTitle(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.cosmos.gov.v1beta1.TextProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.TextProposal.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.v1beta1.TextProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.TextProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.cosmos.gov.v1beta1.TextProposal.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.TextProposal} returns this + */ +proto.cosmos.gov.v1beta1.TextProposal.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.TextProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.TextProposal} returns this + */ +proto.cosmos.gov.v1beta1.TextProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.Deposit.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.Deposit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.Deposit.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: 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.cosmos.gov.v1beta1.Deposit} + */ +proto.cosmos.gov.v1beta1.Deposit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.Deposit; + return proto.cosmos.gov.v1beta1.Deposit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.Deposit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.Deposit} + */ +proto.cosmos.gov.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.setProposalId(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.cosmos.gov.v1beta1.Deposit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.Deposit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.Deposit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalId(); + 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 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.Deposit.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.Deposit} returns this + */ +proto.cosmos.gov.v1beta1.Deposit.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string depositor = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.Deposit.prototype.getDepositor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.Deposit} returns this + */ +proto.cosmos.gov.v1beta1.Deposit.prototype.setDepositor = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 3; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.Deposit.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.Deposit} returns this +*/ +proto.cosmos.gov.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.cosmos.gov.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.cosmos.gov.v1beta1.Deposit} returns this + */ +proto.cosmos.gov.v1beta1.Deposit.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.v1beta1.Proposal.repeatedFields_ = [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.cosmos.gov.v1beta1.Proposal.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.Proposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.Proposal.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), + content: (f = msg.getContent()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + status: jspb.Message.getFieldWithDefault(msg, 3, 0), + finalTallyResult: (f = msg.getFinalTallyResult()) && proto.cosmos.gov.v1beta1.TallyResult.toObject(includeInstance, f), + submitTime: (f = msg.getSubmitTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + depositEndTime: (f = msg.getDepositEndTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + totalDepositList: jspb.Message.toObjectList(msg.getTotalDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + votingStartTime: (f = msg.getVotingStartTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + votingEndTime: (f = msg.getVotingEndTime()) && 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.cosmos.gov.v1beta1.Proposal} + */ +proto.cosmos.gov.v1beta1.Proposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.Proposal; + return proto.cosmos.gov.v1beta1.Proposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.Proposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.Proposal} + */ +proto.cosmos.gov.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.setProposalId(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 {!proto.cosmos.gov.v1beta1.ProposalStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 4: + var value = new proto.cosmos.gov.v1beta1.TallyResult; + reader.readMessage(value,proto.cosmos.gov.v1beta1.TallyResult.deserializeBinaryFromReader); + msg.setFinalTallyResult(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setSubmitTime(value); + break; + case 6: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setDepositEndTime(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 = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setVotingStartTime(value); + break; + case 9: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setVotingEndTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.Proposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.Proposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalId(); + 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.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getFinalTallyResult(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.cosmos.gov.v1beta1.TallyResult.serializeBinaryToWriter + ); + } + f = message.getSubmitTime(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getDepositEndTime(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getTotalDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getVotingStartTime(); + if (f != null) { + writer.writeMessage( + 8, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getVotingEndTime(); + if (f != null) { + writer.writeMessage( + 9, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any content = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.gov.v1beta1.Proposal.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.cosmos.gov.v1beta1.Proposal} returns this +*/ +proto.cosmos.gov.v1beta1.Proposal.prototype.setContent = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.clearContent = function() { + return this.setContent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.hasContent = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ProposalStatus status = 3; + * @return {!proto.cosmos.gov.v1beta1.ProposalStatus} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.getStatus = function() { + return /** @type {!proto.cosmos.gov.v1beta1.ProposalStatus} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.ProposalStatus} value + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional TallyResult final_tally_result = 4; + * @return {?proto.cosmos.gov.v1beta1.TallyResult} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.getFinalTallyResult = function() { + return /** @type{?proto.cosmos.gov.v1beta1.TallyResult} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.gov.v1beta1.TallyResult, 4)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.TallyResult|undefined} value + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this +*/ +proto.cosmos.gov.v1beta1.Proposal.prototype.setFinalTallyResult = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.clearFinalTallyResult = function() { + return this.setFinalTallyResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.hasFinalTallyResult = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Timestamp submit_time = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.getSubmitTime = 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.cosmos.gov.v1beta1.Proposal} returns this +*/ +proto.cosmos.gov.v1beta1.Proposal.prototype.setSubmitTime = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.clearSubmitTime = function() { + return this.setSubmitTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.hasSubmitTime = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Timestamp deposit_end_time = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.getDepositEndTime = 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.cosmos.gov.v1beta1.Proposal} returns this +*/ +proto.cosmos.gov.v1beta1.Proposal.prototype.setDepositEndTime = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.clearDepositEndTime = function() { + return this.setDepositEndTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.hasDepositEndTime = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin total_deposit = 7; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.getTotalDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this +*/ +proto.cosmos.gov.v1beta1.Proposal.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.cosmos.gov.v1beta1.Proposal.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.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.clearTotalDepositList = function() { + return this.setTotalDepositList([]); +}; + + +/** + * optional google.protobuf.Timestamp voting_start_time = 8; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.getVotingStartTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this +*/ +proto.cosmos.gov.v1beta1.Proposal.prototype.setVotingStartTime = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.clearVotingStartTime = function() { + return this.setVotingStartTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.hasVotingStartTime = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional google.protobuf.Timestamp voting_end_time = 9; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.getVotingEndTime = 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.cosmos.gov.v1beta1.Proposal} returns this +*/ +proto.cosmos.gov.v1beta1.Proposal.prototype.setVotingEndTime = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.Proposal} returns this + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.clearVotingEndTime = function() { + return this.setVotingEndTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.Proposal.prototype.hasVotingEndTime = function() { + return jspb.Message.getField(this, 9) != 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.gov.v1beta1.TallyResult.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.TallyResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.TallyResult.toObject = function(includeInstance, msg) { + var f, obj = { + yes: jspb.Message.getFieldWithDefault(msg, 1, ""), + abstain: jspb.Message.getFieldWithDefault(msg, 2, ""), + no: jspb.Message.getFieldWithDefault(msg, 3, ""), + noWithVeto: 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.cosmos.gov.v1beta1.TallyResult} + */ +proto.cosmos.gov.v1beta1.TallyResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.TallyResult; + return proto.cosmos.gov.v1beta1.TallyResult.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.TallyResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.TallyResult} + */ +proto.cosmos.gov.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.setYes(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAbstain(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setNo(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setNoWithVeto(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.TallyResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.TallyResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getYes(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAbstain(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getNo(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getNoWithVeto(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string yes = 1; + * @return {string} + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.getYes = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.TallyResult} returns this + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.setYes = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string abstain = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.getAbstain = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.TallyResult} returns this + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.setAbstain = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string no = 3; + * @return {string} + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.getNo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.TallyResult} returns this + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.setNo = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string no_with_veto = 4; + * @return {string} + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.getNoWithVeto = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.TallyResult} returns this + */ +proto.cosmos.gov.v1beta1.TallyResult.prototype.setNoWithVeto = 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.cosmos.gov.v1beta1.Vote.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.Vote} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.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) + }; + + 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.v1beta1.Vote} + */ +proto.cosmos.gov.v1beta1.Vote.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.Vote; + return proto.cosmos.gov.v1beta1.Vote.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.Vote} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.Vote} + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.VoteOption} */ (reader.readEnum()); + msg.setOption(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.Vote.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.Vote} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.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 + ); + } +}; + + +/** + * optional uint64 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.Vote.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.Vote} returns this + */ +proto.cosmos.gov.v1beta1.Vote.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string voter = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.Vote.prototype.getVoter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.Vote} returns this + */ +proto.cosmos.gov.v1beta1.Vote.prototype.setVoter = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional VoteOption option = 3; + * @return {!proto.cosmos.gov.v1beta1.VoteOption} + */ +proto.cosmos.gov.v1beta1.Vote.prototype.getOption = function() { + return /** @type {!proto.cosmos.gov.v1beta1.VoteOption} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.VoteOption} value + * @return {!proto.cosmos.gov.v1beta1.Vote} returns this + */ +proto.cosmos.gov.v1beta1.Vote.prototype.setOption = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.v1beta1.DepositParams.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.gov.v1beta1.DepositParams.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.DepositParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.DepositParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.DepositParams.toObject = function(includeInstance, msg) { + var f, obj = { + minDepositList: jspb.Message.toObjectList(msg.getMinDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + maxDepositPeriod: (f = msg.getMaxDepositPeriod()) && 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.cosmos.gov.v1beta1.DepositParams} + */ +proto.cosmos.gov.v1beta1.DepositParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.DepositParams; + return proto.cosmos.gov.v1beta1.DepositParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.DepositParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.DepositParams} + */ +proto.cosmos.gov.v1beta1.DepositParams.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 = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setMaxDepositPeriod(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.DepositParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.DepositParams.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.v1beta1.DepositParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.DepositParams.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.getMaxDepositPeriod(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin min_deposit = 1; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.DepositParams.prototype.getMinDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.DepositParams} returns this +*/ +proto.cosmos.gov.v1beta1.DepositParams.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.cosmos.gov.v1beta1.DepositParams.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.cosmos.gov.v1beta1.DepositParams} returns this + */ +proto.cosmos.gov.v1beta1.DepositParams.prototype.clearMinDepositList = function() { + return this.setMinDepositList([]); +}; + + +/** + * optional google.protobuf.Duration max_deposit_period = 2; + * @return {?proto.google.protobuf.Duration} + */ +proto.cosmos.gov.v1beta1.DepositParams.prototype.getMaxDepositPeriod = 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.cosmos.gov.v1beta1.DepositParams} returns this +*/ +proto.cosmos.gov.v1beta1.DepositParams.prototype.setMaxDepositPeriod = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.DepositParams} returns this + */ +proto.cosmos.gov.v1beta1.DepositParams.prototype.clearMaxDepositPeriod = function() { + return this.setMaxDepositPeriod(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.DepositParams.prototype.hasMaxDepositPeriod = 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.gov.v1beta1.VotingParams.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.VotingParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.VotingParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.VotingParams.toObject = function(includeInstance, msg) { + var f, obj = { + votingPeriod: (f = msg.getVotingPeriod()) && 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.cosmos.gov.v1beta1.VotingParams} + */ +proto.cosmos.gov.v1beta1.VotingParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.VotingParams; + return proto.cosmos.gov.v1beta1.VotingParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.VotingParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.VotingParams} + */ +proto.cosmos.gov.v1beta1.VotingParams.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.VotingParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.VotingParams.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.v1beta1.VotingParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.VotingParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVotingPeriod(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Duration voting_period = 1; + * @return {?proto.google.protobuf.Duration} + */ +proto.cosmos.gov.v1beta1.VotingParams.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.cosmos.gov.v1beta1.VotingParams} returns this +*/ +proto.cosmos.gov.v1beta1.VotingParams.prototype.setVotingPeriod = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.VotingParams} returns this + */ +proto.cosmos.gov.v1beta1.VotingParams.prototype.clearVotingPeriod = function() { + return this.setVotingPeriod(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.VotingParams.prototype.hasVotingPeriod = 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.gov.v1beta1.TallyParams.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.TallyParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.TallyParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.TallyParams.toObject = function(includeInstance, msg) { + var f, obj = { + quorum: msg.getQuorum_asB64(), + threshold: msg.getThreshold_asB64(), + vetoThreshold: msg.getVetoThreshold_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.gov.v1beta1.TallyParams} + */ +proto.cosmos.gov.v1beta1.TallyParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.TallyParams; + return proto.cosmos.gov.v1beta1.TallyParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.TallyParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.TallyParams} + */ +proto.cosmos.gov.v1beta1.TallyParams.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.setQuorum(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setThreshold(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setVetoThreshold(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.TallyParams.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.v1beta1.TallyParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.TallyParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getQuorum_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getThreshold_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getVetoThreshold_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional bytes quorum = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getQuorum = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes quorum = 1; + * This is a type-conversion wrapper around `getQuorum()` + * @return {string} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getQuorum_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getQuorum())); +}; + + +/** + * optional bytes quorum = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getQuorum()` + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getQuorum_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getQuorum())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.gov.v1beta1.TallyParams} returns this + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.setQuorum = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes threshold = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getThreshold = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes threshold = 2; + * This is a type-conversion wrapper around `getThreshold()` + * @return {string} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getThreshold_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getThreshold())); +}; + + +/** + * optional bytes threshold = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getThreshold()` + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getThreshold_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getThreshold())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.gov.v1beta1.TallyParams} returns this + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.setThreshold = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes veto_threshold = 3; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getVetoThreshold = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes veto_threshold = 3; + * This is a type-conversion wrapper around `getVetoThreshold()` + * @return {string} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getVetoThreshold_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getVetoThreshold())); +}; + + +/** + * optional bytes veto_threshold = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getVetoThreshold()` + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.getVetoThreshold_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getVetoThreshold())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.gov.v1beta1.TallyParams} returns this + */ +proto.cosmos.gov.v1beta1.TallyParams.prototype.setVetoThreshold = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * @enum {number} + */ +proto.cosmos.gov.v1beta1.VoteOption = { + VOTE_OPTION_UNSPECIFIED: 0, + VOTE_OPTION_YES: 1, + VOTE_OPTION_ABSTAIN: 2, + VOTE_OPTION_NO: 3, + VOTE_OPTION_NO_WITH_VETO: 4 +}; + +/** + * @enum {number} + */ +proto.cosmos.gov.v1beta1.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 +}; + +goog.object.extend(exports, proto.cosmos.gov.v1beta1); diff --git a/src/types/proto-types/cosmos/gov/v1beta1/query_grpc_web_pb.js b/src/types/proto-types/cosmos/gov/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..75ecabb1 --- /dev/null +++ b/src/types/proto-types/cosmos/gov/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,724 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.gov.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_gov_v1beta1_gov_pb = require('../../../cosmos/gov/v1beta1/gov_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.gov = {}; +proto.cosmos.gov.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.gov.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.QueryProposalRequest, + * !proto.cosmos.gov.v1beta1.QueryProposalResponse>} + */ +const methodDescriptor_Query_Proposal = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Query/Proposal', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.QueryProposalRequest, + proto.cosmos.gov.v1beta1.QueryProposalResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryProposalRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryProposalResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.QueryProposalRequest, + * !proto.cosmos.gov.v1beta1.QueryProposalResponse>} + */ +const methodInfo_Query_Proposal = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.QueryProposalResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryProposalRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryProposalResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryProposalRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.QueryProposalResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.QueryClient.prototype.proposal = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Proposal', + request, + metadata || {}, + methodDescriptor_Query_Proposal, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryProposalRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient.prototype.proposal = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Proposal', + request, + metadata || {}, + methodDescriptor_Query_Proposal); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.QueryProposalsRequest, + * !proto.cosmos.gov.v1beta1.QueryProposalsResponse>} + */ +const methodDescriptor_Query_Proposals = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Query/Proposals', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.QueryProposalsRequest, + proto.cosmos.gov.v1beta1.QueryProposalsResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryProposalsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.QueryProposalsRequest, + * !proto.cosmos.gov.v1beta1.QueryProposalsResponse>} + */ +const methodInfo_Query_Proposals = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.QueryProposalsResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryProposalsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.QueryProposalsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.QueryClient.prototype.proposals = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Proposals', + request, + metadata || {}, + methodDescriptor_Query_Proposals, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient.prototype.proposals = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Proposals', + request, + metadata || {}, + methodDescriptor_Query_Proposals); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.QueryVoteRequest, + * !proto.cosmos.gov.v1beta1.QueryVoteResponse>} + */ +const methodDescriptor_Query_Vote = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Query/Vote', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.QueryVoteRequest, + proto.cosmos.gov.v1beta1.QueryVoteResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryVoteRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryVoteResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.QueryVoteRequest, + * !proto.cosmos.gov.v1beta1.QueryVoteResponse>} + */ +const methodInfo_Query_Vote = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.QueryVoteResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryVoteRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryVoteResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryVoteRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.QueryVoteResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.QueryClient.prototype.vote = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Vote', + request, + metadata || {}, + methodDescriptor_Query_Vote, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryVoteRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient.prototype.vote = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Vote', + request, + metadata || {}, + methodDescriptor_Query_Vote); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.QueryVotesRequest, + * !proto.cosmos.gov.v1beta1.QueryVotesResponse>} + */ +const methodDescriptor_Query_Votes = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Query/Votes', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.QueryVotesRequest, + proto.cosmos.gov.v1beta1.QueryVotesResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryVotesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryVotesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.QueryVotesRequest, + * !proto.cosmos.gov.v1beta1.QueryVotesResponse>} + */ +const methodInfo_Query_Votes = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.QueryVotesResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryVotesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryVotesResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryVotesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.QueryVotesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.QueryClient.prototype.votes = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Votes', + request, + metadata || {}, + methodDescriptor_Query_Votes, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryVotesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient.prototype.votes = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Votes', + request, + metadata || {}, + methodDescriptor_Query_Votes); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.QueryParamsRequest, + * !proto.cosmos.gov.v1beta1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Query/Params', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.QueryParamsRequest, + proto.cosmos.gov.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.QueryParamsRequest, + * !proto.cosmos.gov.v1beta1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.QueryDepositRequest, + * !proto.cosmos.gov.v1beta1.QueryDepositResponse>} + */ +const methodDescriptor_Query_Deposit = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Query/Deposit', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.QueryDepositRequest, + proto.cosmos.gov.v1beta1.QueryDepositResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryDepositRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryDepositResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.QueryDepositRequest, + * !proto.cosmos.gov.v1beta1.QueryDepositResponse>} + */ +const methodInfo_Query_Deposit = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.QueryDepositResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryDepositRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryDepositResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryDepositRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.QueryDepositResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.QueryClient.prototype.deposit = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Deposit', + request, + metadata || {}, + methodDescriptor_Query_Deposit, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryDepositRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient.prototype.deposit = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Deposit', + request, + metadata || {}, + methodDescriptor_Query_Deposit); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.QueryDepositsRequest, + * !proto.cosmos.gov.v1beta1.QueryDepositsResponse>} + */ +const methodDescriptor_Query_Deposits = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Query/Deposits', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.QueryDepositsRequest, + proto.cosmos.gov.v1beta1.QueryDepositsResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryDepositsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryDepositsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.QueryDepositsRequest, + * !proto.cosmos.gov.v1beta1.QueryDepositsResponse>} + */ +const methodInfo_Query_Deposits = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.QueryDepositsResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryDepositsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryDepositsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryDepositsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.QueryDepositsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.QueryClient.prototype.deposits = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Deposits', + request, + metadata || {}, + methodDescriptor_Query_Deposits, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryDepositsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient.prototype.deposits = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/Deposits', + request, + metadata || {}, + methodDescriptor_Query_Deposits); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.QueryTallyResultRequest, + * !proto.cosmos.gov.v1beta1.QueryTallyResultResponse>} + */ +const methodDescriptor_Query_TallyResult = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Query/TallyResult', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.QueryTallyResultRequest, + proto.cosmos.gov.v1beta1.QueryTallyResultResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryTallyResultRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryTallyResultResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.QueryTallyResultRequest, + * !proto.cosmos.gov.v1beta1.QueryTallyResultResponse>} + */ +const methodInfo_Query_TallyResult = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.QueryTallyResultResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.QueryTallyResultRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.QueryTallyResultResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryTallyResultRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.QueryTallyResultResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.QueryClient.prototype.tallyResult = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/TallyResult', + request, + metadata || {}, + methodDescriptor_Query_TallyResult, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.QueryTallyResultRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.QueryPromiseClient.prototype.tallyResult = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Query/TallyResult', + request, + metadata || {}, + methodDescriptor_Query_TallyResult); +}; + + +module.exports = proto.cosmos.gov.v1beta1; + diff --git a/src/types/proto-types/cosmos/gov/v1beta1/query_pb.js b/src/types/proto-types/cosmos/gov/v1beta1/query_pb.js new file mode 100644 index 00000000..5cba4a80 --- /dev/null +++ b/src/types/proto-types/cosmos/gov/v1beta1/query_pb.js @@ -0,0 +1,3178 @@ +// source: cosmos/gov/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_gov_v1beta1_gov_pb = require('../../../cosmos/gov/v1beta1/gov_pb.js'); +goog.object.extend(proto, cosmos_gov_v1beta1_gov_pb); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryDepositRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryDepositResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryDepositsRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryDepositsResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryProposalRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryProposalResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryProposalsRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryProposalsResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryTallyResultRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryTallyResultResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryVoteRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryVoteResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.QueryVotesRequest', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.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.v1beta1.QueryProposalRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryProposalRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryProposalRequest.displayName = 'proto.cosmos.gov.v1beta1.QueryProposalRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.QueryProposalResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryProposalResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryProposalResponse.displayName = 'proto.cosmos.gov.v1beta1.QueryProposalResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.QueryProposalsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryProposalsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryProposalsRequest.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryProposalsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.QueryProposalsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryProposalsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryProposalsResponse.displayName = 'proto.cosmos.gov.v1beta1.QueryProposalsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.QueryVoteRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryVoteRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryVoteRequest.displayName = 'proto.cosmos.gov.v1beta1.QueryVoteRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.QueryVoteResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryVoteResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryVoteResponse.displayName = 'proto.cosmos.gov.v1beta1.QueryVoteResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.QueryVotesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryVotesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryVotesRequest.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryVotesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.QueryVotesResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryVotesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryVotesResponse.displayName = 'proto.cosmos.gov.v1beta1.QueryVotesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryParamsRequest.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryParamsResponse.displayName = 'proto.cosmos.gov.v1beta1.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.cosmos.gov.v1beta1.QueryDepositRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryDepositRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryDepositRequest.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryDepositResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryDepositResponse.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryDepositsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryDepositsRequest.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.QueryDepositsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryDepositsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryDepositsResponse.displayName = 'proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryTallyResultRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryTallyResultRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryTallyResultRequest.displayName = 'proto.cosmos.gov.v1beta1.QueryTallyResultRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.QueryTallyResultResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.QueryTallyResultResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.QueryTallyResultResponse.displayName = 'proto.cosmos.gov.v1beta1.QueryTallyResultResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.v1beta1.QueryProposalRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.QueryProposalRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.QueryProposalRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryProposalRequest.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.cosmos.gov.v1beta1.QueryProposalRequest} + */ +proto.cosmos.gov.v1beta1.QueryProposalRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryProposalRequest; + return proto.cosmos.gov.v1beta1.QueryProposalRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryProposalRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryProposalRequest} + */ +proto.cosmos.gov.v1beta1.QueryProposalRequest.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.cosmos.gov.v1beta1.QueryProposalRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.QueryProposalRequest.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.v1beta1.QueryProposalRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryProposalRequest.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.cosmos.gov.v1beta1.QueryProposalRequest.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.QueryProposalRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryProposalRequest.prototype.setProposalId = 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.cosmos.gov.v1beta1.QueryProposalResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.QueryProposalResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.QueryProposalResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryProposalResponse.toObject = function(includeInstance, msg) { + var f, obj = { + proposal: (f = msg.getProposal()) && cosmos_gov_v1beta1_gov_pb.Proposal.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.gov.v1beta1.QueryProposalResponse} + */ +proto.cosmos.gov.v1beta1.QueryProposalResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryProposalResponse; + return proto.cosmos.gov.v1beta1.QueryProposalResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryProposalResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryProposalResponse} + */ +proto.cosmos.gov.v1beta1.QueryProposalResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_gov_v1beta1_gov_pb.Proposal; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.Proposal.deserializeBinaryFromReader); + msg.setProposal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.QueryProposalResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.QueryProposalResponse.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.v1beta1.QueryProposalResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryProposalResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposal(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_gov_v1beta1_gov_pb.Proposal.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Proposal proposal = 1; + * @return {?proto.cosmos.gov.v1beta1.Proposal} + */ +proto.cosmos.gov.v1beta1.QueryProposalResponse.prototype.getProposal = function() { + return /** @type{?proto.cosmos.gov.v1beta1.Proposal} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.Proposal, 1)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.Proposal|undefined} value + * @return {!proto.cosmos.gov.v1beta1.QueryProposalResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryProposalResponse.prototype.setProposal = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryProposalResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryProposalResponse.prototype.clearProposal = function() { + return this.setProposal(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryProposalResponse.prototype.hasProposal = 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.gov.v1beta1.QueryProposalsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.QueryProposalsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.QueryProposalsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + proposalStatus: jspb.Message.getFieldWithDefault(msg, 1, 0), + voter: jspb.Message.getFieldWithDefault(msg, 2, ""), + depositor: jspb.Message.getFieldWithDefault(msg, 3, ""), + 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.gov.v1beta1.QueryProposalsRequest} + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryProposalsRequest; + return proto.cosmos.gov.v1beta1.QueryProposalsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cosmos.gov.v1beta1.ProposalStatus} */ (reader.readEnum()); + msg.setProposalStatus(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVoter(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDepositor(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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.QueryProposalsRequest.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.v1beta1.QueryProposalsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalStatus(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getVoter(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDepositor(); + 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 ProposalStatus proposal_status = 1; + * @return {!proto.cosmos.gov.v1beta1.ProposalStatus} + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.getProposalStatus = function() { + return /** @type {!proto.cosmos.gov.v1beta1.ProposalStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.ProposalStatus} value + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.setProposalStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string voter = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.getVoter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.setVoter = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string depositor = 3; + * @return {string} + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.getDepositor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.setDepositor = 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.cosmos.gov.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.cosmos.gov.v1beta1.QueryProposalsRequest} returns this +*/ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryProposalsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryProposalsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.QueryProposalsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.QueryProposalsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + proposalsList: jspb.Message.toObjectList(msg.getProposalsList(), + cosmos_gov_v1beta1_gov_pb.Proposal.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.gov.v1beta1.QueryProposalsResponse} + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryProposalsResponse; + return proto.cosmos.gov.v1beta1.QueryProposalsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryProposalsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsResponse} + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_gov_v1beta1_gov_pb.Proposal; + reader.readMessage(value,cosmos_gov_v1beta1_gov_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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.QueryProposalsResponse.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.v1beta1.QueryProposalsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_gov_v1beta1_gov_pb.Proposal.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Proposal proposals = 1; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.prototype.getProposalsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_gov_v1beta1_gov_pb.Proposal, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.prototype.setProposalsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.Proposal=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.gov.v1beta1.Proposal} + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.prototype.addProposals = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.gov.v1beta1.Proposal, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.prototype.clearProposalsList = function() { + return this.setProposalsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.gov.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)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryProposalsResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryProposalsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryVoteRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.QueryVoteRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.QueryVoteRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: jspb.Message.getFieldWithDefault(msg, 1, 0), + voter: 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.v1beta1.QueryVoteRequest} + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryVoteRequest; + return proto.cosmos.gov.v1beta1.QueryVoteRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryVoteRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryVoteRequest} + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.QueryVoteRequest.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.v1beta1.QueryVoteRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.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 + ); + } +}; + + +/** + * optional uint64 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.QueryVoteRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string voter = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.prototype.getVoter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.QueryVoteRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryVoteRequest.prototype.setVoter = 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.v1beta1.QueryVoteResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.QueryVoteResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.QueryVoteResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryVoteResponse.toObject = function(includeInstance, msg) { + var f, obj = { + vote: (f = msg.getVote()) && cosmos_gov_v1beta1_gov_pb.Vote.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.gov.v1beta1.QueryVoteResponse} + */ +proto.cosmos.gov.v1beta1.QueryVoteResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryVoteResponse; + return proto.cosmos.gov.v1beta1.QueryVoteResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryVoteResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryVoteResponse} + */ +proto.cosmos.gov.v1beta1.QueryVoteResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_gov_v1beta1_gov_pb.Vote; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.Vote.deserializeBinaryFromReader); + msg.setVote(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.QueryVoteResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.QueryVoteResponse.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.v1beta1.QueryVoteResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryVoteResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVote(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_gov_v1beta1_gov_pb.Vote.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Vote vote = 1; + * @return {?proto.cosmos.gov.v1beta1.Vote} + */ +proto.cosmos.gov.v1beta1.QueryVoteResponse.prototype.getVote = function() { + return /** @type{?proto.cosmos.gov.v1beta1.Vote} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.Vote, 1)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.Vote|undefined} value + * @return {!proto.cosmos.gov.v1beta1.QueryVoteResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryVoteResponse.prototype.setVote = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryVoteResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryVoteResponse.prototype.clearVote = function() { + return this.setVote(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryVoteResponse.prototype.hasVote = 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.gov.v1beta1.QueryVotesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryVotesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryVotesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: 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.cosmos.gov.v1beta1.QueryVotesRequest} + */ +proto.cosmos.gov.v1beta1.QueryVotesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryVotesRequest; + return proto.cosmos.gov.v1beta1.QueryVotesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryVotesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryVotesRequest} + */ +proto.cosmos.gov.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; + 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.gov.v1beta1.QueryVotesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryVotesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryVotesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalId(); + 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 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.QueryVotesRequest.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.QueryVotesRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryVotesRequest.prototype.setProposalId = 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.cosmos.gov.v1beta1.QueryVotesRequest.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.gov.v1beta1.QueryVotesRequest} returns this +*/ +proto.cosmos.gov.v1beta1.QueryVotesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryVotesRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryVotesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryVotesRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.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.gov.v1beta1.QueryVotesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.QueryVotesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.QueryVotesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + votesList: jspb.Message.toObjectList(msg.getVotesList(), + cosmos_gov_v1beta1_gov_pb.Vote.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.gov.v1beta1.QueryVotesResponse} + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryVotesResponse; + return proto.cosmos.gov.v1beta1.QueryVotesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryVotesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryVotesResponse} + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_gov_v1beta1_gov_pb.Vote; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.Vote.deserializeBinaryFromReader); + msg.addVotes(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.gov.v1beta1.QueryVotesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryVotesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVotesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_gov_v1beta1_gov_pb.Vote.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Vote votes = 1; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.prototype.getVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_gov_v1beta1_gov_pb.Vote, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.QueryVotesResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryVotesResponse.prototype.setVotesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.Vote=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.gov.v1beta1.Vote} + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.prototype.addVotes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.gov.v1beta1.Vote, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1beta1.QueryVotesResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.prototype.clearVotesList = function() { + return this.setVotesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.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.gov.v1beta1.QueryVotesResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryVotesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryVotesResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryVotesResponse.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.gov.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryParamsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + paramsType: 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.v1beta1.QueryParamsRequest} + */ +proto.cosmos.gov.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryParamsRequest; + return proto.cosmos.gov.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryParamsRequest} + */ +proto.cosmos.gov.v1beta1.QueryParamsRequest.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.setParamsType(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryParamsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParamsType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string params_type = 1; + * @return {string} + */ +proto.cosmos.gov.v1beta1.QueryParamsRequest.prototype.getParamsType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.QueryParamsRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryParamsRequest.prototype.setParamsType = 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.gov.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + votingParams: (f = msg.getVotingParams()) && cosmos_gov_v1beta1_gov_pb.VotingParams.toObject(includeInstance, f), + depositParams: (f = msg.getDepositParams()) && cosmos_gov_v1beta1_gov_pb.DepositParams.toObject(includeInstance, f), + tallyParams: (f = msg.getTallyParams()) && cosmos_gov_v1beta1_gov_pb.TallyParams.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.gov.v1beta1.QueryParamsResponse} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryParamsResponse; + return proto.cosmos.gov.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryParamsResponse} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_gov_v1beta1_gov_pb.VotingParams; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.VotingParams.deserializeBinaryFromReader); + msg.setVotingParams(value); + break; + case 2: + var value = new cosmos_gov_v1beta1_gov_pb.DepositParams; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.DepositParams.deserializeBinaryFromReader); + msg.setDepositParams(value); + break; + case 3: + var value = new cosmos_gov_v1beta1_gov_pb.TallyParams; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.TallyParams.deserializeBinaryFromReader); + msg.setTallyParams(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVotingParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_gov_v1beta1_gov_pb.VotingParams.serializeBinaryToWriter + ); + } + f = message.getDepositParams(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_gov_v1beta1_gov_pb.DepositParams.serializeBinaryToWriter + ); + } + f = message.getTallyParams(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_gov_v1beta1_gov_pb.TallyParams.serializeBinaryToWriter + ); + } +}; + + +/** + * optional VotingParams voting_params = 1; + * @return {?proto.cosmos.gov.v1beta1.VotingParams} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.getVotingParams = function() { + return /** @type{?proto.cosmos.gov.v1beta1.VotingParams} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.VotingParams, 1)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.VotingParams|undefined} value + * @return {!proto.cosmos.gov.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.setVotingParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.clearVotingParams = function() { + return this.setVotingParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.hasVotingParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional DepositParams deposit_params = 2; + * @return {?proto.cosmos.gov.v1beta1.DepositParams} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.getDepositParams = function() { + return /** @type{?proto.cosmos.gov.v1beta1.DepositParams} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.DepositParams, 2)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.DepositParams|undefined} value + * @return {!proto.cosmos.gov.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.setDepositParams = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.clearDepositParams = function() { + return this.setDepositParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.hasDepositParams = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional TallyParams tally_params = 3; + * @return {?proto.cosmos.gov.v1beta1.TallyParams} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.getTallyParams = function() { + return /** @type{?proto.cosmos.gov.v1beta1.TallyParams} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.TallyParams, 3)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.TallyParams|undefined} value + * @return {!proto.cosmos.gov.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.setTallyParams = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.clearTallyParams = function() { + return this.setTallyParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryParamsResponse.prototype.hasTallyParams = 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.gov.v1beta1.QueryDepositRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryDepositRequest.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: 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.cosmos.gov.v1beta1.QueryDepositRequest} + */ +proto.cosmos.gov.v1beta1.QueryDepositRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryDepositRequest; + return proto.cosmos.gov.v1beta1.QueryDepositRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryDepositRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryDepositRequest} + */ +proto.cosmos.gov.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.setProposalId(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.cosmos.gov.v1beta1.QueryDepositRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryDepositRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalId(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getDepositor(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint64 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.QueryDepositRequest.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.QueryDepositRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryDepositRequest.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string depositor = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.QueryDepositRequest.prototype.getDepositor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.QueryDepositRequest} returns this + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryDepositResponse.toObject = function(includeInstance, msg) { + var f, obj = { + deposit: (f = msg.getDeposit()) && cosmos_gov_v1beta1_gov_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.cosmos.gov.v1beta1.QueryDepositResponse} + */ +proto.cosmos.gov.v1beta1.QueryDepositResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryDepositResponse; + return proto.cosmos.gov.v1beta1.QueryDepositResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryDepositResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryDepositResponse} + */ +proto.cosmos.gov.v1beta1.QueryDepositResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_gov_v1beta1_gov_pb.Deposit; + reader.readMessage(value,cosmos_gov_v1beta1_gov_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.cosmos.gov.v1beta1.QueryDepositResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryDepositResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDeposit(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_gov_v1beta1_gov_pb.Deposit.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Deposit deposit = 1; + * @return {?proto.cosmos.gov.v1beta1.Deposit} + */ +proto.cosmos.gov.v1beta1.QueryDepositResponse.prototype.getDeposit = function() { + return /** @type{?proto.cosmos.gov.v1beta1.Deposit} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.Deposit, 1)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.Deposit|undefined} value + * @return {!proto.cosmos.gov.v1beta1.QueryDepositResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryDepositResponse.prototype.setDeposit = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryDepositResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryDepositResponse.prototype.clearDeposit = function() { + return this.setDeposit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryDepositsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: 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.cosmos.gov.v1beta1.QueryDepositsRequest} + */ +proto.cosmos.gov.v1beta1.QueryDepositsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryDepositsRequest; + return proto.cosmos.gov.v1beta1.QueryDepositsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryDepositsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryDepositsRequest} + */ +proto.cosmos.gov.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.setProposalId(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.gov.v1beta1.QueryDepositsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryDepositsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalId(); + 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 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.QueryDepositsRequest.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.QueryDepositsRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryDepositsRequest.prototype.setProposalId = 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.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsRequest} returns this +*/ +proto.cosmos.gov.v1beta1.QueryDepositsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryDepositsRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryDepositsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryDepositsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + depositsList: jspb.Message.toObjectList(msg.getDepositsList(), + cosmos_gov_v1beta1_gov_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.cosmos.gov.v1beta1.QueryDepositsResponse} + */ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryDepositsResponse; + return proto.cosmos.gov.v1beta1.QueryDepositsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryDepositsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryDepositsResponse} + */ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_gov_v1beta1_gov_pb.Deposit; + reader.readMessage(value,cosmos_gov_v1beta1_gov_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.cosmos.gov.v1beta1.QueryDepositsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDepositsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_gov_v1beta1_gov_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.cosmos.gov.v1beta1.QueryDepositsResponse.prototype.getDepositsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_gov_v1beta1_gov_pb.Deposit, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.QueryDepositsResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.prototype.setDepositsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.Deposit=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.gov.v1beta1.Deposit} + */ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.prototype.addDeposits = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.gov.v1beta1.Deposit, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.gov.v1beta1.QueryDepositsResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.prototype.clearDepositsList = function() { + return this.setDepositsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryDepositsResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryDepositsResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryDepositsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryTallyResultRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.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.cosmos.gov.v1beta1.QueryTallyResultRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryTallyResultRequest.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.cosmos.gov.v1beta1.QueryTallyResultRequest} + */ +proto.cosmos.gov.v1beta1.QueryTallyResultRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryTallyResultRequest; + return proto.cosmos.gov.v1beta1.QueryTallyResultRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryTallyResultRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryTallyResultRequest} + */ +proto.cosmos.gov.v1beta1.QueryTallyResultRequest.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.cosmos.gov.v1beta1.QueryTallyResultRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.QueryTallyResultRequest.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.v1beta1.QueryTallyResultRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryTallyResultRequest.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.cosmos.gov.v1beta1.QueryTallyResultRequest.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.QueryTallyResultRequest} returns this + */ +proto.cosmos.gov.v1beta1.QueryTallyResultRequest.prototype.setProposalId = 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.cosmos.gov.v1beta1.QueryTallyResultResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.QueryTallyResultResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.QueryTallyResultResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.toObject = function(includeInstance, msg) { + var f, obj = { + tally: (f = msg.getTally()) && cosmos_gov_v1beta1_gov_pb.TallyResult.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.gov.v1beta1.QueryTallyResultResponse} + */ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.QueryTallyResultResponse; + return proto.cosmos.gov.v1beta1.QueryTallyResultResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.QueryTallyResultResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.QueryTallyResultResponse} + */ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_gov_v1beta1_gov_pb.TallyResult; + reader.readMessage(value,cosmos_gov_v1beta1_gov_pb.TallyResult.deserializeBinaryFromReader); + msg.setTally(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.QueryTallyResultResponse.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.v1beta1.QueryTallyResultResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTally(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_gov_v1beta1_gov_pb.TallyResult.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TallyResult tally = 1; + * @return {?proto.cosmos.gov.v1beta1.TallyResult} + */ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.prototype.getTally = function() { + return /** @type{?proto.cosmos.gov.v1beta1.TallyResult} */ ( + jspb.Message.getWrapperField(this, cosmos_gov_v1beta1_gov_pb.TallyResult, 1)); +}; + + +/** + * @param {?proto.cosmos.gov.v1beta1.TallyResult|undefined} value + * @return {!proto.cosmos.gov.v1beta1.QueryTallyResultResponse} returns this +*/ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.prototype.setTally = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.QueryTallyResultResponse} returns this + */ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.prototype.clearTally = function() { + return this.setTally(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.QueryTallyResultResponse.prototype.hasTally = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.cosmos.gov.v1beta1); diff --git a/src/types/proto-types/cosmos/gov/v1beta1/tx_grpc_web_pb.js b/src/types/proto-types/cosmos/gov/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..bfa7e873 --- /dev/null +++ b/src/types/proto-types/cosmos/gov/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,326 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.gov.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_gov_v1beta1_gov_pb = require('../../../cosmos/gov/v1beta1/gov_pb.js') + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.gov = {}; +proto.cosmos.gov.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.gov.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.gov.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.MsgSubmitProposal, + * !proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse>} + */ +const methodDescriptor_Msg_SubmitProposal = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Msg/SubmitProposal', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.MsgSubmitProposal, + proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.MsgSubmitProposal, + * !proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse>} + */ +const methodInfo_Msg_SubmitProposal = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.MsgClient.prototype.submitProposal = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Msg/SubmitProposal', + request, + metadata || {}, + methodDescriptor_Msg_SubmitProposal, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.MsgPromiseClient.prototype.submitProposal = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Msg/SubmitProposal', + request, + metadata || {}, + methodDescriptor_Msg_SubmitProposal); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.MsgVote, + * !proto.cosmos.gov.v1beta1.MsgVoteResponse>} + */ +const methodDescriptor_Msg_Vote = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Msg/Vote', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.MsgVote, + proto.cosmos.gov.v1beta1.MsgVoteResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.MsgVote} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.MsgVoteResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.MsgVote, + * !proto.cosmos.gov.v1beta1.MsgVoteResponse>} + */ +const methodInfo_Msg_Vote = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.MsgVoteResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.MsgVote} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.MsgVoteResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.MsgVote} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.MsgVoteResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.MsgClient.prototype.vote = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Msg/Vote', + request, + metadata || {}, + methodDescriptor_Msg_Vote, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.MsgVote} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.MsgPromiseClient.prototype.vote = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Msg/Vote', + request, + metadata || {}, + methodDescriptor_Msg_Vote); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.gov.v1beta1.MsgDeposit, + * !proto.cosmos.gov.v1beta1.MsgDepositResponse>} + */ +const methodDescriptor_Msg_Deposit = new grpc.web.MethodDescriptor( + '/cosmos.gov.v1beta1.Msg/Deposit', + grpc.web.MethodType.UNARY, + proto.cosmos.gov.v1beta1.MsgDeposit, + proto.cosmos.gov.v1beta1.MsgDepositResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.MsgDeposit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.MsgDepositResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.gov.v1beta1.MsgDeposit, + * !proto.cosmos.gov.v1beta1.MsgDepositResponse>} + */ +const methodInfo_Msg_Deposit = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.gov.v1beta1.MsgDepositResponse, + /** + * @param {!proto.cosmos.gov.v1beta1.MsgDeposit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.gov.v1beta1.MsgDepositResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.gov.v1beta1.MsgDeposit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.gov.v1beta1.MsgDepositResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.gov.v1beta1.MsgClient.prototype.deposit = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.gov.v1beta1.Msg/Deposit', + request, + metadata || {}, + methodDescriptor_Msg_Deposit, + callback); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.MsgDeposit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.gov.v1beta1.MsgPromiseClient.prototype.deposit = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.gov.v1beta1.Msg/Deposit', + request, + metadata || {}, + methodDescriptor_Msg_Deposit); +}; + + +module.exports = proto.cosmos.gov.v1beta1; + diff --git a/src/types/proto-types/cosmos/gov/v1beta1/tx_pb.js b/src/types/proto-types/cosmos/gov/v1beta1/tx_pb.js new file mode 100644 index 00000000..f76f101c --- /dev/null +++ b/src/types/proto-types/cosmos/gov/v1beta1/tx_pb.js @@ -0,0 +1,1140 @@ +// source: cosmos/gov/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +var cosmos_gov_v1beta1_gov_pb = require('../../../cosmos/gov/v1beta1/gov_pb.js'); +goog.object.extend(proto, cosmos_gov_v1beta1_gov_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); +goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgDeposit', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgDepositResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgSubmitProposal', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgVote', null, global); +goog.exportSymbol('proto.cosmos.gov.v1beta1.MsgVoteResponse', 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.v1beta1.MsgSubmitProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.MsgSubmitProposal.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.MsgSubmitProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.MsgSubmitProposal.displayName = 'proto.cosmos.gov.v1beta1.MsgSubmitProposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.MsgSubmitProposalResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.displayName = 'proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.MsgVote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.MsgVote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.MsgVote.displayName = 'proto.cosmos.gov.v1beta1.MsgVote'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.MsgVoteResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.MsgVoteResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.MsgVoteResponse.displayName = 'proto.cosmos.gov.v1beta1.MsgVoteResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.MsgDeposit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.gov.v1beta1.MsgDeposit.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.MsgDeposit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.MsgDeposit.displayName = 'proto.cosmos.gov.v1beta1.MsgDeposit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.v1beta1.MsgDepositResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.gov.v1beta1.MsgDepositResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.gov.v1beta1.MsgDepositResponse.displayName = 'proto.cosmos.gov.v1beta1.MsgDepositResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.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.gov.v1beta1.MsgSubmitProposal.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.MsgSubmitProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.MsgSubmitProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.toObject = function(includeInstance, msg) { + var f, obj = { + content: (f = msg.getContent()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + initialDepositList: jspb.Message.toObjectList(msg.getInitialDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + proposer: 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.cosmos.gov.v1beta1.MsgSubmitProposal} + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.MsgSubmitProposal; + return proto.cosmos.gov.v1beta1.MsgSubmitProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.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 = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addInitialDeposit(value); + break; + case 3: + 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.v1beta1.MsgSubmitProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.MsgSubmitProposal.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.v1beta1.MsgSubmitProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.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.getInitialDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getProposer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional google.protobuf.Any content = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.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.cosmos.gov.v1beta1.MsgSubmitProposal} returns this +*/ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.setContent = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} returns this + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.clearContent = function() { + return this.setContent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.hasContent = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin initial_deposit = 2; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.getInitialDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} returns this +*/ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.setInitialDepositList = 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.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.addInitialDeposit = 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.cosmos.gov.v1beta1.MsgSubmitProposal} returns this + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.clearInitialDepositList = function() { + return this.setInitialDepositList([]); +}; + + +/** + * optional string proposer = 3; + * @return {string} + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.getProposer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.MsgSubmitProposal} returns this + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposal.prototype.setProposer = 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.cosmos.gov.v1beta1.MsgSubmitProposalResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.MsgSubmitProposalResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.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.cosmos.gov.v1beta1.MsgSubmitProposalResponse} + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse; + return proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse} + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.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.cosmos.gov.v1beta1.MsgSubmitProposalResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.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.v1beta1.MsgSubmitProposalResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.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.cosmos.gov.v1beta1.MsgSubmitProposalResponse.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse} returns this + */ +proto.cosmos.gov.v1beta1.MsgSubmitProposalResponse.prototype.setProposalId = 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.cosmos.gov.v1beta1.MsgVote.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.MsgVote.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.MsgVote} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgVote.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) + }; + + 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.v1beta1.MsgVote} + */ +proto.cosmos.gov.v1beta1.MsgVote.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.MsgVote; + return proto.cosmos.gov.v1beta1.MsgVote.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.MsgVote} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.MsgVote} + */ +proto.cosmos.gov.v1beta1.MsgVote.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.cosmos.gov.v1beta1.VoteOption} */ (reader.readEnum()); + msg.setOption(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.gov.v1beta1.MsgVote.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.MsgVote.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.v1beta1.MsgVote} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgVote.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 + ); + } +}; + + +/** + * optional uint64 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.MsgVote.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.MsgVote} returns this + */ +proto.cosmos.gov.v1beta1.MsgVote.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string voter = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.MsgVote.prototype.getVoter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.MsgVote} returns this + */ +proto.cosmos.gov.v1beta1.MsgVote.prototype.setVoter = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional VoteOption option = 3; + * @return {!proto.cosmos.gov.v1beta1.VoteOption} + */ +proto.cosmos.gov.v1beta1.MsgVote.prototype.getOption = function() { + return /** @type {!proto.cosmos.gov.v1beta1.VoteOption} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.cosmos.gov.v1beta1.VoteOption} value + * @return {!proto.cosmos.gov.v1beta1.MsgVote} returns this + */ +proto.cosmos.gov.v1beta1.MsgVote.prototype.setOption = 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.cosmos.gov.v1beta1.MsgVoteResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.MsgVoteResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.MsgVoteResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgVoteResponse.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.v1beta1.MsgVoteResponse} + */ +proto.cosmos.gov.v1beta1.MsgVoteResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.MsgVoteResponse; + return proto.cosmos.gov.v1beta1.MsgVoteResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.MsgVoteResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.MsgVoteResponse} + */ +proto.cosmos.gov.v1beta1.MsgVoteResponse.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.v1beta1.MsgVoteResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.MsgVoteResponse.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.v1beta1.MsgVoteResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgVoteResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.gov.v1beta1.MsgDeposit.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.gov.v1beta1.MsgDeposit.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.MsgDeposit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.MsgDeposit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgDeposit.toObject = function(includeInstance, msg) { + var f, obj = { + proposalId: 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.cosmos.gov.v1beta1.MsgDeposit} + */ +proto.cosmos.gov.v1beta1.MsgDeposit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.MsgDeposit; + return proto.cosmos.gov.v1beta1.MsgDeposit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.MsgDeposit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.MsgDeposit} + */ +proto.cosmos.gov.v1beta1.MsgDeposit.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.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.cosmos.gov.v1beta1.MsgDeposit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.MsgDeposit.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.v1beta1.MsgDeposit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgDeposit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProposalId(); + 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 proposal_id = 1; + * @return {number} + */ +proto.cosmos.gov.v1beta1.MsgDeposit.prototype.getProposalId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.gov.v1beta1.MsgDeposit} returns this + */ +proto.cosmos.gov.v1beta1.MsgDeposit.prototype.setProposalId = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string depositor = 2; + * @return {string} + */ +proto.cosmos.gov.v1beta1.MsgDeposit.prototype.getDepositor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.gov.v1beta1.MsgDeposit} returns this + */ +proto.cosmos.gov.v1beta1.MsgDeposit.prototype.setDepositor = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 3; + * @return {!Array} + */ +proto.cosmos.gov.v1beta1.MsgDeposit.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.gov.v1beta1.MsgDeposit} returns this +*/ +proto.cosmos.gov.v1beta1.MsgDeposit.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.gov.v1beta1.MsgDeposit.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.gov.v1beta1.MsgDeposit} returns this + */ +proto.cosmos.gov.v1beta1.MsgDeposit.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.gov.v1beta1.MsgDepositResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.gov.v1beta1.MsgDepositResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.v1beta1.MsgDepositResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgDepositResponse.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.v1beta1.MsgDepositResponse} + */ +proto.cosmos.gov.v1beta1.MsgDepositResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.gov.v1beta1.MsgDepositResponse; + return proto.cosmos.gov.v1beta1.MsgDepositResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.gov.v1beta1.MsgDepositResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.gov.v1beta1.MsgDepositResponse} + */ +proto.cosmos.gov.v1beta1.MsgDepositResponse.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.v1beta1.MsgDepositResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.gov.v1beta1.MsgDepositResponse.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.v1beta1.MsgDepositResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.gov.v1beta1.MsgDepositResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cosmos.gov.v1beta1); diff --git a/src/types/proto-types/cosmos/mint/v1beta1/genesis_pb.js b/src/types/proto-types/cosmos/mint/v1beta1/genesis_pb.js new file mode 100644 index 00000000..f35eb37b --- /dev/null +++ b/src/types/proto-types/cosmos/mint/v1beta1/genesis_pb.js @@ -0,0 +1,243 @@ +// source: cosmos/mint/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_mint_v1beta1_mint_pb = require('../../../cosmos/mint/v1beta1/mint_pb.js'); +goog.object.extend(proto, cosmos_mint_v1beta1_mint_pb); +goog.exportSymbol('proto.cosmos.mint.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.cosmos.mint.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.GenesisState.displayName = 'proto.cosmos.mint.v1beta1.GenesisState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.mint.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.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.cosmos.mint.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + minter: (f = msg.getMinter()) && cosmos_mint_v1beta1_mint_pb.Minter.toObject(includeInstance, f), + params: (f = msg.getParams()) && cosmos_mint_v1beta1_mint_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.cosmos.mint.v1beta1.GenesisState} + */ +proto.cosmos.mint.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.GenesisState; + return proto.cosmos.mint.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.GenesisState} + */ +proto.cosmos.mint.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_mint_v1beta1_mint_pb.Minter; + reader.readMessage(value,cosmos_mint_v1beta1_mint_pb.Minter.deserializeBinaryFromReader); + msg.setMinter(value); + break; + case 2: + var value = new cosmos_mint_v1beta1_mint_pb.Params; + reader.readMessage(value,cosmos_mint_v1beta1_mint_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.cosmos.mint.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.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.cosmos.mint.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMinter(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_mint_v1beta1_mint_pb.Minter.serializeBinaryToWriter + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_mint_v1beta1_mint_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Minter minter = 1; + * @return {?proto.cosmos.mint.v1beta1.Minter} + */ +proto.cosmos.mint.v1beta1.GenesisState.prototype.getMinter = function() { + return /** @type{?proto.cosmos.mint.v1beta1.Minter} */ ( + jspb.Message.getWrapperField(this, cosmos_mint_v1beta1_mint_pb.Minter, 1)); +}; + + +/** + * @param {?proto.cosmos.mint.v1beta1.Minter|undefined} value + * @return {!proto.cosmos.mint.v1beta1.GenesisState} returns this +*/ +proto.cosmos.mint.v1beta1.GenesisState.prototype.setMinter = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.mint.v1beta1.GenesisState} returns this + */ +proto.cosmos.mint.v1beta1.GenesisState.prototype.clearMinter = function() { + return this.setMinter(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.mint.v1beta1.GenesisState.prototype.hasMinter = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Params params = 2; + * @return {?proto.cosmos.mint.v1beta1.Params} + */ +proto.cosmos.mint.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.cosmos.mint.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_mint_v1beta1_mint_pb.Params, 2)); +}; + + +/** + * @param {?proto.cosmos.mint.v1beta1.Params|undefined} value + * @return {!proto.cosmos.mint.v1beta1.GenesisState} returns this +*/ +proto.cosmos.mint.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.mint.v1beta1.GenesisState} returns this + */ +proto.cosmos.mint.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.mint.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.cosmos.mint.v1beta1); diff --git a/src/types/proto-types/cosmos/mint/v1beta1/mint_pb.js b/src/types/proto-types/cosmos/mint/v1beta1/mint_pb.js new file mode 100644 index 00000000..953f3fdb --- /dev/null +++ b/src/types/proto-types/cosmos/mint/v1beta1/mint_pb.js @@ -0,0 +1,501 @@ +// source: cosmos/mint/v1beta1/mint.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.mint.v1beta1.Minter', null, global); +goog.exportSymbol('proto.cosmos.mint.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.cosmos.mint.v1beta1.Minter = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.Minter, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.Minter.displayName = 'proto.cosmos.mint.v1beta1.Minter'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.mint.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.Params.displayName = 'proto.cosmos.mint.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.cosmos.mint.v1beta1.Minter.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.v1beta1.Minter.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.mint.v1beta1.Minter} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.Minter.toObject = function(includeInstance, msg) { + var f, obj = { + inflation: jspb.Message.getFieldWithDefault(msg, 1, ""), + annualProvisions: 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.mint.v1beta1.Minter} + */ +proto.cosmos.mint.v1beta1.Minter.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.Minter; + return proto.cosmos.mint.v1beta1.Minter.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.Minter} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.Minter} + */ +proto.cosmos.mint.v1beta1.Minter.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.setInflation(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAnnualProvisions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.mint.v1beta1.Minter.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.v1beta1.Minter.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.mint.v1beta1.Minter} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.Minter.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInflation(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAnnualProvisions(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string inflation = 1; + * @return {string} + */ +proto.cosmos.mint.v1beta1.Minter.prototype.getInflation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.mint.v1beta1.Minter} returns this + */ +proto.cosmos.mint.v1beta1.Minter.prototype.setInflation = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string annual_provisions = 2; + * @return {string} + */ +proto.cosmos.mint.v1beta1.Minter.prototype.getAnnualProvisions = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.mint.v1beta1.Minter} returns this + */ +proto.cosmos.mint.v1beta1.Minter.prototype.setAnnualProvisions = 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.mint.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.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.cosmos.mint.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + mintDenom: jspb.Message.getFieldWithDefault(msg, 1, ""), + inflationRateChange: jspb.Message.getFieldWithDefault(msg, 2, ""), + inflationMax: jspb.Message.getFieldWithDefault(msg, 3, ""), + inflationMin: jspb.Message.getFieldWithDefault(msg, 4, ""), + goalBonded: jspb.Message.getFieldWithDefault(msg, 5, ""), + blocksPerYear: 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.cosmos.mint.v1beta1.Params} + */ +proto.cosmos.mint.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.Params; + return proto.cosmos.mint.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.Params} + */ +proto.cosmos.mint.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.setMintDenom(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setInflationRateChange(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setInflationMax(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInflationMin(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setGoalBonded(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlocksPerYear(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.mint.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.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.cosmos.mint.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMintDenom(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getInflationRateChange(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getInflationMax(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInflationMin(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getGoalBonded(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getBlocksPerYear(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } +}; + + +/** + * optional string mint_denom = 1; + * @return {string} + */ +proto.cosmos.mint.v1beta1.Params.prototype.getMintDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.mint.v1beta1.Params} returns this + */ +proto.cosmos.mint.v1beta1.Params.prototype.setMintDenom = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string inflation_rate_change = 2; + * @return {string} + */ +proto.cosmos.mint.v1beta1.Params.prototype.getInflationRateChange = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.mint.v1beta1.Params} returns this + */ +proto.cosmos.mint.v1beta1.Params.prototype.setInflationRateChange = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string inflation_max = 3; + * @return {string} + */ +proto.cosmos.mint.v1beta1.Params.prototype.getInflationMax = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.mint.v1beta1.Params} returns this + */ +proto.cosmos.mint.v1beta1.Params.prototype.setInflationMax = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string inflation_min = 4; + * @return {string} + */ +proto.cosmos.mint.v1beta1.Params.prototype.getInflationMin = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.mint.v1beta1.Params} returns this + */ +proto.cosmos.mint.v1beta1.Params.prototype.setInflationMin = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string goal_bonded = 5; + * @return {string} + */ +proto.cosmos.mint.v1beta1.Params.prototype.getGoalBonded = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.mint.v1beta1.Params} returns this + */ +proto.cosmos.mint.v1beta1.Params.prototype.setGoalBonded = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional uint64 blocks_per_year = 6; + * @return {number} + */ +proto.cosmos.mint.v1beta1.Params.prototype.getBlocksPerYear = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.mint.v1beta1.Params} returns this + */ +proto.cosmos.mint.v1beta1.Params.prototype.setBlocksPerYear = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +goog.object.extend(exports, proto.cosmos.mint.v1beta1); diff --git a/src/types/proto-types/cosmos/mint/v1beta1/query_grpc_web_pb.js b/src/types/proto-types/cosmos/mint/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..cab9027c --- /dev/null +++ b/src/types/proto-types/cosmos/mint/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,322 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.mint.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_mint_v1beta1_mint_pb = require('../../../cosmos/mint/v1beta1/mint_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.mint = {}; +proto.cosmos.mint.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.mint.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.mint.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.mint.v1beta1.QueryParamsRequest, + * !proto.cosmos.mint.v1beta1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/cosmos.mint.v1beta1.Query/Params', + grpc.web.MethodType.UNARY, + proto.cosmos.mint.v1beta1.QueryParamsRequest, + proto.cosmos.mint.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.mint.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.mint.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.mint.v1beta1.QueryParamsRequest, + * !proto.cosmos.mint.v1beta1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.mint.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.mint.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.mint.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.mint.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.mint.v1beta1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.mint.v1beta1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.mint.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.cosmos.mint.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.mint.v1beta1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.mint.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.mint.v1beta1.QueryInflationRequest, + * !proto.cosmos.mint.v1beta1.QueryInflationResponse>} + */ +const methodDescriptor_Query_Inflation = new grpc.web.MethodDescriptor( + '/cosmos.mint.v1beta1.Query/Inflation', + grpc.web.MethodType.UNARY, + proto.cosmos.mint.v1beta1.QueryInflationRequest, + proto.cosmos.mint.v1beta1.QueryInflationResponse, + /** + * @param {!proto.cosmos.mint.v1beta1.QueryInflationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.mint.v1beta1.QueryInflationResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.mint.v1beta1.QueryInflationRequest, + * !proto.cosmos.mint.v1beta1.QueryInflationResponse>} + */ +const methodInfo_Query_Inflation = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.mint.v1beta1.QueryInflationResponse, + /** + * @param {!proto.cosmos.mint.v1beta1.QueryInflationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.mint.v1beta1.QueryInflationResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.mint.v1beta1.QueryInflationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.mint.v1beta1.QueryInflationResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.mint.v1beta1.QueryClient.prototype.inflation = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.mint.v1beta1.Query/Inflation', + request, + metadata || {}, + methodDescriptor_Query_Inflation, + callback); +}; + + +/** + * @param {!proto.cosmos.mint.v1beta1.QueryInflationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.mint.v1beta1.QueryPromiseClient.prototype.inflation = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.mint.v1beta1.Query/Inflation', + request, + metadata || {}, + methodDescriptor_Query_Inflation); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest, + * !proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse>} + */ +const methodDescriptor_Query_AnnualProvisions = new grpc.web.MethodDescriptor( + '/cosmos.mint.v1beta1.Query/AnnualProvisions', + grpc.web.MethodType.UNARY, + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest, + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse, + /** + * @param {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest, + * !proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse>} + */ +const methodInfo_Query_AnnualProvisions = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse, + /** + * @param {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.mint.v1beta1.QueryClient.prototype.annualProvisions = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.mint.v1beta1.Query/AnnualProvisions', + request, + metadata || {}, + methodDescriptor_Query_AnnualProvisions, + callback); +}; + + +/** + * @param {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.mint.v1beta1.QueryPromiseClient.prototype.annualProvisions = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.mint.v1beta1.Query/AnnualProvisions', + request, + metadata || {}, + methodDescriptor_Query_AnnualProvisions); +}; + + +module.exports = proto.cosmos.mint.v1beta1; + diff --git a/src/types/proto-types/cosmos/mint/v1beta1/query_pb.js b/src/types/proto-types/cosmos/mint/v1beta1/query_pb.js new file mode 100644 index 00000000..d23b0930 --- /dev/null +++ b/src/types/proto-types/cosmos/mint/v1beta1/query_pb.js @@ -0,0 +1,915 @@ +// source: cosmos/mint/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_mint_v1beta1_mint_pb = require('../../../cosmos/mint/v1beta1/mint_pb.js'); +goog.object.extend(proto, cosmos_mint_v1beta1_mint_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); +goog.exportSymbol('proto.cosmos.mint.v1beta1.QueryInflationResponse', null, global); +goog.exportSymbol('proto.cosmos.mint.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.QueryParamsRequest.displayName = 'proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.QueryParamsResponse.displayName = 'proto.cosmos.mint.v1beta1.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.cosmos.mint.v1beta1.QueryInflationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.QueryInflationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.QueryInflationRequest.displayName = 'proto.cosmos.mint.v1beta1.QueryInflationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.mint.v1beta1.QueryInflationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.QueryInflationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.QueryInflationResponse.displayName = 'proto.cosmos.mint.v1beta1.QueryInflationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.mint.v1beta1.QueryAnnualProvisionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.displayName = 'proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.mint.v1beta1.QueryAnnualProvisionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.displayName = 'proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.mint.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsRequest} + */ +proto.cosmos.mint.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.QueryParamsRequest; + return proto.cosmos.mint.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.QueryParamsRequest} + */ +proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_mint_v1beta1_mint_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.cosmos.mint.v1beta1.QueryParamsResponse} + */ +proto.cosmos.mint.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.QueryParamsResponse; + return proto.cosmos.mint.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.QueryParamsResponse} + */ +proto.cosmos.mint.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_mint_v1beta1_mint_pb.Params; + reader.readMessage(value,cosmos_mint_v1beta1_mint_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.cosmos.mint.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.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.cosmos.mint.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_mint_v1beta1_mint_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.mint.v1beta1.Params} + */ +proto.cosmos.mint.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.cosmos.mint.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_mint_v1beta1_mint_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.mint.v1beta1.Params|undefined} value + * @return {!proto.cosmos.mint.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.mint.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.mint.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.mint.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.mint.v1beta1.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.cosmos.mint.v1beta1.QueryInflationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.v1beta1.QueryInflationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.mint.v1beta1.QueryInflationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryInflationRequest.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.mint.v1beta1.QueryInflationRequest} + */ +proto.cosmos.mint.v1beta1.QueryInflationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.QueryInflationRequest; + return proto.cosmos.mint.v1beta1.QueryInflationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.QueryInflationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.QueryInflationRequest} + */ +proto.cosmos.mint.v1beta1.QueryInflationRequest.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.mint.v1beta1.QueryInflationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.v1beta1.QueryInflationRequest.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.mint.v1beta1.QueryInflationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryInflationRequest.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.mint.v1beta1.QueryInflationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.v1beta1.QueryInflationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.mint.v1beta1.QueryInflationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + inflation: msg.getInflation_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.mint.v1beta1.QueryInflationResponse} + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.QueryInflationResponse; + return proto.cosmos.mint.v1beta1.QueryInflationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.QueryInflationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.QueryInflationResponse} + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.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.setInflation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.v1beta1.QueryInflationResponse.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.mint.v1beta1.QueryInflationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInflation_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes inflation = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.prototype.getInflation = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes inflation = 1; + * This is a type-conversion wrapper around `getInflation()` + * @return {string} + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.prototype.getInflation_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getInflation())); +}; + + +/** + * optional bytes inflation = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getInflation()` + * @return {!Uint8Array} + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.prototype.getInflation_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getInflation())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.mint.v1beta1.QueryInflationResponse} returns this + */ +proto.cosmos.mint.v1beta1.QueryInflationResponse.prototype.setInflation = 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.mint.v1beta1.QueryAnnualProvisionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.mint.v1beta1.QueryAnnualProvisionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.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.mint.v1beta1.QueryAnnualProvisionsRequest} + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest; + return proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest} + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.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.mint.v1beta1.QueryAnnualProvisionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.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.mint.v1beta1.QueryAnnualProvisionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsRequest.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.mint.v1beta1.QueryAnnualProvisionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.mint.v1beta1.QueryAnnualProvisionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + annualProvisions: msg.getAnnualProvisions_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.mint.v1beta1.QueryAnnualProvisionsResponse} + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse; + return proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse} + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.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.setAnnualProvisions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.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.mint.v1beta1.QueryAnnualProvisionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAnnualProvisions_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes annual_provisions = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.prototype.getAnnualProvisions = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes annual_provisions = 1; + * This is a type-conversion wrapper around `getAnnualProvisions()` + * @return {string} + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.prototype.getAnnualProvisions_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAnnualProvisions())); +}; + + +/** + * optional bytes annual_provisions = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAnnualProvisions()` + * @return {!Uint8Array} + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.prototype.getAnnualProvisions_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAnnualProvisions())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse} returns this + */ +proto.cosmos.mint.v1beta1.QueryAnnualProvisionsResponse.prototype.setAnnualProvisions = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +goog.object.extend(exports, proto.cosmos.mint.v1beta1); diff --git a/src/types/proto-types/cosmos/params/v1beta1/params_pb.js b/src/types/proto-types/cosmos/params/v1beta1/params_pb.js new file mode 100644 index 00000000..6efc1573 --- /dev/null +++ b/src/types/proto-types/cosmos/params/v1beta1/params_pb.js @@ -0,0 +1,471 @@ +// source: cosmos/params/v1beta1/params.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.params.v1beta1.ParamChange', null, global); +goog.exportSymbol('proto.cosmos.params.v1beta1.ParameterChangeProposal', 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.params.v1beta1.ParameterChangeProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.params.v1beta1.ParameterChangeProposal.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.params.v1beta1.ParameterChangeProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.params.v1beta1.ParameterChangeProposal.displayName = 'proto.cosmos.params.v1beta1.ParameterChangeProposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.params.v1beta1.ParamChange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.params.v1beta1.ParamChange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.params.v1beta1.ParamChange.displayName = 'proto.cosmos.params.v1beta1.ParamChange'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.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.params.v1beta1.ParameterChangeProposal.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.params.v1beta1.ParameterChangeProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.params.v1beta1.ParameterChangeProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + changesList: jspb.Message.toObjectList(msg.getChangesList(), + proto.cosmos.params.v1beta1.ParamChange.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.params.v1beta1.ParameterChangeProposal} + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.params.v1beta1.ParameterChangeProposal; + return proto.cosmos.params.v1beta1.ParameterChangeProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.params.v1beta1.ParameterChangeProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.params.v1beta1.ParameterChangeProposal} + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.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.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = new proto.cosmos.params.v1beta1.ParamChange; + reader.readMessage(value,proto.cosmos.params.v1beta1.ParamChange.deserializeBinaryFromReader); + msg.addChanges(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.params.v1beta1.ParameterChangeProposal.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.params.v1beta1.ParameterChangeProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getChangesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.params.v1beta1.ParamChange.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.params.v1beta1.ParameterChangeProposal} returns this + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.params.v1beta1.ParameterChangeProposal} returns this + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated ParamChange changes = 3; + * @return {!Array} + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.getChangesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.params.v1beta1.ParamChange, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.params.v1beta1.ParameterChangeProposal} returns this +*/ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.setChangesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.params.v1beta1.ParamChange=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.params.v1beta1.ParamChange} + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.addChanges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.params.v1beta1.ParamChange, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.params.v1beta1.ParameterChangeProposal} returns this + */ +proto.cosmos.params.v1beta1.ParameterChangeProposal.prototype.clearChangesList = function() { + return this.setChangesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.params.v1beta1.ParamChange.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.params.v1beta1.ParamChange.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.params.v1beta1.ParamChange} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.params.v1beta1.ParamChange.toObject = function(includeInstance, msg) { + var f, obj = { + subspace: jspb.Message.getFieldWithDefault(msg, 1, ""), + key: jspb.Message.getFieldWithDefault(msg, 2, ""), + value: 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.cosmos.params.v1beta1.ParamChange} + */ +proto.cosmos.params.v1beta1.ParamChange.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.params.v1beta1.ParamChange; + return proto.cosmos.params.v1beta1.ParamChange.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.params.v1beta1.ParamChange} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.params.v1beta1.ParamChange} + */ +proto.cosmos.params.v1beta1.ParamChange.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.setSubspace(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.params.v1beta1.ParamChange.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.params.v1beta1.ParamChange.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.params.v1beta1.ParamChange} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.params.v1beta1.ParamChange.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSubspace(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getValue(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string subspace = 1; + * @return {string} + */ +proto.cosmos.params.v1beta1.ParamChange.prototype.getSubspace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.params.v1beta1.ParamChange} returns this + */ +proto.cosmos.params.v1beta1.ParamChange.prototype.setSubspace = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string key = 2; + * @return {string} + */ +proto.cosmos.params.v1beta1.ParamChange.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.params.v1beta1.ParamChange} returns this + */ +proto.cosmos.params.v1beta1.ParamChange.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string value = 3; + * @return {string} + */ +proto.cosmos.params.v1beta1.ParamChange.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.params.v1beta1.ParamChange} returns this + */ +proto.cosmos.params.v1beta1.ParamChange.prototype.setValue = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.cosmos.params.v1beta1); diff --git a/src/types/proto-types/cosmos/params/v1beta1/query_grpc_web_pb.js b/src/types/proto-types/cosmos/params/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..0e3c2f43 --- /dev/null +++ b/src/types/proto-types/cosmos/params/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,162 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.params.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_params_v1beta1_params_pb = require('../../../cosmos/params/v1beta1/params_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.params = {}; +proto.cosmos.params.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.params.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.params.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.params.v1beta1.QueryParamsRequest, + * !proto.cosmos.params.v1beta1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/cosmos.params.v1beta1.Query/Params', + grpc.web.MethodType.UNARY, + proto.cosmos.params.v1beta1.QueryParamsRequest, + proto.cosmos.params.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.params.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.params.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.params.v1beta1.QueryParamsRequest, + * !proto.cosmos.params.v1beta1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.params.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.params.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.params.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.params.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.params.v1beta1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.params.v1beta1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.params.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.cosmos.params.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.params.v1beta1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.params.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +module.exports = proto.cosmos.params.v1beta1; + diff --git a/src/types/proto-types/cosmos/params/v1beta1/query_pb.js b/src/types/proto-types/cosmos/params/v1beta1/query_pb.js new file mode 100644 index 00000000..6179168a --- /dev/null +++ b/src/types/proto-types/cosmos/params/v1beta1/query_pb.js @@ -0,0 +1,376 @@ +// source: cosmos/params/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_params_v1beta1_params_pb = require('../../../cosmos/params/v1beta1/params_pb.js'); +goog.object.extend(proto, cosmos_params_v1beta1_params_pb); +goog.exportSymbol('proto.cosmos.params.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.cosmos.params.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.cosmos.params.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.params.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.params.v1beta1.QueryParamsRequest.displayName = 'proto.cosmos.params.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.cosmos.params.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.params.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.params.v1beta1.QueryParamsResponse.displayName = 'proto.cosmos.params.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.cosmos.params.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.params.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.cosmos.params.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + subspace: jspb.Message.getFieldWithDefault(msg, 1, ""), + key: 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.params.v1beta1.QueryParamsRequest} + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.params.v1beta1.QueryParamsRequest; + return proto.cosmos.params.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.params.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.params.v1beta1.QueryParamsRequest} + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.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.setSubspace(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.params.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.cosmos.params.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSubspace(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string subspace = 1; + * @return {string} + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.prototype.getSubspace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.params.v1beta1.QueryParamsRequest} returns this + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.prototype.setSubspace = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string key = 2; + * @return {string} + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.params.v1beta1.QueryParamsRequest} returns this + */ +proto.cosmos.params.v1beta1.QueryParamsRequest.prototype.setKey = 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.params.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.params.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.cosmos.params.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.params.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + param: (f = msg.getParam()) && cosmos_params_v1beta1_params_pb.ParamChange.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.params.v1beta1.QueryParamsResponse} + */ +proto.cosmos.params.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.params.v1beta1.QueryParamsResponse; + return proto.cosmos.params.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.params.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.params.v1beta1.QueryParamsResponse} + */ +proto.cosmos.params.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_params_v1beta1_params_pb.ParamChange; + reader.readMessage(value,cosmos_params_v1beta1_params_pb.ParamChange.deserializeBinaryFromReader); + msg.setParam(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.params.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.params.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.cosmos.params.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.params.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParam(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_params_v1beta1_params_pb.ParamChange.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ParamChange param = 1; + * @return {?proto.cosmos.params.v1beta1.ParamChange} + */ +proto.cosmos.params.v1beta1.QueryParamsResponse.prototype.getParam = function() { + return /** @type{?proto.cosmos.params.v1beta1.ParamChange} */ ( + jspb.Message.getWrapperField(this, cosmos_params_v1beta1_params_pb.ParamChange, 1)); +}; + + +/** + * @param {?proto.cosmos.params.v1beta1.ParamChange|undefined} value + * @return {!proto.cosmos.params.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.params.v1beta1.QueryParamsResponse.prototype.setParam = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.params.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.params.v1beta1.QueryParamsResponse.prototype.clearParam = function() { + return this.setParam(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.params.v1beta1.QueryParamsResponse.prototype.hasParam = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.cosmos.params.v1beta1); diff --git a/src/types/proto-types/cosmos/slashing/v1beta1/genesis_pb.js b/src/types/proto-types/cosmos/slashing/v1beta1/genesis_pb.js new file mode 100644 index 00000000..8d2e6c27 --- /dev/null +++ b/src/types/proto-types/cosmos/slashing/v1beta1/genesis_pb.js @@ -0,0 +1,902 @@ +// source: cosmos/slashing/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_slashing_v1beta1_slashing_pb = require('../../../cosmos/slashing/v1beta1/slashing_pb.js'); +goog.object.extend(proto, cosmos_slashing_v1beta1_slashing_pb); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.GenesisState', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.MissedBlock', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.SigningInfo', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks', 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.slashing.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.slashing.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.GenesisState.displayName = 'proto.cosmos.slashing.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.cosmos.slashing.v1beta1.SigningInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.SigningInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.SigningInfo.displayName = 'proto.cosmos.slashing.v1beta1.SigningInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.slashing.v1beta1.ValidatorMissedBlocks = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.displayName = 'proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.slashing.v1beta1.MissedBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.MissedBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.MissedBlock.displayName = 'proto.cosmos.slashing.v1beta1.MissedBlock'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.slashing.v1beta1.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.cosmos.slashing.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.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.cosmos.slashing.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_slashing_v1beta1_slashing_pb.Params.toObject(includeInstance, f), + signingInfosList: jspb.Message.toObjectList(msg.getSigningInfosList(), + proto.cosmos.slashing.v1beta1.SigningInfo.toObject, includeInstance), + missedBlocksList: jspb.Message.toObjectList(msg.getMissedBlocksList(), + proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.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.slashing.v1beta1.GenesisState} + */ +proto.cosmos.slashing.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.GenesisState; + return proto.cosmos.slashing.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.GenesisState} + */ +proto.cosmos.slashing.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_slashing_v1beta1_slashing_pb.Params; + reader.readMessage(value,cosmos_slashing_v1beta1_slashing_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new proto.cosmos.slashing.v1beta1.SigningInfo; + reader.readMessage(value,proto.cosmos.slashing.v1beta1.SigningInfo.deserializeBinaryFromReader); + msg.addSigningInfos(value); + break; + case 3: + var value = new proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks; + reader.readMessage(value,proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.deserializeBinaryFromReader); + msg.addMissedBlocks(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.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.cosmos.slashing.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_slashing_v1beta1_slashing_pb.Params.serializeBinaryToWriter + ); + } + f = message.getSigningInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.slashing.v1beta1.SigningInfo.serializeBinaryToWriter + ); + } + f = message.getMissedBlocksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.slashing.v1beta1.Params} + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.cosmos.slashing.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_slashing_v1beta1_slashing_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.slashing.v1beta1.Params|undefined} value + * @return {!proto.cosmos.slashing.v1beta1.GenesisState} returns this +*/ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.slashing.v1beta1.GenesisState} returns this + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated SigningInfo signing_infos = 2; + * @return {!Array} + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.getSigningInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.slashing.v1beta1.SigningInfo, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.slashing.v1beta1.GenesisState} returns this +*/ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.setSigningInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.slashing.v1beta1.SigningInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.slashing.v1beta1.SigningInfo} + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.addSigningInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.slashing.v1beta1.SigningInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.slashing.v1beta1.GenesisState} returns this + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.clearSigningInfosList = function() { + return this.setSigningInfosList([]); +}; + + +/** + * repeated ValidatorMissedBlocks missed_blocks = 3; + * @return {!Array} + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.getMissedBlocksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.slashing.v1beta1.GenesisState} returns this +*/ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.setMissedBlocksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks} + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.addMissedBlocks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.slashing.v1beta1.GenesisState} returns this + */ +proto.cosmos.slashing.v1beta1.GenesisState.prototype.clearMissedBlocksList = function() { + return this.setMissedBlocksList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.slashing.v1beta1.SigningInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.SigningInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.SigningInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.SigningInfo.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorSigningInfo: (f = msg.getValidatorSigningInfo()) && cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.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.slashing.v1beta1.SigningInfo} + */ +proto.cosmos.slashing.v1beta1.SigningInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.SigningInfo; + return proto.cosmos.slashing.v1beta1.SigningInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.SigningInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.SigningInfo} + */ +proto.cosmos.slashing.v1beta1.SigningInfo.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_slashing_v1beta1_slashing_pb.ValidatorSigningInfo; + reader.readMessage(value,cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.deserializeBinaryFromReader); + msg.setValidatorSigningInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.SigningInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.SigningInfo.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.slashing.v1beta1.SigningInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.SigningInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorSigningInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.slashing.v1beta1.SigningInfo.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.slashing.v1beta1.SigningInfo} returns this + */ +proto.cosmos.slashing.v1beta1.SigningInfo.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional ValidatorSigningInfo validator_signing_info = 2; + * @return {?proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} + */ +proto.cosmos.slashing.v1beta1.SigningInfo.prototype.getValidatorSigningInfo = function() { + return /** @type{?proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} */ ( + jspb.Message.getWrapperField(this, cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo, 2)); +}; + + +/** + * @param {?proto.cosmos.slashing.v1beta1.ValidatorSigningInfo|undefined} value + * @return {!proto.cosmos.slashing.v1beta1.SigningInfo} returns this +*/ +proto.cosmos.slashing.v1beta1.SigningInfo.prototype.setValidatorSigningInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.slashing.v1beta1.SigningInfo} returns this + */ +proto.cosmos.slashing.v1beta1.SigningInfo.prototype.clearValidatorSigningInfo = function() { + return this.setValidatorSigningInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.SigningInfo.prototype.hasValidatorSigningInfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.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.slashing.v1beta1.ValidatorMissedBlocks.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.ValidatorMissedBlocks} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + missedBlocksList: jspb.Message.toObjectList(msg.getMissedBlocksList(), + proto.cosmos.slashing.v1beta1.MissedBlock.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.slashing.v1beta1.ValidatorMissedBlocks} + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks; + return proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks} + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.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.slashing.v1beta1.MissedBlock; + reader.readMessage(value,proto.cosmos.slashing.v1beta1.MissedBlock.deserializeBinaryFromReader); + msg.addMissedBlocks(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.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.slashing.v1beta1.ValidatorMissedBlocks} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMissedBlocksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.slashing.v1beta1.MissedBlock.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks} returns this + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated MissedBlock missed_blocks = 2; + * @return {!Array} + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.prototype.getMissedBlocksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.slashing.v1beta1.MissedBlock, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks} returns this +*/ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.prototype.setMissedBlocksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.slashing.v1beta1.MissedBlock=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.slashing.v1beta1.MissedBlock} + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.prototype.addMissedBlocks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.slashing.v1beta1.MissedBlock, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks} returns this + */ +proto.cosmos.slashing.v1beta1.ValidatorMissedBlocks.prototype.clearMissedBlocksList = function() { + return this.setMissedBlocksList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.slashing.v1beta1.MissedBlock.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.MissedBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.MissedBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.MissedBlock.toObject = function(includeInstance, msg) { + var f, obj = { + index: jspb.Message.getFieldWithDefault(msg, 1, 0), + missed: 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.cosmos.slashing.v1beta1.MissedBlock} + */ +proto.cosmos.slashing.v1beta1.MissedBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.MissedBlock; + return proto.cosmos.slashing.v1beta1.MissedBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.MissedBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.MissedBlock} + */ +proto.cosmos.slashing.v1beta1.MissedBlock.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.setIndex(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMissed(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.MissedBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.MissedBlock.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.slashing.v1beta1.MissedBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.MissedBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIndex(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMissed(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional int64 index = 1; + * @return {number} + */ +proto.cosmos.slashing.v1beta1.MissedBlock.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.slashing.v1beta1.MissedBlock} returns this + */ +proto.cosmos.slashing.v1beta1.MissedBlock.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bool missed = 2; + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.MissedBlock.prototype.getMissed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.slashing.v1beta1.MissedBlock} returns this + */ +proto.cosmos.slashing.v1beta1.MissedBlock.prototype.setMissed = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cosmos.slashing.v1beta1); diff --git a/src/types/proto-types/cosmos/slashing/v1beta1/query_grpc_web_pb.js b/src/types/proto-types/cosmos/slashing/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..1b156785 --- /dev/null +++ b/src/types/proto-types/cosmos/slashing/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,324 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.slashing.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_slashing_v1beta1_slashing_pb = require('../../../cosmos/slashing/v1beta1/slashing_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.slashing = {}; +proto.cosmos.slashing.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.slashing.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.slashing.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.slashing.v1beta1.QueryParamsRequest, + * !proto.cosmos.slashing.v1beta1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/cosmos.slashing.v1beta1.Query/Params', + grpc.web.MethodType.UNARY, + proto.cosmos.slashing.v1beta1.QueryParamsRequest, + proto.cosmos.slashing.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.slashing.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.slashing.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.slashing.v1beta1.QueryParamsRequest, + * !proto.cosmos.slashing.v1beta1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.slashing.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.slashing.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.slashing.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.slashing.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.slashing.v1beta1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.slashing.v1beta1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.slashing.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.cosmos.slashing.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.slashing.v1beta1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.slashing.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest, + * !proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse>} + */ +const methodDescriptor_Query_SigningInfo = new grpc.web.MethodDescriptor( + '/cosmos.slashing.v1beta1.Query/SigningInfo', + grpc.web.MethodType.UNARY, + proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest, + proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse, + /** + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest, + * !proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse>} + */ +const methodInfo_Query_SigningInfo = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse, + /** + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.slashing.v1beta1.QueryClient.prototype.signingInfo = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.slashing.v1beta1.Query/SigningInfo', + request, + metadata || {}, + methodDescriptor_Query_SigningInfo, + callback); +}; + + +/** + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.slashing.v1beta1.QueryPromiseClient.prototype.signingInfo = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.slashing.v1beta1.Query/SigningInfo', + request, + metadata || {}, + methodDescriptor_Query_SigningInfo); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest, + * !proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse>} + */ +const methodDescriptor_Query_SigningInfos = new grpc.web.MethodDescriptor( + '/cosmos.slashing.v1beta1.Query/SigningInfos', + grpc.web.MethodType.UNARY, + proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest, + proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse, + /** + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest, + * !proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse>} + */ +const methodInfo_Query_SigningInfos = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse, + /** + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.slashing.v1beta1.QueryClient.prototype.signingInfos = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.slashing.v1beta1.Query/SigningInfos', + request, + metadata || {}, + methodDescriptor_Query_SigningInfos, + callback); +}; + + +/** + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.slashing.v1beta1.QueryPromiseClient.prototype.signingInfos = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.slashing.v1beta1.Query/SigningInfos', + request, + metadata || {}, + methodDescriptor_Query_SigningInfos); +}; + + +module.exports = proto.cosmos.slashing.v1beta1; + diff --git a/src/types/proto-types/cosmos/slashing/v1beta1/query_pb.js b/src/types/proto-types/cosmos/slashing/v1beta1/query_pb.js new file mode 100644 index 00000000..39a6b27b --- /dev/null +++ b/src/types/proto-types/cosmos/slashing/v1beta1/query_pb.js @@ -0,0 +1,1050 @@ +// source: cosmos/slashing/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_slashing_v1beta1_slashing_pb = require('../../../cosmos/slashing/v1beta1/slashing_pb.js'); +goog.object.extend(proto, cosmos_slashing_v1beta1_slashing_pb); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse', 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.slashing.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.QueryParamsRequest.displayName = 'proto.cosmos.slashing.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.cosmos.slashing.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.QueryParamsResponse.displayName = 'proto.cosmos.slashing.v1beta1.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.cosmos.slashing.v1beta1.QuerySigningInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.displayName = 'proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.slashing.v1beta1.QuerySigningInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.displayName = 'proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.slashing.v1beta1.QuerySigningInfosRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.displayName = 'proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.slashing.v1beta1.QuerySigningInfosResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.displayName = 'proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.slashing.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.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.cosmos.slashing.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.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.cosmos.slashing.v1beta1.QueryParamsRequest} + */ +proto.cosmos.slashing.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.QueryParamsRequest; + return proto.cosmos.slashing.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.QueryParamsRequest} + */ +proto.cosmos.slashing.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.cosmos.slashing.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.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.cosmos.slashing.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.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.cosmos.slashing.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.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.cosmos.slashing.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_slashing_v1beta1_slashing_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.cosmos.slashing.v1beta1.QueryParamsResponse} + */ +proto.cosmos.slashing.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.QueryParamsResponse; + return proto.cosmos.slashing.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.QueryParamsResponse} + */ +proto.cosmos.slashing.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_slashing_v1beta1_slashing_pb.Params; + reader.readMessage(value,cosmos_slashing_v1beta1_slashing_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.cosmos.slashing.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.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.cosmos.slashing.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_slashing_v1beta1_slashing_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.slashing.v1beta1.Params} + */ +proto.cosmos.slashing.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.cosmos.slashing.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_slashing_v1beta1_slashing_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.slashing.v1beta1.Params|undefined} value + * @return {!proto.cosmos.slashing.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.slashing.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.slashing.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.slashing.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.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.cosmos.slashing.v1beta1.QuerySigningInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.QuerySigningInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + consAddress: 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.slashing.v1beta1.QuerySigningInfoRequest} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest; + return proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.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.setConsAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.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.slashing.v1beta1.QuerySigningInfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConsAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string cons_address = 1; + * @return {string} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.prototype.getConsAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest} returns this + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoRequest.prototype.setConsAddress = 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.slashing.v1beta1.QuerySigningInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.QuerySigningInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + valSigningInfo: (f = msg.getValSigningInfo()) && cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.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.slashing.v1beta1.QuerySigningInfoResponse} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse; + return proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo; + reader.readMessage(value,cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.deserializeBinaryFromReader); + msg.setValSigningInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.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.slashing.v1beta1.QuerySigningInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValSigningInfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ValidatorSigningInfo val_signing_info = 1; + * @return {?proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.prototype.getValSigningInfo = function() { + return /** @type{?proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} */ ( + jspb.Message.getWrapperField(this, cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo, 1)); +}; + + +/** + * @param {?proto.cosmos.slashing.v1beta1.ValidatorSigningInfo|undefined} value + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse} returns this +*/ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.prototype.setValSigningInfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse} returns this + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.prototype.clearValSigningInfo = function() { + return this.setValSigningInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfoResponse.prototype.hasValSigningInfo = 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.slashing.v1beta1.QuerySigningInfosRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.QuerySigningInfosRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.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.slashing.v1beta1.QuerySigningInfosRequest} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest; + return proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.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.slashing.v1beta1.QuerySigningInfosRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.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.slashing.v1beta1.QuerySigningInfosRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.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.slashing.v1beta1.QuerySigningInfosRequest.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.slashing.v1beta1.QuerySigningInfosRequest} returns this +*/ +proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest} returns this + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.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.slashing.v1beta1.QuerySigningInfosResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.QuerySigningInfosResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.toObject = function(includeInstance, msg) { + var f, obj = { + infoList: jspb.Message.toObjectList(msg.getInfoList(), + cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.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.slashing.v1beta1.QuerySigningInfosResponse} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse; + return proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo; + reader.readMessage(value,cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.deserializeBinaryFromReader); + msg.addInfo(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.slashing.v1beta1.QuerySigningInfosResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.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.slashing.v1beta1.QuerySigningInfosResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInfoList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ValidatorSigningInfo info = 1; + * @return {!Array} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.prototype.getInfoList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_slashing_v1beta1_slashing_pb.ValidatorSigningInfo, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse} returns this +*/ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.prototype.setInfoList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.prototype.addInfo = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.slashing.v1beta1.ValidatorSigningInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse} returns this + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.prototype.clearInfoList = function() { + return this.setInfoList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.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.slashing.v1beta1.QuerySigningInfosResponse} returns this +*/ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse} returns this + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.QuerySigningInfosResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.cosmos.slashing.v1beta1); diff --git a/src/types/proto-types/cosmos/slashing/v1beta1/slashing_pb.js b/src/types/proto-types/cosmos/slashing/v1beta1/slashing_pb.js new file mode 100644 index 00000000..bf17e4f1 --- /dev/null +++ b/src/types/proto-types/cosmos/slashing/v1beta1/slashing_pb.js @@ -0,0 +1,709 @@ +// source: cosmos/slashing/v1beta1/slashing.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.Params', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.ValidatorSigningInfo', 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.slashing.v1beta1.ValidatorSigningInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.ValidatorSigningInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.displayName = 'proto.cosmos.slashing.v1beta1.ValidatorSigningInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.slashing.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.Params.displayName = 'proto.cosmos.slashing.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.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.ValidatorSigningInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + startHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + indexOffset: jspb.Message.getFieldWithDefault(msg, 3, 0), + jailedUntil: (f = msg.getJailedUntil()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + tombstoned: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + missedBlocksCounter: 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.cosmos.slashing.v1beta1.ValidatorSigningInfo} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.ValidatorSigningInfo; + return proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.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.setStartHeight(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setIndexOffset(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setJailedUntil(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setTombstoned(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMissedBlocksCounter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.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.slashing.v1beta1.ValidatorSigningInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getStartHeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getIndexOffset(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getJailedUntil(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getTombstoned(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getMissedBlocksCounter(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} returns this + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 start_height = 2; + * @return {number} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.getStartHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} returns this + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.setStartHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 index_offset = 3; + * @return {number} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.getIndexOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} returns this + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.setIndexOffset = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp jailed_until = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.getJailedUntil = 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.cosmos.slashing.v1beta1.ValidatorSigningInfo} returns this +*/ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.setJailedUntil = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} returns this + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.clearJailedUntil = function() { + return this.setJailedUntil(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.hasJailedUntil = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bool tombstoned = 5; + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.getTombstoned = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} returns this + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.setTombstoned = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional int64 missed_blocks_counter = 6; + * @return {number} + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.getMissedBlocksCounter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.slashing.v1beta1.ValidatorSigningInfo} returns this + */ +proto.cosmos.slashing.v1beta1.ValidatorSigningInfo.prototype.setMissedBlocksCounter = 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.cosmos.slashing.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.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.cosmos.slashing.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + signedBlocksWindow: jspb.Message.getFieldWithDefault(msg, 1, 0), + minSignedPerWindow: msg.getMinSignedPerWindow_asB64(), + downtimeJailDuration: (f = msg.getDowntimeJailDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + slashFractionDoubleSign: msg.getSlashFractionDoubleSign_asB64(), + slashFractionDowntime: msg.getSlashFractionDowntime_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.slashing.v1beta1.Params} + */ +proto.cosmos.slashing.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.Params; + return proto.cosmos.slashing.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.Params} + */ +proto.cosmos.slashing.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.readInt64()); + msg.setSignedBlocksWindow(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMinSignedPerWindow(value); + break; + case 3: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setDowntimeJailDuration(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSlashFractionDoubleSign(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSlashFractionDowntime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.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.cosmos.slashing.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignedBlocksWindow(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMinSignedPerWindow_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getDowntimeJailDuration(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getSlashFractionDoubleSign_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getSlashFractionDowntime_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional int64 signed_blocks_window = 1; + * @return {number} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getSignedBlocksWindow = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.slashing.v1beta1.Params} returns this + */ +proto.cosmos.slashing.v1beta1.Params.prototype.setSignedBlocksWindow = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes min_signed_per_window = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getMinSignedPerWindow = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes min_signed_per_window = 2; + * This is a type-conversion wrapper around `getMinSignedPerWindow()` + * @return {string} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getMinSignedPerWindow_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMinSignedPerWindow())); +}; + + +/** + * optional bytes min_signed_per_window = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMinSignedPerWindow()` + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getMinSignedPerWindow_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMinSignedPerWindow())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.slashing.v1beta1.Params} returns this + */ +proto.cosmos.slashing.v1beta1.Params.prototype.setMinSignedPerWindow = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional google.protobuf.Duration downtime_jail_duration = 3; + * @return {?proto.google.protobuf.Duration} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getDowntimeJailDuration = 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.cosmos.slashing.v1beta1.Params} returns this +*/ +proto.cosmos.slashing.v1beta1.Params.prototype.setDowntimeJailDuration = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.slashing.v1beta1.Params} returns this + */ +proto.cosmos.slashing.v1beta1.Params.prototype.clearDowntimeJailDuration = function() { + return this.setDowntimeJailDuration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.hasDowntimeJailDuration = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes slash_fraction_double_sign = 4; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getSlashFractionDoubleSign = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes slash_fraction_double_sign = 4; + * This is a type-conversion wrapper around `getSlashFractionDoubleSign()` + * @return {string} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getSlashFractionDoubleSign_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSlashFractionDoubleSign())); +}; + + +/** + * optional bytes slash_fraction_double_sign = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSlashFractionDoubleSign()` + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getSlashFractionDoubleSign_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSlashFractionDoubleSign())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.slashing.v1beta1.Params} returns this + */ +proto.cosmos.slashing.v1beta1.Params.prototype.setSlashFractionDoubleSign = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bytes slash_fraction_downtime = 5; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getSlashFractionDowntime = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes slash_fraction_downtime = 5; + * This is a type-conversion wrapper around `getSlashFractionDowntime()` + * @return {string} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getSlashFractionDowntime_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSlashFractionDowntime())); +}; + + +/** + * optional bytes slash_fraction_downtime = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSlashFractionDowntime()` + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.Params.prototype.getSlashFractionDowntime_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSlashFractionDowntime())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.slashing.v1beta1.Params} returns this + */ +proto.cosmos.slashing.v1beta1.Params.prototype.setSlashFractionDowntime = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +goog.object.extend(exports, proto.cosmos.slashing.v1beta1); diff --git a/src/types/proto-types/cosmos/slashing/v1beta1/tx_grpc_web_pb.js b/src/types/proto-types/cosmos/slashing/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..82f9172c --- /dev/null +++ b/src/types/proto-types/cosmos/slashing/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,158 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.slashing.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.slashing = {}; +proto.cosmos.slashing.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.slashing.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.slashing.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.slashing.v1beta1.MsgUnjail, + * !proto.cosmos.slashing.v1beta1.MsgUnjailResponse>} + */ +const methodDescriptor_Msg_Unjail = new grpc.web.MethodDescriptor( + '/cosmos.slashing.v1beta1.Msg/Unjail', + grpc.web.MethodType.UNARY, + proto.cosmos.slashing.v1beta1.MsgUnjail, + proto.cosmos.slashing.v1beta1.MsgUnjailResponse, + /** + * @param {!proto.cosmos.slashing.v1beta1.MsgUnjail} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.slashing.v1beta1.MsgUnjailResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.slashing.v1beta1.MsgUnjail, + * !proto.cosmos.slashing.v1beta1.MsgUnjailResponse>} + */ +const methodInfo_Msg_Unjail = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.slashing.v1beta1.MsgUnjailResponse, + /** + * @param {!proto.cosmos.slashing.v1beta1.MsgUnjail} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.slashing.v1beta1.MsgUnjailResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.slashing.v1beta1.MsgUnjail} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.slashing.v1beta1.MsgUnjailResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.slashing.v1beta1.MsgClient.prototype.unjail = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.slashing.v1beta1.Msg/Unjail', + request, + metadata || {}, + methodDescriptor_Msg_Unjail, + callback); +}; + + +/** + * @param {!proto.cosmos.slashing.v1beta1.MsgUnjail} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.slashing.v1beta1.MsgPromiseClient.prototype.unjail = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.slashing.v1beta1.Msg/Unjail', + request, + metadata || {}, + methodDescriptor_Msg_Unjail); +}; + + +module.exports = proto.cosmos.slashing.v1beta1; + diff --git a/src/types/proto-types/cosmos/slashing/v1beta1/tx_pb.js b/src/types/proto-types/cosmos/slashing/v1beta1/tx_pb.js new file mode 100644 index 00000000..d97b4dd7 --- /dev/null +++ b/src/types/proto-types/cosmos/slashing/v1beta1/tx_pb.js @@ -0,0 +1,292 @@ +// source: cosmos/slashing/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.MsgUnjail', null, global); +goog.exportSymbol('proto.cosmos.slashing.v1beta1.MsgUnjailResponse', 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.slashing.v1beta1.MsgUnjail = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.MsgUnjail, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.MsgUnjail.displayName = 'proto.cosmos.slashing.v1beta1.MsgUnjail'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.slashing.v1beta1.MsgUnjailResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.slashing.v1beta1.MsgUnjailResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.slashing.v1beta1.MsgUnjailResponse.displayName = 'proto.cosmos.slashing.v1beta1.MsgUnjailResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.slashing.v1beta1.MsgUnjail.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.MsgUnjail.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.MsgUnjail} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.MsgUnjail.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddr: 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.slashing.v1beta1.MsgUnjail} + */ +proto.cosmos.slashing.v1beta1.MsgUnjail.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.MsgUnjail; + return proto.cosmos.slashing.v1beta1.MsgUnjail.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.MsgUnjail} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.MsgUnjail} + */ +proto.cosmos.slashing.v1beta1.MsgUnjail.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.setValidatorAddr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.slashing.v1beta1.MsgUnjail.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.MsgUnjail.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.slashing.v1beta1.MsgUnjail} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.MsgUnjail.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddr(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string validator_addr = 1; + * @return {string} + */ +proto.cosmos.slashing.v1beta1.MsgUnjail.prototype.getValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.slashing.v1beta1.MsgUnjail} returns this + */ +proto.cosmos.slashing.v1beta1.MsgUnjail.prototype.setValidatorAddr = 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.slashing.v1beta1.MsgUnjailResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.slashing.v1beta1.MsgUnjailResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.slashing.v1beta1.MsgUnjailResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.MsgUnjailResponse.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.slashing.v1beta1.MsgUnjailResponse} + */ +proto.cosmos.slashing.v1beta1.MsgUnjailResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.slashing.v1beta1.MsgUnjailResponse; + return proto.cosmos.slashing.v1beta1.MsgUnjailResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.slashing.v1beta1.MsgUnjailResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.slashing.v1beta1.MsgUnjailResponse} + */ +proto.cosmos.slashing.v1beta1.MsgUnjailResponse.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.slashing.v1beta1.MsgUnjailResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.slashing.v1beta1.MsgUnjailResponse.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.slashing.v1beta1.MsgUnjailResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.slashing.v1beta1.MsgUnjailResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cosmos.slashing.v1beta1); diff --git a/src/types/proto-types/cosmos/staking/v1beta1/genesis_pb.js b/src/types/proto-types/cosmos/staking/v1beta1/genesis_pb.js new file mode 100644 index 00000000..94415ba8 --- /dev/null +++ b/src/types/proto-types/cosmos/staking/v1beta1/genesis_pb.js @@ -0,0 +1,730 @@ +// source: cosmos/staking/v1beta1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_staking_v1beta1_staking_pb = require('../../../cosmos/staking/v1beta1/staking_pb.js'); +goog.object.extend(proto, cosmos_staking_v1beta1_staking_pb); +goog.exportSymbol('proto.cosmos.staking.v1beta1.GenesisState', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.LastValidatorPower', 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.staking.v1beta1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.GenesisState.displayName = 'proto.cosmos.staking.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.cosmos.staking.v1beta1.LastValidatorPower = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.LastValidatorPower, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.LastValidatorPower.displayName = 'proto.cosmos.staking.v1beta1.LastValidatorPower'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.GenesisState.repeatedFields_ = [3,4,5,6,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.cosmos.staking.v1beta1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.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.cosmos.staking.v1beta1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_staking_v1beta1_staking_pb.Params.toObject(includeInstance, f), + lastTotalPower: msg.getLastTotalPower_asB64(), + lastValidatorPowersList: jspb.Message.toObjectList(msg.getLastValidatorPowersList(), + proto.cosmos.staking.v1beta1.LastValidatorPower.toObject, includeInstance), + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + cosmos_staking_v1beta1_staking_pb.Validator.toObject, includeInstance), + delegationsList: jspb.Message.toObjectList(msg.getDelegationsList(), + cosmos_staking_v1beta1_staking_pb.Delegation.toObject, includeInstance), + unbondingDelegationsList: jspb.Message.toObjectList(msg.getUnbondingDelegationsList(), + cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.toObject, includeInstance), + redelegationsList: jspb.Message.toObjectList(msg.getRedelegationsList(), + cosmos_staking_v1beta1_staking_pb.Redelegation.toObject, includeInstance), + exported: 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.cosmos.staking.v1beta1.GenesisState} + */ +proto.cosmos.staking.v1beta1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.GenesisState; + return proto.cosmos.staking.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.GenesisState} + */ +proto.cosmos.staking.v1beta1.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Params; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastTotalPower(value); + break; + case 3: + var value = new proto.cosmos.staking.v1beta1.LastValidatorPower; + reader.readMessage(value,proto.cosmos.staking.v1beta1.LastValidatorPower.deserializeBinaryFromReader); + msg.addLastValidatorPowers(value); + break; + case 4: + var value = new cosmos_staking_v1beta1_staking_pb.Validator; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Validator.deserializeBinaryFromReader); + msg.addValidators(value); + break; + case 5: + var value = new cosmos_staking_v1beta1_staking_pb.Delegation; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Delegation.deserializeBinaryFromReader); + msg.addDelegations(value); + break; + case 6: + var value = new cosmos_staking_v1beta1_staking_pb.UnbondingDelegation; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.deserializeBinaryFromReader); + msg.addUnbondingDelegations(value); + break; + case 7: + var value = new cosmos_staking_v1beta1_staking_pb.Redelegation; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Redelegation.deserializeBinaryFromReader); + msg.addRedelegations(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setExported(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.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.cosmos.staking.v1beta1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Params.serializeBinaryToWriter + ); + } + f = message.getLastTotalPower_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getLastValidatorPowersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.staking.v1beta1.LastValidatorPower.serializeBinaryToWriter + ); + } + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_staking_v1beta1_staking_pb.Validator.serializeBinaryToWriter + ); + } + f = message.getDelegationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + cosmos_staking_v1beta1_staking_pb.Delegation.serializeBinaryToWriter + ); + } + f = message.getUnbondingDelegationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.serializeBinaryToWriter + ); + } + f = message.getRedelegationsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + cosmos_staking_v1beta1_staking_pb.Redelegation.serializeBinaryToWriter + ); + } + f = message.getExported(); + if (f) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.staking.v1beta1.Params} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Params|undefined} value + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this +*/ +proto.cosmos.staking.v1beta1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes last_total_power = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getLastTotalPower = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes last_total_power = 2; + * This is a type-conversion wrapper around `getLastTotalPower()` + * @return {string} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getLastTotalPower_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastTotalPower())); +}; + + +/** + * optional bytes last_total_power = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastTotalPower()` + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getLastTotalPower_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastTotalPower())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.setLastTotalPower = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated LastValidatorPower last_validator_powers = 3; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getLastValidatorPowersList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.staking.v1beta1.LastValidatorPower, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this +*/ +proto.cosmos.staking.v1beta1.GenesisState.prototype.setLastValidatorPowersList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.LastValidatorPower=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.LastValidatorPower} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.addLastValidatorPowers = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.staking.v1beta1.LastValidatorPower, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.clearLastValidatorPowersList = function() { + return this.setLastValidatorPowersList([]); +}; + + +/** + * repeated Validator validators = 4; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.Validator, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this +*/ +proto.cosmos.staking.v1beta1.GenesisState.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.Validator} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.staking.v1beta1.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * repeated Delegation delegations = 5; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getDelegationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.Delegation, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this +*/ +proto.cosmos.staking.v1beta1.GenesisState.prototype.setDelegationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.Delegation=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.Delegation} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.addDelegations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmos.staking.v1beta1.Delegation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.clearDelegationsList = function() { + return this.setDelegationsList([]); +}; + + +/** + * repeated UnbondingDelegation unbonding_delegations = 6; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getUnbondingDelegationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.UnbondingDelegation, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this +*/ +proto.cosmos.staking.v1beta1.GenesisState.prototype.setUnbondingDelegationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.UnbondingDelegation=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegation} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.addUnbondingDelegations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cosmos.staking.v1beta1.UnbondingDelegation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.clearUnbondingDelegationsList = function() { + return this.setUnbondingDelegationsList([]); +}; + + +/** + * repeated Redelegation redelegations = 7; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getRedelegationsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.Redelegation, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this +*/ +proto.cosmos.staking.v1beta1.GenesisState.prototype.setRedelegationsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.Redelegation=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.Redelegation} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.addRedelegations = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.cosmos.staking.v1beta1.Redelegation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.clearRedelegationsList = function() { + return this.setRedelegationsList([]); +}; + + +/** + * optional bool exported = 8; + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.getExported = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.staking.v1beta1.GenesisState} returns this + */ +proto.cosmos.staking.v1beta1.GenesisState.prototype.setExported = 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.cosmos.staking.v1beta1.LastValidatorPower.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.LastValidatorPower.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.LastValidatorPower} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.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.cosmos.staking.v1beta1.LastValidatorPower} + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.LastValidatorPower; + return proto.cosmos.staking.v1beta1.LastValidatorPower.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.LastValidatorPower} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.LastValidatorPower} + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.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.setPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.LastValidatorPower.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.staking.v1beta1.LastValidatorPower} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.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.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.LastValidatorPower} returns this + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 power = 2; + * @return {number} + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.staking.v1beta1.LastValidatorPower} returns this + */ +proto.cosmos.staking.v1beta1.LastValidatorPower.prototype.setPower = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cosmos.staking.v1beta1); diff --git a/src/types/proto-types/cosmos/staking/v1beta1/query_grpc_web_pb.js b/src/types/proto-types/cosmos/staking/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..3072a3f9 --- /dev/null +++ b/src/types/proto-types/cosmos/staking/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,1204 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.staking.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_staking_v1beta1_staking_pb = require('../../../cosmos/staking/v1beta1/staking_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.staking = {}; +proto.cosmos.staking.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.staking.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryValidatorsRequest, + * !proto.cosmos.staking.v1beta1.QueryValidatorsResponse>} + */ +const methodDescriptor_Query_Validators = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/Validators', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryValidatorsRequest, + proto.cosmos.staking.v1beta1.QueryValidatorsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryValidatorsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryValidatorsRequest, + * !proto.cosmos.staking.v1beta1.QueryValidatorsResponse>} + */ +const methodInfo_Query_Validators = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryValidatorsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryValidatorsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryValidatorsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.validators = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Validators', + request, + metadata || {}, + methodDescriptor_Query_Validators, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.validators = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Validators', + request, + metadata || {}, + methodDescriptor_Query_Validators); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryValidatorRequest, + * !proto.cosmos.staking.v1beta1.QueryValidatorResponse>} + */ +const methodDescriptor_Query_Validator = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/Validator', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryValidatorRequest, + proto.cosmos.staking.v1beta1.QueryValidatorResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryValidatorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryValidatorRequest, + * !proto.cosmos.staking.v1beta1.QueryValidatorResponse>} + */ +const methodInfo_Query_Validator = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryValidatorResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryValidatorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryValidatorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.validator = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Validator', + request, + metadata || {}, + methodDescriptor_Query_Validator, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.validator = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Validator', + request, + metadata || {}, + methodDescriptor_Query_Validator); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse>} + */ +const methodDescriptor_Query_ValidatorDelegations = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/ValidatorDelegations', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest, + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse>} + */ +const methodInfo_Query_ValidatorDelegations = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.validatorDelegations = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/ValidatorDelegations', + request, + metadata || {}, + methodDescriptor_Query_ValidatorDelegations, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.validatorDelegations = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/ValidatorDelegations', + request, + metadata || {}, + methodDescriptor_Query_ValidatorDelegations); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse>} + */ +const methodDescriptor_Query_ValidatorUnbondingDelegations = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest, + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse>} + */ +const methodInfo_Query_ValidatorUnbondingDelegations = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.validatorUnbondingDelegations = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations', + request, + metadata || {}, + methodDescriptor_Query_ValidatorUnbondingDelegations, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.validatorUnbondingDelegations = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations', + request, + metadata || {}, + methodDescriptor_Query_ValidatorUnbondingDelegations); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryDelegationRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegationResponse>} + */ +const methodDescriptor_Query_Delegation = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/Delegation', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryDelegationRequest, + proto.cosmos.staking.v1beta1.QueryDelegationResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegationResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryDelegationRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegationResponse>} + */ +const methodInfo_Query_Delegation = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryDelegationResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegationResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryDelegationResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.delegation = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Delegation', + request, + metadata || {}, + methodDescriptor_Query_Delegation, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.delegation = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Delegation', + request, + metadata || {}, + methodDescriptor_Query_Delegation); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest, + * !proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse>} + */ +const methodDescriptor_Query_UnbondingDelegation = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/UnbondingDelegation', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest, + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest, + * !proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse>} + */ +const methodInfo_Query_UnbondingDelegation = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.unbondingDelegation = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/UnbondingDelegation', + request, + metadata || {}, + methodDescriptor_Query_UnbondingDelegation, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.unbondingDelegation = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/UnbondingDelegation', + request, + metadata || {}, + methodDescriptor_Query_UnbondingDelegation); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse>} + */ +const methodDescriptor_Query_DelegatorDelegations = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/DelegatorDelegations', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest, + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse>} + */ +const methodInfo_Query_DelegatorDelegations = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.delegatorDelegations = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/DelegatorDelegations', + request, + metadata || {}, + methodDescriptor_Query_DelegatorDelegations, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.delegatorDelegations = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/DelegatorDelegations', + request, + metadata || {}, + methodDescriptor_Query_DelegatorDelegations); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse>} + */ +const methodDescriptor_Query_DelegatorUnbondingDelegations = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest, + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse>} + */ +const methodInfo_Query_DelegatorUnbondingDelegations = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.delegatorUnbondingDelegations = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations', + request, + metadata || {}, + methodDescriptor_Query_DelegatorUnbondingDelegations, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.delegatorUnbondingDelegations = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations', + request, + metadata || {}, + methodDescriptor_Query_DelegatorUnbondingDelegations); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryRedelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryRedelegationsResponse>} + */ +const methodDescriptor_Query_Redelegations = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/Redelegations', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryRedelegationsRequest, + proto.cosmos.staking.v1beta1.QueryRedelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryRedelegationsRequest, + * !proto.cosmos.staking.v1beta1.QueryRedelegationsResponse>} + */ +const methodInfo_Query_Redelegations = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryRedelegationsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryRedelegationsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.redelegations = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Redelegations', + request, + metadata || {}, + methodDescriptor_Query_Redelegations, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.redelegations = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Redelegations', + request, + metadata || {}, + methodDescriptor_Query_Redelegations); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse>} + */ +const methodDescriptor_Query_DelegatorValidators = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/DelegatorValidators', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest, + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse>} + */ +const methodInfo_Query_DelegatorValidators = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.delegatorValidators = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/DelegatorValidators', + request, + metadata || {}, + methodDescriptor_Query_DelegatorValidators, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.delegatorValidators = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/DelegatorValidators', + request, + metadata || {}, + methodDescriptor_Query_DelegatorValidators); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse>} + */ +const methodDescriptor_Query_DelegatorValidator = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/DelegatorValidator', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest, + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest, + * !proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse>} + */ +const methodInfo_Query_DelegatorValidator = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.delegatorValidator = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/DelegatorValidator', + request, + metadata || {}, + methodDescriptor_Query_DelegatorValidator, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.delegatorValidator = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/DelegatorValidator', + request, + metadata || {}, + methodDescriptor_Query_DelegatorValidator); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest, + * !proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse>} + */ +const methodDescriptor_Query_HistoricalInfo = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/HistoricalInfo', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest, + proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest, + * !proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse>} + */ +const methodInfo_Query_HistoricalInfo = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.historicalInfo = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/HistoricalInfo', + request, + metadata || {}, + methodDescriptor_Query_HistoricalInfo, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.historicalInfo = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/HistoricalInfo', + request, + metadata || {}, + methodDescriptor_Query_HistoricalInfo); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryPoolRequest, + * !proto.cosmos.staking.v1beta1.QueryPoolResponse>} + */ +const methodDescriptor_Query_Pool = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/Pool', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryPoolRequest, + proto.cosmos.staking.v1beta1.QueryPoolResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryPoolRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryPoolResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryPoolRequest, + * !proto.cosmos.staking.v1beta1.QueryPoolResponse>} + */ +const methodInfo_Query_Pool = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryPoolResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryPoolRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryPoolResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryPoolRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryPoolResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.pool = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Pool', + request, + metadata || {}, + methodDescriptor_Query_Pool, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryPoolRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.pool = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Pool', + request, + metadata || {}, + methodDescriptor_Query_Pool); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.QueryParamsRequest, + * !proto.cosmos.staking.v1beta1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Query/Params', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.QueryParamsRequest, + proto.cosmos.staking.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.QueryParamsRequest, + * !proto.cosmos.staking.v1beta1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.QueryParamsResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +module.exports = proto.cosmos.staking.v1beta1; + diff --git a/src/types/proto-types/cosmos/staking/v1beta1/query_pb.js b/src/types/proto-types/cosmos/staking/v1beta1/query_pb.js new file mode 100644 index 00000000..7946da69 --- /dev/null +++ b/src/types/proto-types/cosmos/staking/v1beta1/query_pb.js @@ -0,0 +1,5442 @@ +// source: cosmos/staking/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_staking_v1beta1_staking_pb = require('../../../cosmos/staking/v1beta1/staking_pb.js'); +goog.object.extend(proto, cosmos_staking_v1beta1_staking_pb); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegationRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegationResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryParamsRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryParamsResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryPoolRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryPoolResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryRedelegationsRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryRedelegationsResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryValidatorRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryValidatorResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryValidatorsRequest', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.QueryValidatorsResponse', 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.staking.v1beta1.QueryValidatorsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryValidatorsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryValidatorsRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryValidatorsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryValidatorsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.QueryValidatorsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryValidatorsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryValidatorsResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryValidatorsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryValidatorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryValidatorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryValidatorRequest.displayName = 'proto.cosmos.staking.v1beta1.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.cosmos.staking.v1beta1.QueryValidatorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryValidatorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryValidatorResponse.displayName = 'proto.cosmos.staking.v1beta1.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.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryValidatorDelegationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegationRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegationResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryUnbondingDelegationRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryUnbondingDelegationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegatorDelegationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegatorDelegationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryRedelegationsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryRedelegationsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryRedelegationsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryRedelegationsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryRedelegationsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryRedelegationsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegatorValidatorsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegatorValidatorsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegatorValidatorRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryDelegatorValidatorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryHistoricalInfoRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryHistoricalInfoResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryPoolRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryPoolRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryPoolRequest.displayName = 'proto.cosmos.staking.v1beta1.QueryPoolRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryPoolResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryPoolResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryPoolResponse.displayName = 'proto.cosmos.staking.v1beta1.QueryPoolResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryParamsRequest.displayName = 'proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.QueryParamsResponse.displayName = 'proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryValidatorsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryValidatorsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryValidatorsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + status: 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.staking.v1beta1.QueryValidatorsRequest} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryValidatorsRequest; + return proto.cosmos.staking.v1beta1.QueryValidatorsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorsRequest} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.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.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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryValidatorsRequest.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.staking.v1beta1.QueryValidatorsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatus(); + 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 status = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.prototype.getStatus = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.prototype.setStatus = 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.staking.v1beta1.QueryValidatorsRequest.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.staking.v1beta1.QueryValidatorsRequest} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.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.staking.v1beta1.QueryValidatorsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryValidatorsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryValidatorsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + cosmos_staking_v1beta1_staking_pb.Validator.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.staking.v1beta1.QueryValidatorsResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryValidatorsResponse; + return proto.cosmos.staking.v1beta1.QueryValidatorsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorsResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Validator; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Validator.deserializeBinaryFromReader); + msg.addValidators(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.staking.v1beta1.QueryValidatorsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryValidatorsResponse.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.staking.v1beta1.QueryValidatorsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Validator.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Validator validators = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.Validator, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.Validator} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.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.staking.v1beta1.QueryValidatorsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryValidatorsResponse.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.staking.v1beta1.QueryValidatorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.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.cosmos.staking.v1beta1.QueryValidatorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorRequest.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddr: 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.staking.v1beta1.QueryValidatorRequest} + */ +proto.cosmos.staking.v1beta1.QueryValidatorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryValidatorRequest; + return proto.cosmos.staking.v1beta1.QueryValidatorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorRequest} + */ +proto.cosmos.staking.v1beta1.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.setValidatorAddr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryValidatorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.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.cosmos.staking.v1beta1.QueryValidatorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddr(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string validator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryValidatorRequest.prototype.getValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorRequest.prototype.setValidatorAddr = 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.staking.v1beta1.QueryValidatorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.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.cosmos.staking.v1beta1.QueryValidatorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + validator: (f = msg.getValidator()) && cosmos_staking_v1beta1_staking_pb.Validator.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.staking.v1beta1.QueryValidatorResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryValidatorResponse; + return proto.cosmos.staking.v1beta1.QueryValidatorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Validator; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Validator.deserializeBinaryFromReader); + msg.setValidator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.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.cosmos.staking.v1beta1.QueryValidatorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Validator.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Validator validator = 1; + * @return {?proto.cosmos.staking.v1beta1.Validator} + */ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.prototype.getValidator = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Validator} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.Validator, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Validator|undefined} value + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryValidatorResponse.prototype.hasValidator = 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.staking.v1beta1.QueryValidatorDelegationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryValidatorDelegationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddr: 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.staking.v1beta1.QueryValidatorDelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest; + return proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.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.setValidatorAddr(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.staking.v1beta1.QueryValidatorDelegationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.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.staking.v1beta1.QueryValidatorDelegationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddr(); + 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 validator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.prototype.getValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.prototype.setValidatorAddr = 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.staking.v1beta1.QueryValidatorDelegationsRequest.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.staking.v1beta1.QueryValidatorDelegationsRequest} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.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.staking.v1beta1.QueryValidatorDelegationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryValidatorDelegationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + delegationResponsesList: jspb.Message.toObjectList(msg.getDelegationResponsesList(), + cosmos_staking_v1beta1_staking_pb.DelegationResponse.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.staking.v1beta1.QueryValidatorDelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse; + return proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.DelegationResponse; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.DelegationResponse.deserializeBinaryFromReader); + msg.addDelegationResponses(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.staking.v1beta1.QueryValidatorDelegationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.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.staking.v1beta1.QueryValidatorDelegationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegationResponsesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.DelegationResponse.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DelegationResponse delegation_responses = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.prototype.getDelegationResponsesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.DelegationResponse, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.prototype.setDelegationResponsesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.DelegationResponse=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.DelegationResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.prototype.addDelegationResponses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.DelegationResponse, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.prototype.clearDelegationResponsesList = function() { + return this.setDelegationResponsesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.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.staking.v1beta1.QueryValidatorDelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryValidatorDelegationsResponse.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.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + validatorAddr: 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.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest; + return proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.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.setValidatorAddr(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.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.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.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorAddr(); + 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 validator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.prototype.getValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.prototype.setValidatorAddr = 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.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.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.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.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.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + unbondingResponsesList: jspb.Message.toObjectList(msg.getUnbondingResponsesList(), + cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.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.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse; + return proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.UnbondingDelegation; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.deserializeBinaryFromReader); + msg.addUnbondingResponses(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.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.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.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUnbondingResponsesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated UnbondingDelegation unbonding_responses = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.prototype.getUnbondingResponsesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.UnbondingDelegation, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.prototype.setUnbondingResponsesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.UnbondingDelegation=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegation} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.prototype.addUnbondingResponses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.UnbondingDelegation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.prototype.clearUnbondingResponsesList = function() { + return this.setUnbondingResponsesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.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.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse.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.staking.v1beta1.QueryDelegationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddr: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddr: 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.staking.v1beta1.QueryDelegationRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegationRequest; + return proto.cosmos.staking.v1beta1.QueryDelegationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegationRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.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.setDelegatorAddr(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegationRequest.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.staking.v1beta1.QueryDelegationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddr(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddr(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string delegator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.prototype.getDelegatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegationRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.prototype.setDelegatorAddr = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_addr = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.prototype.getValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegationRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegationRequest.prototype.setValidatorAddr = 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.staking.v1beta1.QueryDelegationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + delegationResponse: (f = msg.getDelegationResponse()) && cosmos_staking_v1beta1_staking_pb.DelegationResponse.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.staking.v1beta1.QueryDelegationResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegationResponse; + return proto.cosmos.staking.v1beta1.QueryDelegationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegationResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.DelegationResponse; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.DelegationResponse.deserializeBinaryFromReader); + msg.setDelegationResponse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegationResponse.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.staking.v1beta1.QueryDelegationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegationResponse(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.DelegationResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DelegationResponse delegation_response = 1; + * @return {?proto.cosmos.staking.v1beta1.DelegationResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.prototype.getDelegationResponse = function() { + return /** @type{?proto.cosmos.staking.v1beta1.DelegationResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.DelegationResponse, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.DelegationResponse|undefined} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegationResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.prototype.setDelegationResponse = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegationResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.prototype.clearDelegationResponse = function() { + return this.setDelegationResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryDelegationResponse.prototype.hasDelegationResponse = 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.staking.v1beta1.QueryUnbondingDelegationRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryUnbondingDelegationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddr: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddr: 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.staking.v1beta1.QueryUnbondingDelegationRequest} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest; + return proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.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.setDelegatorAddr(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.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.staking.v1beta1.QueryUnbondingDelegationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddr(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddr(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string delegator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.prototype.getDelegatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.prototype.setDelegatorAddr = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_addr = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.prototype.getValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationRequest.prototype.setValidatorAddr = 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.staking.v1beta1.QueryUnbondingDelegationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryUnbondingDelegationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + unbond: (f = msg.getUnbond()) && cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.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.staking.v1beta1.QueryUnbondingDelegationResponse} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse; + return proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.UnbondingDelegation; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.deserializeBinaryFromReader); + msg.setUnbond(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.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.staking.v1beta1.QueryUnbondingDelegationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUnbond(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.serializeBinaryToWriter + ); + } +}; + + +/** + * optional UnbondingDelegation unbond = 1; + * @return {?proto.cosmos.staking.v1beta1.UnbondingDelegation} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.prototype.getUnbond = function() { + return /** @type{?proto.cosmos.staking.v1beta1.UnbondingDelegation} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.UnbondingDelegation, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.UnbondingDelegation|undefined} value + * @return {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.prototype.setUnbond = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.prototype.clearUnbond = function() { + return this.setUnbond(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryUnbondingDelegationResponse.prototype.hasUnbond = 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.staking.v1beta1.QueryDelegatorDelegationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegatorDelegationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddr: 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.staking.v1beta1.QueryDelegatorDelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest; + return proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.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.setDelegatorAddr(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.staking.v1beta1.QueryDelegatorDelegationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.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.staking.v1beta1.QueryDelegatorDelegationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddr(); + 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 delegator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.prototype.getDelegatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.prototype.setDelegatorAddr = 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.staking.v1beta1.QueryDelegatorDelegationsRequest.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.staking.v1beta1.QueryDelegatorDelegationsRequest} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.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.staking.v1beta1.QueryDelegatorDelegationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegatorDelegationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + delegationResponsesList: jspb.Message.toObjectList(msg.getDelegationResponsesList(), + cosmos_staking_v1beta1_staking_pb.DelegationResponse.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.staking.v1beta1.QueryDelegatorDelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse; + return proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.DelegationResponse; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.DelegationResponse.deserializeBinaryFromReader); + msg.addDelegationResponses(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.staking.v1beta1.QueryDelegatorDelegationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.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.staking.v1beta1.QueryDelegatorDelegationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegationResponsesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.DelegationResponse.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DelegationResponse delegation_responses = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.prototype.getDelegationResponsesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.DelegationResponse, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.prototype.setDelegationResponsesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.DelegationResponse=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.DelegationResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.prototype.addDelegationResponses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.DelegationResponse, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.prototype.clearDelegationResponsesList = function() { + return this.setDelegationResponsesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.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.staking.v1beta1.QueryDelegatorDelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse.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.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddr: 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.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest; + return proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.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.setDelegatorAddr(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.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.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.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddr(); + 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 delegator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.prototype.getDelegatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.prototype.setDelegatorAddr = 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.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.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.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.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.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + unbondingResponsesList: jspb.Message.toObjectList(msg.getUnbondingResponsesList(), + cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.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.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse; + return proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.UnbondingDelegation; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.deserializeBinaryFromReader); + msg.addUnbondingResponses(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.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.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.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUnbondingResponsesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.UnbondingDelegation.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated UnbondingDelegation unbonding_responses = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.prototype.getUnbondingResponsesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.UnbondingDelegation, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.prototype.setUnbondingResponsesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.UnbondingDelegation=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegation} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.prototype.addUnbondingResponses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.UnbondingDelegation, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.prototype.clearUnbondingResponsesList = function() { + return this.setUnbondingResponsesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.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.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse.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.staking.v1beta1.QueryRedelegationsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryRedelegationsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddr: jspb.Message.getFieldWithDefault(msg, 1, ""), + srcValidatorAddr: jspb.Message.getFieldWithDefault(msg, 2, ""), + dstValidatorAddr: jspb.Message.getFieldWithDefault(msg, 3, ""), + 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.staking.v1beta1.QueryRedelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryRedelegationsRequest; + return proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.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.setDelegatorAddr(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSrcValidatorAddr(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDstValidatorAddr(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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.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.staking.v1beta1.QueryRedelegationsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddr(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSrcValidatorAddr(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDstValidatorAddr(); + 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 delegator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.getDelegatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.setDelegatorAddr = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string src_validator_addr = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.getSrcValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.setSrcValidatorAddr = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string dst_validator_addr = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.getDstValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.setDstValidatorAddr = 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.cosmos.staking.v1beta1.QueryRedelegationsRequest.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.cosmos.staking.v1beta1.QueryRedelegationsRequest} returns this +*/ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.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.staking.v1beta1.QueryRedelegationsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryRedelegationsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + redelegationResponsesList: jspb.Message.toObjectList(msg.getRedelegationResponsesList(), + cosmos_staking_v1beta1_staking_pb.RedelegationResponse.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.staking.v1beta1.QueryRedelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryRedelegationsResponse; + return proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryRedelegationsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsResponse} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.RedelegationResponse; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.RedelegationResponse.deserializeBinaryFromReader); + msg.addRedelegationResponses(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.staking.v1beta1.QueryRedelegationsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.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.staking.v1beta1.QueryRedelegationsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRedelegationResponsesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.RedelegationResponse.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated RedelegationResponse redelegation_responses = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.prototype.getRedelegationResponsesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.RedelegationResponse, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.prototype.setRedelegationResponsesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.RedelegationResponse=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.RedelegationResponse} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.prototype.addRedelegationResponses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.RedelegationResponse, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.prototype.clearRedelegationResponsesList = function() { + return this.setRedelegationResponsesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.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.staking.v1beta1.QueryRedelegationsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryRedelegationsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryRedelegationsResponse.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.staking.v1beta1.QueryDelegatorValidatorsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegatorValidatorsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddr: 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.staking.v1beta1.QueryDelegatorValidatorsRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest; + return proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.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.setDelegatorAddr(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.staking.v1beta1.QueryDelegatorValidatorsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.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.staking.v1beta1.QueryDelegatorValidatorsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddr(); + 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 delegator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.prototype.getDelegatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.prototype.setDelegatorAddr = 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.staking.v1beta1.QueryDelegatorValidatorsRequest.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.staking.v1beta1.QueryDelegatorValidatorsRequest} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.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.staking.v1beta1.QueryDelegatorValidatorsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegatorValidatorsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + cosmos_staking_v1beta1_staking_pb.Validator.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.staking.v1beta1.QueryDelegatorValidatorsResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse; + return proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Validator; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Validator.deserializeBinaryFromReader); + msg.addValidators(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.staking.v1beta1.QueryDelegatorValidatorsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.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.staking.v1beta1.QueryDelegatorValidatorsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Validator.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Validator validators = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_staking_v1beta1_staking_pb.Validator, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.Validator} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.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.staking.v1beta1.QueryDelegatorValidatorsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse.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.staking.v1beta1.QueryDelegatorValidatorRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegatorValidatorRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddr: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddr: 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.staking.v1beta1.QueryDelegatorValidatorRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest; + return proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.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.setDelegatorAddr(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddr(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.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.staking.v1beta1.QueryDelegatorValidatorRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddr(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddr(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string delegator_addr = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.prototype.getDelegatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.prototype.setDelegatorAddr = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_addr = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.prototype.getValidatorAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorRequest.prototype.setValidatorAddr = 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.staking.v1beta1.QueryDelegatorValidatorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryDelegatorValidatorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.toObject = function(includeInstance, msg) { + var f, obj = { + validator: (f = msg.getValidator()) && cosmos_staking_v1beta1_staking_pb.Validator.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.staking.v1beta1.QueryDelegatorValidatorResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse; + return proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Validator; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Validator.deserializeBinaryFromReader); + msg.setValidator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.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.staking.v1beta1.QueryDelegatorValidatorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Validator.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Validator validator = 1; + * @return {?proto.cosmos.staking.v1beta1.Validator} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.prototype.getValidator = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Validator} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.Validator, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Validator|undefined} value + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryDelegatorValidatorResponse.prototype.hasValidator = 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.staking.v1beta1.QueryHistoricalInfoRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryHistoricalInfoRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.toObject = function(includeInstance, msg) { + var f, obj = { + height: 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.cosmos.staking.v1beta1.QueryHistoricalInfoRequest} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest; + return proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.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.staking.v1beta1.QueryHistoricalInfoRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest} returns this + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoRequest.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.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryHistoricalInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + hist: (f = msg.getHist()) && cosmos_staking_v1beta1_staking_pb.HistoricalInfo.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.staking.v1beta1.QueryHistoricalInfoResponse} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse; + return proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.HistoricalInfo; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.HistoricalInfo.deserializeBinaryFromReader); + msg.setHist(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.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.staking.v1beta1.QueryHistoricalInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHist(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.HistoricalInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional HistoricalInfo hist = 1; + * @return {?proto.cosmos.staking.v1beta1.HistoricalInfo} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.prototype.getHist = function() { + return /** @type{?proto.cosmos.staking.v1beta1.HistoricalInfo} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.HistoricalInfo, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.HistoricalInfo|undefined} value + * @return {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.prototype.setHist = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.prototype.clearHist = function() { + return this.setHist(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryHistoricalInfoResponse.prototype.hasHist = 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.staking.v1beta1.QueryPoolRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryPoolRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryPoolRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryPoolRequest.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.staking.v1beta1.QueryPoolRequest} + */ +proto.cosmos.staking.v1beta1.QueryPoolRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryPoolRequest; + return proto.cosmos.staking.v1beta1.QueryPoolRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryPoolRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryPoolRequest} + */ +proto.cosmos.staking.v1beta1.QueryPoolRequest.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.staking.v1beta1.QueryPoolRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryPoolRequest.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.staking.v1beta1.QueryPoolRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryPoolRequest.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.staking.v1beta1.QueryPoolResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.QueryPoolResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.QueryPoolResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryPoolResponse.toObject = function(includeInstance, msg) { + var f, obj = { + pool: (f = msg.getPool()) && cosmos_staking_v1beta1_staking_pb.Pool.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.staking.v1beta1.QueryPoolResponse} + */ +proto.cosmos.staking.v1beta1.QueryPoolResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryPoolResponse; + return proto.cosmos.staking.v1beta1.QueryPoolResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryPoolResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryPoolResponse} + */ +proto.cosmos.staking.v1beta1.QueryPoolResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Pool; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Pool.deserializeBinaryFromReader); + msg.setPool(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.QueryPoolResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.QueryPoolResponse.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.staking.v1beta1.QueryPoolResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryPoolResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPool(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Pool.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Pool pool = 1; + * @return {?proto.cosmos.staking.v1beta1.Pool} + */ +proto.cosmos.staking.v1beta1.QueryPoolResponse.prototype.getPool = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Pool} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.Pool, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Pool|undefined} value + * @return {!proto.cosmos.staking.v1beta1.QueryPoolResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryPoolResponse.prototype.setPool = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryPoolResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryPoolResponse.prototype.clearPool = function() { + return this.setPool(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryPoolResponse.prototype.hasPool = 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.staking.v1beta1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryParamsRequest} + */ +proto.cosmos.staking.v1beta1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryParamsRequest; + return proto.cosmos.staking.v1beta1.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryParamsRequest} + */ +proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && cosmos_staking_v1beta1_staking_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.cosmos.staking.v1beta1.QueryParamsResponse} + */ +proto.cosmos.staking.v1beta1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.QueryParamsResponse; + return proto.cosmos.staking.v1beta1.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.QueryParamsResponse} + */ +proto.cosmos.staking.v1beta1.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Params; + reader.readMessage(value,cosmos_staking_v1beta1_staking_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.cosmos.staking.v1beta1.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.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.cosmos.staking.v1beta1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.cosmos.staking.v1beta1.Params} + */ +proto.cosmos.staking.v1beta1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Params} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.Params, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Params|undefined} value + * @return {!proto.cosmos.staking.v1beta1.QueryParamsResponse} returns this +*/ +proto.cosmos.staking.v1beta1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.QueryParamsResponse} returns this + */ +proto.cosmos.staking.v1beta1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.cosmos.staking.v1beta1); diff --git a/src/types/proto-types/cosmos/staking/v1beta1/staking_pb.js b/src/types/proto-types/cosmos/staking/v1beta1/staking_pb.js new file mode 100644 index 00000000..4d99b2f7 --- /dev/null +++ b/src/types/proto-types/cosmos/staking/v1beta1/staking_pb.js @@ -0,0 +1,4840 @@ +// source: cosmos/staking/v1beta1/staking.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_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'); +goog.object.extend(proto, google_protobuf_timestamp_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 tendermint_types_types_pb = require('../../../tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_types_pb); +goog.exportSymbol('proto.cosmos.staking.v1beta1.BondStatus', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.Commission', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.CommissionRates', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.DVPair', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.DVPairs', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.DVVTriplet', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.DVVTriplets', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.Delegation', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.DelegationResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.Description', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.HistoricalInfo', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.Params', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.Pool', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.Redelegation', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.RedelegationEntry', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.RedelegationEntryResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.RedelegationResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.UnbondingDelegation', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.UnbondingDelegationEntry', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.ValAddresses', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.Validator', 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.staking.v1beta1.HistoricalInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.HistoricalInfo.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.HistoricalInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.HistoricalInfo.displayName = 'proto.cosmos.staking.v1beta1.HistoricalInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.CommissionRates = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.CommissionRates, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.CommissionRates.displayName = 'proto.cosmos.staking.v1beta1.CommissionRates'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.Commission = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.Commission, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.Commission.displayName = 'proto.cosmos.staking.v1beta1.Commission'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.Description = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.Description, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.Description.displayName = 'proto.cosmos.staking.v1beta1.Description'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.Validator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.Validator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.Validator.displayName = 'proto.cosmos.staking.v1beta1.Validator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.ValAddresses = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.ValAddresses.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.ValAddresses, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.ValAddresses.displayName = 'proto.cosmos.staking.v1beta1.ValAddresses'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.DVPair = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.DVPair, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.DVPair.displayName = 'proto.cosmos.staking.v1beta1.DVPair'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.DVPairs = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.DVPairs.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.DVPairs, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.DVPairs.displayName = 'proto.cosmos.staking.v1beta1.DVPairs'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.DVVTriplet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.DVVTriplet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.DVVTriplet.displayName = 'proto.cosmos.staking.v1beta1.DVVTriplet'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.DVVTriplets = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.DVVTriplets.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.DVVTriplets, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.DVVTriplets.displayName = 'proto.cosmos.staking.v1beta1.DVVTriplets'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.Delegation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.Delegation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.Delegation.displayName = 'proto.cosmos.staking.v1beta1.Delegation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.UnbondingDelegation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.UnbondingDelegation.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.UnbondingDelegation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.UnbondingDelegation.displayName = 'proto.cosmos.staking.v1beta1.UnbondingDelegation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.UnbondingDelegationEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.UnbondingDelegationEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.displayName = 'proto.cosmos.staking.v1beta1.UnbondingDelegationEntry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.RedelegationEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.RedelegationEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.RedelegationEntry.displayName = 'proto.cosmos.staking.v1beta1.RedelegationEntry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.Redelegation = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.Redelegation.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.Redelegation, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.Redelegation.displayName = 'proto.cosmos.staking.v1beta1.Redelegation'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.Params.displayName = 'proto.cosmos.staking.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.cosmos.staking.v1beta1.DelegationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.DelegationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.DelegationResponse.displayName = 'proto.cosmos.staking.v1beta1.DelegationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.RedelegationEntryResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.RedelegationEntryResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.RedelegationEntryResponse.displayName = 'proto.cosmos.staking.v1beta1.RedelegationEntryResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.RedelegationResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.staking.v1beta1.RedelegationResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.RedelegationResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.RedelegationResponse.displayName = 'proto.cosmos.staking.v1beta1.RedelegationResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.Pool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.Pool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.Pool.displayName = 'proto.cosmos.staking.v1beta1.Pool'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.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.staking.v1beta1.HistoricalInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.HistoricalInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.HistoricalInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.toObject = function(includeInstance, msg) { + var f, obj = { + header: (f = msg.getHeader()) && tendermint_types_types_pb.Header.toObject(includeInstance, f), + valsetList: jspb.Message.toObjectList(msg.getValsetList(), + proto.cosmos.staking.v1beta1.Validator.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.staking.v1beta1.HistoricalInfo} + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.HistoricalInfo; + return proto.cosmos.staking.v1beta1.HistoricalInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.HistoricalInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.HistoricalInfo} + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.Header; + reader.readMessage(value,tendermint_types_types_pb.Header.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 2: + var value = new proto.cosmos.staking.v1beta1.Validator; + reader.readMessage(value,proto.cosmos.staking.v1beta1.Validator.deserializeBinaryFromReader); + msg.addValset(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.HistoricalInfo.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.staking.v1beta1.HistoricalInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.Header.serializeBinaryToWriter + ); + } + f = message.getValsetList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.staking.v1beta1.Validator.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.types.Header header = 1; + * @return {?proto.tendermint.types.Header} + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.getHeader = function() { + return /** @type{?proto.tendermint.types.Header} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Header, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Header|undefined} value + * @return {!proto.cosmos.staking.v1beta1.HistoricalInfo} returns this +*/ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.HistoricalInfo} returns this + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.clearHeader = function() { + return this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.hasHeader = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Validator valset = 2; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.getValsetList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.staking.v1beta1.Validator, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.HistoricalInfo} returns this +*/ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.setValsetList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.Validator} + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.addValset = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.staking.v1beta1.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.HistoricalInfo} returns this + */ +proto.cosmos.staking.v1beta1.HistoricalInfo.prototype.clearValsetList = function() { + return this.setValsetList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.staking.v1beta1.CommissionRates.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.CommissionRates.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.CommissionRates} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.CommissionRates.toObject = function(includeInstance, msg) { + var f, obj = { + rate: jspb.Message.getFieldWithDefault(msg, 1, ""), + maxRate: jspb.Message.getFieldWithDefault(msg, 2, ""), + maxChangeRate: 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.cosmos.staking.v1beta1.CommissionRates} + */ +proto.cosmos.staking.v1beta1.CommissionRates.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.CommissionRates; + return proto.cosmos.staking.v1beta1.CommissionRates.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.CommissionRates} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.CommissionRates} + */ +proto.cosmos.staking.v1beta1.CommissionRates.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.setRate(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMaxRate(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMaxChangeRate(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.CommissionRates.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.CommissionRates.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.staking.v1beta1.CommissionRates} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.CommissionRates.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRate(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMaxRate(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMaxChangeRate(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string rate = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.CommissionRates.prototype.getRate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.CommissionRates} returns this + */ +proto.cosmos.staking.v1beta1.CommissionRates.prototype.setRate = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string max_rate = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.CommissionRates.prototype.getMaxRate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.CommissionRates} returns this + */ +proto.cosmos.staking.v1beta1.CommissionRates.prototype.setMaxRate = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string max_change_rate = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.CommissionRates.prototype.getMaxChangeRate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.CommissionRates} returns this + */ +proto.cosmos.staking.v1beta1.CommissionRates.prototype.setMaxChangeRate = 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.cosmos.staking.v1beta1.Commission.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.Commission.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.Commission} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Commission.toObject = function(includeInstance, msg) { + var f, obj = { + commissionRates: (f = msg.getCommissionRates()) && proto.cosmos.staking.v1beta1.CommissionRates.toObject(includeInstance, f), + updateTime: (f = msg.getUpdateTime()) && 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.cosmos.staking.v1beta1.Commission} + */ +proto.cosmos.staking.v1beta1.Commission.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.Commission; + return proto.cosmos.staking.v1beta1.Commission.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.Commission} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.Commission} + */ +proto.cosmos.staking.v1beta1.Commission.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.staking.v1beta1.CommissionRates; + reader.readMessage(value,proto.cosmos.staking.v1beta1.CommissionRates.deserializeBinaryFromReader); + msg.setCommissionRates(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdateTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.Commission.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.Commission.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.staking.v1beta1.Commission} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Commission.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCommissionRates(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.staking.v1beta1.CommissionRates.serializeBinaryToWriter + ); + } + f = message.getUpdateTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional CommissionRates commission_rates = 1; + * @return {?proto.cosmos.staking.v1beta1.CommissionRates} + */ +proto.cosmos.staking.v1beta1.Commission.prototype.getCommissionRates = function() { + return /** @type{?proto.cosmos.staking.v1beta1.CommissionRates} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.staking.v1beta1.CommissionRates, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.CommissionRates|undefined} value + * @return {!proto.cosmos.staking.v1beta1.Commission} returns this +*/ +proto.cosmos.staking.v1beta1.Commission.prototype.setCommissionRates = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.Commission} returns this + */ +proto.cosmos.staking.v1beta1.Commission.prototype.clearCommissionRates = function() { + return this.setCommissionRates(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.Commission.prototype.hasCommissionRates = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Timestamp update_time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.staking.v1beta1.Commission.prototype.getUpdateTime = 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.staking.v1beta1.Commission} returns this +*/ +proto.cosmos.staking.v1beta1.Commission.prototype.setUpdateTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.Commission} returns this + */ +proto.cosmos.staking.v1beta1.Commission.prototype.clearUpdateTime = function() { + return this.setUpdateTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.Commission.prototype.hasUpdateTime = 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.staking.v1beta1.Description.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.Description.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.Description} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Description.toObject = function(includeInstance, msg) { + var f, obj = { + moniker: jspb.Message.getFieldWithDefault(msg, 1, ""), + identity: jspb.Message.getFieldWithDefault(msg, 2, ""), + website: jspb.Message.getFieldWithDefault(msg, 3, ""), + securityContact: jspb.Message.getFieldWithDefault(msg, 4, ""), + details: 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.cosmos.staking.v1beta1.Description} + */ +proto.cosmos.staking.v1beta1.Description.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.Description; + return proto.cosmos.staking.v1beta1.Description.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.Description} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.Description} + */ +proto.cosmos.staking.v1beta1.Description.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.setMoniker(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setIdentity(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setWebsite(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSecurityContact(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDetails(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.Description.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.Description.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.staking.v1beta1.Description} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Description.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMoniker(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIdentity(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getWebsite(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSecurityContact(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getDetails(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string moniker = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Description.prototype.getMoniker = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Description} returns this + */ +proto.cosmos.staking.v1beta1.Description.prototype.setMoniker = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string identity = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Description.prototype.getIdentity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Description} returns this + */ +proto.cosmos.staking.v1beta1.Description.prototype.setIdentity = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string website = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Description.prototype.getWebsite = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Description} returns this + */ +proto.cosmos.staking.v1beta1.Description.prototype.setWebsite = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string security_contact = 4; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Description.prototype.getSecurityContact = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Description} returns this + */ +proto.cosmos.staking.v1beta1.Description.prototype.setSecurityContact = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string details = 5; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Description.prototype.getDetails = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Description} returns this + */ +proto.cosmos.staking.v1beta1.Description.prototype.setDetails = 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.cosmos.staking.v1beta1.Validator.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.Validator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.Validator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Validator.toObject = function(includeInstance, msg) { + var f, obj = { + operatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + consensusPubkey: (f = msg.getConsensusPubkey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + jailed: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + status: jspb.Message.getFieldWithDefault(msg, 4, 0), + tokens: jspb.Message.getFieldWithDefault(msg, 5, ""), + delegatorShares: jspb.Message.getFieldWithDefault(msg, 6, ""), + description: (f = msg.getDescription()) && proto.cosmos.staking.v1beta1.Description.toObject(includeInstance, f), + unbondingHeight: jspb.Message.getFieldWithDefault(msg, 8, 0), + unbondingTime: (f = msg.getUnbondingTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + commission: (f = msg.getCommission()) && proto.cosmos.staking.v1beta1.Commission.toObject(includeInstance, f), + minSelfDelegation: jspb.Message.getFieldWithDefault(msg, 11, "") + }; + + 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.staking.v1beta1.Validator} + */ +proto.cosmos.staking.v1beta1.Validator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.Validator; + return proto.cosmos.staking.v1beta1.Validator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.Validator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.Validator} + */ +proto.cosmos.staking.v1beta1.Validator.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.setOperatorAddress(value); + break; + case 2: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setConsensusPubkey(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setJailed(value); + break; + case 4: + var value = /** @type {!proto.cosmos.staking.v1beta1.BondStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setTokens(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setDelegatorShares(value); + break; + case 7: + var value = new proto.cosmos.staking.v1beta1.Description; + reader.readMessage(value,proto.cosmos.staking.v1beta1.Description.deserializeBinaryFromReader); + msg.setDescription(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setUnbondingHeight(value); + break; + case 9: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUnbondingTime(value); + break; + case 10: + var value = new proto.cosmos.staking.v1beta1.Commission; + reader.readMessage(value,proto.cosmos.staking.v1beta1.Commission.deserializeBinaryFromReader); + msg.setCommission(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setMinSelfDelegation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.Validator.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.staking.v1beta1.Validator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Validator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOperatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConsensusPubkey(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getJailed(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getTokens(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getDelegatorShares(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getDescription(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.cosmos.staking.v1beta1.Description.serializeBinaryToWriter + ); + } + f = message.getUnbondingHeight(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getUnbondingTime(); + if (f != null) { + writer.writeMessage( + 9, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getCommission(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.cosmos.staking.v1beta1.Commission.serializeBinaryToWriter + ); + } + f = message.getMinSelfDelegation(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } +}; + + +/** + * optional string operator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getOperatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.setOperatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any consensus_pubkey = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getConsensusPubkey = 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.cosmos.staking.v1beta1.Validator} returns this +*/ +proto.cosmos.staking.v1beta1.Validator.prototype.setConsensusPubkey = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.clearConsensusPubkey = function() { + return this.setConsensusPubkey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.hasConsensusPubkey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bool jailed = 3; + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getJailed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.setJailed = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * optional BondStatus status = 4; + * @return {!proto.cosmos.staking.v1beta1.BondStatus} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getStatus = function() { + return /** @type {!proto.cosmos.staking.v1beta1.BondStatus} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.BondStatus} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional string tokens = 5; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getTokens = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.setTokens = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string delegator_shares = 6; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getDelegatorShares = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.setDelegatorShares = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional Description description = 7; + * @return {?proto.cosmos.staking.v1beta1.Description} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getDescription = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Description} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.staking.v1beta1.Description, 7)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Description|undefined} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this +*/ +proto.cosmos.staking.v1beta1.Validator.prototype.setDescription = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.clearDescription = function() { + return this.setDescription(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.hasDescription = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional int64 unbonding_height = 8; + * @return {number} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getUnbondingHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.setUnbondingHeight = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional google.protobuf.Timestamp unbonding_time = 9; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getUnbondingTime = 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.cosmos.staking.v1beta1.Validator} returns this +*/ +proto.cosmos.staking.v1beta1.Validator.prototype.setUnbondingTime = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.clearUnbondingTime = function() { + return this.setUnbondingTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.hasUnbondingTime = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional Commission commission = 10; + * @return {?proto.cosmos.staking.v1beta1.Commission} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getCommission = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Commission} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.staking.v1beta1.Commission, 10)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Commission|undefined} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this +*/ +proto.cosmos.staking.v1beta1.Validator.prototype.setCommission = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.clearCommission = function() { + return this.setCommission(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.hasCommission = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional string min_self_delegation = 11; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Validator.prototype.getMinSelfDelegation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Validator} returns this + */ +proto.cosmos.staking.v1beta1.Validator.prototype.setMinSelfDelegation = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.ValAddresses.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.staking.v1beta1.ValAddresses.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.ValAddresses.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.ValAddresses} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.ValAddresses.toObject = function(includeInstance, msg) { + var f, obj = { + addressesList: (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.staking.v1beta1.ValAddresses} + */ +proto.cosmos.staking.v1beta1.ValAddresses.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.ValAddresses; + return proto.cosmos.staking.v1beta1.ValAddresses.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.ValAddresses} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.ValAddresses} + */ +proto.cosmos.staking.v1beta1.ValAddresses.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.addAddresses(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.ValAddresses.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.ValAddresses.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.staking.v1beta1.ValAddresses} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.ValAddresses.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddressesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string addresses = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.ValAddresses.prototype.getAddressesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.ValAddresses} returns this + */ +proto.cosmos.staking.v1beta1.ValAddresses.prototype.setAddressesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.ValAddresses} returns this + */ +proto.cosmos.staking.v1beta1.ValAddresses.prototype.addAddresses = 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.staking.v1beta1.ValAddresses} returns this + */ +proto.cosmos.staking.v1beta1.ValAddresses.prototype.clearAddressesList = function() { + return this.setAddressesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.staking.v1beta1.DVPair.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.DVPair.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.DVPair} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DVPair.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: 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.staking.v1beta1.DVPair} + */ +proto.cosmos.staking.v1beta1.DVPair.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.DVPair; + return proto.cosmos.staking.v1beta1.DVPair.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.DVPair} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.DVPair} + */ +proto.cosmos.staking.v1beta1.DVPair.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.setDelegatorAddress(value); + break; + case 2: + 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.cosmos.staking.v1beta1.DVPair.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.DVPair.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.staking.v1beta1.DVPair} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DVPair.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.DVPair.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.DVPair} returns this + */ +proto.cosmos.staking.v1beta1.DVPair.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.DVPair.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.DVPair} returns this + */ +proto.cosmos.staking.v1beta1.DVPair.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.DVPairs.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.staking.v1beta1.DVPairs.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.DVPairs.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.DVPairs} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DVPairs.toObject = function(includeInstance, msg) { + var f, obj = { + pairsList: jspb.Message.toObjectList(msg.getPairsList(), + proto.cosmos.staking.v1beta1.DVPair.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.staking.v1beta1.DVPairs} + */ +proto.cosmos.staking.v1beta1.DVPairs.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.DVPairs; + return proto.cosmos.staking.v1beta1.DVPairs.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.DVPairs} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.DVPairs} + */ +proto.cosmos.staking.v1beta1.DVPairs.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.staking.v1beta1.DVPair; + reader.readMessage(value,proto.cosmos.staking.v1beta1.DVPair.deserializeBinaryFromReader); + msg.addPairs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.DVPairs.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.DVPairs.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.staking.v1beta1.DVPairs} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DVPairs.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPairsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.staking.v1beta1.DVPair.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DVPair pairs = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.DVPairs.prototype.getPairsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.staking.v1beta1.DVPair, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.DVPairs} returns this +*/ +proto.cosmos.staking.v1beta1.DVPairs.prototype.setPairsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.DVPair=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.DVPair} + */ +proto.cosmos.staking.v1beta1.DVPairs.prototype.addPairs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.DVPair, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.DVPairs} returns this + */ +proto.cosmos.staking.v1beta1.DVPairs.prototype.clearPairsList = function() { + return this.setPairsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.staking.v1beta1.DVVTriplet.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.DVVTriplet.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.DVVTriplet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DVVTriplet.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorSrcAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + validatorDstAddress: 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.cosmos.staking.v1beta1.DVVTriplet} + */ +proto.cosmos.staking.v1beta1.DVVTriplet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.DVVTriplet; + return proto.cosmos.staking.v1beta1.DVVTriplet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.DVVTriplet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.DVVTriplet} + */ +proto.cosmos.staking.v1beta1.DVVTriplet.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.setDelegatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorSrcAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorDstAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.DVVTriplet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.DVVTriplet.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.staking.v1beta1.DVVTriplet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DVVTriplet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorSrcAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getValidatorDstAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.DVVTriplet.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.DVVTriplet} returns this + */ +proto.cosmos.staking.v1beta1.DVVTriplet.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_src_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.DVVTriplet.prototype.getValidatorSrcAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.DVVTriplet} returns this + */ +proto.cosmos.staking.v1beta1.DVVTriplet.prototype.setValidatorSrcAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string validator_dst_address = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.DVVTriplet.prototype.getValidatorDstAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.DVVTriplet} returns this + */ +proto.cosmos.staking.v1beta1.DVVTriplet.prototype.setValidatorDstAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.DVVTriplets.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.staking.v1beta1.DVVTriplets.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.DVVTriplets.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.DVVTriplets} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DVVTriplets.toObject = function(includeInstance, msg) { + var f, obj = { + tripletsList: jspb.Message.toObjectList(msg.getTripletsList(), + proto.cosmos.staking.v1beta1.DVVTriplet.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.staking.v1beta1.DVVTriplets} + */ +proto.cosmos.staking.v1beta1.DVVTriplets.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.DVVTriplets; + return proto.cosmos.staking.v1beta1.DVVTriplets.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.DVVTriplets} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.DVVTriplets} + */ +proto.cosmos.staking.v1beta1.DVVTriplets.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.staking.v1beta1.DVVTriplet; + reader.readMessage(value,proto.cosmos.staking.v1beta1.DVVTriplet.deserializeBinaryFromReader); + msg.addTriplets(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.DVVTriplets.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.DVVTriplets.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.staking.v1beta1.DVVTriplets} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DVVTriplets.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTripletsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.staking.v1beta1.DVVTriplet.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DVVTriplet triplets = 1; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.DVVTriplets.prototype.getTripletsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.staking.v1beta1.DVVTriplet, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.DVVTriplets} returns this +*/ +proto.cosmos.staking.v1beta1.DVVTriplets.prototype.setTripletsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.DVVTriplet=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.DVVTriplet} + */ +proto.cosmos.staking.v1beta1.DVVTriplets.prototype.addTriplets = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.staking.v1beta1.DVVTriplet, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.DVVTriplets} returns this + */ +proto.cosmos.staking.v1beta1.DVVTriplets.prototype.clearTripletsList = function() { + return this.setTripletsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.staking.v1beta1.Delegation.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.Delegation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.Delegation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Delegation.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + shares: 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.cosmos.staking.v1beta1.Delegation} + */ +proto.cosmos.staking.v1beta1.Delegation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.Delegation; + return proto.cosmos.staking.v1beta1.Delegation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.Delegation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.Delegation} + */ +proto.cosmos.staking.v1beta1.Delegation.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.setDelegatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setShares(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.Delegation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.Delegation.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.staking.v1beta1.Delegation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Delegation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getShares(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Delegation.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Delegation} returns this + */ +proto.cosmos.staking.v1beta1.Delegation.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Delegation.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Delegation} returns this + */ +proto.cosmos.staking.v1beta1.Delegation.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string shares = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Delegation.prototype.getShares = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Delegation} returns this + */ +proto.cosmos.staking.v1beta1.Delegation.prototype.setShares = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.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.staking.v1beta1.UnbondingDelegation.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.UnbondingDelegation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.UnbondingDelegation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.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.staking.v1beta1.UnbondingDelegation} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.UnbondingDelegation; + return proto.cosmos.staking.v1beta1.UnbondingDelegation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.UnbondingDelegation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegation} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.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.setDelegatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + case 3: + var value = new proto.cosmos.staking.v1beta1.UnbondingDelegationEntry; + reader.readMessage(value,proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.UnbondingDelegation.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.staking.v1beta1.UnbondingDelegation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegation} returns this + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegation} returns this + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated UnbondingDelegationEntry entries = 3; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.staking.v1beta1.UnbondingDelegationEntry, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegation} returns this +*/ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.UnbondingDelegationEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegationEntry} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.staking.v1beta1.UnbondingDelegationEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegation} returns this + */ +proto.cosmos.staking.v1beta1.UnbondingDelegation.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.staking.v1beta1.UnbondingDelegationEntry.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.UnbondingDelegationEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.toObject = function(includeInstance, msg) { + var f, obj = { + creationHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + completionTime: (f = msg.getCompletionTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + initialBalance: jspb.Message.getFieldWithDefault(msg, 3, ""), + balance: 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.cosmos.staking.v1beta1.UnbondingDelegationEntry} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.UnbondingDelegationEntry; + return proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.UnbondingDelegationEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegationEntry} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.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.setCreationHeight(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCompletionTime(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setInitialBalance(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setBalance(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.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.staking.v1beta1.UnbondingDelegationEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCreationHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getCompletionTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getInitialBalance(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getBalance(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional int64 creation_height = 1; + * @return {number} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.getCreationHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegationEntry} returns this + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.setCreationHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp completion_time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.getCompletionTime = 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.staking.v1beta1.UnbondingDelegationEntry} returns this +*/ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.setCompletionTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegationEntry} returns this + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.clearCompletionTime = function() { + return this.setCompletionTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.hasCompletionTime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string initial_balance = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.getInitialBalance = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegationEntry} returns this + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.setInitialBalance = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string balance = 4; + * @return {string} + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.getBalance = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.UnbondingDelegationEntry} returns this + */ +proto.cosmos.staking.v1beta1.UnbondingDelegationEntry.prototype.setBalance = 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.cosmos.staking.v1beta1.RedelegationEntry.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.RedelegationEntry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.RedelegationEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.toObject = function(includeInstance, msg) { + var f, obj = { + creationHeight: jspb.Message.getFieldWithDefault(msg, 1, 0), + completionTime: (f = msg.getCompletionTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + initialBalance: jspb.Message.getFieldWithDefault(msg, 3, ""), + sharesDst: 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.cosmos.staking.v1beta1.RedelegationEntry} + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.RedelegationEntry; + return proto.cosmos.staking.v1beta1.RedelegationEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.RedelegationEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntry} + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.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.setCreationHeight(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCompletionTime(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setInitialBalance(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSharesDst(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.RedelegationEntry.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.staking.v1beta1.RedelegationEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCreationHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getCompletionTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getInitialBalance(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSharesDst(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional int64 creation_height = 1; + * @return {number} + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.getCreationHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntry} returns this + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.setCreationHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp completion_time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.getCompletionTime = 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.staking.v1beta1.RedelegationEntry} returns this +*/ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.setCompletionTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntry} returns this + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.clearCompletionTime = function() { + return this.setCompletionTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.hasCompletionTime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string initial_balance = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.getInitialBalance = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntry} returns this + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.setInitialBalance = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string shares_dst = 4; + * @return {string} + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.getSharesDst = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntry} returns this + */ +proto.cosmos.staking.v1beta1.RedelegationEntry.prototype.setSharesDst = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.Redelegation.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.cosmos.staking.v1beta1.Redelegation.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.Redelegation.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.Redelegation} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Redelegation.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorSrcAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + validatorDstAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.cosmos.staking.v1beta1.RedelegationEntry.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.staking.v1beta1.Redelegation} + */ +proto.cosmos.staking.v1beta1.Redelegation.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.Redelegation; + return proto.cosmos.staking.v1beta1.Redelegation.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.Redelegation} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.Redelegation} + */ +proto.cosmos.staking.v1beta1.Redelegation.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.setDelegatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorSrcAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorDstAddress(value); + break; + case 4: + var value = new proto.cosmos.staking.v1beta1.RedelegationEntry; + reader.readMessage(value,proto.cosmos.staking.v1beta1.RedelegationEntry.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.Redelegation.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.staking.v1beta1.Redelegation} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Redelegation.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorSrcAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getValidatorDstAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.cosmos.staking.v1beta1.RedelegationEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Redelegation} returns this + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_src_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.getValidatorSrcAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Redelegation} returns this + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.setValidatorSrcAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string validator_dst_address = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.getValidatorDstAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Redelegation} returns this + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.setValidatorDstAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated RedelegationEntry entries = 4; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.staking.v1beta1.RedelegationEntry, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.Redelegation} returns this +*/ +proto.cosmos.staking.v1beta1.Redelegation.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.RedelegationEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntry} + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmos.staking.v1beta1.RedelegationEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.Redelegation} returns this + */ +proto.cosmos.staking.v1beta1.Redelegation.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.staking.v1beta1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.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.cosmos.staking.v1beta1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + unbondingTime: (f = msg.getUnbondingTime()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + maxValidators: jspb.Message.getFieldWithDefault(msg, 2, 0), + maxEntries: jspb.Message.getFieldWithDefault(msg, 3, 0), + historicalEntries: jspb.Message.getFieldWithDefault(msg, 4, 0), + bondDenom: 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.cosmos.staking.v1beta1.Params} + */ +proto.cosmos.staking.v1beta1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.Params; + return proto.cosmos.staking.v1beta1.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.Params} + */ +proto.cosmos.staking.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.setUnbondingTime(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxValidators(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setMaxEntries(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setHistoricalEntries(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setBondDenom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.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.cosmos.staking.v1beta1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUnbondingTime(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getMaxValidators(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getMaxEntries(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getHistoricalEntries(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getBondDenom(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional google.protobuf.Duration unbonding_time = 1; + * @return {?proto.google.protobuf.Duration} + */ +proto.cosmos.staking.v1beta1.Params.prototype.getUnbondingTime = 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.cosmos.staking.v1beta1.Params} returns this +*/ +proto.cosmos.staking.v1beta1.Params.prototype.setUnbondingTime = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.Params} returns this + */ +proto.cosmos.staking.v1beta1.Params.prototype.clearUnbondingTime = function() { + return this.setUnbondingTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.Params.prototype.hasUnbondingTime = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional uint32 max_validators = 2; + * @return {number} + */ +proto.cosmos.staking.v1beta1.Params.prototype.getMaxValidators = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.staking.v1beta1.Params} returns this + */ +proto.cosmos.staking.v1beta1.Params.prototype.setMaxValidators = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 max_entries = 3; + * @return {number} + */ +proto.cosmos.staking.v1beta1.Params.prototype.getMaxEntries = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.staking.v1beta1.Params} returns this + */ +proto.cosmos.staking.v1beta1.Params.prototype.setMaxEntries = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint32 historical_entries = 4; + * @return {number} + */ +proto.cosmos.staking.v1beta1.Params.prototype.getHistoricalEntries = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.staking.v1beta1.Params} returns this + */ +proto.cosmos.staking.v1beta1.Params.prototype.setHistoricalEntries = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string bond_denom = 5; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Params.prototype.getBondDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Params} returns this + */ +proto.cosmos.staking.v1beta1.Params.prototype.setBondDenom = 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.cosmos.staking.v1beta1.DelegationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.DelegationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.DelegationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DelegationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + delegation: (f = msg.getDelegation()) && proto.cosmos.staking.v1beta1.Delegation.toObject(includeInstance, f), + 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.staking.v1beta1.DelegationResponse} + */ +proto.cosmos.staking.v1beta1.DelegationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.DelegationResponse; + return proto.cosmos.staking.v1beta1.DelegationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.DelegationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.DelegationResponse} + */ +proto.cosmos.staking.v1beta1.DelegationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.staking.v1beta1.Delegation; + reader.readMessage(value,proto.cosmos.staking.v1beta1.Delegation.deserializeBinaryFromReader); + msg.setDelegation(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.staking.v1beta1.DelegationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.DelegationResponse.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.staking.v1beta1.DelegationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.DelegationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegation(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.staking.v1beta1.Delegation.serializeBinaryToWriter + ); + } + f = message.getBalance(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Delegation delegation = 1; + * @return {?proto.cosmos.staking.v1beta1.Delegation} + */ +proto.cosmos.staking.v1beta1.DelegationResponse.prototype.getDelegation = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Delegation} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.staking.v1beta1.Delegation, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Delegation|undefined} value + * @return {!proto.cosmos.staking.v1beta1.DelegationResponse} returns this +*/ +proto.cosmos.staking.v1beta1.DelegationResponse.prototype.setDelegation = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.DelegationResponse} returns this + */ +proto.cosmos.staking.v1beta1.DelegationResponse.prototype.clearDelegation = function() { + return this.setDelegation(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.DelegationResponse.prototype.hasDelegation = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional cosmos.base.v1beta1.Coin balance = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.staking.v1beta1.DelegationResponse.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.staking.v1beta1.DelegationResponse} returns this +*/ +proto.cosmos.staking.v1beta1.DelegationResponse.prototype.setBalance = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.DelegationResponse} returns this + */ +proto.cosmos.staking.v1beta1.DelegationResponse.prototype.clearBalance = function() { + return this.setBalance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.DelegationResponse.prototype.hasBalance = 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.staking.v1beta1.RedelegationEntryResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.RedelegationEntryResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.RedelegationEntryResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.toObject = function(includeInstance, msg) { + var f, obj = { + redelegationEntry: (f = msg.getRedelegationEntry()) && proto.cosmos.staking.v1beta1.RedelegationEntry.toObject(includeInstance, f), + balance: 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.cosmos.staking.v1beta1.RedelegationEntryResponse} + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.RedelegationEntryResponse; + return proto.cosmos.staking.v1beta1.RedelegationEntryResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.RedelegationEntryResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntryResponse} + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.staking.v1beta1.RedelegationEntry; + reader.readMessage(value,proto.cosmos.staking.v1beta1.RedelegationEntry.deserializeBinaryFromReader); + msg.setRedelegationEntry(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setBalance(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.RedelegationEntryResponse.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.staking.v1beta1.RedelegationEntryResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRedelegationEntry(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.staking.v1beta1.RedelegationEntry.serializeBinaryToWriter + ); + } + f = message.getBalance(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional RedelegationEntry redelegation_entry = 1; + * @return {?proto.cosmos.staking.v1beta1.RedelegationEntry} + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.prototype.getRedelegationEntry = function() { + return /** @type{?proto.cosmos.staking.v1beta1.RedelegationEntry} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.staking.v1beta1.RedelegationEntry, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.RedelegationEntry|undefined} value + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntryResponse} returns this +*/ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.prototype.setRedelegationEntry = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntryResponse} returns this + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.prototype.clearRedelegationEntry = function() { + return this.setRedelegationEntry(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.prototype.hasRedelegationEntry = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string balance = 4; + * @return {string} + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.prototype.getBalance = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntryResponse} returns this + */ +proto.cosmos.staking.v1beta1.RedelegationEntryResponse.prototype.setBalance = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.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.staking.v1beta1.RedelegationResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.RedelegationResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.RedelegationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.toObject = function(includeInstance, msg) { + var f, obj = { + redelegation: (f = msg.getRedelegation()) && proto.cosmos.staking.v1beta1.Redelegation.toObject(includeInstance, f), + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.cosmos.staking.v1beta1.RedelegationEntryResponse.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.staking.v1beta1.RedelegationResponse} + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.RedelegationResponse; + return proto.cosmos.staking.v1beta1.RedelegationResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.RedelegationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.RedelegationResponse} + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.staking.v1beta1.Redelegation; + reader.readMessage(value,proto.cosmos.staking.v1beta1.Redelegation.deserializeBinaryFromReader); + msg.setRedelegation(value); + break; + case 2: + var value = new proto.cosmos.staking.v1beta1.RedelegationEntryResponse; + reader.readMessage(value,proto.cosmos.staking.v1beta1.RedelegationEntryResponse.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.RedelegationResponse.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.staking.v1beta1.RedelegationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRedelegation(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.staking.v1beta1.Redelegation.serializeBinaryToWriter + ); + } + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.staking.v1beta1.RedelegationEntryResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Redelegation redelegation = 1; + * @return {?proto.cosmos.staking.v1beta1.Redelegation} + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.getRedelegation = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Redelegation} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.staking.v1beta1.Redelegation, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Redelegation|undefined} value + * @return {!proto.cosmos.staking.v1beta1.RedelegationResponse} returns this +*/ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.setRedelegation = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.RedelegationResponse} returns this + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.clearRedelegation = function() { + return this.setRedelegation(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.hasRedelegation = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated RedelegationEntryResponse entries = 2; + * @return {!Array} + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.staking.v1beta1.RedelegationEntryResponse, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.staking.v1beta1.RedelegationResponse} returns this +*/ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.RedelegationEntryResponse=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.staking.v1beta1.RedelegationEntryResponse} + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.staking.v1beta1.RedelegationEntryResponse, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.staking.v1beta1.RedelegationResponse} returns this + */ +proto.cosmos.staking.v1beta1.RedelegationResponse.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.staking.v1beta1.Pool.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.Pool.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.Pool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Pool.toObject = function(includeInstance, msg) { + var f, obj = { + notBondedTokens: jspb.Message.getFieldWithDefault(msg, 1, ""), + bondedTokens: 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.staking.v1beta1.Pool} + */ +proto.cosmos.staking.v1beta1.Pool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.Pool; + return proto.cosmos.staking.v1beta1.Pool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.Pool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.Pool} + */ +proto.cosmos.staking.v1beta1.Pool.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.setNotBondedTokens(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setBondedTokens(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.Pool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.Pool.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.staking.v1beta1.Pool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.Pool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNotBondedTokens(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBondedTokens(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string not_bonded_tokens = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Pool.prototype.getNotBondedTokens = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Pool} returns this + */ +proto.cosmos.staking.v1beta1.Pool.prototype.setNotBondedTokens = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string bonded_tokens = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.Pool.prototype.getBondedTokens = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.Pool} returns this + */ +proto.cosmos.staking.v1beta1.Pool.prototype.setBondedTokens = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * @enum {number} + */ +proto.cosmos.staking.v1beta1.BondStatus = { + BOND_STATUS_UNSPECIFIED: 0, + BOND_STATUS_UNBONDED: 1, + BOND_STATUS_UNBONDING: 2, + BOND_STATUS_BONDED: 3 +}; + +goog.object.extend(exports, proto.cosmos.staking.v1beta1); diff --git a/src/types/proto-types/cosmos/staking/v1beta1/tx_grpc_web_pb.js b/src/types/proto-types/cosmos/staking/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..6ade61fe --- /dev/null +++ b/src/types/proto-types/cosmos/staking/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,488 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.staking.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_staking_v1beta1_staking_pb = require('../../../cosmos/staking/v1beta1/staking_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.staking = {}; +proto.cosmos.staking.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.staking.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.staking.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.MsgCreateValidator, + * !proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse>} + */ +const methodDescriptor_Msg_CreateValidator = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Msg/CreateValidator', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.MsgCreateValidator, + proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgCreateValidator} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.MsgCreateValidator, + * !proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse>} + */ +const methodInfo_Msg_CreateValidator = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgCreateValidator} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgCreateValidator} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.MsgClient.prototype.createValidator = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/CreateValidator', + request, + metadata || {}, + methodDescriptor_Msg_CreateValidator, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgCreateValidator} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.MsgPromiseClient.prototype.createValidator = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/CreateValidator', + request, + metadata || {}, + methodDescriptor_Msg_CreateValidator); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.MsgEditValidator, + * !proto.cosmos.staking.v1beta1.MsgEditValidatorResponse>} + */ +const methodDescriptor_Msg_EditValidator = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Msg/EditValidator', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.MsgEditValidator, + proto.cosmos.staking.v1beta1.MsgEditValidatorResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgEditValidator} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.MsgEditValidator, + * !proto.cosmos.staking.v1beta1.MsgEditValidatorResponse>} + */ +const methodInfo_Msg_EditValidator = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.MsgEditValidatorResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgEditValidator} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgEditValidator} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.MsgEditValidatorResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.MsgClient.prototype.editValidator = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/EditValidator', + request, + metadata || {}, + methodDescriptor_Msg_EditValidator, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgEditValidator} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.MsgPromiseClient.prototype.editValidator = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/EditValidator', + request, + metadata || {}, + methodDescriptor_Msg_EditValidator); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.MsgDelegate, + * !proto.cosmos.staking.v1beta1.MsgDelegateResponse>} + */ +const methodDescriptor_Msg_Delegate = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Msg/Delegate', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.MsgDelegate, + proto.cosmos.staking.v1beta1.MsgDelegateResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgDelegate} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgDelegateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.MsgDelegate, + * !proto.cosmos.staking.v1beta1.MsgDelegateResponse>} + */ +const methodInfo_Msg_Delegate = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.MsgDelegateResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgDelegate} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgDelegateResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgDelegate} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.MsgDelegateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.MsgClient.prototype.delegate = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/Delegate', + request, + metadata || {}, + methodDescriptor_Msg_Delegate, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgDelegate} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.MsgPromiseClient.prototype.delegate = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/Delegate', + request, + metadata || {}, + methodDescriptor_Msg_Delegate); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.MsgBeginRedelegate, + * !proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse>} + */ +const methodDescriptor_Msg_BeginRedelegate = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Msg/BeginRedelegate', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.MsgBeginRedelegate, + proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.MsgBeginRedelegate, + * !proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse>} + */ +const methodInfo_Msg_BeginRedelegate = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.MsgClient.prototype.beginRedelegate = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/BeginRedelegate', + request, + metadata || {}, + methodDescriptor_Msg_BeginRedelegate, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.MsgPromiseClient.prototype.beginRedelegate = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/BeginRedelegate', + request, + metadata || {}, + methodDescriptor_Msg_BeginRedelegate); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.staking.v1beta1.MsgUndelegate, + * !proto.cosmos.staking.v1beta1.MsgUndelegateResponse>} + */ +const methodDescriptor_Msg_Undelegate = new grpc.web.MethodDescriptor( + '/cosmos.staking.v1beta1.Msg/Undelegate', + grpc.web.MethodType.UNARY, + proto.cosmos.staking.v1beta1.MsgUndelegate, + proto.cosmos.staking.v1beta1.MsgUndelegateResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgUndelegate} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgUndelegateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.staking.v1beta1.MsgUndelegate, + * !proto.cosmos.staking.v1beta1.MsgUndelegateResponse>} + */ +const methodInfo_Msg_Undelegate = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.staking.v1beta1.MsgUndelegateResponse, + /** + * @param {!proto.cosmos.staking.v1beta1.MsgUndelegate} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.staking.v1beta1.MsgUndelegateResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgUndelegate} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.staking.v1beta1.MsgUndelegateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.staking.v1beta1.MsgClient.prototype.undelegate = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/Undelegate', + request, + metadata || {}, + methodDescriptor_Msg_Undelegate, + callback); +}; + + +/** + * @param {!proto.cosmos.staking.v1beta1.MsgUndelegate} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.staking.v1beta1.MsgPromiseClient.prototype.undelegate = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.staking.v1beta1.Msg/Undelegate', + request, + metadata || {}, + methodDescriptor_Msg_Undelegate); +}; + + +module.exports = proto.cosmos.staking.v1beta1; + diff --git a/src/types/proto-types/cosmos/staking/v1beta1/tx_pb.js b/src/types/proto-types/cosmos/staking/v1beta1/tx_pb.js new file mode 100644 index 00000000..65d0cb27 --- /dev/null +++ b/src/types/proto-types/cosmos/staking/v1beta1/tx_pb.js @@ -0,0 +1,2150 @@ +// source: cosmos/staking/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 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_staking_v1beta1_staking_pb = require('../../../cosmos/staking/v1beta1/staking_pb.js'); +goog.object.extend(proto, cosmos_staking_v1beta1_staking_pb); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgBeginRedelegate', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgCreateValidator', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgDelegate', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgDelegateResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgEditValidator', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgEditValidatorResponse', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgUndelegate', null, global); +goog.exportSymbol('proto.cosmos.staking.v1beta1.MsgUndelegateResponse', 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.staking.v1beta1.MsgCreateValidator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgCreateValidator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgCreateValidator.displayName = 'proto.cosmos.staking.v1beta1.MsgCreateValidator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgCreateValidatorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.displayName = 'proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgEditValidator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgEditValidator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgEditValidator.displayName = 'proto.cosmos.staking.v1beta1.MsgEditValidator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgEditValidatorResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgEditValidatorResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.displayName = 'proto.cosmos.staking.v1beta1.MsgEditValidatorResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgDelegate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgDelegate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgDelegate.displayName = 'proto.cosmos.staking.v1beta1.MsgDelegate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgDelegateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgDelegateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgDelegateResponse.displayName = 'proto.cosmos.staking.v1beta1.MsgDelegateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgBeginRedelegate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgBeginRedelegate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgBeginRedelegate.displayName = 'proto.cosmos.staking.v1beta1.MsgBeginRedelegate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgBeginRedelegateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.displayName = 'proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgUndelegate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgUndelegate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgUndelegate.displayName = 'proto.cosmos.staking.v1beta1.MsgUndelegate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.staking.v1beta1.MsgUndelegateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.staking.v1beta1.MsgUndelegateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.staking.v1beta1.MsgUndelegateResponse.displayName = 'proto.cosmos.staking.v1beta1.MsgUndelegateResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.staking.v1beta1.MsgCreateValidator.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgCreateValidator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgCreateValidator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.toObject = function(includeInstance, msg) { + var f, obj = { + description: (f = msg.getDescription()) && cosmos_staking_v1beta1_staking_pb.Description.toObject(includeInstance, f), + commission: (f = msg.getCommission()) && cosmos_staking_v1beta1_staking_pb.CommissionRates.toObject(includeInstance, f), + minSelfDelegation: jspb.Message.getFieldWithDefault(msg, 3, ""), + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 4, ""), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), + pubkey: (f = msg.getPubkey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + value: (f = msg.getValue()) && 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.staking.v1beta1.MsgCreateValidator} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgCreateValidator; + return proto.cosmos.staking.v1beta1.MsgCreateValidator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgCreateValidator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Description; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Description.deserializeBinaryFromReader); + msg.setDescription(value); + break; + case 2: + var value = new cosmos_staking_v1beta1_staking_pb.CommissionRates; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.CommissionRates.deserializeBinaryFromReader); + msg.setCommission(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMinSelfDelegation(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setDelegatorAddress(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + case 6: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setPubkey(value); + break; + case 7: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgCreateValidator.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.staking.v1beta1.MsgCreateValidator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDescription(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Description.serializeBinaryToWriter + ); + } + f = message.getCommission(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_staking_v1beta1_staking_pb.CommissionRates.serializeBinaryToWriter + ); + } + f = message.getMinSelfDelegation(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getPubkey(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getValue(); + if (f != null) { + writer.writeMessage( + 7, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Description description = 1; + * @return {?proto.cosmos.staking.v1beta1.Description} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.getDescription = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Description} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.Description, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Description|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this +*/ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.setDescription = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.clearDescription = function() { + return this.setDescription(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.hasDescription = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional CommissionRates commission = 2; + * @return {?proto.cosmos.staking.v1beta1.CommissionRates} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.getCommission = function() { + return /** @type{?proto.cosmos.staking.v1beta1.CommissionRates} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.CommissionRates, 2)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.CommissionRates|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this +*/ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.setCommission = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.clearCommission = function() { + return this.setCommission(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.hasCommission = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string min_self_delegation = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.getMinSelfDelegation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.setMinSelfDelegation = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string delegator_address = 4; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string validator_address = 5; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional google.protobuf.Any pubkey = 6; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.getPubkey = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 6)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this +*/ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.setPubkey = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.clearPubkey = function() { + return this.setPubkey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.hasPubkey = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional cosmos.base.v1beta1.Coin value = 7; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.getValue = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 7)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this +*/ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.setValue = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.clearValue = function() { + return this.setValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidator.prototype.hasValue = function() { + return jspb.Message.getField(this, 7) != 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.staking.v1beta1.MsgCreateValidatorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgCreateValidatorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.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.staking.v1beta1.MsgCreateValidatorResponse} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse; + return proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse} + */ +proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.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.staking.v1beta1.MsgCreateValidatorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.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.staking.v1beta1.MsgCreateValidatorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgCreateValidatorResponse.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.staking.v1beta1.MsgEditValidator.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgEditValidator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgEditValidator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.toObject = function(includeInstance, msg) { + var f, obj = { + description: (f = msg.getDescription()) && cosmos_staking_v1beta1_staking_pb.Description.toObject(includeInstance, f), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + commissionRate: jspb.Message.getFieldWithDefault(msg, 3, ""), + minSelfDelegation: 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.cosmos.staking.v1beta1.MsgEditValidator} + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgEditValidator; + return proto.cosmos.staking.v1beta1.MsgEditValidator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgEditValidator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgEditValidator} + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_staking_v1beta1_staking_pb.Description; + reader.readMessage(value,cosmos_staking_v1beta1_staking_pb.Description.deserializeBinaryFromReader); + msg.setDescription(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setCommissionRate(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMinSelfDelegation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgEditValidator.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.staking.v1beta1.MsgEditValidator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDescription(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_staking_v1beta1_staking_pb.Description.serializeBinaryToWriter + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getCommissionRate(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMinSelfDelegation(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional Description description = 1; + * @return {?proto.cosmos.staking.v1beta1.Description} + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.getDescription = function() { + return /** @type{?proto.cosmos.staking.v1beta1.Description} */ ( + jspb.Message.getWrapperField(this, cosmos_staking_v1beta1_staking_pb.Description, 1)); +}; + + +/** + * @param {?proto.cosmos.staking.v1beta1.Description|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgEditValidator} returns this +*/ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.setDescription = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgEditValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.clearDescription = function() { + return this.setDescription(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.hasDescription = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgEditValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string commission_rate = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.getCommissionRate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgEditValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.setCommissionRate = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string min_self_delegation = 4; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.getMinSelfDelegation = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgEditValidator} returns this + */ +proto.cosmos.staking.v1beta1.MsgEditValidator.prototype.setMinSelfDelegation = 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.cosmos.staking.v1beta1.MsgEditValidatorResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgEditValidatorResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.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.staking.v1beta1.MsgEditValidatorResponse} + */ +proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgEditValidatorResponse; + return proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgEditValidatorResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgEditValidatorResponse} + */ +proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.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.staking.v1beta1.MsgEditValidatorResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.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.staking.v1beta1.MsgEditValidatorResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgEditValidatorResponse.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.staking.v1beta1.MsgDelegate.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgDelegate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgDelegate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgDelegate.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + 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.cosmos.staking.v1beta1.MsgDelegate} + */ +proto.cosmos.staking.v1beta1.MsgDelegate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgDelegate; + return proto.cosmos.staking.v1beta1.MsgDelegate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgDelegate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgDelegate} + */ +proto.cosmos.staking.v1beta1.MsgDelegate.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.setDelegatorAddress(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.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgDelegate.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.staking.v1beta1.MsgDelegate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgDelegate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgDelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgDelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin amount = 3; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.getAmount = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgDelegate} returns this +*/ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.setAmount = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgDelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgDelegate.prototype.hasAmount = 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.staking.v1beta1.MsgDelegateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgDelegateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgDelegateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgDelegateResponse.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.staking.v1beta1.MsgDelegateResponse} + */ +proto.cosmos.staking.v1beta1.MsgDelegateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgDelegateResponse; + return proto.cosmos.staking.v1beta1.MsgDelegateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgDelegateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgDelegateResponse} + */ +proto.cosmos.staking.v1beta1.MsgDelegateResponse.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.staking.v1beta1.MsgDelegateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgDelegateResponse.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.staking.v1beta1.MsgDelegateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgDelegateResponse.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.staking.v1beta1.MsgBeginRedelegate.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgBeginRedelegate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgBeginRedelegate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorSrcAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + validatorDstAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + 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.cosmos.staking.v1beta1.MsgBeginRedelegate} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgBeginRedelegate; + return proto.cosmos.staking.v1beta1.MsgBeginRedelegate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.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.setDelegatorAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorSrcAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setValidatorDstAddress(value); + break; + case 4: + 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.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgBeginRedelegate.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.staking.v1beta1.MsgBeginRedelegate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorSrcAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getValidatorDstAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAmount(); + if (f != null) { + writer.writeMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_src_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.getValidatorSrcAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.setValidatorSrcAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string validator_dst_address = 3; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.getValidatorDstAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.setValidatorDstAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin amount = 4; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.getAmount = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} returns this +*/ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.setAmount = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegate.prototype.hasAmount = 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.staking.v1beta1.MsgBeginRedelegateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgBeginRedelegateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + completionTime: (f = msg.getCompletionTime()) && 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.cosmos.staking.v1beta1.MsgBeginRedelegateResponse} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse; + return proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCompletionTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.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.staking.v1beta1.MsgBeginRedelegateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCompletionTime(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Timestamp completion_time = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.prototype.getCompletionTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse} returns this +*/ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.prototype.setCompletionTime = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse} returns this + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.prototype.clearCompletionTime = function() { + return this.setCompletionTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgBeginRedelegateResponse.prototype.hasCompletionTime = 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.staking.v1beta1.MsgUndelegate.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgUndelegate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgUndelegate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.toObject = function(includeInstance, msg) { + var f, obj = { + delegatorAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + validatorAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + 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.cosmos.staking.v1beta1.MsgUndelegate} + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgUndelegate; + return proto.cosmos.staking.v1beta1.MsgUndelegate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgUndelegate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegate} + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.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.setDelegatorAddress(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.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgUndelegate.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.staking.v1beta1.MsgUndelegate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDelegatorAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValidatorAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAmount(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string delegator_address = 1; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.getDelegatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.setDelegatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string validator_address = 2; + * @return {string} + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.getValidatorAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin amount = 3; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.getAmount = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegate} returns this +*/ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.setAmount = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegate} returns this + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.clearAmount = function() { + return this.setAmount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgUndelegate.prototype.hasAmount = 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.staking.v1beta1.MsgUndelegateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.staking.v1beta1.MsgUndelegateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.staking.v1beta1.MsgUndelegateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + completionTime: (f = msg.getCompletionTime()) && 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.cosmos.staking.v1beta1.MsgUndelegateResponse} + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.staking.v1beta1.MsgUndelegateResponse; + return proto.cosmos.staking.v1beta1.MsgUndelegateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.staking.v1beta1.MsgUndelegateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegateResponse} + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setCompletionTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.staking.v1beta1.MsgUndelegateResponse.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.staking.v1beta1.MsgUndelegateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCompletionTime(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Timestamp completion_time = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.prototype.getCompletionTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegateResponse} returns this +*/ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.prototype.setCompletionTime = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.staking.v1beta1.MsgUndelegateResponse} returns this + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.prototype.clearCompletionTime = function() { + return this.setCompletionTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.staking.v1beta1.MsgUndelegateResponse.prototype.hasCompletionTime = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.cosmos.staking.v1beta1); diff --git a/src/types/proto-types/cosmos/tx/signing/v1beta1/signing_pb.js b/src/types/proto-types/cosmos/tx/signing/v1beta1/signing_pb.js new file mode 100644 index 00000000..e0ddaaf8 --- /dev/null +++ b/src/types/proto-types/cosmos/tx/signing/v1beta1/signing_pb.js @@ -0,0 +1,1156 @@ +// source: cosmos/tx/signing/v1beta1/signing.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var cosmos_crypto_multisig_v1beta1_multisig_pb = require('../../../../cosmos/crypto/multisig/v1beta1/multisig_pb.js'); +goog.object.extend(proto, cosmos_crypto_multisig_v1beta1_multisig_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.tx.signing.v1beta1.SignMode', null, global); +goog.exportSymbol('proto.cosmos.tx.signing.v1beta1.SignatureDescriptor', null, global); +goog.exportSymbol('proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data', null, global); +goog.exportSymbol('proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi', null, global); +goog.exportSymbol('proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single', null, global); +goog.exportSymbol('proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.SumCase', null, global); +goog.exportSymbol('proto.cosmos.tx.signing.v1beta1.SignatureDescriptors', 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.tx.signing.v1beta1.SignatureDescriptors = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.signing.v1beta1.SignatureDescriptors, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.displayName = 'proto.cosmos.tx.signing.v1beta1.SignatureDescriptors'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.signing.v1beta1.SignatureDescriptor = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.signing.v1beta1.SignatureDescriptor, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.displayName = 'proto.cosmos.tx.signing.v1beta1.SignatureDescriptor'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.signing.v1beta1.SignatureDescriptor.Data = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.oneofGroups_); +}; +goog.inherits(proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.displayName = 'proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.signing.v1beta1.SignatureDescriptor.Data.Single = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.displayName = 'proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.signing.v1beta1.SignatureDescriptor.Data.Multi = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.displayName = 'proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.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.tx.signing.v1beta1.SignatureDescriptors.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.signing.v1beta1.SignatureDescriptors} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.toObject = function(includeInstance, msg) { + var f, obj = { + signaturesList: jspb.Message.toObjectList(msg.getSignaturesList(), + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.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.tx.signing.v1beta1.SignatureDescriptors} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptors; + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptors} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptors} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor; + reader.readMessage(value,proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.deserializeBinaryFromReader); + msg.addSignatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.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.tx.signing.v1beta1.SignatureDescriptors} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignaturesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated SignatureDescriptor signatures = 1; + * @return {!Array} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.prototype.getSignaturesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptors} returns this +*/ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.prototype.setSignaturesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.prototype.addSignatures = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptors} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptors.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.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.signing.v1beta1.SignatureDescriptor} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.toObject = function(includeInstance, msg) { + var f, obj = { + publicKey: (f = msg.getPublicKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + data: (f = msg.getData()) && proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.toObject(includeInstance, f), + sequence: 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.tx.signing.v1beta1.SignatureDescriptor} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor; + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.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 = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data; + reader.readMessage(value,proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.deserializeBinaryFromReader); + msg.setData(value); + break; + case 3: + 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.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.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.tx.signing.v1beta1.SignatureDescriptor} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.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.getData(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.serializeBinaryToWriter + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + + +/** + * 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.tx.signing.v1beta1.SignatureDescriptor.Data.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.SumCase = { + SUM_NOT_SET: 0, + SINGLE: 1, + MULTI: 2 +}; + +/** + * @return {proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.SumCase} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.getSumCase = function() { + return /** @type {proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.SumCase} */(jspb.Message.computeOneofCase(this, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.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.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.signing.v1beta1.SignatureDescriptor.Data} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.toObject = function(includeInstance, msg) { + var f, obj = { + single: (f = msg.getSingle()) && proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.toObject(includeInstance, f), + multi: (f = msg.getMulti()) && proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.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.tx.signing.v1beta1.SignatureDescriptor.Data} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data; + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single; + reader.readMessage(value,proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.deserializeBinaryFromReader); + msg.setSingle(value); + break; + case 2: + var value = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi; + reader.readMessage(value,proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.deserializeBinaryFromReader); + msg.setMulti(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.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.tx.signing.v1beta1.SignatureDescriptor.Data} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSingle(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.serializeBinaryToWriter + ); + } + f = message.getMulti(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.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.tx.signing.v1beta1.SignatureDescriptor.Data.Single.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.signing.v1beta1.SignatureDescriptor.Data.Single} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.toObject = function(includeInstance, msg) { + var f, obj = { + mode: jspb.Message.getFieldWithDefault(msg, 1, 0), + 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.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single; + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cosmos.tx.signing.v1beta1.SignMode} */ (reader.readEnum()); + msg.setMode(value); + break; + case 2: + 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.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.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.tx.signing.v1beta1.SignatureDescriptor.Data.Single} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMode(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional SignMode mode = 1; + * @return {!proto.cosmos.tx.signing.v1beta1.SignMode} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.prototype.getMode = function() { + return /** @type {!proto.cosmos.tx.signing.v1beta1.SignMode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cosmos.tx.signing.v1beta1.SignMode} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.prototype.setMode = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional bytes signature = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.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.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.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.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.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.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.toObject = function(includeInstance, msg) { + var f, obj = { + bitarray: (f = msg.getBitarray()) && cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray.toObject(includeInstance, f), + signaturesList: jspb.Message.toObjectList(msg.getSignaturesList(), + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.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.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi; + return proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray; + reader.readMessage(value,cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray.deserializeBinaryFromReader); + msg.setBitarray(value); + break; + case 2: + var value = new proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data; + reader.readMessage(value,proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.deserializeBinaryFromReader); + msg.addSignatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.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.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBitarray(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray.serializeBinaryToWriter + ); + } + f = message.getSignaturesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; + * @return {?proto.cosmos.crypto.multisig.v1beta1.CompactBitArray} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.getBitarray = function() { + return /** @type{?proto.cosmos.crypto.multisig.v1beta1.CompactBitArray} */ ( + jspb.Message.getWrapperField(this, cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray, 1)); +}; + + +/** + * @param {?proto.cosmos.crypto.multisig.v1beta1.CompactBitArray|undefined} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} returns this +*/ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.setBitarray = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.clearBitarray = function() { + return this.setBitarray(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.hasBitarray = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Data signatures = 2; + * @return {!Array} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.getSignaturesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} returns this +*/ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.setSignaturesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.addSignatures = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi.prototype.clearSignaturesList = function() { + return this.setSignaturesList([]); +}; + + +/** + * optional Single single = 1; + * @return {?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.getSingle = function() { + return /** @type{?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single, 1)); +}; + + +/** + * @param {?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Single|undefined} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} returns this +*/ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.setSingle = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.clearSingle = function() { + return this.setSingle(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.hasSingle = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Multi multi = 2; + * @return {?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.getMulti = function() { + return /** @type{?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi, 2)); +}; + + +/** + * @param {?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.Multi|undefined} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} returns this +*/ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.setMulti = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.clearMulti = function() { + return this.setMulti(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data.prototype.hasMulti = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Any public_key = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.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.cosmos.tx.signing.v1beta1.SignatureDescriptor} returns this +*/ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.setPublicKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.clearPublicKey = function() { + return this.setPublicKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.hasPublicKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Data data = 2; + * @return {?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.getData = function() { + return /** @type{?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data, 2)); +}; + + +/** + * @param {?proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.Data|undefined} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor} returns this +*/ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.setData = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.clearData = function() { + return this.setData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.hasData = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 sequence = 3; + * @return {number} + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.tx.signing.v1beta1.SignatureDescriptor} returns this + */ +proto.cosmos.tx.signing.v1beta1.SignatureDescriptor.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * @enum {number} + */ +proto.cosmos.tx.signing.v1beta1.SignMode = { + SIGN_MODE_UNSPECIFIED: 0, + SIGN_MODE_DIRECT: 1, + SIGN_MODE_TEXTUAL: 2, + SIGN_MODE_LEGACY_AMINO_JSON: 127 +}; + +goog.object.extend(exports, proto.cosmos.tx.signing.v1beta1); diff --git a/src/types/proto-types/cosmos/tx/v1beta1/service_grpc_web_pb.js b/src/types/proto-types/cosmos/tx/v1beta1/service_grpc_web_pb.js new file mode 100644 index 00000000..bbb4be3a --- /dev/null +++ b/src/types/proto-types/cosmos/tx/v1beta1/service_grpc_web_pb.js @@ -0,0 +1,406 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.tx.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_base_abci_v1beta1_abci_pb = require('../../../cosmos/base/abci/v1beta1/abci_pb.js') + +var cosmos_tx_v1beta1_tx_pb = require('../../../cosmos/tx/v1beta1/tx_pb.js') + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../cosmos/base/query/v1beta1/pagination_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.tx = {}; +proto.cosmos.tx.v1beta1 = require('./service_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.tx.v1beta1.ServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.tx.v1beta1.ServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.tx.v1beta1.SimulateRequest, + * !proto.cosmos.tx.v1beta1.SimulateResponse>} + */ +const methodDescriptor_Service_Simulate = new grpc.web.MethodDescriptor( + '/cosmos.tx.v1beta1.Service/Simulate', + grpc.web.MethodType.UNARY, + proto.cosmos.tx.v1beta1.SimulateRequest, + proto.cosmos.tx.v1beta1.SimulateResponse, + /** + * @param {!proto.cosmos.tx.v1beta1.SimulateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.tx.v1beta1.SimulateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.tx.v1beta1.SimulateRequest, + * !proto.cosmos.tx.v1beta1.SimulateResponse>} + */ +const methodInfo_Service_Simulate = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.tx.v1beta1.SimulateResponse, + /** + * @param {!proto.cosmos.tx.v1beta1.SimulateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.tx.v1beta1.SimulateResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.tx.v1beta1.SimulateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.tx.v1beta1.SimulateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.tx.v1beta1.ServiceClient.prototype.simulate = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.tx.v1beta1.Service/Simulate', + request, + metadata || {}, + methodDescriptor_Service_Simulate, + callback); +}; + + +/** + * @param {!proto.cosmos.tx.v1beta1.SimulateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.tx.v1beta1.ServicePromiseClient.prototype.simulate = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.tx.v1beta1.Service/Simulate', + request, + metadata || {}, + methodDescriptor_Service_Simulate); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.tx.v1beta1.GetTxRequest, + * !proto.cosmos.tx.v1beta1.GetTxResponse>} + */ +const methodDescriptor_Service_GetTx = new grpc.web.MethodDescriptor( + '/cosmos.tx.v1beta1.Service/GetTx', + grpc.web.MethodType.UNARY, + proto.cosmos.tx.v1beta1.GetTxRequest, + proto.cosmos.tx.v1beta1.GetTxResponse, + /** + * @param {!proto.cosmos.tx.v1beta1.GetTxRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.tx.v1beta1.GetTxResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.tx.v1beta1.GetTxRequest, + * !proto.cosmos.tx.v1beta1.GetTxResponse>} + */ +const methodInfo_Service_GetTx = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.tx.v1beta1.GetTxResponse, + /** + * @param {!proto.cosmos.tx.v1beta1.GetTxRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.tx.v1beta1.GetTxResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.tx.v1beta1.GetTxRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.tx.v1beta1.GetTxResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.tx.v1beta1.ServiceClient.prototype.getTx = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.tx.v1beta1.Service/GetTx', + request, + metadata || {}, + methodDescriptor_Service_GetTx, + callback); +}; + + +/** + * @param {!proto.cosmos.tx.v1beta1.GetTxRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.tx.v1beta1.ServicePromiseClient.prototype.getTx = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.tx.v1beta1.Service/GetTx', + request, + metadata || {}, + methodDescriptor_Service_GetTx); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.tx.v1beta1.BroadcastTxRequest, + * !proto.cosmos.tx.v1beta1.BroadcastTxResponse>} + */ +const methodDescriptor_Service_BroadcastTx = new grpc.web.MethodDescriptor( + '/cosmos.tx.v1beta1.Service/BroadcastTx', + grpc.web.MethodType.UNARY, + proto.cosmos.tx.v1beta1.BroadcastTxRequest, + proto.cosmos.tx.v1beta1.BroadcastTxResponse, + /** + * @param {!proto.cosmos.tx.v1beta1.BroadcastTxRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.tx.v1beta1.BroadcastTxResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.tx.v1beta1.BroadcastTxRequest, + * !proto.cosmos.tx.v1beta1.BroadcastTxResponse>} + */ +const methodInfo_Service_BroadcastTx = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.tx.v1beta1.BroadcastTxResponse, + /** + * @param {!proto.cosmos.tx.v1beta1.BroadcastTxRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.tx.v1beta1.BroadcastTxResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.tx.v1beta1.BroadcastTxRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.tx.v1beta1.BroadcastTxResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.tx.v1beta1.ServiceClient.prototype.broadcastTx = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.tx.v1beta1.Service/BroadcastTx', + request, + metadata || {}, + methodDescriptor_Service_BroadcastTx, + callback); +}; + + +/** + * @param {!proto.cosmos.tx.v1beta1.BroadcastTxRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.tx.v1beta1.ServicePromiseClient.prototype.broadcastTx = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.tx.v1beta1.Service/BroadcastTx', + request, + metadata || {}, + methodDescriptor_Service_BroadcastTx); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.tx.v1beta1.GetTxsEventRequest, + * !proto.cosmos.tx.v1beta1.GetTxsEventResponse>} + */ +const methodDescriptor_Service_GetTxsEvent = new grpc.web.MethodDescriptor( + '/cosmos.tx.v1beta1.Service/GetTxsEvent', + grpc.web.MethodType.UNARY, + proto.cosmos.tx.v1beta1.GetTxsEventRequest, + proto.cosmos.tx.v1beta1.GetTxsEventResponse, + /** + * @param {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.tx.v1beta1.GetTxsEventResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.tx.v1beta1.GetTxsEventRequest, + * !proto.cosmos.tx.v1beta1.GetTxsEventResponse>} + */ +const methodInfo_Service_GetTxsEvent = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.tx.v1beta1.GetTxsEventResponse, + /** + * @param {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.tx.v1beta1.GetTxsEventResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.tx.v1beta1.GetTxsEventResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.tx.v1beta1.ServiceClient.prototype.getTxsEvent = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.tx.v1beta1.Service/GetTxsEvent', + request, + metadata || {}, + methodDescriptor_Service_GetTxsEvent, + callback); +}; + + +/** + * @param {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.tx.v1beta1.ServicePromiseClient.prototype.getTxsEvent = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.tx.v1beta1.Service/GetTxsEvent', + request, + metadata || {}, + methodDescriptor_Service_GetTxsEvent); +}; + + +module.exports = proto.cosmos.tx.v1beta1; + diff --git a/src/types/proto-types/cosmos/tx/v1beta1/service_pb.js b/src/types/proto-types/cosmos/tx/v1beta1/service_pb.js new file mode 100644 index 00000000..5152870c --- /dev/null +++ b/src/types/proto-types/cosmos/tx/v1beta1/service_pb.js @@ -0,0 +1,1703 @@ +// source: cosmos/tx/v1beta1/service.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var cosmos_base_abci_v1beta1_abci_pb = require('../../../cosmos/base/abci/v1beta1/abci_pb.js'); +goog.object.extend(proto, cosmos_base_abci_v1beta1_abci_pb); +var cosmos_tx_v1beta1_tx_pb = require('../../../cosmos/tx/v1beta1/tx_pb.js'); +goog.object.extend(proto, cosmos_tx_v1beta1_tx_pb); +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); +goog.exportSymbol('proto.cosmos.tx.v1beta1.BroadcastMode', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.BroadcastTxRequest', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.BroadcastTxResponse', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.GetTxRequest', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.GetTxResponse', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.GetTxsEventRequest', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.GetTxsEventResponse', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.SimulateRequest', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.SimulateResponse', 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.tx.v1beta1.GetTxsEventRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.GetTxsEventRequest.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.GetTxsEventRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.GetTxsEventRequest.displayName = 'proto.cosmos.tx.v1beta1.GetTxsEventRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.GetTxsEventResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.GetTxsEventResponse.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.GetTxsEventResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.GetTxsEventResponse.displayName = 'proto.cosmos.tx.v1beta1.GetTxsEventResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.BroadcastTxRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.BroadcastTxRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.BroadcastTxRequest.displayName = 'proto.cosmos.tx.v1beta1.BroadcastTxRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.BroadcastTxResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.BroadcastTxResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.BroadcastTxResponse.displayName = 'proto.cosmos.tx.v1beta1.BroadcastTxResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.SimulateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.SimulateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.SimulateRequest.displayName = 'proto.cosmos.tx.v1beta1.SimulateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.SimulateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.SimulateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.SimulateResponse.displayName = 'proto.cosmos.tx.v1beta1.SimulateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.GetTxRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.GetTxRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.GetTxRequest.displayName = 'proto.cosmos.tx.v1beta1.GetTxRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.GetTxResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.GetTxResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.GetTxResponse.displayName = 'proto.cosmos.tx.v1beta1.GetTxResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.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.tx.v1beta1.GetTxsEventRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.GetTxsEventRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.GetTxsEventRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.toObject = function(includeInstance, msg) { + var f, obj = { + eventsList: (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) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.GetTxsEventRequest; + return proto.cosmos.tx.v1beta1.GetTxsEventRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.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.addEvents(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.tx.v1beta1.GetTxsEventRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.GetTxsEventRequest.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.tx.v1beta1.GetTxsEventRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEventsList(); + 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 events = 1; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.getEventsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} returns this + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.setEventsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} returns this + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.addEvents = 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.tx.v1beta1.GetTxsEventRequest} returns this + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.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.tx.v1beta1.GetTxsEventRequest} returns this +*/ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventRequest} returns this + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.GetTxsEventRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.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.tx.v1beta1.GetTxsEventResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.GetTxsEventResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.GetTxsEventResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.toObject = function(includeInstance, msg) { + var f, obj = { + txsList: jspb.Message.toObjectList(msg.getTxsList(), + cosmos_tx_v1beta1_tx_pb.Tx.toObject, includeInstance), + txResponsesList: jspb.Message.toObjectList(msg.getTxResponsesList(), + cosmos_base_abci_v1beta1_abci_pb.TxResponse.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.tx.v1beta1.GetTxsEventResponse} + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.GetTxsEventResponse; + return proto.cosmos.tx.v1beta1.GetTxsEventResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.GetTxsEventResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventResponse} + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_tx_v1beta1_tx_pb.Tx; + reader.readMessage(value,cosmos_tx_v1beta1_tx_pb.Tx.deserializeBinaryFromReader); + msg.addTxs(value); + break; + case 2: + var value = new cosmos_base_abci_v1beta1_abci_pb.TxResponse; + reader.readMessage(value,cosmos_base_abci_v1beta1_abci_pb.TxResponse.deserializeBinaryFromReader); + msg.addTxResponses(value); + break; + case 3: + 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.tx.v1beta1.GetTxsEventResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.GetTxsEventResponse.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.tx.v1beta1.GetTxsEventResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_tx_v1beta1_tx_pb.Tx.serializeBinaryToWriter + ); + } + f = message.getTxResponsesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_abci_v1beta1_abci_pb.TxResponse.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Tx txs = 1; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.getTxsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_tx_v1beta1_tx_pb.Tx, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventResponse} returns this +*/ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.setTxsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.tx.v1beta1.Tx=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.tx.v1beta1.Tx} + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.addTxs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.tx.v1beta1.Tx, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventResponse} returns this + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.clearTxsList = function() { + return this.setTxsList([]); +}; + + +/** + * repeated cosmos.base.abci.v1beta1.TxResponse tx_responses = 2; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.getTxResponsesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_abci_v1beta1_abci_pb.TxResponse, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventResponse} returns this +*/ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.setTxResponsesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.base.abci.v1beta1.TxResponse=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.abci.v1beta1.TxResponse} + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.addTxResponses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.abci.v1beta1.TxResponse, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventResponse} returns this + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.clearTxResponsesList = function() { + return this.setTxResponsesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.getPagination = function() { + return /** @type{?proto.cosmos.base.query.v1beta1.PageResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_query_v1beta1_pagination_pb.PageResponse, 3)); +}; + + +/** + * @param {?proto.cosmos.base.query.v1beta1.PageResponse|undefined} value + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventResponse} returns this +*/ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.GetTxsEventResponse} returns this + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.GetTxsEventResponse.prototype.hasPagination = 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.tx.v1beta1.BroadcastTxRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.BroadcastTxRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.BroadcastTxRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.toObject = function(includeInstance, msg) { + var f, obj = { + txBytes: msg.getTxBytes_asB64(), + mode: 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.tx.v1beta1.BroadcastTxRequest} + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.BroadcastTxRequest; + return proto.cosmos.tx.v1beta1.BroadcastTxRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.BroadcastTxRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.BroadcastTxRequest} + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.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.setTxBytes(value); + break; + case 2: + var value = /** @type {!proto.cosmos.tx.v1beta1.BroadcastMode} */ (reader.readEnum()); + msg.setMode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.BroadcastTxRequest.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.tx.v1beta1.BroadcastTxRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getMode(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } +}; + + +/** + * optional bytes tx_bytes = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.prototype.getTxBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes tx_bytes = 1; + * This is a type-conversion wrapper around `getTxBytes()` + * @return {string} + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.prototype.getTxBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTxBytes())); +}; + + +/** + * optional bytes tx_bytes = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getTxBytes()` + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.prototype.getTxBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTxBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.tx.v1beta1.BroadcastTxRequest} returns this + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.prototype.setTxBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional BroadcastMode mode = 2; + * @return {!proto.cosmos.tx.v1beta1.BroadcastMode} + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.prototype.getMode = function() { + return /** @type {!proto.cosmos.tx.v1beta1.BroadcastMode} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.cosmos.tx.v1beta1.BroadcastMode} value + * @return {!proto.cosmos.tx.v1beta1.BroadcastTxRequest} returns this + */ +proto.cosmos.tx.v1beta1.BroadcastTxRequest.prototype.setMode = function(value) { + return jspb.Message.setProto3EnumField(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.tx.v1beta1.BroadcastTxResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.BroadcastTxResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.BroadcastTxResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.toObject = function(includeInstance, msg) { + var f, obj = { + txResponse: (f = msg.getTxResponse()) && cosmos_base_abci_v1beta1_abci_pb.TxResponse.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.tx.v1beta1.BroadcastTxResponse} + */ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.BroadcastTxResponse; + return proto.cosmos.tx.v1beta1.BroadcastTxResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.BroadcastTxResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.BroadcastTxResponse} + */ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_abci_v1beta1_abci_pb.TxResponse; + reader.readMessage(value,cosmos_base_abci_v1beta1_abci_pb.TxResponse.deserializeBinaryFromReader); + msg.setTxResponse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.BroadcastTxResponse.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.tx.v1beta1.BroadcastTxResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxResponse(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_abci_v1beta1_abci_pb.TxResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.abci.v1beta1.TxResponse tx_response = 1; + * @return {?proto.cosmos.base.abci.v1beta1.TxResponse} + */ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.prototype.getTxResponse = function() { + return /** @type{?proto.cosmos.base.abci.v1beta1.TxResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_abci_v1beta1_abci_pb.TxResponse, 1)); +}; + + +/** + * @param {?proto.cosmos.base.abci.v1beta1.TxResponse|undefined} value + * @return {!proto.cosmos.tx.v1beta1.BroadcastTxResponse} returns this +*/ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.prototype.setTxResponse = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.BroadcastTxResponse} returns this + */ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.prototype.clearTxResponse = function() { + return this.setTxResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.BroadcastTxResponse.prototype.hasTxResponse = 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.tx.v1beta1.SimulateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.SimulateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.SimulateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.SimulateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + tx: (f = msg.getTx()) && cosmos_tx_v1beta1_tx_pb.Tx.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.tx.v1beta1.SimulateRequest} + */ +proto.cosmos.tx.v1beta1.SimulateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.SimulateRequest; + return proto.cosmos.tx.v1beta1.SimulateRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.SimulateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.SimulateRequest} + */ +proto.cosmos.tx.v1beta1.SimulateRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_tx_v1beta1_tx_pb.Tx; + reader.readMessage(value,cosmos_tx_v1beta1_tx_pb.Tx.deserializeBinaryFromReader); + msg.setTx(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.SimulateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.SimulateRequest.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.tx.v1beta1.SimulateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.SimulateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTx(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_tx_v1beta1_tx_pb.Tx.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Tx tx = 1; + * @return {?proto.cosmos.tx.v1beta1.Tx} + */ +proto.cosmos.tx.v1beta1.SimulateRequest.prototype.getTx = function() { + return /** @type{?proto.cosmos.tx.v1beta1.Tx} */ ( + jspb.Message.getWrapperField(this, cosmos_tx_v1beta1_tx_pb.Tx, 1)); +}; + + +/** + * @param {?proto.cosmos.tx.v1beta1.Tx|undefined} value + * @return {!proto.cosmos.tx.v1beta1.SimulateRequest} returns this +*/ +proto.cosmos.tx.v1beta1.SimulateRequest.prototype.setTx = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.SimulateRequest} returns this + */ +proto.cosmos.tx.v1beta1.SimulateRequest.prototype.clearTx = function() { + return this.setTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.SimulateRequest.prototype.hasTx = 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.tx.v1beta1.SimulateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.SimulateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.SimulateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.SimulateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + gasInfo: (f = msg.getGasInfo()) && cosmos_base_abci_v1beta1_abci_pb.GasInfo.toObject(includeInstance, f), + result: (f = msg.getResult()) && cosmos_base_abci_v1beta1_abci_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.cosmos.tx.v1beta1.SimulateResponse} + */ +proto.cosmos.tx.v1beta1.SimulateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.SimulateResponse; + return proto.cosmos.tx.v1beta1.SimulateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.SimulateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.SimulateResponse} + */ +proto.cosmos.tx.v1beta1.SimulateResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_base_abci_v1beta1_abci_pb.GasInfo; + reader.readMessage(value,cosmos_base_abci_v1beta1_abci_pb.GasInfo.deserializeBinaryFromReader); + msg.setGasInfo(value); + break; + case 2: + var value = new cosmos_base_abci_v1beta1_abci_pb.Result; + reader.readMessage(value,cosmos_base_abci_v1beta1_abci_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.cosmos.tx.v1beta1.SimulateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.SimulateResponse.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.tx.v1beta1.SimulateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.SimulateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getGasInfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_abci_v1beta1_abci_pb.GasInfo.serializeBinaryToWriter + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_abci_v1beta1_abci_pb.Result.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.abci.v1beta1.GasInfo gas_info = 1; + * @return {?proto.cosmos.base.abci.v1beta1.GasInfo} + */ +proto.cosmos.tx.v1beta1.SimulateResponse.prototype.getGasInfo = function() { + return /** @type{?proto.cosmos.base.abci.v1beta1.GasInfo} */ ( + jspb.Message.getWrapperField(this, cosmos_base_abci_v1beta1_abci_pb.GasInfo, 1)); +}; + + +/** + * @param {?proto.cosmos.base.abci.v1beta1.GasInfo|undefined} value + * @return {!proto.cosmos.tx.v1beta1.SimulateResponse} returns this +*/ +proto.cosmos.tx.v1beta1.SimulateResponse.prototype.setGasInfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.SimulateResponse} returns this + */ +proto.cosmos.tx.v1beta1.SimulateResponse.prototype.clearGasInfo = function() { + return this.setGasInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.SimulateResponse.prototype.hasGasInfo = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional cosmos.base.abci.v1beta1.Result result = 2; + * @return {?proto.cosmos.base.abci.v1beta1.Result} + */ +proto.cosmos.tx.v1beta1.SimulateResponse.prototype.getResult = function() { + return /** @type{?proto.cosmos.base.abci.v1beta1.Result} */ ( + jspb.Message.getWrapperField(this, cosmos_base_abci_v1beta1_abci_pb.Result, 2)); +}; + + +/** + * @param {?proto.cosmos.base.abci.v1beta1.Result|undefined} value + * @return {!proto.cosmos.tx.v1beta1.SimulateResponse} returns this +*/ +proto.cosmos.tx.v1beta1.SimulateResponse.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.SimulateResponse} returns this + */ +proto.cosmos.tx.v1beta1.SimulateResponse.prototype.clearResult = function() { + return this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.SimulateResponse.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.cosmos.tx.v1beta1.GetTxRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.GetTxRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.GetTxRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.GetTxRequest.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.cosmos.tx.v1beta1.GetTxRequest} + */ +proto.cosmos.tx.v1beta1.GetTxRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.GetTxRequest; + return proto.cosmos.tx.v1beta1.GetTxRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.GetTxRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.GetTxRequest} + */ +proto.cosmos.tx.v1beta1.GetTxRequest.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.cosmos.tx.v1beta1.GetTxRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.GetTxRequest.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.tx.v1beta1.GetTxRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.GetTxRequest.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.cosmos.tx.v1beta1.GetTxRequest.prototype.getHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.tx.v1beta1.GetTxRequest} returns this + */ +proto.cosmos.tx.v1beta1.GetTxRequest.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.cosmos.tx.v1beta1.GetTxResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.GetTxResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.GetTxResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.GetTxResponse.toObject = function(includeInstance, msg) { + var f, obj = { + tx: (f = msg.getTx()) && cosmos_tx_v1beta1_tx_pb.Tx.toObject(includeInstance, f), + txResponse: (f = msg.getTxResponse()) && cosmos_base_abci_v1beta1_abci_pb.TxResponse.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.tx.v1beta1.GetTxResponse} + */ +proto.cosmos.tx.v1beta1.GetTxResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.GetTxResponse; + return proto.cosmos.tx.v1beta1.GetTxResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.GetTxResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.GetTxResponse} + */ +proto.cosmos.tx.v1beta1.GetTxResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_tx_v1beta1_tx_pb.Tx; + reader.readMessage(value,cosmos_tx_v1beta1_tx_pb.Tx.deserializeBinaryFromReader); + msg.setTx(value); + break; + case 2: + var value = new cosmos_base_abci_v1beta1_abci_pb.TxResponse; + reader.readMessage(value,cosmos_base_abci_v1beta1_abci_pb.TxResponse.deserializeBinaryFromReader); + msg.setTxResponse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.GetTxResponse.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.tx.v1beta1.GetTxResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.GetTxResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTx(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_tx_v1beta1_tx_pb.Tx.serializeBinaryToWriter + ); + } + f = message.getTxResponse(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_abci_v1beta1_abci_pb.TxResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Tx tx = 1; + * @return {?proto.cosmos.tx.v1beta1.Tx} + */ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.getTx = function() { + return /** @type{?proto.cosmos.tx.v1beta1.Tx} */ ( + jspb.Message.getWrapperField(this, cosmos_tx_v1beta1_tx_pb.Tx, 1)); +}; + + +/** + * @param {?proto.cosmos.tx.v1beta1.Tx|undefined} value + * @return {!proto.cosmos.tx.v1beta1.GetTxResponse} returns this +*/ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.setTx = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.GetTxResponse} returns this + */ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.clearTx = function() { + return this.setTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.hasTx = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional cosmos.base.abci.v1beta1.TxResponse tx_response = 2; + * @return {?proto.cosmos.base.abci.v1beta1.TxResponse} + */ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.getTxResponse = function() { + return /** @type{?proto.cosmos.base.abci.v1beta1.TxResponse} */ ( + jspb.Message.getWrapperField(this, cosmos_base_abci_v1beta1_abci_pb.TxResponse, 2)); +}; + + +/** + * @param {?proto.cosmos.base.abci.v1beta1.TxResponse|undefined} value + * @return {!proto.cosmos.tx.v1beta1.GetTxResponse} returns this +*/ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.setTxResponse = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.GetTxResponse} returns this + */ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.clearTxResponse = function() { + return this.setTxResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.GetTxResponse.prototype.hasTxResponse = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * @enum {number} + */ +proto.cosmos.tx.v1beta1.BroadcastMode = { + BROADCAST_MODE_UNSPECIFIED: 0, + BROADCAST_MODE_BLOCK: 1, + BROADCAST_MODE_SYNC: 2, + BROADCAST_MODE_ASYNC: 3 +}; + +goog.object.extend(exports, proto.cosmos.tx.v1beta1); diff --git a/src/types/proto-types/cosmos/tx/v1beta1/tx_pb.js b/src/types/proto-types/cosmos/tx/v1beta1/tx_pb.js new file mode 100644 index 00000000..538dc51a --- /dev/null +++ b/src/types/proto-types/cosmos/tx/v1beta1/tx_pb.js @@ -0,0 +1,2672 @@ +// source: cosmos/tx/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_crypto_multisig_v1beta1_multisig_pb = require('../../../cosmos/crypto/multisig/v1beta1/multisig_pb.js'); +goog.object.extend(proto, cosmos_crypto_multisig_v1beta1_multisig_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_tx_signing_v1beta1_signing_pb = require('../../../cosmos/tx/signing/v1beta1/signing_pb.js'); +goog.object.extend(proto, cosmos_tx_signing_v1beta1_signing_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.tx.v1beta1.AuthInfo', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.Fee', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.ModeInfo', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.ModeInfo.Multi', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.ModeInfo.Single', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.ModeInfo.SumCase', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.SignDoc', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.SignerInfo', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.Tx', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.TxBody', null, global); +goog.exportSymbol('proto.cosmos.tx.v1beta1.TxRaw', 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.tx.v1beta1.Tx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.Tx.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.Tx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.Tx.displayName = 'proto.cosmos.tx.v1beta1.Tx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.TxRaw = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.TxRaw.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.TxRaw, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.TxRaw.displayName = 'proto.cosmos.tx.v1beta1.TxRaw'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.SignDoc = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.SignDoc, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.SignDoc.displayName = 'proto.cosmos.tx.v1beta1.SignDoc'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.TxBody = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, 500, proto.cosmos.tx.v1beta1.TxBody.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.TxBody, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.TxBody.displayName = 'proto.cosmos.tx.v1beta1.TxBody'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.AuthInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.AuthInfo.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.AuthInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.AuthInfo.displayName = 'proto.cosmos.tx.v1beta1.AuthInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.SignerInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.SignerInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.SignerInfo.displayName = 'proto.cosmos.tx.v1beta1.SignerInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.ModeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cosmos.tx.v1beta1.ModeInfo.oneofGroups_); +}; +goog.inherits(proto.cosmos.tx.v1beta1.ModeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.ModeInfo.displayName = 'proto.cosmos.tx.v1beta1.ModeInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.ModeInfo.Single = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.ModeInfo.Single, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.ModeInfo.Single.displayName = 'proto.cosmos.tx.v1beta1.ModeInfo.Single'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.ModeInfo.Multi = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.ModeInfo.Multi.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.ModeInfo.Multi, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.ModeInfo.Multi.displayName = 'proto.cosmos.tx.v1beta1.ModeInfo.Multi'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.tx.v1beta1.Fee = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.tx.v1beta1.Fee.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.tx.v1beta1.Fee, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.tx.v1beta1.Fee.displayName = 'proto.cosmos.tx.v1beta1.Fee'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.v1beta1.Tx.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.tx.v1beta1.Tx.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.Tx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.Tx} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.Tx.toObject = function(includeInstance, msg) { + var f, obj = { + body: (f = msg.getBody()) && proto.cosmos.tx.v1beta1.TxBody.toObject(includeInstance, f), + authInfo: (f = msg.getAuthInfo()) && proto.cosmos.tx.v1beta1.AuthInfo.toObject(includeInstance, f), + signaturesList: msg.getSignaturesList_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.tx.v1beta1.Tx} + */ +proto.cosmos.tx.v1beta1.Tx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.Tx; + return proto.cosmos.tx.v1beta1.Tx.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.Tx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.Tx} + */ +proto.cosmos.tx.v1beta1.Tx.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.tx.v1beta1.TxBody; + reader.readMessage(value,proto.cosmos.tx.v1beta1.TxBody.deserializeBinaryFromReader); + msg.setBody(value); + break; + case 2: + var value = new proto.cosmos.tx.v1beta1.AuthInfo; + reader.readMessage(value,proto.cosmos.tx.v1beta1.AuthInfo.deserializeBinaryFromReader); + msg.setAuthInfo(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addSignatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.Tx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.Tx.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.tx.v1beta1.Tx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.Tx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBody(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.tx.v1beta1.TxBody.serializeBinaryToWriter + ); + } + f = message.getAuthInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.tx.v1beta1.AuthInfo.serializeBinaryToWriter + ); + } + f = message.getSignaturesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 3, + f + ); + } +}; + + +/** + * optional TxBody body = 1; + * @return {?proto.cosmos.tx.v1beta1.TxBody} + */ +proto.cosmos.tx.v1beta1.Tx.prototype.getBody = function() { + return /** @type{?proto.cosmos.tx.v1beta1.TxBody} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.v1beta1.TxBody, 1)); +}; + + +/** + * @param {?proto.cosmos.tx.v1beta1.TxBody|undefined} value + * @return {!proto.cosmos.tx.v1beta1.Tx} returns this +*/ +proto.cosmos.tx.v1beta1.Tx.prototype.setBody = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.Tx} returns this + */ +proto.cosmos.tx.v1beta1.Tx.prototype.clearBody = function() { + return this.setBody(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.Tx.prototype.hasBody = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional AuthInfo auth_info = 2; + * @return {?proto.cosmos.tx.v1beta1.AuthInfo} + */ +proto.cosmos.tx.v1beta1.Tx.prototype.getAuthInfo = function() { + return /** @type{?proto.cosmos.tx.v1beta1.AuthInfo} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.v1beta1.AuthInfo, 2)); +}; + + +/** + * @param {?proto.cosmos.tx.v1beta1.AuthInfo|undefined} value + * @return {!proto.cosmos.tx.v1beta1.Tx} returns this +*/ +proto.cosmos.tx.v1beta1.Tx.prototype.setAuthInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.Tx} returns this + */ +proto.cosmos.tx.v1beta1.Tx.prototype.clearAuthInfo = function() { + return this.setAuthInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.Tx.prototype.hasAuthInfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated bytes signatures = 3; + * @return {!(Array|Array)} + */ +proto.cosmos.tx.v1beta1.Tx.prototype.getSignaturesList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * repeated bytes signatures = 3; + * This is a type-conversion wrapper around `getSignaturesList()` + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.Tx.prototype.getSignaturesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getSignaturesList())); +}; + + +/** + * repeated bytes signatures = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignaturesList()` + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.Tx.prototype.getSignaturesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getSignaturesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.cosmos.tx.v1beta1.Tx} returns this + */ +proto.cosmos.tx.v1beta1.Tx.prototype.setSignaturesList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.cosmos.tx.v1beta1.Tx} returns this + */ +proto.cosmos.tx.v1beta1.Tx.prototype.addSignatures = 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.tx.v1beta1.Tx} returns this + */ +proto.cosmos.tx.v1beta1.Tx.prototype.clearSignaturesList = function() { + return this.setSignaturesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.v1beta1.TxRaw.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.tx.v1beta1.TxRaw.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.TxRaw.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.TxRaw} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.TxRaw.toObject = function(includeInstance, msg) { + var f, obj = { + bodyBytes: msg.getBodyBytes_asB64(), + authInfoBytes: msg.getAuthInfoBytes_asB64(), + signaturesList: msg.getSignaturesList_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.tx.v1beta1.TxRaw} + */ +proto.cosmos.tx.v1beta1.TxRaw.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.TxRaw; + return proto.cosmos.tx.v1beta1.TxRaw.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.TxRaw} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.TxRaw} + */ +proto.cosmos.tx.v1beta1.TxRaw.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.setBodyBytes(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAuthInfoBytes(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addSignatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.TxRaw.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.tx.v1beta1.TxRaw} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.TxRaw.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBodyBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAuthInfoBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getSignaturesList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 3, + f + ); + } +}; + + +/** + * optional bytes body_bytes = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getBodyBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes body_bytes = 1; + * This is a type-conversion wrapper around `getBodyBytes()` + * @return {string} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getBodyBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBodyBytes())); +}; + + +/** + * optional bytes body_bytes = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBodyBytes()` + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getBodyBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBodyBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.tx.v1beta1.TxRaw} returns this + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.setBodyBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes auth_info_bytes = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getAuthInfoBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes auth_info_bytes = 2; + * This is a type-conversion wrapper around `getAuthInfoBytes()` + * @return {string} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getAuthInfoBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAuthInfoBytes())); +}; + + +/** + * optional bytes auth_info_bytes = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAuthInfoBytes()` + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getAuthInfoBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAuthInfoBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.tx.v1beta1.TxRaw} returns this + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.setAuthInfoBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated bytes signatures = 3; + * @return {!(Array|Array)} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getSignaturesList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * repeated bytes signatures = 3; + * This is a type-conversion wrapper around `getSignaturesList()` + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getSignaturesList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getSignaturesList())); +}; + + +/** + * repeated bytes signatures = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignaturesList()` + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.getSignaturesList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getSignaturesList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.cosmos.tx.v1beta1.TxRaw} returns this + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.setSignaturesList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.cosmos.tx.v1beta1.TxRaw} returns this + */ +proto.cosmos.tx.v1beta1.TxRaw.prototype.addSignatures = 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.tx.v1beta1.TxRaw} returns this + */ +proto.cosmos.tx.v1beta1.TxRaw.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.cosmos.tx.v1beta1.SignDoc.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.SignDoc.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.SignDoc} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.SignDoc.toObject = function(includeInstance, msg) { + var f, obj = { + bodyBytes: msg.getBodyBytes_asB64(), + authInfoBytes: msg.getAuthInfoBytes_asB64(), + chainId: jspb.Message.getFieldWithDefault(msg, 3, ""), + accountNumber: 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.tx.v1beta1.SignDoc} + */ +proto.cosmos.tx.v1beta1.SignDoc.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.SignDoc; + return proto.cosmos.tx.v1beta1.SignDoc.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.SignDoc} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.SignDoc} + */ +proto.cosmos.tx.v1beta1.SignDoc.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.setBodyBytes(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAuthInfoBytes(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAccountNumber(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.SignDoc.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.tx.v1beta1.SignDoc} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.SignDoc.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBodyBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAuthInfoBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAccountNumber(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional bytes body_bytes = 1; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.getBodyBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes body_bytes = 1; + * This is a type-conversion wrapper around `getBodyBytes()` + * @return {string} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.getBodyBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBodyBytes())); +}; + + +/** + * optional bytes body_bytes = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBodyBytes()` + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.getBodyBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBodyBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.tx.v1beta1.SignDoc} returns this + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.setBodyBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes auth_info_bytes = 2; + * @return {!(string|Uint8Array)} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.getAuthInfoBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes auth_info_bytes = 2; + * This is a type-conversion wrapper around `getAuthInfoBytes()` + * @return {string} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.getAuthInfoBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAuthInfoBytes())); +}; + + +/** + * optional bytes auth_info_bytes = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAuthInfoBytes()` + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.getAuthInfoBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAuthInfoBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.cosmos.tx.v1beta1.SignDoc} returns this + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.setAuthInfoBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string chain_id = 3; + * @return {string} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.tx.v1beta1.SignDoc} returns this + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional uint64 account_number = 4; + * @return {number} + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.getAccountNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.tx.v1beta1.SignDoc} returns this + */ +proto.cosmos.tx.v1beta1.SignDoc.prototype.setAccountNumber = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.v1beta1.TxBody.repeatedFields_ = [1,1023,2047]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.tx.v1beta1.TxBody.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.TxBody.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.TxBody} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.TxBody.toObject = function(includeInstance, msg) { + var f, obj = { + messagesList: jspb.Message.toObjectList(msg.getMessagesList(), + google_protobuf_any_pb.Any.toObject, includeInstance), + memo: jspb.Message.getFieldWithDefault(msg, 2, ""), + timeoutHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + extensionOptionsList: jspb.Message.toObjectList(msg.getExtensionOptionsList(), + google_protobuf_any_pb.Any.toObject, includeInstance), + nonCriticalExtensionOptionsList: jspb.Message.toObjectList(msg.getNonCriticalExtensionOptionsList(), + 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.cosmos.tx.v1beta1.TxBody} + */ +proto.cosmos.tx.v1beta1.TxBody.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.TxBody; + return proto.cosmos.tx.v1beta1.TxBody.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.TxBody} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.TxBody} + */ +proto.cosmos.tx.v1beta1.TxBody.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; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimeoutHeight(value); + break; + case 1023: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addExtensionOptions(value); + break; + case 2047: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addNonCriticalExtensionOptions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.TxBody.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.tx.v1beta1.TxBody} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.TxBody.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessagesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTimeoutHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getExtensionOptionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1023, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getNonCriticalExtensionOptionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2047, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated google.protobuf.Any messages = 1; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.getMessagesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.TxBody} returns this +*/ +proto.cosmos.tx.v1beta1.TxBody.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.cosmos.tx.v1beta1.TxBody.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.cosmos.tx.v1beta1.TxBody} returns this + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.clearMessagesList = function() { + return this.setMessagesList([]); +}; + + +/** + * optional string memo = 2; + * @return {string} + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.tx.v1beta1.TxBody} returns this + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 timeout_height = 3; + * @return {number} + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.getTimeoutHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.tx.v1beta1.TxBody} returns this + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.setTimeoutHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * repeated google.protobuf.Any extension_options = 1023; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.getExtensionOptionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1023)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.TxBody} returns this +*/ +proto.cosmos.tx.v1beta1.TxBody.prototype.setExtensionOptionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1023, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.addExtensionOptions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1023, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.tx.v1beta1.TxBody} returns this + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.clearExtensionOptionsList = function() { + return this.setExtensionOptionsList([]); +}; + + +/** + * repeated google.protobuf.Any non_critical_extension_options = 2047; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.getNonCriticalExtensionOptionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 2047)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.TxBody} returns this +*/ +proto.cosmos.tx.v1beta1.TxBody.prototype.setNonCriticalExtensionOptionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2047, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.addNonCriticalExtensionOptions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2047, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.tx.v1beta1.TxBody} returns this + */ +proto.cosmos.tx.v1beta1.TxBody.prototype.clearNonCriticalExtensionOptionsList = function() { + return this.setNonCriticalExtensionOptionsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.v1beta1.AuthInfo.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.tx.v1beta1.AuthInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.AuthInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.AuthInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.AuthInfo.toObject = function(includeInstance, msg) { + var f, obj = { + signerInfosList: jspb.Message.toObjectList(msg.getSignerInfosList(), + proto.cosmos.tx.v1beta1.SignerInfo.toObject, includeInstance), + fee: (f = msg.getFee()) && proto.cosmos.tx.v1beta1.Fee.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.tx.v1beta1.AuthInfo} + */ +proto.cosmos.tx.v1beta1.AuthInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.AuthInfo; + return proto.cosmos.tx.v1beta1.AuthInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.AuthInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.AuthInfo} + */ +proto.cosmos.tx.v1beta1.AuthInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.tx.v1beta1.SignerInfo; + reader.readMessage(value,proto.cosmos.tx.v1beta1.SignerInfo.deserializeBinaryFromReader); + msg.addSignerInfos(value); + break; + case 2: + var value = new proto.cosmos.tx.v1beta1.Fee; + reader.readMessage(value,proto.cosmos.tx.v1beta1.Fee.deserializeBinaryFromReader); + msg.setFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.AuthInfo.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.tx.v1beta1.AuthInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.AuthInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignerInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.cosmos.tx.v1beta1.SignerInfo.serializeBinaryToWriter + ); + } + f = message.getFee(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.tx.v1beta1.Fee.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated SignerInfo signer_infos = 1; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.getSignerInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.tx.v1beta1.SignerInfo, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.AuthInfo} returns this +*/ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.setSignerInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.cosmos.tx.v1beta1.SignerInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.tx.v1beta1.SignerInfo} + */ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.addSignerInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.tx.v1beta1.SignerInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.tx.v1beta1.AuthInfo} returns this + */ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.clearSignerInfosList = function() { + return this.setSignerInfosList([]); +}; + + +/** + * optional Fee fee = 2; + * @return {?proto.cosmos.tx.v1beta1.Fee} + */ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.getFee = function() { + return /** @type{?proto.cosmos.tx.v1beta1.Fee} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.v1beta1.Fee, 2)); +}; + + +/** + * @param {?proto.cosmos.tx.v1beta1.Fee|undefined} value + * @return {!proto.cosmos.tx.v1beta1.AuthInfo} returns this +*/ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.setFee = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.AuthInfo} returns this + */ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.clearFee = function() { + return this.setFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.AuthInfo.prototype.hasFee = 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.tx.v1beta1.SignerInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.SignerInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.SignerInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.SignerInfo.toObject = function(includeInstance, msg) { + var f, obj = { + publicKey: (f = msg.getPublicKey()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + modeInfo: (f = msg.getModeInfo()) && proto.cosmos.tx.v1beta1.ModeInfo.toObject(includeInstance, f), + sequence: 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.tx.v1beta1.SignerInfo} + */ +proto.cosmos.tx.v1beta1.SignerInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.SignerInfo; + return proto.cosmos.tx.v1beta1.SignerInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.SignerInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.SignerInfo} + */ +proto.cosmos.tx.v1beta1.SignerInfo.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 = new proto.cosmos.tx.v1beta1.ModeInfo; + reader.readMessage(value,proto.cosmos.tx.v1beta1.ModeInfo.deserializeBinaryFromReader); + msg.setModeInfo(value); + break; + case 3: + 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.cosmos.tx.v1beta1.SignerInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.SignerInfo.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.tx.v1beta1.SignerInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.SignerInfo.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.getModeInfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.tx.v1beta1.ModeInfo.serializeBinaryToWriter + ); + } + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional google.protobuf.Any public_key = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.tx.v1beta1.SignerInfo.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.cosmos.tx.v1beta1.SignerInfo} returns this +*/ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.setPublicKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.SignerInfo} returns this + */ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.clearPublicKey = function() { + return this.setPublicKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.hasPublicKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ModeInfo mode_info = 2; + * @return {?proto.cosmos.tx.v1beta1.ModeInfo} + */ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.getModeInfo = function() { + return /** @type{?proto.cosmos.tx.v1beta1.ModeInfo} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.v1beta1.ModeInfo, 2)); +}; + + +/** + * @param {?proto.cosmos.tx.v1beta1.ModeInfo|undefined} value + * @return {!proto.cosmos.tx.v1beta1.SignerInfo} returns this +*/ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.setModeInfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.SignerInfo} returns this + */ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.clearModeInfo = function() { + return this.setModeInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.hasModeInfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 sequence = 3; + * @return {number} + */ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.tx.v1beta1.SignerInfo} returns this + */ +proto.cosmos.tx.v1beta1.SignerInfo.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 3, 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.cosmos.tx.v1beta1.ModeInfo.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.cosmos.tx.v1beta1.ModeInfo.SumCase = { + SUM_NOT_SET: 0, + SINGLE: 1, + MULTI: 2 +}; + +/** + * @return {proto.cosmos.tx.v1beta1.ModeInfo.SumCase} + */ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.getSumCase = function() { + return /** @type {proto.cosmos.tx.v1beta1.ModeInfo.SumCase} */(jspb.Message.computeOneofCase(this, proto.cosmos.tx.v1beta1.ModeInfo.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.tx.v1beta1.ModeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.ModeInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.ModeInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.ModeInfo.toObject = function(includeInstance, msg) { + var f, obj = { + single: (f = msg.getSingle()) && proto.cosmos.tx.v1beta1.ModeInfo.Single.toObject(includeInstance, f), + multi: (f = msg.getMulti()) && proto.cosmos.tx.v1beta1.ModeInfo.Multi.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.tx.v1beta1.ModeInfo} + */ +proto.cosmos.tx.v1beta1.ModeInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.ModeInfo; + return proto.cosmos.tx.v1beta1.ModeInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.ModeInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.ModeInfo} + */ +proto.cosmos.tx.v1beta1.ModeInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.tx.v1beta1.ModeInfo.Single; + reader.readMessage(value,proto.cosmos.tx.v1beta1.ModeInfo.Single.deserializeBinaryFromReader); + msg.setSingle(value); + break; + case 2: + var value = new proto.cosmos.tx.v1beta1.ModeInfo.Multi; + reader.readMessage(value,proto.cosmos.tx.v1beta1.ModeInfo.Multi.deserializeBinaryFromReader); + msg.setMulti(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.ModeInfo.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.tx.v1beta1.ModeInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.ModeInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSingle(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.tx.v1beta1.ModeInfo.Single.serializeBinaryToWriter + ); + } + f = message.getMulti(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.cosmos.tx.v1beta1.ModeInfo.Multi.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.tx.v1beta1.ModeInfo.Single.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.ModeInfo.Single.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.ModeInfo.Single} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.ModeInfo.Single.toObject = function(includeInstance, msg) { + var f, obj = { + mode: 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.cosmos.tx.v1beta1.ModeInfo.Single} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Single.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.ModeInfo.Single; + return proto.cosmos.tx.v1beta1.ModeInfo.Single.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.ModeInfo.Single} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.ModeInfo.Single} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Single.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.cosmos.tx.signing.v1beta1.SignMode} */ (reader.readEnum()); + msg.setMode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Single.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.ModeInfo.Single.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.tx.v1beta1.ModeInfo.Single} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.ModeInfo.Single.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMode(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * optional cosmos.tx.signing.v1beta1.SignMode mode = 1; + * @return {!proto.cosmos.tx.signing.v1beta1.SignMode} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Single.prototype.getMode = function() { + return /** @type {!proto.cosmos.tx.signing.v1beta1.SignMode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.cosmos.tx.signing.v1beta1.SignMode} value + * @return {!proto.cosmos.tx.v1beta1.ModeInfo.Single} returns this + */ +proto.cosmos.tx.v1beta1.ModeInfo.Single.prototype.setMode = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.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.tx.v1beta1.ModeInfo.Multi.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.ModeInfo.Multi.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tx.v1beta1.ModeInfo.Multi} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.toObject = function(includeInstance, msg) { + var f, obj = { + bitarray: (f = msg.getBitarray()) && cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray.toObject(includeInstance, f), + modeInfosList: jspb.Message.toObjectList(msg.getModeInfosList(), + proto.cosmos.tx.v1beta1.ModeInfo.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.tx.v1beta1.ModeInfo.Multi} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.ModeInfo.Multi; + return proto.cosmos.tx.v1beta1.ModeInfo.Multi.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.ModeInfo.Multi} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.ModeInfo.Multi} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray; + reader.readMessage(value,cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray.deserializeBinaryFromReader); + msg.setBitarray(value); + break; + case 2: + var value = new proto.cosmos.tx.v1beta1.ModeInfo; + reader.readMessage(value,proto.cosmos.tx.v1beta1.ModeInfo.deserializeBinaryFromReader); + msg.addModeInfos(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.ModeInfo.Multi.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.tx.v1beta1.ModeInfo.Multi} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBitarray(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray.serializeBinaryToWriter + ); + } + f = message.getModeInfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.cosmos.tx.v1beta1.ModeInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; + * @return {?proto.cosmos.crypto.multisig.v1beta1.CompactBitArray} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.getBitarray = function() { + return /** @type{?proto.cosmos.crypto.multisig.v1beta1.CompactBitArray} */ ( + jspb.Message.getWrapperField(this, cosmos_crypto_multisig_v1beta1_multisig_pb.CompactBitArray, 1)); +}; + + +/** + * @param {?proto.cosmos.crypto.multisig.v1beta1.CompactBitArray|undefined} value + * @return {!proto.cosmos.tx.v1beta1.ModeInfo.Multi} returns this +*/ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.setBitarray = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.ModeInfo.Multi} returns this + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.clearBitarray = function() { + return this.setBitarray(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.hasBitarray = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated ModeInfo mode_infos = 2; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.getModeInfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.tx.v1beta1.ModeInfo, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.ModeInfo.Multi} returns this +*/ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.setModeInfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.cosmos.tx.v1beta1.ModeInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.tx.v1beta1.ModeInfo} + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.addModeInfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.tx.v1beta1.ModeInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.tx.v1beta1.ModeInfo.Multi} returns this + */ +proto.cosmos.tx.v1beta1.ModeInfo.Multi.prototype.clearModeInfosList = function() { + return this.setModeInfosList([]); +}; + + +/** + * optional Single single = 1; + * @return {?proto.cosmos.tx.v1beta1.ModeInfo.Single} + */ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.getSingle = function() { + return /** @type{?proto.cosmos.tx.v1beta1.ModeInfo.Single} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.v1beta1.ModeInfo.Single, 1)); +}; + + +/** + * @param {?proto.cosmos.tx.v1beta1.ModeInfo.Single|undefined} value + * @return {!proto.cosmos.tx.v1beta1.ModeInfo} returns this +*/ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.setSingle = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.cosmos.tx.v1beta1.ModeInfo.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.ModeInfo} returns this + */ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.clearSingle = function() { + return this.setSingle(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.hasSingle = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Multi multi = 2; + * @return {?proto.cosmos.tx.v1beta1.ModeInfo.Multi} + */ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.getMulti = function() { + return /** @type{?proto.cosmos.tx.v1beta1.ModeInfo.Multi} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.tx.v1beta1.ModeInfo.Multi, 2)); +}; + + +/** + * @param {?proto.cosmos.tx.v1beta1.ModeInfo.Multi|undefined} value + * @return {!proto.cosmos.tx.v1beta1.ModeInfo} returns this +*/ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.setMulti = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.cosmos.tx.v1beta1.ModeInfo.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.tx.v1beta1.ModeInfo} returns this + */ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.clearMulti = function() { + return this.setMulti(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.tx.v1beta1.ModeInfo.prototype.hasMulti = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.tx.v1beta1.Fee.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.tx.v1beta1.Fee.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.tx.v1beta1.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.cosmos.tx.v1beta1.Fee} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.Fee.toObject = function(includeInstance, msg) { + var f, obj = { + amountList: jspb.Message.toObjectList(msg.getAmountList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + gasLimit: jspb.Message.getFieldWithDefault(msg, 2, 0), + payer: jspb.Message.getFieldWithDefault(msg, 3, ""), + granter: 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.cosmos.tx.v1beta1.Fee} + */ +proto.cosmos.tx.v1beta1.Fee.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.tx.v1beta1.Fee; + return proto.cosmos.tx.v1beta1.Fee.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.tx.v1beta1.Fee} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.tx.v1beta1.Fee} + */ +proto.cosmos.tx.v1beta1.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.addAmount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setGasLimit(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPayer(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setGranter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.tx.v1beta1.Fee.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.tx.v1beta1.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.cosmos.tx.v1beta1.Fee} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.tx.v1beta1.Fee.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmountList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getGasLimit(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getPayer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getGranter(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 1; + * @return {!Array} + */ +proto.cosmos.tx.v1beta1.Fee.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.tx.v1beta1.Fee} returns this +*/ +proto.cosmos.tx.v1beta1.Fee.prototype.setAmountList = 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.cosmos.tx.v1beta1.Fee.prototype.addAmount = 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.cosmos.tx.v1beta1.Fee} returns this + */ +proto.cosmos.tx.v1beta1.Fee.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + +/** + * optional uint64 gas_limit = 2; + * @return {number} + */ +proto.cosmos.tx.v1beta1.Fee.prototype.getGasLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.tx.v1beta1.Fee} returns this + */ +proto.cosmos.tx.v1beta1.Fee.prototype.setGasLimit = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string payer = 3; + * @return {string} + */ +proto.cosmos.tx.v1beta1.Fee.prototype.getPayer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.tx.v1beta1.Fee} returns this + */ +proto.cosmos.tx.v1beta1.Fee.prototype.setPayer = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string granter = 4; + * @return {string} + */ +proto.cosmos.tx.v1beta1.Fee.prototype.getGranter = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.tx.v1beta1.Fee} returns this + */ +proto.cosmos.tx.v1beta1.Fee.prototype.setGranter = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +goog.object.extend(exports, proto.cosmos.tx.v1beta1); diff --git a/src/types/proto-types/cosmos/upgrade/v1beta1/query_grpc_web_pb.js b/src/types/proto-types/cosmos/upgrade/v1beta1/query_grpc_web_pb.js new file mode 100644 index 00000000..c90f8c53 --- /dev/null +++ b/src/types/proto-types/cosmos/upgrade/v1beta1/query_grpc_web_pb.js @@ -0,0 +1,322 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.upgrade.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var google_api_annotations_pb = require('../../../google/api/annotations_pb.js') + +var cosmos_upgrade_v1beta1_upgrade_pb = require('../../../cosmos/upgrade/v1beta1/upgrade_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.upgrade = {}; +proto.cosmos.upgrade.v1beta1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.upgrade.v1beta1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.upgrade.v1beta1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest, + * !proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse>} + */ +const methodDescriptor_Query_CurrentPlan = new grpc.web.MethodDescriptor( + '/cosmos.upgrade.v1beta1.Query/CurrentPlan', + grpc.web.MethodType.UNARY, + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest, + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse, + /** + * @param {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest, + * !proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse>} + */ +const methodInfo_Query_CurrentPlan = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse, + /** + * @param {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.upgrade.v1beta1.QueryClient.prototype.currentPlan = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.upgrade.v1beta1.Query/CurrentPlan', + request, + metadata || {}, + methodDescriptor_Query_CurrentPlan, + callback); +}; + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.upgrade.v1beta1.QueryPromiseClient.prototype.currentPlan = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.upgrade.v1beta1.Query/CurrentPlan', + request, + metadata || {}, + methodDescriptor_Query_CurrentPlan); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest, + * !proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse>} + */ +const methodDescriptor_Query_AppliedPlan = new grpc.web.MethodDescriptor( + '/cosmos.upgrade.v1beta1.Query/AppliedPlan', + grpc.web.MethodType.UNARY, + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest, + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse, + /** + * @param {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest, + * !proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse>} + */ +const methodInfo_Query_AppliedPlan = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse, + /** + * @param {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.upgrade.v1beta1.QueryClient.prototype.appliedPlan = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.upgrade.v1beta1.Query/AppliedPlan', + request, + metadata || {}, + methodDescriptor_Query_AppliedPlan, + callback); +}; + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.upgrade.v1beta1.QueryPromiseClient.prototype.appliedPlan = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.upgrade.v1beta1.Query/AppliedPlan', + request, + metadata || {}, + methodDescriptor_Query_AppliedPlan); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest, + * !proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse>} + */ +const methodDescriptor_Query_UpgradedConsensusState = new grpc.web.MethodDescriptor( + '/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState', + grpc.web.MethodType.UNARY, + proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest, + proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse, + /** + * @param {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest, + * !proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse>} + */ +const methodInfo_Query_UpgradedConsensusState = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse, + /** + * @param {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.upgrade.v1beta1.QueryClient.prototype.upgradedConsensusState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState', + request, + metadata || {}, + methodDescriptor_Query_UpgradedConsensusState, + callback); +}; + + +/** + * @param {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.upgrade.v1beta1.QueryPromiseClient.prototype.upgradedConsensusState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.upgrade.v1beta1.Query/UpgradedConsensusState', + request, + metadata || {}, + methodDescriptor_Query_UpgradedConsensusState); +}; + + +module.exports = proto.cosmos.upgrade.v1beta1; + diff --git a/src/types/proto-types/cosmos/upgrade/v1beta1/query_pb.js b/src/types/proto-types/cosmos/upgrade/v1beta1/query_pb.js new file mode 100644 index 00000000..afaaba2b --- /dev/null +++ b/src/types/proto-types/cosmos/upgrade/v1beta1/query_pb.js @@ -0,0 +1,946 @@ +// source: cosmos/upgrade/v1beta1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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'); +goog.object.extend(proto, google_api_annotations_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.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse', 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.upgrade.v1beta1.QueryCurrentPlanRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.displayName = 'proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.upgrade.v1beta1.QueryCurrentPlanResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.displayName = 'proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.upgrade.v1beta1.QueryAppliedPlanRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.displayName = 'proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.upgrade.v1beta1.QueryAppliedPlanResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.displayName = 'proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.upgrade.v1beta1.QueryUpgradedConsensusStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.displayName = 'proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.upgrade.v1beta1.QueryUpgradedConsensusStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.displayName = 'proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.upgrade.v1beta1.QueryCurrentPlanRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.upgrade.v1beta1.QueryCurrentPlanRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.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.upgrade.v1beta1.QueryCurrentPlanRequest} + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest; + return proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest} + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.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.upgrade.v1beta1.QueryCurrentPlanRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.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.upgrade.v1beta1.QueryCurrentPlanRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanRequest.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.upgrade.v1beta1.QueryCurrentPlanResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.upgrade.v1beta1.QueryCurrentPlanResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.toObject = function(includeInstance, msg) { + var f, obj = { + plan: (f = msg.getPlan()) && cosmos_upgrade_v1beta1_upgrade_pb.Plan.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.upgrade.v1beta1.QueryCurrentPlanResponse} + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse; + return proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse} + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.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.upgrade.v1beta1.QueryCurrentPlanResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPlan(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_upgrade_v1beta1_upgrade_pb.Plan.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Plan plan = 1; + * @return {?proto.cosmos.upgrade.v1beta1.Plan} + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.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.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse} returns this +*/ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.prototype.setPlan = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse} returns this + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.prototype.clearPlan = function() { + return this.setPlan(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.upgrade.v1beta1.QueryCurrentPlanResponse.prototype.hasPlan = 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.upgrade.v1beta1.QueryAppliedPlanRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.upgrade.v1beta1.QueryAppliedPlanRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.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.upgrade.v1beta1.QueryAppliedPlanRequest} + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest; + return proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.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.upgrade.v1beta1.QueryAppliedPlanRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.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.upgrade.v1beta1.QueryAppliedPlanRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.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.upgrade.v1beta1.QueryAppliedPlanRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest} returns this + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanRequest.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.upgrade.v1beta1.QueryAppliedPlanResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.upgrade.v1beta1.QueryAppliedPlanResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.toObject = function(includeInstance, msg) { + var f, obj = { + height: 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.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse} + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse; + return proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse} + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.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.upgrade.v1beta1.QueryAppliedPlanResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse} returns this + */ +proto.cosmos.upgrade.v1beta1.QueryAppliedPlanResponse.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.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.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.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + lastHeight: 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.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest; + return proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.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.setLastHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.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.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLastHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 last_height = 1; + * @return {number} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.prototype.getLastHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest} returns this + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateRequest.prototype.setLastHeight = 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.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.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.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + upgradedConsensusState: (f = msg.getUpgradedConsensusState()) && 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.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse; + return proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.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.setUpgradedConsensusState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.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.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUpgradedConsensusState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Any upgraded_consensus_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.getUpgradedConsensusState = 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.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} returns this +*/ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.setUpgradedConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse} returns this + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.clearUpgradedConsensusState = function() { + return this.setUpgradedConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse.prototype.hasUpgradedConsensusState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.cosmos.upgrade.v1beta1); diff --git a/src/types/proto-types/cosmos/upgrade/v1beta1/upgrade_pb.js b/src/types/proto-types/cosmos/upgrade/v1beta1/upgrade_pb.js new file mode 100644 index 00000000..316cd7e3 --- /dev/null +++ b/src/types/proto-types/cosmos/upgrade/v1beta1/upgrade_pb.js @@ -0,0 +1,750 @@ +// source: cosmos/upgrade/v1beta1/upgrade.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.Plan', null, global); +goog.exportSymbol('proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal', 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.upgrade.v1beta1.Plan = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.Plan, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.Plan.displayName = 'proto.cosmos.upgrade.v1beta1.Plan'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.upgrade.v1beta1.SoftwareUpgradeProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.displayName = 'proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.upgrade.v1beta1.CancelSoftwareUpgradeProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.displayName = 'proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.upgrade.v1beta1.Plan.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.Plan.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.upgrade.v1beta1.Plan} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.Plan.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + info: jspb.Message.getFieldWithDefault(msg, 4, ""), + 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.cosmos.upgrade.v1beta1.Plan} + */ +proto.cosmos.upgrade.v1beta1.Plan.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.Plan; + return proto.cosmos.upgrade.v1beta1.Plan.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.Plan} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.Plan} + */ +proto.cosmos.upgrade.v1beta1.Plan.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 = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + case 5: + 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.cosmos.upgrade.v1beta1.Plan.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.Plan.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.upgrade.v1beta1.Plan} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.Plan.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getUpgradedClientState(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.Plan} returns this + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.getTime = 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.upgrade.v1beta1.Plan} returns this +*/ +proto.cosmos.upgrade.v1beta1.Plan.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.upgrade.v1beta1.Plan} returns this + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.hasTime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 height = 3; + * @return {number} + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.upgrade.v1beta1.Plan} returns this + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.Plan} returns this + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.setInfo = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional google.protobuf.Any upgraded_client_state = 5; + * @return {?proto.google.protobuf.Any} + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.getUpgradedClientState = function() { + return /** @type{?proto.google.protobuf.Any} */ ( + jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 5)); +}; + + +/** + * @param {?proto.google.protobuf.Any|undefined} value + * @return {!proto.cosmos.upgrade.v1beta1.Plan} returns this +*/ +proto.cosmos.upgrade.v1beta1.Plan.prototype.setUpgradedClientState = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.upgrade.v1beta1.Plan} returns this + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.clearUpgradedClientState = function() { + return this.setUpgradedClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.upgrade.v1beta1.Plan.prototype.hasUpgradedClientState = function() { + return jspb.Message.getField(this, 5) != 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.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.upgrade.v1beta1.SoftwareUpgradeProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + plan: (f = msg.getPlan()) && proto.cosmos.upgrade.v1beta1.Plan.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.upgrade.v1beta1.SoftwareUpgradeProposal} + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal; + return proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.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.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = new proto.cosmos.upgrade.v1beta1.Plan; + reader.readMessage(value,proto.cosmos.upgrade.v1beta1.Plan.deserializeBinaryFromReader); + msg.setPlan(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.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.upgrade.v1beta1.SoftwareUpgradeProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + 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, + proto.cosmos.upgrade.v1beta1.Plan.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} returns this + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} returns this + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Plan plan = 3; + * @return {?proto.cosmos.upgrade.v1beta1.Plan} + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.getPlan = function() { + return /** @type{?proto.cosmos.upgrade.v1beta1.Plan} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.upgrade.v1beta1.Plan, 3)); +}; + + +/** + * @param {?proto.cosmos.upgrade.v1beta1.Plan|undefined} value + * @return {!proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} returns this +*/ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.setPlan = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} returns this + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.clearPlan = function() { + return this.setPlan(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.prototype.hasPlan = 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.upgrade.v1beta1.CancelSoftwareUpgradeProposal.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.upgrade.v1beta1.CancelSoftwareUpgradeProposal} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.toObject = function(includeInstance, msg) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} + */ +proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal; + return proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} + */ +proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.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.setTitle(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.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string title = 1; + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.prototype.getTitle = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} returns this + */ +proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.prototype.setTitle = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} returns this + */ +proto.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.cosmos.upgrade.v1beta1); diff --git a/src/types/proto-types/cosmos/vesting/v1beta1/tx_grpc_web_pb.js b/src/types/proto-types/cosmos/vesting/v1beta1/tx_grpc_web_pb.js new file mode 100644 index 00000000..d09c57df --- /dev/null +++ b/src/types/proto-types/cosmos/vesting/v1beta1/tx_grpc_web_pb.js @@ -0,0 +1,160 @@ +/** + * @fileoverview gRPC-Web generated client stub for cosmos.vesting.v1beta1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js') +const proto = {}; +proto.cosmos = {}; +proto.cosmos.vesting = {}; +proto.cosmos.vesting.v1beta1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.vesting.v1beta1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.cosmos.vesting.v1beta1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount, + * !proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse>} + */ +const methodDescriptor_Msg_CreateVestingAccount = new grpc.web.MethodDescriptor( + '/cosmos.vesting.v1beta1.Msg/CreateVestingAccount', + grpc.web.MethodType.UNARY, + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount, + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse, + /** + * @param {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount, + * !proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse>} + */ +const methodInfo_Msg_CreateVestingAccount = new grpc.web.AbstractClientBase.MethodInfo( + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse, + /** + * @param {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.deserializeBinary +); + + +/** + * @param {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.cosmos.vesting.v1beta1.MsgClient.prototype.createVestingAccount = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/cosmos.vesting.v1beta1.Msg/CreateVestingAccount', + request, + metadata || {}, + methodDescriptor_Msg_CreateVestingAccount, + callback); +}; + + +/** + * @param {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.cosmos.vesting.v1beta1.MsgPromiseClient.prototype.createVestingAccount = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/cosmos.vesting.v1beta1.Msg/CreateVestingAccount', + request, + metadata || {}, + methodDescriptor_Msg_CreateVestingAccount); +}; + + +module.exports = proto.cosmos.vesting.v1beta1; + diff --git a/src/types/proto-types/cosmos/vesting/v1beta1/tx_pb.js b/src/types/proto-types/cosmos/vesting/v1beta1/tx_pb.js new file mode 100644 index 00000000..ce1cd8b4 --- /dev/null +++ b/src/types/proto-types/cosmos/vesting/v1beta1/tx_pb.js @@ -0,0 +1,444 @@ +// source: cosmos/vesting/v1beta1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount', null, global); +goog.exportSymbol('proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse', 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.vesting.v1beta1.MsgCreateVestingAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.displayName = 'proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.vesting.v1beta1.MsgCreateVestingAccountResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.displayName = 'proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.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.vesting.v1beta1.MsgCreateVestingAccount.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.vesting.v1beta1.MsgCreateVestingAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.toObject = function(includeInstance, msg) { + var f, obj = { + fromAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + toAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), + amountList: jspb.Message.toObjectList(msg.getAmountList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + endTime: jspb.Message.getFieldWithDefault(msg, 4, 0), + delayed: jspb.Message.getBooleanFieldWithDefault(msg, 5, 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.vesting.v1beta1.MsgCreateVestingAccount} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount; + return proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.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.setFromAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setToAddress(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; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEndTime(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDelayed(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.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.vesting.v1beta1.MsgCreateVestingAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFromAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getToAddress(); + 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 + ); + } + f = message.getEndTime(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getDelayed(); + if (f) { + writer.writeBool( + 5, + f + ); + } +}; + + +/** + * optional string from_address = 1; + * @return {string} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.getFromAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.setFromAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string to_address = 2; + * @return {string} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.getToAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.setToAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 3; + * @return {!Array} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.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.vesting.v1beta1.MsgCreateVestingAccount.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.vesting.v1beta1.MsgCreateVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + +/** + * optional int64 end_time = 4; + * @return {number} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.getEndTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.setEndTime = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bool delayed = 5; + * @return {boolean} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.getDelayed = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccount.prototype.setDelayed = function(value) { + return jspb.Message.setProto3BooleanField(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.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.vesting.v1beta1.MsgCreateVestingAccountResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.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.vesting.v1beta1.MsgCreateVestingAccountResponse} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse; + return proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse} + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.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.vesting.v1beta1.MsgCreateVestingAccountResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.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.vesting.v1beta1.MsgCreateVestingAccountResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.cosmos.vesting.v1beta1); diff --git a/src/types/proto-types/cosmos/vesting/v1beta1/vesting_pb.js b/src/types/proto-types/cosmos/vesting/v1beta1/vesting_pb.js new file mode 100644 index 00000000..a4eb5b46 --- /dev/null +++ b/src/types/proto-types/cosmos/vesting/v1beta1/vesting_pb.js @@ -0,0 +1,1241 @@ +// source: cosmos/vesting/v1beta1/vesting.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_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.cosmos.vesting.v1beta1.BaseVestingAccount', null, global); +goog.exportSymbol('proto.cosmos.vesting.v1beta1.ContinuousVestingAccount', null, global); +goog.exportSymbol('proto.cosmos.vesting.v1beta1.DelayedVestingAccount', null, global); +goog.exportSymbol('proto.cosmos.vesting.v1beta1.Period', null, global); +goog.exportSymbol('proto.cosmos.vesting.v1beta1.PeriodicVestingAccount', 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.vesting.v1beta1.BaseVestingAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.vesting.v1beta1.BaseVestingAccount.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.vesting.v1beta1.BaseVestingAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.vesting.v1beta1.BaseVestingAccount.displayName = 'proto.cosmos.vesting.v1beta1.BaseVestingAccount'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.vesting.v1beta1.ContinuousVestingAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.vesting.v1beta1.ContinuousVestingAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.displayName = 'proto.cosmos.vesting.v1beta1.ContinuousVestingAccount'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.vesting.v1beta1.DelayedVestingAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.cosmos.vesting.v1beta1.DelayedVestingAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.vesting.v1beta1.DelayedVestingAccount.displayName = 'proto.cosmos.vesting.v1beta1.DelayedVestingAccount'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.vesting.v1beta1.Period = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.vesting.v1beta1.Period.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.vesting.v1beta1.Period, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.vesting.v1beta1.Period.displayName = 'proto.cosmos.vesting.v1beta1.Period'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.vesting.v1beta1.PeriodicVestingAccount = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.repeatedFields_, null); +}; +goog.inherits(proto.cosmos.vesting.v1beta1.PeriodicVestingAccount, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.displayName = 'proto.cosmos.vesting.v1beta1.PeriodicVestingAccount'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.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.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.vesting.v1beta1.BaseVestingAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.vesting.v1beta1.BaseVestingAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.toObject = function(includeInstance, msg) { + var f, obj = { + baseAccount: (f = msg.getBaseAccount()) && cosmos_auth_v1beta1_auth_pb.BaseAccount.toObject(includeInstance, f), + originalVestingList: jspb.Message.toObjectList(msg.getOriginalVestingList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + delegatedFreeList: jspb.Message.toObjectList(msg.getDelegatedFreeList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + delegatedVestingList: jspb.Message.toObjectList(msg.getDelegatedVestingList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + endTime: 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.cosmos.vesting.v1beta1.BaseVestingAccount} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.vesting.v1beta1.BaseVestingAccount; + return proto.cosmos.vesting.v1beta1.BaseVestingAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.vesting.v1beta1.BaseVestingAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.vesting.v1beta1.BaseVestingAccount} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.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 = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addOriginalVesting(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addDelegatedFree(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addDelegatedVesting(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEndTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.vesting.v1beta1.BaseVestingAccount.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.vesting.v1beta1.BaseVestingAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.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.getOriginalVestingList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getDelegatedFreeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getDelegatedVestingList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getEndTime(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional cosmos.auth.v1beta1.BaseAccount base_account = 1; + * @return {?proto.cosmos.auth.v1beta1.BaseAccount} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.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.cosmos.vesting.v1beta1.BaseVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.setBaseAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.vesting.v1beta1.BaseVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.clearBaseAccount = function() { + return this.setBaseAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.hasBaseAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated cosmos.base.v1beta1.Coin original_vesting = 2; + * @return {!Array} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.getOriginalVestingList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.vesting.v1beta1.BaseVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.setOriginalVestingList = 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.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.addOriginalVesting = 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.cosmos.vesting.v1beta1.BaseVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.clearOriginalVestingList = function() { + return this.setOriginalVestingList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin delegated_free = 3; + * @return {!Array} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.getDelegatedFreeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.vesting.v1beta1.BaseVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.setDelegatedFreeList = 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.vesting.v1beta1.BaseVestingAccount.prototype.addDelegatedFree = 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.vesting.v1beta1.BaseVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.clearDelegatedFreeList = function() { + return this.setDelegatedFreeList([]); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin delegated_vesting = 4; + * @return {!Array} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.getDelegatedVestingList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.vesting.v1beta1.BaseVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.setDelegatedVestingList = 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.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.addDelegatedVesting = 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.cosmos.vesting.v1beta1.BaseVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.clearDelegatedVestingList = function() { + return this.setDelegatedVestingList([]); +}; + + +/** + * optional int64 end_time = 5; + * @return {number} + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.getEndTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.vesting.v1beta1.BaseVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.BaseVestingAccount.prototype.setEndTime = 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.cosmos.vesting.v1beta1.ContinuousVestingAccount.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.vesting.v1beta1.ContinuousVestingAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.toObject = function(includeInstance, msg) { + var f, obj = { + baseVestingAccount: (f = msg.getBaseVestingAccount()) && proto.cosmos.vesting.v1beta1.BaseVestingAccount.toObject(includeInstance, f), + startTime: 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.vesting.v1beta1.ContinuousVestingAccount} + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.vesting.v1beta1.ContinuousVestingAccount; + return proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.vesting.v1beta1.ContinuousVestingAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.vesting.v1beta1.ContinuousVestingAccount} + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.vesting.v1beta1.BaseVestingAccount; + reader.readMessage(value,proto.cosmos.vesting.v1beta1.BaseVestingAccount.deserializeBinaryFromReader); + msg.setBaseVestingAccount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStartTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.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.vesting.v1beta1.ContinuousVestingAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBaseVestingAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.vesting.v1beta1.BaseVestingAccount.serializeBinaryToWriter + ); + } + f = message.getStartTime(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional BaseVestingAccount base_vesting_account = 1; + * @return {?proto.cosmos.vesting.v1beta1.BaseVestingAccount} + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.prototype.getBaseVestingAccount = function() { + return /** @type{?proto.cosmos.vesting.v1beta1.BaseVestingAccount} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.vesting.v1beta1.BaseVestingAccount, 1)); +}; + + +/** + * @param {?proto.cosmos.vesting.v1beta1.BaseVestingAccount|undefined} value + * @return {!proto.cosmos.vesting.v1beta1.ContinuousVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.prototype.setBaseVestingAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.vesting.v1beta1.ContinuousVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.prototype.clearBaseVestingAccount = function() { + return this.setBaseVestingAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.prototype.hasBaseVestingAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 start_time = 2; + * @return {number} + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.prototype.getStartTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.vesting.v1beta1.ContinuousVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.ContinuousVestingAccount.prototype.setStartTime = 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.vesting.v1beta1.DelayedVestingAccount.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.vesting.v1beta1.DelayedVestingAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.vesting.v1beta1.DelayedVestingAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.toObject = function(includeInstance, msg) { + var f, obj = { + baseVestingAccount: (f = msg.getBaseVestingAccount()) && proto.cosmos.vesting.v1beta1.BaseVestingAccount.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.vesting.v1beta1.DelayedVestingAccount} + */ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.vesting.v1beta1.DelayedVestingAccount; + return proto.cosmos.vesting.v1beta1.DelayedVestingAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.vesting.v1beta1.DelayedVestingAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.vesting.v1beta1.DelayedVestingAccount} + */ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.vesting.v1beta1.BaseVestingAccount; + reader.readMessage(value,proto.cosmos.vesting.v1beta1.BaseVestingAccount.deserializeBinaryFromReader); + msg.setBaseVestingAccount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.vesting.v1beta1.DelayedVestingAccount.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.vesting.v1beta1.DelayedVestingAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBaseVestingAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.vesting.v1beta1.BaseVestingAccount.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BaseVestingAccount base_vesting_account = 1; + * @return {?proto.cosmos.vesting.v1beta1.BaseVestingAccount} + */ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.prototype.getBaseVestingAccount = function() { + return /** @type{?proto.cosmos.vesting.v1beta1.BaseVestingAccount} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.vesting.v1beta1.BaseVestingAccount, 1)); +}; + + +/** + * @param {?proto.cosmos.vesting.v1beta1.BaseVestingAccount|undefined} value + * @return {!proto.cosmos.vesting.v1beta1.DelayedVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.prototype.setBaseVestingAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.vesting.v1beta1.DelayedVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.prototype.clearBaseVestingAccount = function() { + return this.setBaseVestingAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.vesting.v1beta1.DelayedVestingAccount.prototype.hasBaseVestingAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.vesting.v1beta1.Period.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.vesting.v1beta1.Period.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.vesting.v1beta1.Period.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.vesting.v1beta1.Period} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.Period.toObject = function(includeInstance, msg) { + var f, obj = { + length: jspb.Message.getFieldWithDefault(msg, 1, 0), + 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.vesting.v1beta1.Period} + */ +proto.cosmos.vesting.v1beta1.Period.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.vesting.v1beta1.Period; + return proto.cosmos.vesting.v1beta1.Period.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.vesting.v1beta1.Period} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.vesting.v1beta1.Period} + */ +proto.cosmos.vesting.v1beta1.Period.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.setLength(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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.vesting.v1beta1.Period.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.vesting.v1beta1.Period.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.vesting.v1beta1.Period} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.Period.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getLength(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getAmountList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 length = 1; + * @return {number} + */ +proto.cosmos.vesting.v1beta1.Period.prototype.getLength = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.vesting.v1beta1.Period} returns this + */ +proto.cosmos.vesting.v1beta1.Period.prototype.setLength = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 2; + * @return {!Array} + */ +proto.cosmos.vesting.v1beta1.Period.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.vesting.v1beta1.Period} returns this +*/ +proto.cosmos.vesting.v1beta1.Period.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.cosmos.vesting.v1beta1.Period.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.cosmos.vesting.v1beta1.Period} returns this + */ +proto.cosmos.vesting.v1beta1.Period.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.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.vesting.v1beta1.PeriodicVestingAccount.prototype.toObject = function(opt_includeInstance) { + return proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.vesting.v1beta1.PeriodicVestingAccount} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.toObject = function(includeInstance, msg) { + var f, obj = { + baseVestingAccount: (f = msg.getBaseVestingAccount()) && proto.cosmos.vesting.v1beta1.BaseVestingAccount.toObject(includeInstance, f), + startTime: jspb.Message.getFieldWithDefault(msg, 2, 0), + vestingPeriodsList: jspb.Message.toObjectList(msg.getVestingPeriodsList(), + proto.cosmos.vesting.v1beta1.Period.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.vesting.v1beta1.PeriodicVestingAccount} + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.cosmos.vesting.v1beta1.PeriodicVestingAccount; + return proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.cosmos.vesting.v1beta1.PeriodicVestingAccount} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.cosmos.vesting.v1beta1.PeriodicVestingAccount} + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.cosmos.vesting.v1beta1.BaseVestingAccount; + reader.readMessage(value,proto.cosmos.vesting.v1beta1.BaseVestingAccount.deserializeBinaryFromReader); + msg.setBaseVestingAccount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStartTime(value); + break; + case 3: + var value = new proto.cosmos.vesting.v1beta1.Period; + reader.readMessage(value,proto.cosmos.vesting.v1beta1.Period.deserializeBinaryFromReader); + msg.addVestingPeriods(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.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.vesting.v1beta1.PeriodicVestingAccount} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBaseVestingAccount(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.cosmos.vesting.v1beta1.BaseVestingAccount.serializeBinaryToWriter + ); + } + f = message.getStartTime(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getVestingPeriodsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.cosmos.vesting.v1beta1.Period.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BaseVestingAccount base_vesting_account = 1; + * @return {?proto.cosmos.vesting.v1beta1.BaseVestingAccount} + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.getBaseVestingAccount = function() { + return /** @type{?proto.cosmos.vesting.v1beta1.BaseVestingAccount} */ ( + jspb.Message.getWrapperField(this, proto.cosmos.vesting.v1beta1.BaseVestingAccount, 1)); +}; + + +/** + * @param {?proto.cosmos.vesting.v1beta1.BaseVestingAccount|undefined} value + * @return {!proto.cosmos.vesting.v1beta1.PeriodicVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.setBaseVestingAccount = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.cosmos.vesting.v1beta1.PeriodicVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.clearBaseVestingAccount = function() { + return this.setBaseVestingAccount(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.hasBaseVestingAccount = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 start_time = 2; + * @return {number} + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.getStartTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.cosmos.vesting.v1beta1.PeriodicVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.setStartTime = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated Period vesting_periods = 3; + * @return {!Array} + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.getVestingPeriodsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.cosmos.vesting.v1beta1.Period, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.cosmos.vesting.v1beta1.PeriodicVestingAccount} returns this +*/ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.setVestingPeriodsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.cosmos.vesting.v1beta1.Period=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.vesting.v1beta1.Period} + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.addVestingPeriods = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmos.vesting.v1beta1.Period, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.cosmos.vesting.v1beta1.PeriodicVestingAccount} returns this + */ +proto.cosmos.vesting.v1beta1.PeriodicVestingAccount.prototype.clearVestingPeriodsList = function() { + return this.setVestingPeriodsList([]); +}; + + +goog.object.extend(exports, proto.cosmos.vesting.v1beta1); diff --git a/src/types/proto-types/cosmos_proto/cosmos_pb.js b/src/types/proto-types/cosmos_proto/cosmos_pb.js new file mode 100644 index 00000000..05a713cf --- /dev/null +++ b/src/types/proto-types/cosmos_proto/cosmos_pb.js @@ -0,0 +1,95 @@ +// source: cosmos_proto/cosmos.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_proto.acceptsInterface', null, global); +goog.exportSymbol('proto.cosmos_proto.implementsInterface', null, global); +goog.exportSymbol('proto.cosmos_proto.interfaceType', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `interfaceType`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.cosmos_proto.interfaceType = new jspb.ExtensionFieldInfo( + 93001, + {interfaceType: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[93001] = new jspb.ExtensionFieldBinaryInfo( + proto.cosmos_proto.interfaceType, + 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[93001] = proto.cosmos_proto.interfaceType; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `implementsInterface`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.cosmos_proto.implementsInterface = new jspb.ExtensionFieldInfo( + 93002, + {implementsInterface: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[93002] = new jspb.ExtensionFieldBinaryInfo( + proto.cosmos_proto.implementsInterface, + 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.implementsInterface; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `acceptsInterface`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.cosmos_proto.acceptsInterface = new jspb.ExtensionFieldInfo( + 93001, + {acceptsInterface: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[93001] = new jspb.ExtensionFieldBinaryInfo( + proto.cosmos_proto.acceptsInterface, + 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[93001] = proto.cosmos_proto.acceptsInterface; + +goog.object.extend(exports, proto.cosmos_proto); diff --git a/src/types/proto-types/gogoproto/gogo_pb.js b/src/types/proto-types/gogoproto/gogo_pb.js new file mode 100644 index 00000000..52865d8a --- /dev/null +++ b/src/types/proto-types/gogoproto/gogo_pb.js @@ -0,0 +1,2019 @@ +// source: gogoproto/gogo.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.gogoproto.benchgen', null, global); +goog.exportSymbol('proto.gogoproto.benchgenAll', null, global); +goog.exportSymbol('proto.gogoproto.castkey', null, global); +goog.exportSymbol('proto.gogoproto.castrepeated', null, global); +goog.exportSymbol('proto.gogoproto.casttype', null, global); +goog.exportSymbol('proto.gogoproto.castvalue', null, global); +goog.exportSymbol('proto.gogoproto.compare', null, global); +goog.exportSymbol('proto.gogoproto.compareAll', null, global); +goog.exportSymbol('proto.gogoproto.customname', null, global); +goog.exportSymbol('proto.gogoproto.customtype', null, global); +goog.exportSymbol('proto.gogoproto.description', null, global); +goog.exportSymbol('proto.gogoproto.descriptionAll', null, global); +goog.exportSymbol('proto.gogoproto.embed', null, global); +goog.exportSymbol('proto.gogoproto.enumCustomname', null, global); +goog.exportSymbol('proto.gogoproto.enumStringer', null, global); +goog.exportSymbol('proto.gogoproto.enumStringerAll', null, global); +goog.exportSymbol('proto.gogoproto.enumdecl', null, global); +goog.exportSymbol('proto.gogoproto.enumdeclAll', null, global); +goog.exportSymbol('proto.gogoproto.enumvalueCustomname', null, global); +goog.exportSymbol('proto.gogoproto.equal', null, global); +goog.exportSymbol('proto.gogoproto.equalAll', null, global); +goog.exportSymbol('proto.gogoproto.face', null, global); +goog.exportSymbol('proto.gogoproto.faceAll', null, global); +goog.exportSymbol('proto.gogoproto.gogoprotoImport', null, global); +goog.exportSymbol('proto.gogoproto.goprotoEnumPrefix', null, global); +goog.exportSymbol('proto.gogoproto.goprotoEnumPrefixAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoEnumStringer', null, global); +goog.exportSymbol('proto.gogoproto.goprotoEnumStringerAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoExtensionsMap', null, global); +goog.exportSymbol('proto.gogoproto.goprotoExtensionsMapAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoGetters', null, global); +goog.exportSymbol('proto.gogoproto.goprotoGettersAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoRegistration', null, global); +goog.exportSymbol('proto.gogoproto.goprotoSizecache', null, global); +goog.exportSymbol('proto.gogoproto.goprotoSizecacheAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoStringer', null, global); +goog.exportSymbol('proto.gogoproto.goprotoStringerAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoUnkeyed', null, global); +goog.exportSymbol('proto.gogoproto.goprotoUnkeyedAll', null, global); +goog.exportSymbol('proto.gogoproto.goprotoUnrecognized', null, global); +goog.exportSymbol('proto.gogoproto.goprotoUnrecognizedAll', null, global); +goog.exportSymbol('proto.gogoproto.gostring', null, global); +goog.exportSymbol('proto.gogoproto.gostringAll', null, global); +goog.exportSymbol('proto.gogoproto.jsontag', null, global); +goog.exportSymbol('proto.gogoproto.marshaler', null, global); +goog.exportSymbol('proto.gogoproto.marshalerAll', null, global); +goog.exportSymbol('proto.gogoproto.messagename', null, global); +goog.exportSymbol('proto.gogoproto.messagenameAll', null, global); +goog.exportSymbol('proto.gogoproto.moretags', null, global); +goog.exportSymbol('proto.gogoproto.nullable', null, global); +goog.exportSymbol('proto.gogoproto.onlyone', null, global); +goog.exportSymbol('proto.gogoproto.onlyoneAll', null, global); +goog.exportSymbol('proto.gogoproto.populate', null, global); +goog.exportSymbol('proto.gogoproto.populateAll', null, global); +goog.exportSymbol('proto.gogoproto.protosizer', null, global); +goog.exportSymbol('proto.gogoproto.protosizerAll', null, global); +goog.exportSymbol('proto.gogoproto.sizer', null, global); +goog.exportSymbol('proto.gogoproto.sizerAll', null, global); +goog.exportSymbol('proto.gogoproto.stableMarshaler', null, global); +goog.exportSymbol('proto.gogoproto.stableMarshalerAll', null, global); +goog.exportSymbol('proto.gogoproto.stdduration', null, global); +goog.exportSymbol('proto.gogoproto.stdtime', null, global); +goog.exportSymbol('proto.gogoproto.stringer', null, global); +goog.exportSymbol('proto.gogoproto.stringerAll', null, global); +goog.exportSymbol('proto.gogoproto.testgen', null, global); +goog.exportSymbol('proto.gogoproto.testgenAll', null, global); +goog.exportSymbol('proto.gogoproto.typedecl', null, global); +goog.exportSymbol('proto.gogoproto.typedeclAll', null, global); +goog.exportSymbol('proto.gogoproto.unmarshaler', null, global); +goog.exportSymbol('proto.gogoproto.unmarshalerAll', null, global); +goog.exportSymbol('proto.gogoproto.unsafeMarshaler', null, global); +goog.exportSymbol('proto.gogoproto.unsafeMarshalerAll', null, global); +goog.exportSymbol('proto.gogoproto.unsafeUnmarshaler', null, global); +goog.exportSymbol('proto.gogoproto.unsafeUnmarshalerAll', null, global); +goog.exportSymbol('proto.gogoproto.verboseEqual', null, global); +goog.exportSymbol('proto.gogoproto.verboseEqualAll', null, global); +goog.exportSymbol('proto.gogoproto.wktpointer', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoEnumPrefix`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoEnumPrefix = new jspb.ExtensionFieldInfo( + 62001, + {goprotoEnumPrefix: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[62001] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoEnumPrefix, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[62001] = proto.gogoproto.goprotoEnumPrefix; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoEnumStringer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoEnumStringer = new jspb.ExtensionFieldInfo( + 62021, + {goprotoEnumStringer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[62021] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoEnumStringer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[62021] = proto.gogoproto.goprotoEnumStringer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumStringer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumStringer = new jspb.ExtensionFieldInfo( + 62022, + {enumStringer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[62022] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumStringer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[62022] = proto.gogoproto.enumStringer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumCustomname`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumCustomname = new jspb.ExtensionFieldInfo( + 62023, + {enumCustomname: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[62023] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumCustomname, + 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.EnumOptions.extensions[62023] = proto.gogoproto.enumCustomname; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumdecl`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumdecl = new jspb.ExtensionFieldInfo( + 62024, + {enumdecl: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumOptions.extensionsBinary[62024] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumdecl, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.EnumOptions.extensions[62024] = proto.gogoproto.enumdecl; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumvalueCustomname`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumvalueCustomname = new jspb.ExtensionFieldInfo( + 66001, + {enumvalueCustomname: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.EnumValueOptions.extensionsBinary[66001] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumvalueCustomname, + 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.EnumValueOptions.extensions[66001] = proto.gogoproto.enumvalueCustomname; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoGettersAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoGettersAll = new jspb.ExtensionFieldInfo( + 63001, + {goprotoGettersAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63001] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoGettersAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63001] = proto.gogoproto.goprotoGettersAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoEnumPrefixAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoEnumPrefixAll = new jspb.ExtensionFieldInfo( + 63002, + {goprotoEnumPrefixAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63002] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoEnumPrefixAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63002] = proto.gogoproto.goprotoEnumPrefixAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoStringerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoStringerAll = new jspb.ExtensionFieldInfo( + 63003, + {goprotoStringerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63003] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoStringerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63003] = proto.gogoproto.goprotoStringerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `verboseEqualAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.verboseEqualAll = new jspb.ExtensionFieldInfo( + 63004, + {verboseEqualAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63004] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.verboseEqualAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63004] = proto.gogoproto.verboseEqualAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `faceAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.faceAll = new jspb.ExtensionFieldInfo( + 63005, + {faceAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63005] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.faceAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63005] = proto.gogoproto.faceAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `gostringAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.gostringAll = new jspb.ExtensionFieldInfo( + 63006, + {gostringAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63006] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.gostringAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63006] = proto.gogoproto.gostringAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `populateAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.populateAll = new jspb.ExtensionFieldInfo( + 63007, + {populateAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63007] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.populateAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63007] = proto.gogoproto.populateAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stringerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stringerAll = new jspb.ExtensionFieldInfo( + 63008, + {stringerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63008] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stringerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63008] = proto.gogoproto.stringerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `onlyoneAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.onlyoneAll = new jspb.ExtensionFieldInfo( + 63009, + {onlyoneAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63009] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.onlyoneAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63009] = proto.gogoproto.onlyoneAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `equalAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.equalAll = new jspb.ExtensionFieldInfo( + 63013, + {equalAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63013] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.equalAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63013] = proto.gogoproto.equalAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `descriptionAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.descriptionAll = new jspb.ExtensionFieldInfo( + 63014, + {descriptionAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63014] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.descriptionAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63014] = proto.gogoproto.descriptionAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `testgenAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.testgenAll = new jspb.ExtensionFieldInfo( + 63015, + {testgenAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63015] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.testgenAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63015] = proto.gogoproto.testgenAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `benchgenAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.benchgenAll = new jspb.ExtensionFieldInfo( + 63016, + {benchgenAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63016] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.benchgenAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63016] = proto.gogoproto.benchgenAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `marshalerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.marshalerAll = new jspb.ExtensionFieldInfo( + 63017, + {marshalerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63017] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.marshalerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63017] = proto.gogoproto.marshalerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unmarshalerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unmarshalerAll = new jspb.ExtensionFieldInfo( + 63018, + {unmarshalerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63018] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unmarshalerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63018] = proto.gogoproto.unmarshalerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stableMarshalerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stableMarshalerAll = new jspb.ExtensionFieldInfo( + 63019, + {stableMarshalerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63019] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stableMarshalerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63019] = proto.gogoproto.stableMarshalerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `sizerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.sizerAll = new jspb.ExtensionFieldInfo( + 63020, + {sizerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63020] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.sizerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63020] = proto.gogoproto.sizerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoEnumStringerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoEnumStringerAll = new jspb.ExtensionFieldInfo( + 63021, + {goprotoEnumStringerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63021] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoEnumStringerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63021] = proto.gogoproto.goprotoEnumStringerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumStringerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumStringerAll = new jspb.ExtensionFieldInfo( + 63022, + {enumStringerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63022] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumStringerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63022] = proto.gogoproto.enumStringerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unsafeMarshalerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unsafeMarshalerAll = new jspb.ExtensionFieldInfo( + 63023, + {unsafeMarshalerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63023] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unsafeMarshalerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63023] = proto.gogoproto.unsafeMarshalerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unsafeUnmarshalerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unsafeUnmarshalerAll = new jspb.ExtensionFieldInfo( + 63024, + {unsafeUnmarshalerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63024] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unsafeUnmarshalerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63024] = proto.gogoproto.unsafeUnmarshalerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoExtensionsMapAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoExtensionsMapAll = new jspb.ExtensionFieldInfo( + 63025, + {goprotoExtensionsMapAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63025] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoExtensionsMapAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63025] = proto.gogoproto.goprotoExtensionsMapAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoUnrecognizedAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoUnrecognizedAll = new jspb.ExtensionFieldInfo( + 63026, + {goprotoUnrecognizedAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63026] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoUnrecognizedAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63026] = proto.gogoproto.goprotoUnrecognizedAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `gogoprotoImport`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.gogoprotoImport = new jspb.ExtensionFieldInfo( + 63027, + {gogoprotoImport: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63027] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.gogoprotoImport, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63027] = proto.gogoproto.gogoprotoImport; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `protosizerAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.protosizerAll = new jspb.ExtensionFieldInfo( + 63028, + {protosizerAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63028] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.protosizerAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63028] = proto.gogoproto.protosizerAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `compareAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.compareAll = new jspb.ExtensionFieldInfo( + 63029, + {compareAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63029] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.compareAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63029] = proto.gogoproto.compareAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `typedeclAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.typedeclAll = new jspb.ExtensionFieldInfo( + 63030, + {typedeclAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63030] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.typedeclAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63030] = proto.gogoproto.typedeclAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `enumdeclAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.enumdeclAll = new jspb.ExtensionFieldInfo( + 63031, + {enumdeclAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63031] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.enumdeclAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63031] = proto.gogoproto.enumdeclAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoRegistration`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoRegistration = new jspb.ExtensionFieldInfo( + 63032, + {goprotoRegistration: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63032] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoRegistration, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63032] = proto.gogoproto.goprotoRegistration; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `messagenameAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.messagenameAll = new jspb.ExtensionFieldInfo( + 63033, + {messagenameAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63033] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.messagenameAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63033] = proto.gogoproto.messagenameAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoSizecacheAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoSizecacheAll = new jspb.ExtensionFieldInfo( + 63034, + {goprotoSizecacheAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63034] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoSizecacheAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63034] = proto.gogoproto.goprotoSizecacheAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoUnkeyedAll`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoUnkeyedAll = new jspb.ExtensionFieldInfo( + 63035, + {goprotoUnkeyedAll: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FileOptions.extensionsBinary[63035] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoUnkeyedAll, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FileOptions.extensions[63035] = proto.gogoproto.goprotoUnkeyedAll; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoGetters`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoGetters = new jspb.ExtensionFieldInfo( + 64001, + {goprotoGetters: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64001] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoGetters, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64001] = proto.gogoproto.goprotoGetters; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoStringer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoStringer = new jspb.ExtensionFieldInfo( + 64003, + {goprotoStringer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64003] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoStringer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64003] = proto.gogoproto.goprotoStringer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `verboseEqual`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.verboseEqual = new jspb.ExtensionFieldInfo( + 64004, + {verboseEqual: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64004] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.verboseEqual, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64004] = proto.gogoproto.verboseEqual; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `face`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.face = new jspb.ExtensionFieldInfo( + 64005, + {face: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64005] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.face, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64005] = proto.gogoproto.face; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `gostring`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.gostring = new jspb.ExtensionFieldInfo( + 64006, + {gostring: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64006] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.gostring, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64006] = proto.gogoproto.gostring; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `populate`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.populate = new jspb.ExtensionFieldInfo( + 64007, + {populate: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64007] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.populate, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64007] = proto.gogoproto.populate; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stringer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stringer = new jspb.ExtensionFieldInfo( + 67008, + {stringer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[67008] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stringer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[67008] = proto.gogoproto.stringer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `onlyone`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.onlyone = new jspb.ExtensionFieldInfo( + 64009, + {onlyone: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64009] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.onlyone, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64009] = proto.gogoproto.onlyone; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `equal`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.equal = new jspb.ExtensionFieldInfo( + 64013, + {equal: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64013] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.equal, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64013] = proto.gogoproto.equal; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `description`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.description = new jspb.ExtensionFieldInfo( + 64014, + {description: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64014] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.description, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64014] = proto.gogoproto.description; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `testgen`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.testgen = new jspb.ExtensionFieldInfo( + 64015, + {testgen: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64015] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.testgen, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64015] = proto.gogoproto.testgen; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `benchgen`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.benchgen = new jspb.ExtensionFieldInfo( + 64016, + {benchgen: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64016] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.benchgen, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64016] = proto.gogoproto.benchgen; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `marshaler`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.marshaler = new jspb.ExtensionFieldInfo( + 64017, + {marshaler: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64017] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.marshaler, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64017] = proto.gogoproto.marshaler; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unmarshaler`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unmarshaler = new jspb.ExtensionFieldInfo( + 64018, + {unmarshaler: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64018] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unmarshaler, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64018] = proto.gogoproto.unmarshaler; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stableMarshaler`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stableMarshaler = new jspb.ExtensionFieldInfo( + 64019, + {stableMarshaler: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64019] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stableMarshaler, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64019] = proto.gogoproto.stableMarshaler; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `sizer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.sizer = new jspb.ExtensionFieldInfo( + 64020, + {sizer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64020] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.sizer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64020] = proto.gogoproto.sizer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unsafeMarshaler`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unsafeMarshaler = new jspb.ExtensionFieldInfo( + 64023, + {unsafeMarshaler: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64023] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unsafeMarshaler, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64023] = proto.gogoproto.unsafeMarshaler; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `unsafeUnmarshaler`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.unsafeUnmarshaler = new jspb.ExtensionFieldInfo( + 64024, + {unsafeUnmarshaler: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64024] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.unsafeUnmarshaler, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64024] = proto.gogoproto.unsafeUnmarshaler; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoExtensionsMap`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoExtensionsMap = new jspb.ExtensionFieldInfo( + 64025, + {goprotoExtensionsMap: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64025] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoExtensionsMap, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64025] = proto.gogoproto.goprotoExtensionsMap; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoUnrecognized`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoUnrecognized = new jspb.ExtensionFieldInfo( + 64026, + {goprotoUnrecognized: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64026] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoUnrecognized, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64026] = proto.gogoproto.goprotoUnrecognized; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `protosizer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.protosizer = new jspb.ExtensionFieldInfo( + 64028, + {protosizer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64028] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.protosizer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64028] = proto.gogoproto.protosizer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `compare`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.compare = new jspb.ExtensionFieldInfo( + 64029, + {compare: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64029] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.compare, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64029] = proto.gogoproto.compare; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `typedecl`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.typedecl = new jspb.ExtensionFieldInfo( + 64030, + {typedecl: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64030] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.typedecl, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64030] = proto.gogoproto.typedecl; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `messagename`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.messagename = new jspb.ExtensionFieldInfo( + 64033, + {messagename: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64033] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.messagename, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64033] = proto.gogoproto.messagename; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoSizecache`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoSizecache = new jspb.ExtensionFieldInfo( + 64034, + {goprotoSizecache: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64034] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoSizecache, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64034] = proto.gogoproto.goprotoSizecache; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `goprotoUnkeyed`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.goprotoUnkeyed = new jspb.ExtensionFieldInfo( + 64035, + {goprotoUnkeyed: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[64035] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.goprotoUnkeyed, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MessageOptions.extensions[64035] = proto.gogoproto.goprotoUnkeyed; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `nullable`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.nullable = new jspb.ExtensionFieldInfo( + 65001, + {nullable: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65001] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.nullable, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65001] = proto.gogoproto.nullable; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `embed`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.embed = new jspb.ExtensionFieldInfo( + 65002, + {embed: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65002] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.embed, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65002] = proto.gogoproto.embed; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `customtype`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.customtype = new jspb.ExtensionFieldInfo( + 65003, + {customtype: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65003] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.customtype, + 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[65003] = proto.gogoproto.customtype; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `customname`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.customname = new jspb.ExtensionFieldInfo( + 65004, + {customname: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65004] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.customname, + 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[65004] = proto.gogoproto.customname; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `jsontag`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.jsontag = new jspb.ExtensionFieldInfo( + 65005, + {jsontag: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65005] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.jsontag, + 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[65005] = proto.gogoproto.jsontag; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `moretags`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.moretags = new jspb.ExtensionFieldInfo( + 65006, + {moretags: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65006] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.moretags, + 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[65006] = proto.gogoproto.moretags; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `casttype`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.casttype = new jspb.ExtensionFieldInfo( + 65007, + {casttype: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65007] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.casttype, + 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[65007] = proto.gogoproto.casttype; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `castkey`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.castkey = new jspb.ExtensionFieldInfo( + 65008, + {castkey: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65008] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.castkey, + 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[65008] = proto.gogoproto.castkey; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `castvalue`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.castvalue = new jspb.ExtensionFieldInfo( + 65009, + {castvalue: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65009] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.castvalue, + 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[65009] = proto.gogoproto.castvalue; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stdtime`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stdtime = new jspb.ExtensionFieldInfo( + 65010, + {stdtime: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65010] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stdtime, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65010] = proto.gogoproto.stdtime; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `stdduration`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.stdduration = new jspb.ExtensionFieldInfo( + 65011, + {stdduration: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65011] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.stdduration, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65011] = proto.gogoproto.stdduration; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `wktpointer`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.wktpointer = new jspb.ExtensionFieldInfo( + 65012, + {wktpointer: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65012] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.wktpointer, + jspb.BinaryReader.prototype.readBool, + jspb.BinaryWriter.prototype.writeBool, + undefined, + undefined, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.FieldOptions.extensions[65012] = proto.gogoproto.wktpointer; + + +/** + * A tuple of {field number, class constructor} for the extension + * field named `castrepeated`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.gogoproto.castrepeated = new jspb.ExtensionFieldInfo( + 65013, + {castrepeated: 0}, + null, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + null), + 0); + +google_protobuf_descriptor_pb.FieldOptions.extensionsBinary[65013] = new jspb.ExtensionFieldBinaryInfo( + proto.gogoproto.castrepeated, + 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[65013] = proto.gogoproto.castrepeated; + +goog.object.extend(exports, proto.gogoproto); diff --git a/src/types/proto-types/google/api/annotations_pb.js b/src/types/proto-types/google/api/annotations_pb.js new file mode 100644 index 00000000..2341dbed --- /dev/null +++ b/src/types/proto-types/google/api/annotations_pb.js @@ -0,0 +1,45 @@ +// source: google/api/annotations.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_api_http_pb = require('../../google/api/http_pb.js'); +goog.object.extend(proto, google_api_http_pb); +var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); +goog.object.extend(proto, google_protobuf_descriptor_pb); +goog.exportSymbol('proto.google.api.http', null, global); + +/** + * A tuple of {field number, class constructor} for the extension + * field named `http`. + * @type {!jspb.ExtensionFieldInfo} + */ +proto.google.api.http = new jspb.ExtensionFieldInfo( + 72295728, + {http: 0}, + google_api_http_pb.HttpRule, + /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( + google_api_http_pb.HttpRule.toObject), + 0); + +google_protobuf_descriptor_pb.MethodOptions.extensionsBinary[72295728] = new jspb.ExtensionFieldBinaryInfo( + proto.google.api.http, + jspb.BinaryReader.prototype.readMessage, + jspb.BinaryWriter.prototype.writeMessage, + google_api_http_pb.HttpRule.serializeBinaryToWriter, + google_api_http_pb.HttpRule.deserializeBinaryFromReader, + false); +// This registers the extension field with the extended class, so that +// toObject() will function correctly. +google_protobuf_descriptor_pb.MethodOptions.extensions[72295728] = proto.google.api.http; + +goog.object.extend(exports, proto.google.api); diff --git a/src/types/proto-types/google/api/http_pb.js b/src/types/proto-types/google/api/http_pb.js new file mode 100644 index 00000000..b59093d9 --- /dev/null +++ b/src/types/proto-types/google/api/http_pb.js @@ -0,0 +1,1003 @@ +// source: google/api/http.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.google.api.CustomHttpPattern', null, global); +goog.exportSymbol('proto.google.api.Http', null, global); +goog.exportSymbol('proto.google.api.HttpRule', null, global); +goog.exportSymbol('proto.google.api.HttpRule.PatternCase', 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.google.api.Http = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Http.repeatedFields_, null); +}; +goog.inherits(proto.google.api.Http, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.Http.displayName = 'proto.google.api.Http'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.HttpRule = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.HttpRule.repeatedFields_, proto.google.api.HttpRule.oneofGroups_); +}; +goog.inherits(proto.google.api.HttpRule, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.HttpRule.displayName = 'proto.google.api.HttpRule'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.google.api.CustomHttpPattern = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.api.CustomHttpPattern, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.CustomHttpPattern.displayName = 'proto.google.api.CustomHttpPattern'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.Http.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.google.api.Http.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.Http.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.Http} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Http.toObject = function(includeInstance, msg) { + var f, obj = { + rulesList: jspb.Message.toObjectList(msg.getRulesList(), + proto.google.api.HttpRule.toObject, includeInstance), + fullyDecodeReservedExpansion: 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.google.api.Http} + */ +proto.google.api.Http.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.Http; + return proto.google.api.Http.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.Http} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.Http} + */ +proto.google.api.Http.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.google.api.HttpRule; + reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); + msg.addRules(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setFullyDecodeReservedExpansion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.Http.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.Http.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.Http} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.Http.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRulesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.google.api.HttpRule.serializeBinaryToWriter + ); + } + f = message.getFullyDecodeReservedExpansion(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * repeated HttpRule rules = 1; + * @return {!Array} + */ +proto.google.api.Http.prototype.getRulesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.Http} returns this +*/ +proto.google.api.Http.prototype.setRulesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.google.api.HttpRule=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.Http.prototype.addRules = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.HttpRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.Http} returns this + */ +proto.google.api.Http.prototype.clearRulesList = function() { + return this.setRulesList([]); +}; + + +/** + * optional bool fully_decode_reserved_expansion = 2; + * @return {boolean} + */ +proto.google.api.Http.prototype.getFullyDecodeReservedExpansion = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.google.api.Http} returns this + */ +proto.google.api.Http.prototype.setFullyDecodeReservedExpansion = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.HttpRule.repeatedFields_ = [11]; + +/** + * 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.google.api.HttpRule.oneofGroups_ = [[2,3,4,5,6,8]]; + +/** + * @enum {number} + */ +proto.google.api.HttpRule.PatternCase = { + PATTERN_NOT_SET: 0, + GET: 2, + PUT: 3, + POST: 4, + DELETE: 5, + PATCH: 6, + CUSTOM: 8 +}; + +/** + * @return {proto.google.api.HttpRule.PatternCase} + */ +proto.google.api.HttpRule.prototype.getPatternCase = function() { + return /** @type {proto.google.api.HttpRule.PatternCase} */(jspb.Message.computeOneofCase(this, proto.google.api.HttpRule.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.google.api.HttpRule.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.HttpRule.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.HttpRule} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpRule.toObject = function(includeInstance, msg) { + var f, obj = { + selector: jspb.Message.getFieldWithDefault(msg, 1, ""), + get: jspb.Message.getFieldWithDefault(msg, 2, ""), + put: jspb.Message.getFieldWithDefault(msg, 3, ""), + post: jspb.Message.getFieldWithDefault(msg, 4, ""), + pb_delete: jspb.Message.getFieldWithDefault(msg, 5, ""), + patch: jspb.Message.getFieldWithDefault(msg, 6, ""), + custom: (f = msg.getCustom()) && proto.google.api.CustomHttpPattern.toObject(includeInstance, f), + body: jspb.Message.getFieldWithDefault(msg, 7, ""), + responseBody: jspb.Message.getFieldWithDefault(msg, 12, ""), + additionalBindingsList: jspb.Message.toObjectList(msg.getAdditionalBindingsList(), + proto.google.api.HttpRule.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.google.api.HttpRule} + */ +proto.google.api.HttpRule.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.HttpRule; + return proto.google.api.HttpRule.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.HttpRule} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.HttpRule.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.setSelector(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setGet(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPut(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPost(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDelete(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setPatch(value); + break; + case 8: + var value = new proto.google.api.CustomHttpPattern; + reader.readMessage(value,proto.google.api.CustomHttpPattern.deserializeBinaryFromReader); + msg.setCustom(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setBody(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setResponseBody(value); + break; + case 11: + var value = new proto.google.api.HttpRule; + reader.readMessage(value,proto.google.api.HttpRule.deserializeBinaryFromReader); + msg.addAdditionalBindings(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.HttpRule.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.HttpRule.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.HttpRule} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpRule.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSelector(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeString( + 4, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( + 5, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeString( + 6, + f + ); + } + f = message.getCustom(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.google.api.CustomHttpPattern.serializeBinaryToWriter + ); + } + f = message.getBody(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getResponseBody(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getAdditionalBindingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + proto.google.api.HttpRule.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string selector = 1; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getSelector = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setSelector = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string get = 2; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getGet = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setGet = function(value) { + return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearGet = function() { + return jspb.Message.setOneofField(this, 2, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasGet = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string put = 3; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPut = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPut = function(value) { + return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPut = function() { + return jspb.Message.setOneofField(this, 3, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPut = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string post = 4; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPost = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPost = function(value) { + return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPost = function() { + return jspb.Message.setOneofField(this, 4, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPost = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string delete = 5; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getDelete = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setDelete = function(value) { + return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearDelete = function() { + return jspb.Message.setOneofField(this, 5, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasDelete = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional string patch = 6; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getPatch = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setPatch = function(value) { + return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearPatch = function() { + return jspb.Message.setOneofField(this, 6, proto.google.api.HttpRule.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasPatch = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional CustomHttpPattern custom = 8; + * @return {?proto.google.api.CustomHttpPattern} + */ +proto.google.api.HttpRule.prototype.getCustom = function() { + return /** @type{?proto.google.api.CustomHttpPattern} */ ( + jspb.Message.getWrapperField(this, proto.google.api.CustomHttpPattern, 8)); +}; + + +/** + * @param {?proto.google.api.CustomHttpPattern|undefined} value + * @return {!proto.google.api.HttpRule} returns this +*/ +proto.google.api.HttpRule.prototype.setCustom = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.HttpRule.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearCustom = function() { + return this.setCustom(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.google.api.HttpRule.prototype.hasCustom = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string body = 7; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getBody = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setBody = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string response_body = 12; + * @return {string} + */ +proto.google.api.HttpRule.prototype.getResponseBody = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.setResponseBody = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * repeated HttpRule additional_bindings = 11; + * @return {!Array} + */ +proto.google.api.HttpRule.prototype.getAdditionalBindingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.google.api.HttpRule, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.HttpRule} returns this +*/ +proto.google.api.HttpRule.prototype.setAdditionalBindingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); +}; + + +/** + * @param {!proto.google.api.HttpRule=} opt_value + * @param {number=} opt_index + * @return {!proto.google.api.HttpRule} + */ +proto.google.api.HttpRule.prototype.addAdditionalBindings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.google.api.HttpRule, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.HttpRule} returns this + */ +proto.google.api.HttpRule.prototype.clearAdditionalBindingsList = function() { + return this.setAdditionalBindingsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.api.CustomHttpPattern.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.CustomHttpPattern.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.CustomHttpPattern} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.CustomHttpPattern.toObject = function(includeInstance, msg) { + var f, obj = { + kind: jspb.Message.getFieldWithDefault(msg, 1, ""), + path: 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.google.api.CustomHttpPattern} + */ +proto.google.api.CustomHttpPattern.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.CustomHttpPattern; + return proto.google.api.CustomHttpPattern.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.CustomHttpPattern} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.CustomHttpPattern} + */ +proto.google.api.CustomHttpPattern.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.setKind(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPath(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.CustomHttpPattern.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.CustomHttpPattern.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.CustomHttpPattern} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.CustomHttpPattern.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKind(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string kind = 1; + * @return {string} + */ +proto.google.api.CustomHttpPattern.prototype.getKind = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.CustomHttpPattern} returns this + */ +proto.google.api.CustomHttpPattern.prototype.setKind = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string path = 2; + * @return {string} + */ +proto.google.api.CustomHttpPattern.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.CustomHttpPattern} returns this + */ +proto.google.api.CustomHttpPattern.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.api); diff --git a/src/types/proto-types/google/api/httpbody_pb.js b/src/types/proto-types/google/api/httpbody_pb.js new file mode 100644 index 00000000..af6eaf27 --- /dev/null +++ b/src/types/proto-types/google/api/httpbody_pb.js @@ -0,0 +1,283 @@ +// source: google/api/httpbody.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +goog.exportSymbol('proto.google.api.HttpBody', 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.google.api.HttpBody = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.HttpBody.repeatedFields_, null); +}; +goog.inherits(proto.google.api.HttpBody, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.api.HttpBody.displayName = 'proto.google.api.HttpBody'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.google.api.HttpBody.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.google.api.HttpBody.prototype.toObject = function(opt_includeInstance) { + return proto.google.api.HttpBody.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.api.HttpBody} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpBody.toObject = function(includeInstance, msg) { + var f, obj = { + contentType: jspb.Message.getFieldWithDefault(msg, 1, ""), + data: msg.getData_asB64(), + extensionsList: jspb.Message.toObjectList(msg.getExtensionsList(), + 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.google.api.HttpBody} + */ +proto.google.api.HttpBody.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.api.HttpBody; + return proto.google.api.HttpBody.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.api.HttpBody} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.api.HttpBody} + */ +proto.google.api.HttpBody.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.setContentType(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.addExtensions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.google.api.HttpBody.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.api.HttpBody.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.api.HttpBody} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.api.HttpBody.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContentType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getExtensionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string content_type = 1; + * @return {string} + */ +proto.google.api.HttpBody.prototype.getContentType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.api.HttpBody} returns this + */ +proto.google.api.HttpBody.prototype.setContentType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.google.api.HttpBody.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.google.api.HttpBody.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.google.api.HttpBody.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.api.HttpBody} returns this + */ +proto.google.api.HttpBody.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * repeated google.protobuf.Any extensions = 3; + * @return {!Array} + */ +proto.google.api.HttpBody.prototype.getExtensionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.google.api.HttpBody} returns this +*/ +proto.google.api.HttpBody.prototype.setExtensionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.google.protobuf.Any=} opt_value + * @param {number=} opt_index + * @return {!proto.google.protobuf.Any} + */ +proto.google.api.HttpBody.prototype.addExtensions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.Any, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.google.api.HttpBody} returns this + */ +proto.google.api.HttpBody.prototype.clearExtensionsList = function() { + return this.setExtensionsList([]); +}; + + +goog.object.extend(exports, proto.google.api); diff --git a/src/types/proto-types/google/protobuf/any_pb.js b/src/types/proto-types/google/protobuf/any_pb.js new file mode 100644 index 00000000..b8055533 --- /dev/null +++ b/src/types/proto-types/google/protobuf/any_pb.js @@ -0,0 +1,274 @@ +// source: google/protobuf/any.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.google.protobuf.Any', 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.google.protobuf.Any = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.google.protobuf.Any, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.google.protobuf.Any.displayName = 'proto.google.protobuf.Any'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.google.protobuf.Any.prototype.toObject = function(opt_includeInstance) { + return proto.google.protobuf.Any.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.google.protobuf.Any} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Any.toObject = function(includeInstance, msg) { + var f, obj = { + typeUrl: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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.google.protobuf.Any} + */ +proto.google.protobuf.Any.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.google.protobuf.Any; + return proto.google.protobuf.Any.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.google.protobuf.Any} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.google.protobuf.Any} + */ +proto.google.protobuf.Any.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.setTypeUrl(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.google.protobuf.Any.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.google.protobuf.Any.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.google.protobuf.Any} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.google.protobuf.Any.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTypeUrl(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string type_url = 1; + * @return {string} + */ +proto.google.protobuf.Any.prototype.getTypeUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.google.protobuf.Any} returns this + */ +proto.google.protobuf.Any.prototype.setTypeUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes value = 2; + * @return {!(string|Uint8Array)} + */ +proto.google.protobuf.Any.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.google.protobuf.Any.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.google.protobuf.Any.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.google.protobuf.Any} returns this + */ +proto.google.protobuf.Any.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +goog.object.extend(exports, proto.google.protobuf); +/* This code will be inserted into generated code for + * google/protobuf/any.proto. */ + +/** + * Returns the type name contained in this instance, if any. + * @return {string|undefined} + */ +proto.google.protobuf.Any.prototype.getTypeName = function() { + return this.getTypeUrl().split('/').pop(); +}; + + +/** + * Packs the given message instance into this Any. + * For binary format usage only. + * @param {!Uint8Array} serialized The serialized data to pack. + * @param {string} name The type name of this message object. + * @param {string=} opt_typeUrlPrefix the type URL prefix. + */ +proto.google.protobuf.Any.prototype.pack = function(serialized, name, + opt_typeUrlPrefix) { + if (!opt_typeUrlPrefix) { + opt_typeUrlPrefix = 'type.googleapis.com/'; + } + + if (opt_typeUrlPrefix.substr(-1) != '/') { + this.setTypeUrl(opt_typeUrlPrefix + '/' + name); + } else { + this.setTypeUrl(opt_typeUrlPrefix + name); + } + + this.setValue(serialized); +}; + + +/** + * @template T + * Unpacks this Any into the given message object. + * @param {function(Uint8Array):T} deserialize Function that will deserialize + * the binary data properly. + * @param {string} name The expected type name of this message object. + * @return {?T} If the name matched the expected name, returns the deserialized + * object, otherwise returns null. + */ +proto.google.protobuf.Any.prototype.unpack = function(deserialize, name) { + if (this.getTypeName() == name) { + return deserialize(this.getValue_asU8()); + } else { + return null; + } +}; diff --git a/src/types/proto-types/ibc/applications/transfer/v1/genesis_pb.js b/src/types/proto-types/ibc/applications/transfer/v1/genesis_pb.js new file mode 100644 index 00000000..aa9bc75d --- /dev/null +++ b/src/types/proto-types/ibc/applications/transfer/v1/genesis_pb.js @@ -0,0 +1,282 @@ +// source: ibc/applications/transfer/v1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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_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.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.applications.transfer.v1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.transfer.v1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.GenesisState.displayName = 'proto.ibc.applications.transfer.v1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.transfer.v1.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.ibc.applications.transfer.v1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.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.transfer.v1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + 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) + }; + + 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.GenesisState} + */ +proto.ibc.applications.transfer.v1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.GenesisState; + return proto.ibc.applications.transfer.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.transfer.v1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.GenesisState} + */ +proto.ibc.applications.transfer.v1.GenesisState.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_applications_transfer_v1_transfer_pb.DenomTrace; + reader.readMessage(value,ibc_applications_transfer_v1_transfer_pb.DenomTrace.deserializeBinaryFromReader); + msg.addDenomTraces(value); + break; + case 3: + 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.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.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.transfer.v1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomTracesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + ibc_applications_transfer_v1_transfer_pb.DenomTrace.serializeBinaryToWriter + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_applications_transfer_v1_transfer_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.GenesisState} returns this + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated DenomTrace denom_traces = 2; + * @return {!Array} + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.getDenomTracesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_applications_transfer_v1_transfer_pb.DenomTrace, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.transfer.v1.GenesisState} returns this +*/ +proto.ibc.applications.transfer.v1.GenesisState.prototype.setDenomTracesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.applications.transfer.v1.DenomTrace=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.transfer.v1.DenomTrace} + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.addDenomTraces = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.applications.transfer.v1.DenomTrace, 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.clearDenomTracesList = function() { + return this.setDenomTracesList([]); +}; + + +/** + * optional Params params = 3; + * @return {?proto.ibc.applications.transfer.v1.Params} + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.ibc.applications.transfer.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_applications_transfer_v1_transfer_pb.Params, 3)); +}; + + +/** + * @param {?proto.ibc.applications.transfer.v1.Params|undefined} value + * @return {!proto.ibc.applications.transfer.v1.GenesisState} returns this +*/ +proto.ibc.applications.transfer.v1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.transfer.v1.GenesisState} returns this + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +goog.object.extend(exports, proto.ibc.applications.transfer.v1); diff --git a/src/types/proto-types/ibc/applications/transfer/v1/query_grpc_web_pb.js b/src/types/proto-types/ibc/applications/transfer/v1/query_grpc_web_pb.js new file mode 100644 index 00000000..7ad5a167 --- /dev/null +++ b/src/types/proto-types/ibc/applications/transfer/v1/query_grpc_web_pb.js @@ -0,0 +1,325 @@ +/** + * @fileoverview gRPC-Web generated client stub for ibc.applications.transfer.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var ibc_applications_transfer_v1_transfer_pb = require('../../../../ibc/applications/transfer/v1/transfer_pb.js') + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js') +const proto = {}; +proto.ibc = {}; +proto.ibc.applications = {}; +proto.ibc.applications.transfer = {}; +proto.ibc.applications.transfer.v1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.applications.transfer.v1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.applications.transfer.v1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.applications.transfer.v1.QueryDenomTraceRequest, + * !proto.ibc.applications.transfer.v1.QueryDenomTraceResponse>} + */ +const methodDescriptor_Query_DenomTrace = new grpc.web.MethodDescriptor( + '/ibc.applications.transfer.v1.Query/DenomTrace', + grpc.web.MethodType.UNARY, + proto.ibc.applications.transfer.v1.QueryDenomTraceRequest, + proto.ibc.applications.transfer.v1.QueryDenomTraceResponse, + /** + * @param {!proto.ibc.applications.transfer.v1.QueryDenomTraceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.applications.transfer.v1.QueryDenomTraceRequest, + * !proto.ibc.applications.transfer.v1.QueryDenomTraceResponse>} + */ +const methodInfo_Query_DenomTrace = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.applications.transfer.v1.QueryDenomTraceResponse, + /** + * @param {!proto.ibc.applications.transfer.v1.QueryDenomTraceRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.applications.transfer.v1.QueryDenomTraceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.applications.transfer.v1.QueryDenomTraceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.applications.transfer.v1.QueryClient.prototype.denomTrace = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.applications.transfer.v1.Query/DenomTrace', + request, + metadata || {}, + methodDescriptor_Query_DenomTrace, + callback); +}; + + +/** + * @param {!proto.ibc.applications.transfer.v1.QueryDenomTraceRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.applications.transfer.v1.QueryPromiseClient.prototype.denomTrace = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.applications.transfer.v1.Query/DenomTrace', + request, + metadata || {}, + methodDescriptor_Query_DenomTrace); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.applications.transfer.v1.QueryDenomTracesRequest, + * !proto.ibc.applications.transfer.v1.QueryDenomTracesResponse>} + */ +const methodDescriptor_Query_DenomTraces = new grpc.web.MethodDescriptor( + '/ibc.applications.transfer.v1.Query/DenomTraces', + grpc.web.MethodType.UNARY, + proto.ibc.applications.transfer.v1.QueryDenomTracesRequest, + proto.ibc.applications.transfer.v1.QueryDenomTracesResponse, + /** + * @param {!proto.ibc.applications.transfer.v1.QueryDenomTracesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.applications.transfer.v1.QueryDenomTracesRequest, + * !proto.ibc.applications.transfer.v1.QueryDenomTracesResponse>} + */ +const methodInfo_Query_DenomTraces = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.applications.transfer.v1.QueryDenomTracesResponse, + /** + * @param {!proto.ibc.applications.transfer.v1.QueryDenomTracesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.applications.transfer.v1.QueryDenomTracesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.applications.transfer.v1.QueryDenomTracesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.applications.transfer.v1.QueryClient.prototype.denomTraces = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.applications.transfer.v1.Query/DenomTraces', + request, + metadata || {}, + methodDescriptor_Query_DenomTraces, + callback); +}; + + +/** + * @param {!proto.ibc.applications.transfer.v1.QueryDenomTracesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.applications.transfer.v1.QueryPromiseClient.prototype.denomTraces = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.applications.transfer.v1.Query/DenomTraces', + request, + metadata || {}, + methodDescriptor_Query_DenomTraces); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.applications.transfer.v1.QueryParamsRequest, + * !proto.ibc.applications.transfer.v1.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/ibc.applications.transfer.v1.Query/Params', + grpc.web.MethodType.UNARY, + proto.ibc.applications.transfer.v1.QueryParamsRequest, + proto.ibc.applications.transfer.v1.QueryParamsResponse, + /** + * @param {!proto.ibc.applications.transfer.v1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.applications.transfer.v1.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.applications.transfer.v1.QueryParamsRequest, + * !proto.ibc.applications.transfer.v1.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.applications.transfer.v1.QueryParamsResponse, + /** + * @param {!proto.ibc.applications.transfer.v1.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.applications.transfer.v1.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.applications.transfer.v1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.applications.transfer.v1.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.applications.transfer.v1.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.applications.transfer.v1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.ibc.applications.transfer.v1.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.applications.transfer.v1.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.applications.transfer.v1.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +module.exports = proto.ibc.applications.transfer.v1; + diff --git a/src/types/proto-types/ibc/applications/transfer/v1/query_pb.js b/src/types/proto-types/ibc/applications/transfer/v1/query_pb.js new file mode 100644 index 00000000..74f2fd7c --- /dev/null +++ b/src/types/proto-types/ibc/applications/transfer/v1/query_pb.js @@ -0,0 +1,1050 @@ +// source: ibc/applications/transfer/v1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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.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.QueryParamsRequest', null, global); +goog.exportSymbol('proto.ibc.applications.transfer.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.transfer.v1.QueryDenomTraceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryDenomTraceRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.displayName = 'proto.ibc.applications.transfer.v1.QueryDenomTraceRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDenomTraceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryDenomTraceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.displayName = 'proto.ibc.applications.transfer.v1.QueryDenomTraceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDenomTracesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryDenomTracesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.displayName = 'proto.ibc.applications.transfer.v1.QueryDenomTracesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryDenomTracesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryDenomTracesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.displayName = 'proto.ibc.applications.transfer.v1.QueryDenomTracesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryParamsRequest.displayName = 'proto.ibc.applications.transfer.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.transfer.v1.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.QueryParamsResponse.displayName = 'proto.ibc.applications.transfer.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.transfer.v1.QueryDenomTraceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDenomTraceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.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.QueryDenomTraceRequest} + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryDenomTraceRequest; + return proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.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.QueryDenomTraceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTraceRequest} + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.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.QueryDenomTraceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.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.QueryDenomTraceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.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.QueryDenomTraceRequest.prototype.getHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTraceRequest} returns this + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceRequest.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.QueryDenomTraceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDenomTraceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + denomTrace: (f = msg.getDenomTrace()) && ibc_applications_transfer_v1_transfer_pb.DenomTrace.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.QueryDenomTraceResponse} + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryDenomTraceResponse; + return proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.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.QueryDenomTraceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTraceResponse} + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_applications_transfer_v1_transfer_pb.DenomTrace; + reader.readMessage(value,ibc_applications_transfer_v1_transfer_pb.DenomTrace.deserializeBinaryFromReader); + msg.setDenomTrace(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.QueryDenomTraceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.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.QueryDenomTraceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomTrace(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_applications_transfer_v1_transfer_pb.DenomTrace.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DenomTrace denom_trace = 1; + * @return {?proto.ibc.applications.transfer.v1.DenomTrace} + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.prototype.getDenomTrace = function() { + return /** @type{?proto.ibc.applications.transfer.v1.DenomTrace} */ ( + jspb.Message.getWrapperField(this, ibc_applications_transfer_v1_transfer_pb.DenomTrace, 1)); +}; + + +/** + * @param {?proto.ibc.applications.transfer.v1.DenomTrace|undefined} value + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTraceResponse} returns this +*/ +proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.prototype.setDenomTrace = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTraceResponse} returns this + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.prototype.clearDenomTrace = function() { + return this.setDenomTrace(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.QueryDenomTraceResponse.prototype.hasDenomTrace = 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.transfer.v1.QueryDenomTracesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDenomTracesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.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.applications.transfer.v1.QueryDenomTracesRequest} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryDenomTracesRequest; + return proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.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.QueryDenomTracesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTracesRequest} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.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.applications.transfer.v1.QueryDenomTracesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.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.QueryDenomTracesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.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.applications.transfer.v1.QueryDenomTracesRequest.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.transfer.v1.QueryDenomTracesRequest} returns this +*/ +proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTracesRequest} returns this + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.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.QueryDenomTracesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryDenomTracesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + denomTracesList: jspb.Message.toObjectList(msg.getDenomTracesList(), + ibc_applications_transfer_v1_transfer_pb.DenomTrace.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.transfer.v1.QueryDenomTracesResponse} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryDenomTracesResponse; + return proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.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.QueryDenomTracesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTracesResponse} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new ibc_applications_transfer_v1_transfer_pb.DenomTrace; + reader.readMessage(value,ibc_applications_transfer_v1_transfer_pb.DenomTrace.deserializeBinaryFromReader); + msg.addDenomTraces(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.transfer.v1.QueryDenomTracesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.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.QueryDenomTracesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomTracesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_applications_transfer_v1_transfer_pb.DenomTrace.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DenomTrace denom_traces = 1; + * @return {!Array} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.prototype.getDenomTracesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_applications_transfer_v1_transfer_pb.DenomTrace, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTracesResponse} returns this +*/ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.prototype.setDenomTracesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.applications.transfer.v1.DenomTrace=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.applications.transfer.v1.DenomTrace} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.prototype.addDenomTraces = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.applications.transfer.v1.DenomTrace, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTracesResponse} returns this + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.prototype.clearDenomTracesList = function() { + return this.setDenomTracesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.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.transfer.v1.QueryDenomTracesResponse} returns this +*/ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.transfer.v1.QueryDenomTracesResponse} returns this + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.QueryDenomTracesResponse.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.transfer.v1.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.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.transfer.v1.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.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.transfer.v1.QueryParamsRequest} + */ +proto.ibc.applications.transfer.v1.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryParamsRequest; + return proto.ibc.applications.transfer.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.transfer.v1.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryParamsRequest} + */ +proto.ibc.applications.transfer.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.transfer.v1.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.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.transfer.v1.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.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.transfer.v1.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.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.transfer.v1.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + 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.QueryParamsResponse} + */ +proto.ibc.applications.transfer.v1.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.QueryParamsResponse; + return proto.ibc.applications.transfer.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.transfer.v1.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.QueryParamsResponse} + */ +proto.ibc.applications.transfer.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_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.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.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.transfer.v1.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_applications_transfer_v1_transfer_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.ibc.applications.transfer.v1.Params} + */ +proto.ibc.applications.transfer.v1.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.ibc.applications.transfer.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_applications_transfer_v1_transfer_pb.Params, 1)); +}; + + +/** + * @param {?proto.ibc.applications.transfer.v1.Params|undefined} value + * @return {!proto.ibc.applications.transfer.v1.QueryParamsResponse} returns this +*/ +proto.ibc.applications.transfer.v1.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.transfer.v1.QueryParamsResponse} returns this + */ +proto.ibc.applications.transfer.v1.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.ibc.applications.transfer.v1); diff --git a/src/types/proto-types/ibc/applications/transfer/v1/transfer_pb.js b/src/types/proto-types/ibc/applications/transfer/v1/transfer_pb.js new file mode 100644 index 00000000..f9936af6 --- /dev/null +++ b/src/types/proto-types/ibc/applications/transfer/v1/transfer_pb.js @@ -0,0 +1,623 @@ +// source: ibc/applications/transfer/v1/transfer.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +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 + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.DenomTrace = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.DenomTrace, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.DenomTrace.displayName = 'proto.ibc.applications.transfer.v1.DenomTrace'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.Params.displayName = 'proto.ibc.applications.transfer.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.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. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.DenomTrace.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.DenomTrace.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.DenomTrace} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.DenomTrace.toObject = function(includeInstance, msg) { + var f, obj = { + path: jspb.Message.getFieldWithDefault(msg, 1, ""), + baseDenom: 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.DenomTrace} + */ +proto.ibc.applications.transfer.v1.DenomTrace.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.DenomTrace; + return proto.ibc.applications.transfer.v1.DenomTrace.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.DenomTrace} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.DenomTrace} + */ +proto.ibc.applications.transfer.v1.DenomTrace.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 {string} */ (reader.readString()); + msg.setBaseDenom(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.DenomTrace.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.DenomTrace.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.DenomTrace} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.DenomTrace.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBaseDenom(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string path = 1; + * @return {string} + */ +proto.ibc.applications.transfer.v1.DenomTrace.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.DenomTrace} returns this + */ +proto.ibc.applications.transfer.v1.DenomTrace.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string base_denom = 2; + * @return {string} + */ +proto.ibc.applications.transfer.v1.DenomTrace.prototype.getBaseDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.DenomTrace} returns this + */ +proto.ibc.applications.transfer.v1.DenomTrace.prototype.setBaseDenom = 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.Params.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.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.transfer.v1.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.Params.toObject = function(includeInstance, msg) { + var f, obj = { + sendEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + receiveEnabled: 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.ibc.applications.transfer.v1.Params} + */ +proto.ibc.applications.transfer.v1.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.Params; + return proto.ibc.applications.transfer.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.transfer.v1.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.Params} + */ +proto.ibc.applications.transfer.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.setSendEnabled(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReceiveEnabled(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.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.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.transfer.v1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSendEnabled(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getReceiveEnabled(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional bool send_enabled = 1; + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.Params.prototype.getSendEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.applications.transfer.v1.Params} returns this + */ +proto.ibc.applications.transfer.v1.Params.prototype.setSendEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional bool receive_enabled = 2; + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.Params.prototype.getReceiveEnabled = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.applications.transfer.v1.Params} returns this + */ +proto.ibc.applications.transfer.v1.Params.prototype.setReceiveEnabled = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +goog.object.extend(exports, proto.ibc.applications.transfer.v1); diff --git a/src/types/proto-types/ibc/applications/transfer/v1/tx_grpc_web_pb.js b/src/types/proto-types/ibc/applications/transfer/v1/tx_grpc_web_pb.js new file mode 100644 index 00000000..f7206cb9 --- /dev/null +++ b/src/types/proto-types/ibc/applications/transfer/v1/tx_grpc_web_pb.js @@ -0,0 +1,163 @@ +/** + * @fileoverview gRPC-Web generated client stub for ibc.applications.transfer.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../../../cosmos/base/v1beta1/coin_pb.js') + +var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js') +const proto = {}; +proto.ibc = {}; +proto.ibc.applications = {}; +proto.ibc.applications.transfer = {}; +proto.ibc.applications.transfer.v1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.applications.transfer.v1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.applications.transfer.v1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.applications.transfer.v1.MsgTransfer, + * !proto.ibc.applications.transfer.v1.MsgTransferResponse>} + */ +const methodDescriptor_Msg_Transfer = new grpc.web.MethodDescriptor( + '/ibc.applications.transfer.v1.Msg/Transfer', + grpc.web.MethodType.UNARY, + proto.ibc.applications.transfer.v1.MsgTransfer, + proto.ibc.applications.transfer.v1.MsgTransferResponse, + /** + * @param {!proto.ibc.applications.transfer.v1.MsgTransfer} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.applications.transfer.v1.MsgTransferResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.applications.transfer.v1.MsgTransfer, + * !proto.ibc.applications.transfer.v1.MsgTransferResponse>} + */ +const methodInfo_Msg_Transfer = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.applications.transfer.v1.MsgTransferResponse, + /** + * @param {!proto.ibc.applications.transfer.v1.MsgTransfer} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.applications.transfer.v1.MsgTransferResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.applications.transfer.v1.MsgTransfer} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.applications.transfer.v1.MsgTransferResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.applications.transfer.v1.MsgClient.prototype.transfer = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.applications.transfer.v1.Msg/Transfer', + request, + metadata || {}, + methodDescriptor_Msg_Transfer, + callback); +}; + + +/** + * @param {!proto.ibc.applications.transfer.v1.MsgTransfer} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.applications.transfer.v1.MsgPromiseClient.prototype.transfer = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.applications.transfer.v1.Msg/Transfer', + request, + metadata || {}, + methodDescriptor_Msg_Transfer); +}; + + +module.exports = proto.ibc.applications.transfer.v1; + diff --git a/src/types/proto-types/ibc/applications/transfer/v1/tx_pb.js b/src/types/proto-types/ibc/applications/transfer/v1/tx_pb.js new file mode 100644 index 00000000..a12ab2c4 --- /dev/null +++ b/src/types/proto-types/ibc/applications/transfer/v1/tx_pb.js @@ -0,0 +1,518 @@ +// source: ibc/applications/transfer/v1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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); +goog.exportSymbol('proto.ibc.applications.transfer.v1.MsgTransfer', null, global); +goog.exportSymbol('proto.ibc.applications.transfer.v1.MsgTransferResponse', 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.MsgTransfer = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.MsgTransfer, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.MsgTransfer.displayName = 'proto.ibc.applications.transfer.v1.MsgTransfer'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgTransferResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.applications.transfer.v1.MsgTransferResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.applications.transfer.v1.MsgTransferResponse.displayName = 'proto.ibc.applications.transfer.v1.MsgTransferResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.MsgTransfer.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.MsgTransfer.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgTransfer} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.MsgTransfer.toObject = function(includeInstance, msg) { + var f, obj = { + sourcePort: jspb.Message.getFieldWithDefault(msg, 1, ""), + sourceChannel: jspb.Message.getFieldWithDefault(msg, 2, ""), + token: (f = msg.getToken()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + 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) + }; + + 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.MsgTransfer} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.MsgTransfer; + return proto.ibc.applications.transfer.v1.MsgTransfer.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.MsgTransfer} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.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.setToken(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setReceiver(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.setTimeoutHeight(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimeoutTimestamp(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.MsgTransfer.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.MsgTransfer.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.MsgTransfer} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.MsgTransfer.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.getToken(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getReceiver(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getTimeoutHeight(); + if (f != null) { + writer.writeMessage( + 6, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getTimeoutTimestamp(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } +}; + + +/** + * optional string source_port = 1; + * @return {string} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.getSourcePort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.setSourcePort = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string source_channel = 2; + * @return {string} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.getSourceChannel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.setSourceChannel = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin token = 3; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.getToken = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this +*/ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.setToken = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.clearToken = function() { + return this.setToken(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.hasToken = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string sender = 4; + * @return {string} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string receiver = 5; + * @return {string} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.getReceiver = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.setReceiver = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional ibc.core.client.v1.Height timeout_height = 6; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.getTimeoutHeight = 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.applications.transfer.v1.MsgTransfer} returns this +*/ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.setTimeoutHeight = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.clearTimeoutHeight = function() { + return this.setTimeoutHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.hasTimeoutHeight = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional uint64 timeout_timestamp = 7; + * @return {number} + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.getTimeoutTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.applications.transfer.v1.MsgTransfer} returns this + */ +proto.ibc.applications.transfer.v1.MsgTransfer.prototype.setTimeoutTimestamp = 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.applications.transfer.v1.MsgTransferResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.applications.transfer.v1.MsgTransferResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgTransferResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.MsgTransferResponse.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.MsgTransferResponse} + */ +proto.ibc.applications.transfer.v1.MsgTransferResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.applications.transfer.v1.MsgTransferResponse; + return proto.ibc.applications.transfer.v1.MsgTransferResponse.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.MsgTransferResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.applications.transfer.v1.MsgTransferResponse} + */ +proto.ibc.applications.transfer.v1.MsgTransferResponse.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.MsgTransferResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.applications.transfer.v1.MsgTransferResponse.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.MsgTransferResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.applications.transfer.v1.MsgTransferResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.ibc.applications.transfer.v1); diff --git a/src/types/proto-types/ibc/core/channel/v1/channel_pb.js b/src/types/proto-types/ibc/core/channel/v1/channel_pb.js new file mode 100644 index 00000000..be3aaa32 --- /dev/null +++ b/src/types/proto-types/ibc/core/channel/v1/channel_pb.js @@ -0,0 +1,1863 @@ +// source: ibc/core/channel/v1/channel.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.ibc.core.channel.v1.Acknowledgement', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.Acknowledgement.ResponseCase', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.Channel', null, global); +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.PacketState', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.State', 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.Channel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.Channel.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.Channel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.Channel.displayName = 'proto.ibc.core.channel.v1.Channel'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.IdentifiedChannel = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.IdentifiedChannel.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.IdentifiedChannel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.IdentifiedChannel.displayName = 'proto.ibc.core.channel.v1.IdentifiedChannel'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Counterparty = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.Counterparty, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.Counterparty.displayName = 'proto.ibc.core.channel.v1.Counterparty'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Packet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.Packet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.Packet.displayName = 'proto.ibc.core.channel.v1.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.ibc.core.channel.v1.PacketState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.PacketState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + 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.Acknowledgement = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ibc.core.channel.v1.Acknowledgement.oneofGroups_); +}; +goog.inherits(proto.ibc.core.channel.v1.Acknowledgement, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.Acknowledgement.displayName = 'proto.ibc.core.channel.v1.Acknowledgement'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.Channel.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.ibc.core.channel.v1.Channel.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.Channel.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Channel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Channel.toObject = function(includeInstance, msg) { + var f, obj = { + state: jspb.Message.getFieldWithDefault(msg, 1, 0), + 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, "") + }; + + 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.Channel} + */ +proto.ibc.core.channel.v1.Channel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.Channel; + return proto.ibc.core.channel.v1.Channel.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.Channel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.Channel} + */ +proto.ibc.core.channel.v1.Channel.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.State} */ (reader.readEnum()); + msg.setState(value); + break; + case 2: + var value = /** @type {!proto.ibc.core.channel.v1.Order} */ (reader.readEnum()); + msg.setOrdering(value); + break; + case 3: + var value = new proto.ibc.core.channel.v1.Counterparty; + reader.readMessage(value,proto.ibc.core.channel.v1.Counterparty.deserializeBinaryFromReader); + msg.setCounterparty(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.addConnectionHops(value); + break; + case 5: + 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.Channel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.Channel.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.Channel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Channel.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getOrdering(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getCounterparty(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.ibc.core.channel.v1.Counterparty.serializeBinaryToWriter + ); + } + f = message.getConnectionHopsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 4, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional State state = 1; + * @return {!proto.ibc.core.channel.v1.State} + */ +proto.ibc.core.channel.v1.Channel.prototype.getState = function() { + return /** @type {!proto.ibc.core.channel.v1.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.State} value + * @return {!proto.ibc.core.channel.v1.Channel} returns this + */ +proto.ibc.core.channel.v1.Channel.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional Order ordering = 2; + * @return {!proto.ibc.core.channel.v1.Order} + */ +proto.ibc.core.channel.v1.Channel.prototype.getOrdering = function() { + return /** @type {!proto.ibc.core.channel.v1.Order} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.Order} value + * @return {!proto.ibc.core.channel.v1.Channel} returns this + */ +proto.ibc.core.channel.v1.Channel.prototype.setOrdering = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional Counterparty counterparty = 3; + * @return {?proto.ibc.core.channel.v1.Counterparty} + */ +proto.ibc.core.channel.v1.Channel.prototype.getCounterparty = function() { + return /** @type{?proto.ibc.core.channel.v1.Counterparty} */ ( + jspb.Message.getWrapperField(this, proto.ibc.core.channel.v1.Counterparty, 3)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Counterparty|undefined} value + * @return {!proto.ibc.core.channel.v1.Channel} returns this +*/ +proto.ibc.core.channel.v1.Channel.prototype.setCounterparty = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.Channel} returns this + */ +proto.ibc.core.channel.v1.Channel.prototype.clearCounterparty = function() { + return this.setCounterparty(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.Channel.prototype.hasCounterparty = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated string connection_hops = 4; + * @return {!Array} + */ +proto.ibc.core.channel.v1.Channel.prototype.getConnectionHopsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.Channel} returns this + */ +proto.ibc.core.channel.v1.Channel.prototype.setConnectionHopsList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.Channel} returns this + */ +proto.ibc.core.channel.v1.Channel.prototype.addConnectionHops = 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.Channel} returns this + */ +proto.ibc.core.channel.v1.Channel.prototype.clearConnectionHopsList = function() { + return this.setConnectionHopsList([]); +}; + + +/** + * optional string version = 5; + * @return {string} + */ +proto.ibc.core.channel.v1.Channel.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.Channel} returns this + */ +proto.ibc.core.channel.v1.Channel.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.IdentifiedChannel.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.ibc.core.channel.v1.IdentifiedChannel.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.IdentifiedChannel.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.IdentifiedChannel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.IdentifiedChannel.toObject = function(includeInstance, msg) { + var f, obj = { + state: jspb.Message.getFieldWithDefault(msg, 1, 0), + 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, ""), + portId: jspb.Message.getFieldWithDefault(msg, 6, ""), + channelId: 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.IdentifiedChannel} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.IdentifiedChannel; + return proto.ibc.core.channel.v1.IdentifiedChannel.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.IdentifiedChannel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.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.State} */ (reader.readEnum()); + msg.setState(value); + break; + case 2: + var value = /** @type {!proto.ibc.core.channel.v1.Order} */ (reader.readEnum()); + msg.setOrdering(value); + break; + case 3: + var value = new proto.ibc.core.channel.v1.Counterparty; + reader.readMessage(value,proto.ibc.core.channel.v1.Counterparty.deserializeBinaryFromReader); + msg.setCounterparty(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.addConnectionHops(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setPortId(value); + break; + case 7: + 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.IdentifiedChannel.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.IdentifiedChannel.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.IdentifiedChannel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.IdentifiedChannel.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getOrdering(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getCounterparty(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.ibc.core.channel.v1.Counterparty.serializeBinaryToWriter + ); + } + f = message.getConnectionHopsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 4, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getPortId(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getChannelId(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional State state = 1; + * @return {!proto.ibc.core.channel.v1.State} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getState = function() { + return /** @type {!proto.ibc.core.channel.v1.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.State} value + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional Order ordering = 2; + * @return {!proto.ibc.core.channel.v1.Order} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getOrdering = function() { + return /** @type {!proto.ibc.core.channel.v1.Order} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.Order} value + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setOrdering = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional Counterparty counterparty = 3; + * @return {?proto.ibc.core.channel.v1.Counterparty} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getCounterparty = function() { + return /** @type{?proto.ibc.core.channel.v1.Counterparty} */ ( + jspb.Message.getWrapperField(this, proto.ibc.core.channel.v1.Counterparty, 3)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Counterparty|undefined} value + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this +*/ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setCounterparty = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.clearCounterparty = function() { + return this.setCounterparty(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.hasCounterparty = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated string connection_hops = 4; + * @return {!Array} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getConnectionHopsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setConnectionHopsList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.addConnectionHops = 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.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.clearConnectionHopsList = function() { + return this.setConnectionHopsList([]); +}; + + +/** + * optional string version = 5; + * @return {string} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string port_id = 6; + * @return {string} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string channel_id = 7; + * @return {string} + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this + */ +proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setChannelId = 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.Counterparty.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.Counterparty.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Counterparty} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Counterparty.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.Counterparty} + */ +proto.ibc.core.channel.v1.Counterparty.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.Counterparty; + return proto.ibc.core.channel.v1.Counterparty.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.Counterparty} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.Counterparty} + */ +proto.ibc.core.channel.v1.Counterparty.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.Counterparty.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.Counterparty.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.Counterparty} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Counterparty.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.Counterparty.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.Counterparty} returns this + */ +proto.ibc.core.channel.v1.Counterparty.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.Counterparty.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.Counterparty} returns this + */ +proto.ibc.core.channel.v1.Counterparty.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.Packet.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.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.ibc.core.channel.v1.Packet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Packet.toObject = function(includeInstance, msg) { + var f, obj = { + sequence: jspb.Message.getFieldWithDefault(msg, 1, 0), + sourcePort: jspb.Message.getFieldWithDefault(msg, 2, ""), + sourceChannel: jspb.Message.getFieldWithDefault(msg, 3, ""), + destinationPort: jspb.Message.getFieldWithDefault(msg, 4, ""), + destinationChannel: jspb.Message.getFieldWithDefault(msg, 5, ""), + data: msg.getData_asB64(), + timeoutHeight: (f = msg.getTimeoutHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + timeoutTimestamp: 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.ibc.core.channel.v1.Packet} + */ +proto.ibc.core.channel.v1.Packet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.Packet; + return proto.ibc.core.channel.v1.Packet.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.Packet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.Packet} + */ +proto.ibc.core.channel.v1.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.setSequence(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSourcePort(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSourceChannel(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setDestinationPort(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setDestinationChannel(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(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.setTimeoutHeight(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimeoutTimestamp(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.Packet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.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.ibc.core.channel.v1.Packet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.Packet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequence(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSourcePort(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSourceChannel(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDestinationPort(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getDestinationChannel(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getTimeoutHeight(); + if (f != null) { + writer.writeMessage( + 7, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getTimeoutTimestamp(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } +}; + + +/** + * optional uint64 sequence = 1; + * @return {number} + */ +proto.ibc.core.channel.v1.Packet.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.Packet} returns this + */ +proto.ibc.core.channel.v1.Packet.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string source_port = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.Packet.prototype.getSourcePort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.Packet} returns this + */ +proto.ibc.core.channel.v1.Packet.prototype.setSourcePort = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string source_channel = 3; + * @return {string} + */ +proto.ibc.core.channel.v1.Packet.prototype.getSourceChannel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.Packet} returns this + */ +proto.ibc.core.channel.v1.Packet.prototype.setSourceChannel = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string destination_port = 4; + * @return {string} + */ +proto.ibc.core.channel.v1.Packet.prototype.getDestinationPort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.Packet} returns this + */ +proto.ibc.core.channel.v1.Packet.prototype.setDestinationPort = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string destination_channel = 5; + * @return {string} + */ +proto.ibc.core.channel.v1.Packet.prototype.getDestinationChannel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.Packet} returns this + */ +proto.ibc.core.channel.v1.Packet.prototype.setDestinationChannel = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional bytes data = 6; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.Packet.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes data = 6; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.ibc.core.channel.v1.Packet.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 6; + * 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.core.channel.v1.Packet.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.Packet} returns this + */ +proto.ibc.core.channel.v1.Packet.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional ibc.core.client.v1.Height timeout_height = 7; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.Packet.prototype.getTimeoutHeight = 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.Packet} returns this +*/ +proto.ibc.core.channel.v1.Packet.prototype.setTimeoutHeight = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.Packet} returns this + */ +proto.ibc.core.channel.v1.Packet.prototype.clearTimeoutHeight = function() { + return this.setTimeoutHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.Packet.prototype.hasTimeoutHeight = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional uint64 timeout_timestamp = 8; + * @return {number} + */ +proto.ibc.core.channel.v1.Packet.prototype.getTimeoutTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.Packet} returns this + */ +proto.ibc.core.channel.v1.Packet.prototype.setTimeoutTimestamp = 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.ibc.core.channel.v1.PacketState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.PacketState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.PacketState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.PacketState.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + sequence: jspb.Message.getFieldWithDefault(msg, 3, 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.core.channel.v1.PacketState} + */ +proto.ibc.core.channel.v1.PacketState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.PacketState; + return proto.ibc.core.channel.v1.PacketState.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.PacketState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.PacketState} + */ +proto.ibc.core.channel.v1.PacketState.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.setSequence(value); + break; + case 4: + 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.core.channel.v1.PacketState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.PacketState.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.PacketState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.PacketState.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.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.PacketState.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.PacketState} returns this + */ +proto.ibc.core.channel.v1.PacketState.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.PacketState.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.PacketState} returns this + */ +proto.ibc.core.channel.v1.PacketState.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 sequence = 3; + * @return {number} + */ +proto.ibc.core.channel.v1.PacketState.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.PacketState} returns this + */ +proto.ibc.core.channel.v1.PacketState.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes data = 4; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.PacketState.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes data = 4; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.ibc.core.channel.v1.PacketState.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 4; + * 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.core.channel.v1.PacketState.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.PacketState} returns this + */ +proto.ibc.core.channel.v1.PacketState.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 4, 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) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.ibc.core.channel.v1.Acknowledgement} returns this + */ +proto.ibc.core.channel.v1.Acknowledgement.prototype.clearError = function() { + return jspb.Message.setOneofField(this, 22, proto.ibc.core.channel.v1.Acknowledgement.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.Acknowledgement.prototype.hasError = function() { + return jspb.Message.getField(this, 22) != null; +}; + + +/** + * @enum {number} + */ +proto.ibc.core.channel.v1.State = { + STATE_UNINITIALIZED_UNSPECIFIED: 0, + STATE_INIT: 1, + STATE_TRYOPEN: 2, + STATE_OPEN: 3, + STATE_CLOSED: 4 +}; + +/** + * @enum {number} + */ +proto.ibc.core.channel.v1.Order = { + ORDER_NONE_UNSPECIFIED: 0, + ORDER_UNORDERED: 1, + ORDER_ORDERED: 2 +}; + +goog.object.extend(exports, proto.ibc.core.channel.v1); diff --git a/src/types/proto-types/ibc/core/channel/v1/genesis_pb.js b/src/types/proto-types/ibc/core/channel/v1/genesis_pb.js new file mode 100644 index 00000000..2f8be893 --- /dev/null +++ b/src/types/proto-types/ibc/core/channel/v1/genesis_pb.js @@ -0,0 +1,761 @@ +// source: ibc/core/channel/v1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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_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.GenesisState', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.PacketSequence', 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.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.GenesisState.displayName = 'proto.ibc.core.channel.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.core.channel.v1.PacketSequence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.PacketSequence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.PacketSequence.displayName = 'proto.ibc.core.channel.v1.PacketSequence'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.GenesisState.repeatedFields_ = [1,2,3,4,5,6,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.ibc.core.channel.v1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.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.core.channel.v1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + ibc_core_channel_v1_channel_pb.IdentifiedChannel.toObject, includeInstance), + acknowledgementsList: jspb.Message.toObjectList(msg.getAcknowledgementsList(), + ibc_core_channel_v1_channel_pb.PacketState.toObject, includeInstance), + commitmentsList: jspb.Message.toObjectList(msg.getCommitmentsList(), + ibc_core_channel_v1_channel_pb.PacketState.toObject, includeInstance), + receiptsList: jspb.Message.toObjectList(msg.getReceiptsList(), + ibc_core_channel_v1_channel_pb.PacketState.toObject, includeInstance), + sendSequencesList: jspb.Message.toObjectList(msg.getSendSequencesList(), + proto.ibc.core.channel.v1.PacketSequence.toObject, includeInstance), + recvSequencesList: jspb.Message.toObjectList(msg.getRecvSequencesList(), + 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) + }; + + 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.GenesisState} + */ +proto.ibc.core.channel.v1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.GenesisState; + return proto.ibc.core.channel.v1.GenesisState.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.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.GenesisState} + */ +proto.ibc.core.channel.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_core_channel_v1_channel_pb.IdentifiedChannel; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.IdentifiedChannel.deserializeBinaryFromReader); + msg.addChannels(value); + break; + case 2: + var value = new ibc_core_channel_v1_channel_pb.PacketState; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketState.deserializeBinaryFromReader); + msg.addAcknowledgements(value); + break; + case 3: + var value = new ibc_core_channel_v1_channel_pb.PacketState; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketState.deserializeBinaryFromReader); + msg.addCommitments(value); + break; + case 4: + var value = new ibc_core_channel_v1_channel_pb.PacketState; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketState.deserializeBinaryFromReader); + msg.addReceipts(value); + break; + case 5: + var value = new proto.ibc.core.channel.v1.PacketSequence; + reader.readMessage(value,proto.ibc.core.channel.v1.PacketSequence.deserializeBinaryFromReader); + msg.addSendSequences(value); + break; + case 6: + var value = new proto.ibc.core.channel.v1.PacketSequence; + reader.readMessage(value,proto.ibc.core.channel.v1.PacketSequence.deserializeBinaryFromReader); + msg.addRecvSequences(value); + break; + case 7: + var value = new proto.ibc.core.channel.v1.PacketSequence; + reader.readMessage(value,proto.ibc.core.channel.v1.PacketSequence.deserializeBinaryFromReader); + msg.addAckSequences(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNextChannelSequence(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.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.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.core.channel.v1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.IdentifiedChannel.serializeBinaryToWriter + ); + } + f = message.getAcknowledgementsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + ibc_core_channel_v1_channel_pb.PacketState.serializeBinaryToWriter + ); + } + f = message.getCommitmentsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + ibc_core_channel_v1_channel_pb.PacketState.serializeBinaryToWriter + ); + } + f = message.getReceiptsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + ibc_core_channel_v1_channel_pb.PacketState.serializeBinaryToWriter + ); + } + f = message.getSendSequencesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.ibc.core.channel.v1.PacketSequence.serializeBinaryToWriter + ); + } + f = message.getRecvSequencesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.ibc.core.channel.v1.PacketSequence.serializeBinaryToWriter + ); + } + f = message.getAckSequencesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.ibc.core.channel.v1.PacketSequence.serializeBinaryToWriter + ); + } + f = message.getNextChannelSequence(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } +}; + + +/** + * repeated IdentifiedChannel channels = 1; + * @return {!Array} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_channel_v1_channel_pb.IdentifiedChannel, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this +*/ +proto.ibc.core.channel.v1.GenesisState.prototype.setChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.IdentifiedChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.channel.v1.IdentifiedChannel, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.clearChannelsList = function() { + return this.setChannelsList([]); +}; + + +/** + * repeated PacketState acknowledgements = 2; + * @return {!Array} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getAcknowledgementsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_channel_v1_channel_pb.PacketState, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this +*/ +proto.ibc.core.channel.v1.GenesisState.prototype.setAcknowledgementsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.PacketState=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.PacketState} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.addAcknowledgements = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.core.channel.v1.PacketState, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.clearAcknowledgementsList = function() { + return this.setAcknowledgementsList([]); +}; + + +/** + * repeated PacketState commitments = 3; + * @return {!Array} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getCommitmentsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_channel_v1_channel_pb.PacketState, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this +*/ +proto.ibc.core.channel.v1.GenesisState.prototype.setCommitmentsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.PacketState=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.PacketState} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.addCommitments = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.ibc.core.channel.v1.PacketState, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.clearCommitmentsList = function() { + return this.setCommitmentsList([]); +}; + + +/** + * repeated PacketState receipts = 4; + * @return {!Array} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getReceiptsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_channel_v1_channel_pb.PacketState, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this +*/ +proto.ibc.core.channel.v1.GenesisState.prototype.setReceiptsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.PacketState=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.PacketState} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.addReceipts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.ibc.core.channel.v1.PacketState, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.clearReceiptsList = function() { + return this.setReceiptsList([]); +}; + + +/** + * repeated PacketSequence send_sequences = 5; + * @return {!Array} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getSendSequencesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.core.channel.v1.PacketSequence, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this +*/ +proto.ibc.core.channel.v1.GenesisState.prototype.setSendSequencesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.PacketSequence=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.PacketSequence} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.addSendSequences = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.ibc.core.channel.v1.PacketSequence, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.clearSendSequencesList = function() { + return this.setSendSequencesList([]); +}; + + +/** + * repeated PacketSequence recv_sequences = 6; + * @return {!Array} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getRecvSequencesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.core.channel.v1.PacketSequence, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this +*/ +proto.ibc.core.channel.v1.GenesisState.prototype.setRecvSequencesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.PacketSequence=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.PacketSequence} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.addRecvSequences = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.ibc.core.channel.v1.PacketSequence, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.clearRecvSequencesList = function() { + return this.setRecvSequencesList([]); +}; + + +/** + * repeated PacketSequence ack_sequences = 7; + * @return {!Array} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getAckSequencesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.core.channel.v1.PacketSequence, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this +*/ +proto.ibc.core.channel.v1.GenesisState.prototype.setAckSequencesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.PacketSequence=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.PacketSequence} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.addAckSequences = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.ibc.core.channel.v1.PacketSequence, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.clearAckSequencesList = function() { + return this.setAckSequencesList([]); +}; + + +/** + * optional uint64 next_channel_sequence = 8; + * @return {number} + */ +proto.ibc.core.channel.v1.GenesisState.prototype.getNextChannelSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.GenesisState} returns this + */ +proto.ibc.core.channel.v1.GenesisState.prototype.setNextChannelSequence = 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.ibc.core.channel.v1.PacketSequence.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.PacketSequence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.PacketSequence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.PacketSequence.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + sequence: 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.PacketSequence} + */ +proto.ibc.core.channel.v1.PacketSequence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.PacketSequence; + return proto.ibc.core.channel.v1.PacketSequence.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.PacketSequence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.PacketSequence} + */ +proto.ibc.core.channel.v1.PacketSequence.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.setSequence(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.PacketSequence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.PacketSequence.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.PacketSequence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.PacketSequence.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.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.PacketSequence.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.PacketSequence} returns this + */ +proto.ibc.core.channel.v1.PacketSequence.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.PacketSequence.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.PacketSequence} returns this + */ +proto.ibc.core.channel.v1.PacketSequence.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 sequence = 3; + * @return {number} + */ +proto.ibc.core.channel.v1.PacketSequence.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.PacketSequence} returns this + */ +proto.ibc.core.channel.v1.PacketSequence.prototype.setSequence = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +goog.object.extend(exports, proto.ibc.core.channel.v1); diff --git a/src/types/proto-types/ibc/core/channel/v1/query_grpc_web_pb.js b/src/types/proto-types/ibc/core/channel/v1/query_grpc_web_pb.js new file mode 100644 index 00000000..5e6fbded --- /dev/null +++ b/src/types/proto-types/ibc/core/channel/v1/query_grpc_web_pb.js @@ -0,0 +1,1129 @@ +/** + * @fileoverview gRPC-Web generated client stub for ibc.core.channel.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var ibc_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js') + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') +const proto = {}; +proto.ibc = {}; +proto.ibc.core = {}; +proto.ibc.core.channel = {}; +proto.ibc.core.channel.v1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.channel.v1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.channel.v1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryChannelRequest, + * !proto.ibc.core.channel.v1.QueryChannelResponse>} + */ +const methodDescriptor_Query_Channel = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/Channel', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryChannelRequest, + proto.ibc.core.channel.v1.QueryChannelResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryChannelRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryChannelResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryChannelRequest, + * !proto.ibc.core.channel.v1.QueryChannelResponse>} + */ +const methodInfo_Query_Channel = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryChannelResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryChannelRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryChannelResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryChannelRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryChannelResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.channel = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/Channel', + request, + metadata || {}, + methodDescriptor_Query_Channel, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryChannelRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.channel = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/Channel', + request, + metadata || {}, + methodDescriptor_Query_Channel); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryChannelsRequest, + * !proto.ibc.core.channel.v1.QueryChannelsResponse>} + */ +const methodDescriptor_Query_Channels = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/Channels', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryChannelsRequest, + proto.ibc.core.channel.v1.QueryChannelsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryChannelsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryChannelsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryChannelsRequest, + * !proto.ibc.core.channel.v1.QueryChannelsResponse>} + */ +const methodInfo_Query_Channels = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryChannelsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryChannelsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryChannelsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryChannelsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryChannelsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.channels = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/Channels', + request, + metadata || {}, + methodDescriptor_Query_Channels, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryChannelsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.channels = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/Channels', + request, + metadata || {}, + methodDescriptor_Query_Channels); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryConnectionChannelsRequest, + * !proto.ibc.core.channel.v1.QueryConnectionChannelsResponse>} + */ +const methodDescriptor_Query_ConnectionChannels = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/ConnectionChannels', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryConnectionChannelsRequest, + proto.ibc.core.channel.v1.QueryConnectionChannelsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryConnectionChannelsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryConnectionChannelsRequest, + * !proto.ibc.core.channel.v1.QueryConnectionChannelsResponse>} + */ +const methodInfo_Query_ConnectionChannels = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryConnectionChannelsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryConnectionChannelsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryConnectionChannelsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryConnectionChannelsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.connectionChannels = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/ConnectionChannels', + request, + metadata || {}, + methodDescriptor_Query_ConnectionChannels, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryConnectionChannelsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.connectionChannels = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/ConnectionChannels', + request, + metadata || {}, + methodDescriptor_Query_ConnectionChannels); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryChannelClientStateRequest, + * !proto.ibc.core.channel.v1.QueryChannelClientStateResponse>} + */ +const methodDescriptor_Query_ChannelClientState = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/ChannelClientState', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryChannelClientStateRequest, + proto.ibc.core.channel.v1.QueryChannelClientStateResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryChannelClientStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryChannelClientStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryChannelClientStateRequest, + * !proto.ibc.core.channel.v1.QueryChannelClientStateResponse>} + */ +const methodInfo_Query_ChannelClientState = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryChannelClientStateResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryChannelClientStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryChannelClientStateResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryChannelClientStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryChannelClientStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.channelClientState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/ChannelClientState', + request, + metadata || {}, + methodDescriptor_Query_ChannelClientState, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryChannelClientStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.channelClientState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/ChannelClientState', + request, + metadata || {}, + methodDescriptor_Query_ChannelClientState); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest, + * !proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse>} + */ +const methodDescriptor_Query_ChannelConsensusState = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/ChannelConsensusState', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest, + proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest, + * !proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse>} + */ +const methodInfo_Query_ChannelConsensusState = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.channelConsensusState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/ChannelConsensusState', + request, + metadata || {}, + methodDescriptor_Query_ChannelConsensusState, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.channelConsensusState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/ChannelConsensusState', + request, + metadata || {}, + methodDescriptor_Query_ChannelConsensusState); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryPacketCommitmentRequest, + * !proto.ibc.core.channel.v1.QueryPacketCommitmentResponse>} + */ +const methodDescriptor_Query_PacketCommitment = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/PacketCommitment', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryPacketCommitmentRequest, + proto.ibc.core.channel.v1.QueryPacketCommitmentResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketCommitmentRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryPacketCommitmentRequest, + * !proto.ibc.core.channel.v1.QueryPacketCommitmentResponse>} + */ +const methodInfo_Query_PacketCommitment = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryPacketCommitmentResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketCommitmentRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketCommitmentRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryPacketCommitmentResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.packetCommitment = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketCommitment', + request, + metadata || {}, + methodDescriptor_Query_PacketCommitment, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketCommitmentRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.packetCommitment = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketCommitment', + request, + metadata || {}, + methodDescriptor_Query_PacketCommitment); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest, + * !proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse>} + */ +const methodDescriptor_Query_PacketCommitments = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/PacketCommitments', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest, + proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest, + * !proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse>} + */ +const methodInfo_Query_PacketCommitments = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.packetCommitments = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketCommitments', + request, + metadata || {}, + methodDescriptor_Query_PacketCommitments, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.packetCommitments = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketCommitments', + request, + metadata || {}, + methodDescriptor_Query_PacketCommitments); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryPacketReceiptRequest, + * !proto.ibc.core.channel.v1.QueryPacketReceiptResponse>} + */ +const methodDescriptor_Query_PacketReceipt = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/PacketReceipt', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryPacketReceiptRequest, + proto.ibc.core.channel.v1.QueryPacketReceiptResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketReceiptRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketReceiptResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryPacketReceiptRequest, + * !proto.ibc.core.channel.v1.QueryPacketReceiptResponse>} + */ +const methodInfo_Query_PacketReceipt = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryPacketReceiptResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketReceiptRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketReceiptResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketReceiptRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryPacketReceiptResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.packetReceipt = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketReceipt', + request, + metadata || {}, + methodDescriptor_Query_PacketReceipt, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketReceiptRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.packetReceipt = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketReceipt', + request, + metadata || {}, + methodDescriptor_Query_PacketReceipt); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest, + * !proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse>} + */ +const methodDescriptor_Query_PacketAcknowledgement = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/PacketAcknowledgement', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest, + proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest, + * !proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse>} + */ +const methodInfo_Query_PacketAcknowledgement = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.packetAcknowledgement = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketAcknowledgement', + request, + metadata || {}, + methodDescriptor_Query_PacketAcknowledgement, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.packetAcknowledgement = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketAcknowledgement', + request, + metadata || {}, + methodDescriptor_Query_PacketAcknowledgement); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest, + * !proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse>} + */ +const methodDescriptor_Query_PacketAcknowledgements = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/PacketAcknowledgements', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest, + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest, + * !proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse>} + */ +const methodInfo_Query_PacketAcknowledgements = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.packetAcknowledgements = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketAcknowledgements', + request, + metadata || {}, + methodDescriptor_Query_PacketAcknowledgements, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.packetAcknowledgements = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/PacketAcknowledgements', + request, + metadata || {}, + methodDescriptor_Query_PacketAcknowledgements); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest, + * !proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse>} + */ +const methodDescriptor_Query_UnreceivedPackets = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/UnreceivedPackets', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest, + proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest, + * !proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse>} + */ +const methodInfo_Query_UnreceivedPackets = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.unreceivedPackets = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/UnreceivedPackets', + request, + metadata || {}, + methodDescriptor_Query_UnreceivedPackets, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.unreceivedPackets = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/UnreceivedPackets', + request, + metadata || {}, + methodDescriptor_Query_UnreceivedPackets); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest, + * !proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse>} + */ +const methodDescriptor_Query_UnreceivedAcks = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/UnreceivedAcks', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest, + proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest, + * !proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse>} + */ +const methodInfo_Query_UnreceivedAcks = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.unreceivedAcks = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/UnreceivedAcks', + request, + metadata || {}, + methodDescriptor_Query_UnreceivedAcks, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.unreceivedAcks = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/UnreceivedAcks', + request, + metadata || {}, + methodDescriptor_Query_UnreceivedAcks); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest, + * !proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse>} + */ +const methodDescriptor_Query_NextSequenceReceive = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Query/NextSequenceReceive', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest, + proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest, + * !proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse>} + */ +const methodInfo_Query_NextSequenceReceive = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse, + /** + * @param {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.QueryClient.prototype.nextSequenceReceive = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Query/NextSequenceReceive', + request, + metadata || {}, + methodDescriptor_Query_NextSequenceReceive, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.QueryPromiseClient.prototype.nextSequenceReceive = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Query/NextSequenceReceive', + request, + metadata || {}, + methodDescriptor_Query_NextSequenceReceive); +}; + + +module.exports = proto.ibc.core.channel.v1; + diff --git a/src/types/proto-types/ibc/core/channel/v1/query_pb.js b/src/types/proto-types/ibc/core/channel/v1/query_pb.js new file mode 100644 index 00000000..8b3566cc --- /dev/null +++ b/src/types/proto-types/ibc/core/channel/v1/query_pb.js @@ -0,0 +1,6303 @@ +// source: ibc/core/channel/v1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 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_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js'); +goog.object.extend(proto, ibc_core_channel_v1_channel_pb); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +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.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.QueryChannelRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryChannelResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryChannelsRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryChannelsResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryConnectionChannelsRequest', null, global); +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.QueryPacketAcknowledgementRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketCommitmentRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketCommitmentResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketReceiptRequest', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryPacketReceiptResponse', null, global); +goog.exportSymbol('proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest', null, global); +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); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryChannelRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelRequest.displayName = 'proto.ibc.core.channel.v1.QueryChannelRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryChannelResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelResponse.displayName = 'proto.ibc.core.channel.v1.QueryChannelResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryChannelsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelsRequest.displayName = 'proto.ibc.core.channel.v1.QueryChannelsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryChannelsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryChannelsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelsResponse.displayName = 'proto.ibc.core.channel.v1.QueryChannelsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionChannelsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryConnectionChannelsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.displayName = 'proto.ibc.core.channel.v1.QueryConnectionChannelsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionChannelsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryConnectionChannelsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.displayName = 'proto.ibc.core.channel.v1.QueryConnectionChannelsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryChannelClientStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelClientStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelClientStateRequest.displayName = 'proto.ibc.core.channel.v1.QueryChannelClientStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryChannelClientStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelClientStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelClientStateResponse.displayName = 'proto.ibc.core.channel.v1.QueryChannelClientStateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryChannelConsensusStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.displayName = 'proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryChannelConsensusStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.displayName = 'proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketCommitmentRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketCommitmentRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.displayName = 'proto.ibc.core.channel.v1.QueryPacketCommitmentRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketCommitmentResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketCommitmentResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.displayName = 'proto.ibc.core.channel.v1.QueryPacketCommitmentResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketCommitmentsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.displayName = 'proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketCommitmentsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.displayName = 'proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketReceiptRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketReceiptRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketReceiptRequest.displayName = 'proto.ibc.core.channel.v1.QueryPacketReceiptRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketReceiptResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketReceiptResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketReceiptResponse.displayName = 'proto.ibc.core.channel.v1.QueryPacketReceiptResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketAcknowledgementRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.displayName = 'proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketAcknowledgementResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.displayName = 'proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketAcknowledgementsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.displayName = 'proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryPacketAcknowledgementsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.displayName = 'proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryUnreceivedPacketsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.displayName = 'proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryUnreceivedPacketsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.displayName = 'proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryUnreceivedAcksRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.displayName = 'proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryUnreceivedAcksResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.displayName = 'proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryNextSequenceReceiveRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.displayName = 'proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryNextSequenceReceiveResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.displayName = 'proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.QueryChannelRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryChannelRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelRequest.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.QueryChannelRequest} + */ +proto.ibc.core.channel.v1.QueryChannelRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelRequest; + return proto.ibc.core.channel.v1.QueryChannelRequest.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.QueryChannelRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelRequest} + */ +proto.ibc.core.channel.v1.QueryChannelRequest.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.QueryChannelRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelRequest.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.QueryChannelRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelRequest.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.QueryChannelRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryChannelRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryChannelRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryChannelRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelRequest.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.QueryChannelResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryChannelResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelResponse.toObject = function(includeInstance, msg) { + var f, obj = { + channel: (f = msg.getChannel()) && ibc_core_channel_v1_channel_pb.Channel.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.QueryChannelResponse} + */ +proto.ibc.core.channel.v1.QueryChannelResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelResponse; + return proto.ibc.core.channel.v1.QueryChannelResponse.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.QueryChannelResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelResponse} + */ +proto.ibc.core.channel.v1.QueryChannelResponse.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.Channel; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.Channel.deserializeBinaryFromReader); + msg.setChannel(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.QueryChannelResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelResponse.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.QueryChannelResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannel(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.Channel.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 Channel channel = 1; + * @return {?proto.ibc.core.channel.v1.Channel} + */ +proto.ibc.core.channel.v1.QueryChannelResponse.prototype.getChannel = function() { + return /** @type{?proto.ibc.core.channel.v1.Channel} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_channel_pb.Channel, 1)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.Channel|undefined} value + * @return {!proto.ibc.core.channel.v1.QueryChannelResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelResponse.prototype.setChannel = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelResponse.prototype.clearChannel = function() { + return this.setChannel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelResponse.prototype.hasChannel = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryChannelResponse.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.QueryChannelResponse.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.QueryChannelResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryChannelResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelResponse.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.QueryChannelResponse.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.QueryChannelResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelResponse.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.QueryChannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryChannelsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelsRequest.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.core.channel.v1.QueryChannelsRequest} + */ +proto.ibc.core.channel.v1.QueryChannelsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelsRequest; + return proto.ibc.core.channel.v1.QueryChannelsRequest.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.QueryChannelsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelsRequest} + */ +proto.ibc.core.channel.v1.QueryChannelsRequest.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.core.channel.v1.QueryChannelsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelsRequest.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.QueryChannelsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelsRequest.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.core.channel.v1.QueryChannelsRequest.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.core.channel.v1.QueryChannelsRequest} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.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.core.channel.v1.QueryChannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryChannelsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + ibc_core_channel_v1_channel_pb.IdentifiedChannel.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f), + height: (f = msg.getHeight()) && 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.QueryChannelsResponse} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelsResponse; + return proto.ibc.core.channel.v1.QueryChannelsResponse.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.QueryChannelsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelsResponse} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.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.IdentifiedChannel; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.IdentifiedChannel.deserializeBinaryFromReader); + msg.addChannels(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; + case 3: + 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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelsResponse.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.QueryChannelsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.IdentifiedChannel.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated IdentifiedChannel channels = 1; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_channel_v1_channel_pb.IdentifiedChannel, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryChannelsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.setChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.IdentifiedChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.channel.v1.IdentifiedChannel, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.QueryChannelsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.clearChannelsList = function() { + return this.setChannelsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.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.channel.v1.QueryChannelsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ibc.core.client.v1.Height height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.getHeight = 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.QueryChannelsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelsResponse.prototype.hasHeight = 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.QueryConnectionChannelsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionChannelsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + connection: 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.ibc.core.channel.v1.QueryConnectionChannelsRequest} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryConnectionChannelsRequest; + return proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.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.QueryConnectionChannelsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryConnectionChannelsRequest} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.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.setConnection(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.ibc.core.channel.v1.QueryConnectionChannelsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.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.QueryConnectionChannelsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnection(); + 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 connection = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.prototype.getConnection = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryConnectionChannelsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.prototype.setConnection = 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.channel.v1.QueryConnectionChannelsRequest.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.channel.v1.QueryConnectionChannelsRequest} returns this +*/ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryConnectionChannelsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.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.core.channel.v1.QueryConnectionChannelsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionChannelsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + channelsList: jspb.Message.toObjectList(msg.getChannelsList(), + ibc_core_channel_v1_channel_pb.IdentifiedChannel.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f), + height: (f = msg.getHeight()) && 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.QueryConnectionChannelsResponse} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryConnectionChannelsResponse; + return proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.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.QueryConnectionChannelsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryConnectionChannelsResponse} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.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.IdentifiedChannel; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.IdentifiedChannel.deserializeBinaryFromReader); + msg.addChannels(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; + case 3: + 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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.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.QueryConnectionChannelsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChannelsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.IdentifiedChannel.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated IdentifiedChannel channels = 1; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.getChannelsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_channel_v1_channel_pb.IdentifiedChannel, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryConnectionChannelsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.setChannelsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.IdentifiedChannel=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.IdentifiedChannel} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.addChannels = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.channel.v1.IdentifiedChannel, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.QueryConnectionChannelsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.clearChannelsList = function() { + return this.setChannelsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.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.channel.v1.QueryConnectionChannelsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryConnectionChannelsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ibc.core.client.v1.Height height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.getHeight = 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.QueryConnectionChannelsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryConnectionChannelsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryConnectionChannelsResponse.prototype.hasHeight = 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.QueryChannelClientStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelClientStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryChannelClientStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelClientStateRequest.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.QueryChannelClientStateRequest} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelClientStateRequest; + return proto.ibc.core.channel.v1.QueryChannelClientStateRequest.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.QueryChannelClientStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelClientStateRequest} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateRequest.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.QueryChannelClientStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelClientStateRequest.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.QueryChannelClientStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelClientStateRequest.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.QueryChannelClientStateRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryChannelClientStateRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelClientStateRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryChannelClientStateRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelClientStateRequest.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.QueryChannelClientStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelClientStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryChannelClientStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + identifiedClientState: (f = msg.getIdentifiedClientState()) && ibc_core_client_v1_client_pb.IdentifiedClientState.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.QueryChannelClientStateResponse} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelClientStateResponse; + return proto.ibc.core.channel.v1.QueryChannelClientStateResponse.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.QueryChannelClientStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelClientStateResponse} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.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.IdentifiedClientState; + reader.readMessage(value,ibc_core_client_v1_client_pb.IdentifiedClientState.deserializeBinaryFromReader); + msg.setIdentifiedClientState(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.QueryChannelClientStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelClientStateResponse.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.QueryChannelClientStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentifiedClientState(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_client_v1_client_pb.IdentifiedClientState.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 ibc.core.client.v1.IdentifiedClientState identified_client_state = 1; + * @return {?proto.ibc.core.client.v1.IdentifiedClientState} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.prototype.getIdentifiedClientState = function() { + return /** @type{?proto.ibc.core.client.v1.IdentifiedClientState} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.IdentifiedClientState, 1)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.IdentifiedClientState|undefined} value + * @return {!proto.ibc.core.channel.v1.QueryChannelClientStateResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.prototype.setIdentifiedClientState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelClientStateResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.prototype.clearIdentifiedClientState = function() { + return this.setIdentifiedClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.prototype.hasIdentifiedClientState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.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.QueryChannelClientStateResponse.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.QueryChannelClientStateResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryChannelClientStateResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.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.QueryChannelClientStateResponse.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.QueryChannelClientStateResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelClientStateResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelClientStateResponse.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.QueryChannelConsensusStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryChannelConsensusStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + revisionNumber: jspb.Message.getFieldWithDefault(msg, 3, 0), + revisionHeight: 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.core.channel.v1.QueryChannelConsensusStateRequest} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest; + return proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.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.QueryChannelConsensusStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.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.setRevisionNumber(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRevisionHeight(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.QueryChannelConsensusStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.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.QueryChannelConsensusStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.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.getRevisionNumber(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getRevisionHeight(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 revision_number = 3; + * @return {number} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.prototype.getRevisionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.prototype.setRevisionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional uint64 revision_height = 4; + * @return {number} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.prototype.getRevisionHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest} returns this + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateRequest.prototype.setRevisionHeight = 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.core.channel.v1.QueryChannelConsensusStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryChannelConsensusStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + consensusState: (f = msg.getConsensusState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + clientId: jspb.Message.getFieldWithDefault(msg, 2, ""), + 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.QueryChannelConsensusStateResponse} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse; + return proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.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.QueryChannelConsensusStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.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.setConsensusState(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setClientId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProof(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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.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.QueryChannelConsensusStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConsensusState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getProof_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 + ); + } +}; + + +/** + * optional google.protobuf.Any consensus_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.getConsensusState = 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.channel.v1.QueryChannelConsensusStateResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.hasConsensusState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string client_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes proof = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.getProof = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes proof = 3; + * This is a type-conversion wrapper around `getProof()` + * @return {string} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.getProof_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProof())); +}; + + +/** + * optional bytes proof = 3; + * 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.QueryChannelConsensusStateResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.setProof = 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.QueryChannelConsensusStateResponse.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.QueryChannelConsensusStateResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse} returns this + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryChannelConsensusStateResponse.prototype.hasProofHeight = 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.core.channel.v1.QueryPacketCommitmentRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketCommitmentRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + sequence: 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.QueryPacketCommitmentRequest} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketCommitmentRequest; + return proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.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.QueryPacketCommitmentRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentRequest} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.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.setSequence(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.QueryPacketCommitmentRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.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.QueryPacketCommitmentRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.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.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 sequence = 3; + * @return {number} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentRequest.prototype.setSequence = 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.core.channel.v1.QueryPacketCommitmentResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketCommitmentResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.toObject = function(includeInstance, msg) { + var f, obj = { + commitment: msg.getCommitment_asB64(), + 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.QueryPacketCommitmentResponse} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketCommitmentResponse; + return proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.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.QueryPacketCommitmentResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentResponse} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.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.setCommitment(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.QueryPacketCommitmentResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.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.QueryPacketCommitmentResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCommitment_asU8(); + if (f.length > 0) { + writer.writeBytes( + 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 bytes commitment = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.prototype.getCommitment = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes commitment = 1; + * This is a type-conversion wrapper around `getCommitment()` + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.prototype.getCommitment_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getCommitment())); +}; + + +/** + * optional bytes commitment = 1; + * 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.core.channel.v1.QueryPacketCommitmentResponse.prototype.getCommitment_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getCommitment())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.prototype.setCommitment = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.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.QueryPacketCommitmentResponse.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.QueryPacketCommitmentResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.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.QueryPacketCommitmentResponse.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.QueryPacketCommitmentResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentResponse.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.QueryPacketCommitmentsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketCommitmentsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.toObject = function(includeInstance, msg) { + 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) + }; + + 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.QueryPacketCommitmentsRequest} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest; + return proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.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.QueryPacketCommitmentsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.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 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.core.channel.v1.QueryPacketCommitmentsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.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.QueryPacketCommitmentsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.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.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.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.ibc.core.channel.v1.QueryPacketCommitmentsRequest} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.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.core.channel.v1.QueryPacketCommitmentsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketCommitmentsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + commitmentsList: jspb.Message.toObjectList(msg.getCommitmentsList(), + ibc_core_channel_v1_channel_pb.PacketState.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f), + height: (f = msg.getHeight()) && 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.QueryPacketCommitmentsResponse} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse; + return proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.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.QueryPacketCommitmentsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.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.PacketState; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketState.deserializeBinaryFromReader); + msg.addCommitments(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; + case 3: + 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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.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.QueryPacketCommitmentsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCommitmentsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.PacketState.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated PacketState commitments = 1; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.getCommitmentsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_channel_v1_channel_pb.PacketState, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.setCommitmentsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.PacketState=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.PacketState} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.addCommitments = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.channel.v1.PacketState, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.clearCommitmentsList = function() { + return this.setCommitmentsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.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.channel.v1.QueryPacketCommitmentsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ibc.core.client.v1.Height height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.getHeight = 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.QueryPacketCommitmentsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketCommitmentsResponse.prototype.hasHeight = 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.QueryPacketReceiptRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketReceiptRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketReceiptRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + sequence: 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.QueryPacketReceiptRequest} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketReceiptRequest; + return proto.ibc.core.channel.v1.QueryPacketReceiptRequest.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.QueryPacketReceiptRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketReceiptRequest} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.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.setSequence(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.QueryPacketReceiptRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketReceiptRequest.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.QueryPacketReceiptRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.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.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketReceiptRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketReceiptRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 sequence = 3; + * @return {number} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.QueryPacketReceiptRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketReceiptRequest.prototype.setSequence = 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.core.channel.v1.QueryPacketReceiptResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketReceiptResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketReceiptResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.toObject = function(includeInstance, msg) { + var f, obj = { + received: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + 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.QueryPacketReceiptResponse} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketReceiptResponse; + return proto.ibc.core.channel.v1.QueryPacketReceiptResponse.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.QueryPacketReceiptResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketReceiptResponse} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setReceived(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProof(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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketReceiptResponse.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.QueryPacketReceiptResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReceived(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getProof_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 + ); + } +}; + + +/** + * optional bool received = 2; + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.getReceived = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.core.channel.v1.QueryPacketReceiptResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.setReceived = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional bytes proof = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.getProof = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes proof = 3; + * This is a type-conversion wrapper around `getProof()` + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.getProof_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProof())); +}; + + +/** + * optional bytes proof = 3; + * 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.QueryPacketReceiptResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryPacketReceiptResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.setProof = 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.QueryPacketReceiptResponse.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.QueryPacketReceiptResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketReceiptResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketReceiptResponse.prototype.hasProofHeight = 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.core.channel.v1.QueryPacketAcknowledgementRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketAcknowledgementRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + sequence: 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.QueryPacketAcknowledgementRequest} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest; + return proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.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.QueryPacketAcknowledgementRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.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.setSequence(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.QueryPacketAcknowledgementRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.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.QueryPacketAcknowledgementRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.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.getSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 sequence = 3; + * @return {number} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementRequest.prototype.setSequence = 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.core.channel.v1.QueryPacketAcknowledgementResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketAcknowledgementResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.toObject = function(includeInstance, msg) { + var f, obj = { + acknowledgement: msg.getAcknowledgement_asB64(), + 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.QueryPacketAcknowledgementResponse} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse; + return proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.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.QueryPacketAcknowledgementResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.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.setAcknowledgement(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.QueryPacketAcknowledgementResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.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.QueryPacketAcknowledgementResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAcknowledgement_asU8(); + if (f.length > 0) { + writer.writeBytes( + 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 bytes acknowledgement = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.prototype.getAcknowledgement = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes acknowledgement = 1; + * This is a type-conversion wrapper around `getAcknowledgement()` + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.prototype.getAcknowledgement_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAcknowledgement())); +}; + + +/** + * optional bytes acknowledgement = 1; + * 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.QueryPacketAcknowledgementResponse.prototype.getAcknowledgement_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAcknowledgement())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.prototype.setAcknowledgement = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.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.QueryPacketAcknowledgementResponse.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.QueryPacketAcknowledgementResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.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.QueryPacketAcknowledgementResponse.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.QueryPacketAcknowledgementResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementResponse.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.QueryPacketAcknowledgementsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketAcknowledgementsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.toObject = function(includeInstance, msg) { + 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) + }; + + 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.QueryPacketAcknowledgementsRequest} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest; + return proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.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.QueryPacketAcknowledgementsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.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 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.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.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.QueryPacketAcknowledgementsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.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.getPagination(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_query_v1beta1_pagination_pb.PageRequest.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageRequest pagination = 3; + * @return {?proto.cosmos.base.query.v1beta1.PageRequest} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.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.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.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.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryPacketAcknowledgementsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + acknowledgementsList: jspb.Message.toObjectList(msg.getAcknowledgementsList(), + ibc_core_channel_v1_channel_pb.PacketState.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f), + height: (f = msg.getHeight()) && 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.QueryPacketAcknowledgementsResponse} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse; + return proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.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.QueryPacketAcknowledgementsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.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.PacketState; + reader.readMessage(value,ibc_core_channel_v1_channel_pb.PacketState.deserializeBinaryFromReader); + msg.addAcknowledgements(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; + case 3: + 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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.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.QueryPacketAcknowledgementsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAcknowledgementsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_channel_v1_channel_pb.PacketState.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated PacketState acknowledgements = 1; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.getAcknowledgementsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_channel_v1_channel_pb.PacketState, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.setAcknowledgementsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.PacketState=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.PacketState} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.addAcknowledgements = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.channel.v1.PacketState, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.clearAcknowledgementsList = function() { + return this.setAcknowledgementsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.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.channel.v1.QueryPacketAcknowledgementsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ibc.core.client.v1.Height height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.getHeight = 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.QueryPacketAcknowledgementsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.prototype.hasHeight = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.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.QueryUnreceivedPacketsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryUnreceivedPacketsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + packetCommitmentSequencesList: (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.core.channel.v1.QueryUnreceivedPacketsRequest} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest; + return proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.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.QueryUnreceivedPacketsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.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 {!Array} */ (reader.readPackedUint64()); + msg.setPacketCommitmentSequencesList(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.QueryUnreceivedPacketsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.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.QueryUnreceivedPacketsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.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.getPacketCommitmentSequencesList(); + if (f.length > 0) { + writer.writePackedUint64( + 3, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated uint64 packet_commitment_sequences = 3; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.prototype.getPacketCommitmentSequencesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.prototype.setPacketCommitmentSequencesList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.prototype.addPacketCommitmentSequences = 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.QueryUnreceivedPacketsRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsRequest.prototype.clearPacketCommitmentSequencesList = function() { + return this.setPacketCommitmentSequencesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.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.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryUnreceivedPacketsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + sequencesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + height: (f = msg.getHeight()) && 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.QueryUnreceivedPacketsResponse} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse; + return proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.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.QueryUnreceivedPacketsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Array} */ (reader.readPackedUint64()); + msg.setSequencesList(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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.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.QueryUnreceivedPacketsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequencesList(); + if (f.length > 0) { + writer.writePackedUint64( + 1, + f + ); + } + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated uint64 sequences = 1; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.getSequencesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.setSequencesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.addSequences = 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.core.channel.v1.QueryUnreceivedPacketsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.clearSequencesList = function() { + return this.setSequencesList([]); +}; + + +/** + * optional ibc.core.client.v1.Height height = 2; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.getHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 2)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryUnreceivedPacketsResponse.prototype.hasHeight = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.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.QueryUnreceivedAcksRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryUnreceivedAcksRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.toObject = function(includeInstance, msg) { + var f, obj = { + portId: jspb.Message.getFieldWithDefault(msg, 1, ""), + channelId: jspb.Message.getFieldWithDefault(msg, 2, ""), + packetAckSequencesList: (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.core.channel.v1.QueryUnreceivedAcksRequest} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest; + return proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.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.QueryUnreceivedAcksRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.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 {!Array} */ (reader.readPackedUint64()); + msg.setPacketAckSequencesList(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.QueryUnreceivedAcksRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.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.QueryUnreceivedAcksRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.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.getPacketAckSequencesList(); + if (f.length > 0) { + writer.writePackedUint64( + 3, + f + ); + } +}; + + +/** + * optional string port_id = 1; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.prototype.setChannelId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated uint64 packet_ack_sequences = 3; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.prototype.getPacketAckSequencesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.prototype.setPacketAckSequencesList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.prototype.addPacketAckSequences = 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.QueryUnreceivedAcksRequest} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksRequest.prototype.clearPacketAckSequencesList = function() { + return this.setPacketAckSequencesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.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.core.channel.v1.QueryUnreceivedAcksResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryUnreceivedAcksResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.toObject = function(includeInstance, msg) { + var f, obj = { + sequencesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, + height: (f = msg.getHeight()) && 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.QueryUnreceivedAcksResponse} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse; + return proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.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.QueryUnreceivedAcksResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Array} */ (reader.readPackedUint64()); + msg.setSequencesList(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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.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.QueryUnreceivedAcksResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSequencesList(); + if (f.length > 0) { + writer.writePackedUint64( + 1, + f + ); + } + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated uint64 sequences = 1; + * @return {!Array} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.getSequencesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.setSequencesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.addSequences = 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.core.channel.v1.QueryUnreceivedAcksResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.clearSequencesList = function() { + return this.setSequencesList([]); +}; + + +/** + * optional ibc.core.client.v1.Height height = 2; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.getHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 2)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse} returns this + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryUnreceivedAcksResponse.prototype.hasHeight = 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.QueryNextSequenceReceiveRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryNextSequenceReceiveRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.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.QueryNextSequenceReceiveRequest} + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest; + return proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.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.QueryNextSequenceReceiveRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest} + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.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.QueryNextSequenceReceiveRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.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.QueryNextSequenceReceiveRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.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.QueryNextSequenceReceiveRequest.prototype.getPortId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest} returns this + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.prototype.setPortId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string channel_id = 2; + * @return {string} + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.prototype.getChannelId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest} returns this + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveRequest.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.QueryNextSequenceReceiveResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryNextSequenceReceiveResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.toObject = function(includeInstance, msg) { + var f, obj = { + nextSequenceReceive: 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.QueryNextSequenceReceiveResponse} + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse; + return proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.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.QueryNextSequenceReceiveResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse} + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.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.setNextSequenceReceive(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.QueryNextSequenceReceiveResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.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.QueryNextSequenceReceiveResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNextSequenceReceive(); + 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_receive = 1; + * @return {number} + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.prototype.getNextSequenceReceive = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse} returns this + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.prototype.setNextSequenceReceive = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.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.QueryNextSequenceReceiveResponse.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.QueryNextSequenceReceiveResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse} returns this + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.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.QueryNextSequenceReceiveResponse.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.QueryNextSequenceReceiveResponse} returns this +*/ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse} returns this + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.channel.v1.QueryNextSequenceReceiveResponse.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +goog.object.extend(exports, proto.ibc.core.channel.v1); diff --git a/src/types/proto-types/ibc/core/channel/v1/tx_grpc_web_pb.js b/src/types/proto-types/ibc/core/channel/v1/tx_grpc_web_pb.js new file mode 100644 index 00000000..5cbd8237 --- /dev/null +++ b/src/types/proto-types/ibc/core/channel/v1/tx_grpc_web_pb.js @@ -0,0 +1,883 @@ +/** + * @fileoverview gRPC-Web generated client stub for ibc.core.channel.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') + +var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js') + +var ibc_core_channel_v1_channel_pb = require('../../../../ibc/core/channel/v1/channel_pb.js') +const proto = {}; +proto.ibc = {}; +proto.ibc.core = {}; +proto.ibc.core.channel = {}; +proto.ibc.core.channel.v1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.channel.v1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.channel.v1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgChannelOpenInit, + * !proto.ibc.core.channel.v1.MsgChannelOpenInitResponse>} + */ +const methodDescriptor_Msg_ChannelOpenInit = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/ChannelOpenInit', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgChannelOpenInit, + proto.ibc.core.channel.v1.MsgChannelOpenInitResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgChannelOpenInit, + * !proto.ibc.core.channel.v1.MsgChannelOpenInitResponse>} + */ +const methodInfo_Msg_ChannelOpenInit = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgChannelOpenInitResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelOpenInitResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgChannelOpenInitResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.channelOpenInit = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelOpenInit', + request, + metadata || {}, + methodDescriptor_Msg_ChannelOpenInit, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenInit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.channelOpenInit = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelOpenInit', + request, + metadata || {}, + methodDescriptor_Msg_ChannelOpenInit); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgChannelOpenTry, + * !proto.ibc.core.channel.v1.MsgChannelOpenTryResponse>} + */ +const methodDescriptor_Msg_ChannelOpenTry = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/ChannelOpenTry', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgChannelOpenTry, + proto.ibc.core.channel.v1.MsgChannelOpenTryResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTry} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgChannelOpenTry, + * !proto.ibc.core.channel.v1.MsgChannelOpenTryResponse>} + */ +const methodInfo_Msg_ChannelOpenTry = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgChannelOpenTryResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTry} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelOpenTryResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTry} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgChannelOpenTryResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.channelOpenTry = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelOpenTry', + request, + metadata || {}, + methodDescriptor_Msg_ChannelOpenTry, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenTry} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.channelOpenTry = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelOpenTry', + request, + metadata || {}, + methodDescriptor_Msg_ChannelOpenTry); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgChannelOpenAck, + * !proto.ibc.core.channel.v1.MsgChannelOpenAckResponse>} + */ +const methodDescriptor_Msg_ChannelOpenAck = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/ChannelOpenAck', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgChannelOpenAck, + proto.ibc.core.channel.v1.MsgChannelOpenAckResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAck} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgChannelOpenAck, + * !proto.ibc.core.channel.v1.MsgChannelOpenAckResponse>} + */ +const methodInfo_Msg_ChannelOpenAck = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgChannelOpenAckResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAck} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelOpenAckResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAck} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgChannelOpenAckResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.channelOpenAck = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelOpenAck', + request, + metadata || {}, + methodDescriptor_Msg_ChannelOpenAck, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenAck} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.channelOpenAck = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelOpenAck', + request, + metadata || {}, + methodDescriptor_Msg_ChannelOpenAck); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgChannelOpenConfirm, + * !proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse>} + */ +const methodDescriptor_Msg_ChannelOpenConfirm = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/ChannelOpenConfirm', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgChannelOpenConfirm, + proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgChannelOpenConfirm, + * !proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse>} + */ +const methodInfo_Msg_ChannelOpenConfirm = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgChannelOpenConfirmResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.channelOpenConfirm = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelOpenConfirm', + request, + metadata || {}, + methodDescriptor_Msg_ChannelOpenConfirm, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelOpenConfirm} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.channelOpenConfirm = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelOpenConfirm', + request, + metadata || {}, + methodDescriptor_Msg_ChannelOpenConfirm); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgChannelCloseInit, + * !proto.ibc.core.channel.v1.MsgChannelCloseInitResponse>} + */ +const methodDescriptor_Msg_ChannelCloseInit = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/ChannelCloseInit', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgChannelCloseInit, + proto.ibc.core.channel.v1.MsgChannelCloseInitResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgChannelCloseInit, + * !proto.ibc.core.channel.v1.MsgChannelCloseInitResponse>} + */ +const methodInfo_Msg_ChannelCloseInit = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgChannelCloseInitResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelCloseInitResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgChannelCloseInitResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.channelCloseInit = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelCloseInit', + request, + metadata || {}, + methodDescriptor_Msg_ChannelCloseInit, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseInit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.channelCloseInit = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelCloseInit', + request, + metadata || {}, + methodDescriptor_Msg_ChannelCloseInit); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgChannelCloseConfirm, + * !proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse>} + */ +const methodDescriptor_Msg_ChannelCloseConfirm = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/ChannelCloseConfirm', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgChannelCloseConfirm, + proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgChannelCloseConfirm, + * !proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse>} + */ +const methodInfo_Msg_ChannelCloseConfirm = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgChannelCloseConfirmResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.channelCloseConfirm = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelCloseConfirm', + request, + metadata || {}, + methodDescriptor_Msg_ChannelCloseConfirm, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgChannelCloseConfirm} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.channelCloseConfirm = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/ChannelCloseConfirm', + request, + metadata || {}, + methodDescriptor_Msg_ChannelCloseConfirm); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgRecvPacket, + * !proto.ibc.core.channel.v1.MsgRecvPacketResponse>} + */ +const methodDescriptor_Msg_RecvPacket = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/RecvPacket', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgRecvPacket, + proto.ibc.core.channel.v1.MsgRecvPacketResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgRecvPacket} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgRecvPacketResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgRecvPacket, + * !proto.ibc.core.channel.v1.MsgRecvPacketResponse>} + */ +const methodInfo_Msg_RecvPacket = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgRecvPacketResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgRecvPacket} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgRecvPacketResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgRecvPacket} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgRecvPacketResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.recvPacket = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/RecvPacket', + request, + metadata || {}, + methodDescriptor_Msg_RecvPacket, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgRecvPacket} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.recvPacket = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/RecvPacket', + request, + metadata || {}, + methodDescriptor_Msg_RecvPacket); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgTimeout, + * !proto.ibc.core.channel.v1.MsgTimeoutResponse>} + */ +const methodDescriptor_Msg_Timeout = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/Timeout', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgTimeout, + proto.ibc.core.channel.v1.MsgTimeoutResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgTimeout} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgTimeoutResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgTimeout, + * !proto.ibc.core.channel.v1.MsgTimeoutResponse>} + */ +const methodInfo_Msg_Timeout = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgTimeoutResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgTimeout} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgTimeoutResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgTimeout} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgTimeoutResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.timeout = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/Timeout', + request, + metadata || {}, + methodDescriptor_Msg_Timeout, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgTimeout} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.timeout = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/Timeout', + request, + metadata || {}, + methodDescriptor_Msg_Timeout); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgTimeoutOnClose, + * !proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse>} + */ +const methodDescriptor_Msg_TimeoutOnClose = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/TimeoutOnClose', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgTimeoutOnClose, + proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgTimeoutOnClose, + * !proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse>} + */ +const methodInfo_Msg_TimeoutOnClose = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgTimeoutOnCloseResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.timeoutOnClose = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/TimeoutOnClose', + request, + metadata || {}, + methodDescriptor_Msg_TimeoutOnClose, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgTimeoutOnClose} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.timeoutOnClose = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/TimeoutOnClose', + request, + metadata || {}, + methodDescriptor_Msg_TimeoutOnClose); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.channel.v1.MsgAcknowledgement, + * !proto.ibc.core.channel.v1.MsgAcknowledgementResponse>} + */ +const methodDescriptor_Msg_Acknowledgement = new grpc.web.MethodDescriptor( + '/ibc.core.channel.v1.Msg/Acknowledgement', + grpc.web.MethodType.UNARY, + proto.ibc.core.channel.v1.MsgAcknowledgement, + proto.ibc.core.channel.v1.MsgAcknowledgementResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgAcknowledgement} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgAcknowledgementResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.channel.v1.MsgAcknowledgement, + * !proto.ibc.core.channel.v1.MsgAcknowledgementResponse>} + */ +const methodInfo_Msg_Acknowledgement = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.channel.v1.MsgAcknowledgementResponse, + /** + * @param {!proto.ibc.core.channel.v1.MsgAcknowledgement} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.channel.v1.MsgAcknowledgementResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.channel.v1.MsgAcknowledgement} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.channel.v1.MsgAcknowledgementResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.channel.v1.MsgClient.prototype.acknowledgement = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/Acknowledgement', + request, + metadata || {}, + methodDescriptor_Msg_Acknowledgement, + callback); +}; + + +/** + * @param {!proto.ibc.core.channel.v1.MsgAcknowledgement} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.channel.v1.MsgPromiseClient.prototype.acknowledgement = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.channel.v1.Msg/Acknowledgement', + request, + metadata || {}, + methodDescriptor_Msg_Acknowledgement); +}; + + +module.exports = proto.ibc.core.channel.v1; + diff --git a/src/types/proto-types/ibc/core/channel/v1/tx_pb.js b/src/types/proto-types/ibc/core/channel/v1/tx_pb.js new file mode 100644 index 00000000..e2bb9432 --- /dev/null +++ b/src/types/proto-types/ibc/core/channel/v1/tx_pb.js @@ -0,0 +1,4505 @@ +// source: ibc/core/channel/v1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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/src/types/proto-types/ibc/core/client/v1/client_pb.js b/src/types/proto-types/ibc/core/client/v1/client_pb.js new file mode 100644 index 00000000..cd0a29a6 --- /dev/null +++ b/src/types/proto-types/ibc/core/client/v1/client_pb.js @@ -0,0 +1,1281 @@ +// source: ibc/core/client/v1/client.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_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); +goog.exportSymbol('proto.ibc.core.client.v1.Height', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.IdentifiedClientState', null, global); +goog.exportSymbol('proto.ibc.core.client.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.core.client.v1.IdentifiedClientState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.IdentifiedClientState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.IdentifiedClientState.displayName = 'proto.ibc.core.client.v1.IdentifiedClientState'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ConsensusStateWithHeight = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.ConsensusStateWithHeight, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.ConsensusStateWithHeight.displayName = 'proto.ibc.core.client.v1.ConsensusStateWithHeight'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ClientConsensusStates = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.client.v1.ClientConsensusStates.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.client.v1.ClientConsensusStates, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.ClientConsensusStates.displayName = 'proto.ibc.core.client.v1.ClientConsensusStates'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ClientUpdateProposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.ClientUpdateProposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.ClientUpdateProposal.displayName = 'proto.ibc.core.client.v1.ClientUpdateProposal'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Height = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.Height, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.Height.displayName = 'proto.ibc.core.client.v1.Height'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.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.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.Params.displayName = 'proto.ibc.core.client.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.core.client.v1.IdentifiedClientState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.IdentifiedClientState.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.IdentifiedClientState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.IdentifiedClientState.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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.core.client.v1.IdentifiedClientState} + */ +proto.ibc.core.client.v1.IdentifiedClientState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.IdentifiedClientState; + return proto.ibc.core.client.v1.IdentifiedClientState.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.IdentifiedClientState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.IdentifiedClientState} + */ +proto.ibc.core.client.v1.IdentifiedClientState.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 = 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.core.client.v1.IdentifiedClientState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.IdentifiedClientState.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.IdentifiedClientState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.IdentifiedClientState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getClientState(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.IdentifiedClientState.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.IdentifiedClientState} returns this + */ +proto.ibc.core.client.v1.IdentifiedClientState.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any client_state = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.IdentifiedClientState.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.core.client.v1.IdentifiedClientState} returns this +*/ +proto.ibc.core.client.v1.IdentifiedClientState.prototype.setClientState = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.IdentifiedClientState} returns this + */ +proto.ibc.core.client.v1.IdentifiedClientState.prototype.clearClientState = function() { + return this.setClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.IdentifiedClientState.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.core.client.v1.ConsensusStateWithHeight.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.ConsensusStateWithHeight.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ConsensusStateWithHeight} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.toObject = function(includeInstance, msg) { + var f, obj = { + height: (f = msg.getHeight()) && proto.ibc.core.client.v1.Height.toObject(includeInstance, f), + 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.core.client.v1.ConsensusStateWithHeight} + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.ConsensusStateWithHeight; + return proto.ibc.core.client.v1.ConsensusStateWithHeight.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.ConsensusStateWithHeight} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.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.client.v1.Height; + reader.readMessage(value,proto.ibc.core.client.v1.Height.deserializeBinaryFromReader); + msg.setHeight(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.core.client.v1.ConsensusStateWithHeight.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.ConsensusStateWithHeight.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.ConsensusStateWithHeight} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.ibc.core.client.v1.Height.serializeBinaryToWriter + ); + } + f = message.getConsensusState(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Height height = 1; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.getHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, proto.ibc.core.client.v1.Height, 1)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} returns this +*/ +proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} returns this + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.hasHeight = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Any consensus_state = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.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.core.client.v1.ConsensusStateWithHeight} returns this +*/ +proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} returns this + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.ConsensusStateWithHeight.prototype.hasConsensusState = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.client.v1.ClientConsensusStates.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.client.v1.ClientConsensusStates.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.ClientConsensusStates.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ClientConsensusStates} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.ClientConsensusStates.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + consensusStatesList: jspb.Message.toObjectList(msg.getConsensusStatesList(), + proto.ibc.core.client.v1.ConsensusStateWithHeight.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.core.client.v1.ClientConsensusStates} + */ +proto.ibc.core.client.v1.ClientConsensusStates.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.ClientConsensusStates; + return proto.ibc.core.client.v1.ClientConsensusStates.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.ClientConsensusStates} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.ClientConsensusStates} + */ +proto.ibc.core.client.v1.ClientConsensusStates.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 = new proto.ibc.core.client.v1.ConsensusStateWithHeight; + reader.readMessage(value,proto.ibc.core.client.v1.ConsensusStateWithHeight.deserializeBinaryFromReader); + msg.addConsensusStates(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.ClientConsensusStates.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.ClientConsensusStates.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.ClientConsensusStates} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.ClientConsensusStates.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConsensusStatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.ibc.core.client.v1.ConsensusStateWithHeight.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.ClientConsensusStates.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.ClientConsensusStates} returns this + */ +proto.ibc.core.client.v1.ClientConsensusStates.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated ConsensusStateWithHeight consensus_states = 2; + * @return {!Array} + */ +proto.ibc.core.client.v1.ClientConsensusStates.prototype.getConsensusStatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.core.client.v1.ConsensusStateWithHeight, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.ClientConsensusStates} returns this +*/ +proto.ibc.core.client.v1.ClientConsensusStates.prototype.setConsensusStatesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.core.client.v1.ConsensusStateWithHeight=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} + */ +proto.ibc.core.client.v1.ClientConsensusStates.prototype.addConsensusStates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.core.client.v1.ConsensusStateWithHeight, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.client.v1.ClientConsensusStates} returns this + */ +proto.ibc.core.client.v1.ClientConsensusStates.prototype.clearConsensusStatesList = function() { + return this.setConsensusStatesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.ClientUpdateProposal.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.ClientUpdateProposal.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ClientUpdateProposal} 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) { + var f, obj = { + title: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + clientId: jspb.Message.getFieldWithDefault(msg, 3, ""), + header: (f = msg.getHeader()) && 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.ClientUpdateProposal} + */ +proto.ibc.core.client.v1.ClientUpdateProposal.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} + */ +proto.ibc.core.client.v1.ClientUpdateProposal.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.setTitle(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setClientId(value); + break; + case 4: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setHeader(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.ClientUpdateProposal.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.ClientUpdateProposal.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.ClientUpdateProposal} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.ClientUpdateProposal.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTitle(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * 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} + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string client_id = 3; + * @return {string} + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getClientId = 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.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional google.protobuf.Any header = 4; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.getHeader = 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.ClientUpdateProposal} returns this +*/ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.ClientUpdateProposal} returns this + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.clearHeader = function() { + return this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.ClientUpdateProposal.prototype.hasHeader = 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.core.client.v1.Height.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.Height.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Height} 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) { + var f, obj = { + revisionNumber: jspb.Message.getFieldWithDefault(msg, 1, 0), + revisionHeight: 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.client.v1.Height} + */ +proto.ibc.core.client.v1.Height.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.client.v1.Height.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.setRevisionNumber(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRevisionHeight(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.Height.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.Height.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.Height} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.Height.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRevisionNumber(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getRevisionHeight(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 revision_number = 1; + * @return {number} + */ +proto.ibc.core.client.v1.Height.prototype.getRevisionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.client.v1.Height} returns this + */ +proto.ibc.core.client.v1.Height.prototype.setRevisionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 revision_height = 2; + * @return {number} + */ +proto.ibc.core.client.v1.Height.prototype.getRevisionHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.client.v1.Height} returns this + */ +proto.ibc.core.client.v1.Height.prototype.setRevisionHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.client.v1.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.ibc.core.client.v1.Params.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.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.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.Params.toObject = function(includeInstance, msg) { + var f, obj = { + allowedClientsList: (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.ibc.core.client.v1.Params} + */ +proto.ibc.core.client.v1.Params.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.Params} + */ +proto.ibc.core.client.v1.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.addAllowedClients(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.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.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.client.v1.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAllowedClientsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string allowed_clients = 1; + * @return {!Array} + */ +proto.ibc.core.client.v1.Params.prototype.getAllowedClientsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.Params} returns this + */ +proto.ibc.core.client.v1.Params.prototype.setAllowedClientsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.Params} returns this + */ +proto.ibc.core.client.v1.Params.prototype.addAllowedClients = 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.core.client.v1.Params} returns this + */ +proto.ibc.core.client.v1.Params.prototype.clearAllowedClientsList = function() { + return this.setAllowedClientsList([]); +}; + + +goog.object.extend(exports, proto.ibc.core.client.v1); diff --git a/src/types/proto-types/ibc/core/client/v1/genesis_pb.js b/src/types/proto-types/ibc/core/client/v1/genesis_pb.js new file mode 100644 index 00000000..b94703ba --- /dev/null +++ b/src/types/proto-types/ibc/core/client/v1/genesis_pb.js @@ -0,0 +1,860 @@ +// source: ibc/core/client/v1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.ibc.core.client.v1.GenesisMetadata', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.GenesisState', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.IdentifiedGenesisMetadata', 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.client.v1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.client.v1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.client.v1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.GenesisState.displayName = 'proto.ibc.core.client.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.core.client.v1.GenesisMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.GenesisMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.GenesisMetadata.displayName = 'proto.ibc.core.client.v1.GenesisMetadata'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.IdentifiedGenesisMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.client.v1.IdentifiedGenesisMetadata.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.client.v1.IdentifiedGenesisMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.IdentifiedGenesisMetadata.displayName = 'proto.ibc.core.client.v1.IdentifiedGenesisMetadata'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.client.v1.GenesisState.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.core.client.v1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.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.core.client.v1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + clientsList: jspb.Message.toObjectList(msg.getClientsList(), + ibc_core_client_v1_client_pb.IdentifiedClientState.toObject, includeInstance), + clientsConsensusList: jspb.Message.toObjectList(msg.getClientsConsensusList(), + ibc_core_client_v1_client_pb.ClientConsensusStates.toObject, includeInstance), + clientsMetadataList: jspb.Message.toObjectList(msg.getClientsMetadataList(), + proto.ibc.core.client.v1.IdentifiedGenesisMetadata.toObject, includeInstance), + params: (f = msg.getParams()) && ibc_core_client_v1_client_pb.Params.toObject(includeInstance, f), + createLocalhost: jspb.Message.getBooleanFieldWithDefault(msg, 5, false), + nextClientSequence: 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.client.v1.GenesisState} + */ +proto.ibc.core.client.v1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.GenesisState; + return proto.ibc.core.client.v1.GenesisState.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.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.GenesisState} + */ +proto.ibc.core.client.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_core_client_v1_client_pb.IdentifiedClientState; + reader.readMessage(value,ibc_core_client_v1_client_pb.IdentifiedClientState.deserializeBinaryFromReader); + msg.addClients(value); + break; + case 2: + var value = new ibc_core_client_v1_client_pb.ClientConsensusStates; + reader.readMessage(value,ibc_core_client_v1_client_pb.ClientConsensusStates.deserializeBinaryFromReader); + msg.addClientsConsensus(value); + break; + case 3: + var value = new proto.ibc.core.client.v1.IdentifiedGenesisMetadata; + reader.readMessage(value,proto.ibc.core.client.v1.IdentifiedGenesisMetadata.deserializeBinaryFromReader); + msg.addClientsMetadata(value); + break; + case 4: + 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; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setCreateLocalhost(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNextClientSequence(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.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.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.core.client.v1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_client_v1_client_pb.IdentifiedClientState.serializeBinaryToWriter + ); + } + f = message.getClientsConsensusList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + ibc_core_client_v1_client_pb.ClientConsensusStates.serializeBinaryToWriter + ); + } + f = message.getClientsMetadataList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.ibc.core.client.v1.IdentifiedGenesisMetadata.serializeBinaryToWriter + ); + } + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 4, + f, + ibc_core_client_v1_client_pb.Params.serializeBinaryToWriter + ); + } + f = message.getCreateLocalhost(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getNextClientSequence(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } +}; + + +/** + * repeated IdentifiedClientState clients = 1; + * @return {!Array} + */ +proto.ibc.core.client.v1.GenesisState.prototype.getClientsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_client_v1_client_pb.IdentifiedClientState, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.GenesisState} returns this +*/ +proto.ibc.core.client.v1.GenesisState.prototype.setClientsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.client.v1.IdentifiedClientState=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.IdentifiedClientState} + */ +proto.ibc.core.client.v1.GenesisState.prototype.addClients = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.client.v1.IdentifiedClientState, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.client.v1.GenesisState} returns this + */ +proto.ibc.core.client.v1.GenesisState.prototype.clearClientsList = function() { + return this.setClientsList([]); +}; + + +/** + * repeated ClientConsensusStates clients_consensus = 2; + * @return {!Array} + */ +proto.ibc.core.client.v1.GenesisState.prototype.getClientsConsensusList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_client_v1_client_pb.ClientConsensusStates, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.GenesisState} returns this +*/ +proto.ibc.core.client.v1.GenesisState.prototype.setClientsConsensusList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.core.client.v1.ClientConsensusStates=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.ClientConsensusStates} + */ +proto.ibc.core.client.v1.GenesisState.prototype.addClientsConsensus = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.core.client.v1.ClientConsensusStates, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.client.v1.GenesisState} returns this + */ +proto.ibc.core.client.v1.GenesisState.prototype.clearClientsConsensusList = function() { + return this.setClientsConsensusList([]); +}; + + +/** + * repeated IdentifiedGenesisMetadata clients_metadata = 3; + * @return {!Array} + */ +proto.ibc.core.client.v1.GenesisState.prototype.getClientsMetadataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.core.client.v1.IdentifiedGenesisMetadata, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.GenesisState} returns this +*/ +proto.ibc.core.client.v1.GenesisState.prototype.setClientsMetadataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.ibc.core.client.v1.IdentifiedGenesisMetadata=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.IdentifiedGenesisMetadata} + */ +proto.ibc.core.client.v1.GenesisState.prototype.addClientsMetadata = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.ibc.core.client.v1.IdentifiedGenesisMetadata, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.client.v1.GenesisState} returns this + */ +proto.ibc.core.client.v1.GenesisState.prototype.clearClientsMetadataList = function() { + return this.setClientsMetadataList([]); +}; + + +/** + * optional Params params = 4; + * @return {?proto.ibc.core.client.v1.Params} + */ +proto.ibc.core.client.v1.GenesisState.prototype.getParams = function() { + return /** @type{?proto.ibc.core.client.v1.Params} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Params, 4)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Params|undefined} value + * @return {!proto.ibc.core.client.v1.GenesisState} returns this +*/ +proto.ibc.core.client.v1.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.GenesisState} returns this + */ +proto.ibc.core.client.v1.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional bool create_localhost = 5; + * @return {boolean} + */ +proto.ibc.core.client.v1.GenesisState.prototype.getCreateLocalhost = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.core.client.v1.GenesisState} returns this + */ +proto.ibc.core.client.v1.GenesisState.prototype.setCreateLocalhost = function(value) { + return jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional uint64 next_client_sequence = 6; + * @return {number} + */ +proto.ibc.core.client.v1.GenesisState.prototype.getNextClientSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.client.v1.GenesisState} returns this + */ +proto.ibc.core.client.v1.GenesisState.prototype.setNextClientSequence = 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.client.v1.GenesisMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.GenesisMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.GenesisMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.GenesisMetadata.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.ibc.core.client.v1.GenesisMetadata} + */ +proto.ibc.core.client.v1.GenesisMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.GenesisMetadata; + return proto.ibc.core.client.v1.GenesisMetadata.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.GenesisMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.GenesisMetadata} + */ +proto.ibc.core.client.v1.GenesisMetadata.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.ibc.core.client.v1.GenesisMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.GenesisMetadata.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.GenesisMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.GenesisMetadata.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.ibc.core.client.v1.GenesisMetadata.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.ibc.core.client.v1.GenesisMetadata.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.ibc.core.client.v1.GenesisMetadata.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.client.v1.GenesisMetadata} returns this + */ +proto.ibc.core.client.v1.GenesisMetadata.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes value = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.client.v1.GenesisMetadata.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.ibc.core.client.v1.GenesisMetadata.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.ibc.core.client.v1.GenesisMetadata.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.client.v1.GenesisMetadata} returns this + */ +proto.ibc.core.client.v1.GenesisMetadata.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.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.client.v1.IdentifiedGenesisMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.IdentifiedGenesisMetadata.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.IdentifiedGenesisMetadata} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + clientMetadataList: jspb.Message.toObjectList(msg.getClientMetadataList(), + proto.ibc.core.client.v1.GenesisMetadata.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.core.client.v1.IdentifiedGenesisMetadata} + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.IdentifiedGenesisMetadata; + return proto.ibc.core.client.v1.IdentifiedGenesisMetadata.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.IdentifiedGenesisMetadata} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.IdentifiedGenesisMetadata} + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.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 = new proto.ibc.core.client.v1.GenesisMetadata; + reader.readMessage(value,proto.ibc.core.client.v1.GenesisMetadata.deserializeBinaryFromReader); + msg.addClientMetadata(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.IdentifiedGenesisMetadata.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.IdentifiedGenesisMetadata.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.IdentifiedGenesisMetadata} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getClientMetadataList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.ibc.core.client.v1.GenesisMetadata.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.IdentifiedGenesisMetadata} returns this + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated GenesisMetadata client_metadata = 2; + * @return {!Array} + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.prototype.getClientMetadataList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.core.client.v1.GenesisMetadata, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.IdentifiedGenesisMetadata} returns this +*/ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.prototype.setClientMetadataList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.core.client.v1.GenesisMetadata=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.GenesisMetadata} + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.prototype.addClientMetadata = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.core.client.v1.GenesisMetadata, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.client.v1.IdentifiedGenesisMetadata} returns this + */ +proto.ibc.core.client.v1.IdentifiedGenesisMetadata.prototype.clearClientMetadataList = function() { + return this.setClientMetadataList([]); +}; + + +goog.object.extend(exports, proto.ibc.core.client.v1); diff --git a/src/types/proto-types/ibc/core/client/v1/query_grpc_web_pb.js b/src/types/proto-types/ibc/core/client/v1/query_grpc_web_pb.js new file mode 100644 index 00000000..ba2b29b5 --- /dev/null +++ b/src/types/proto-types/ibc/core/client/v1/query_grpc_web_pb.js @@ -0,0 +1,487 @@ +/** + * @fileoverview gRPC-Web generated client stub for ibc.core.client.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js') + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') +const proto = {}; +proto.ibc = {}; +proto.ibc.core = {}; +proto.ibc.core.client = {}; +proto.ibc.core.client.v1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.client.v1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.client.v1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.QueryClientStateRequest, + * !proto.ibc.core.client.v1.QueryClientStateResponse>} + */ +const methodDescriptor_Query_ClientState = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Query/ClientState', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.QueryClientStateRequest, + proto.ibc.core.client.v1.QueryClientStateResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryClientStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryClientStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.QueryClientStateRequest, + * !proto.ibc.core.client.v1.QueryClientStateResponse>} + */ +const methodInfo_Query_ClientState = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.QueryClientStateResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryClientStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryClientStateResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.QueryClientStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.QueryClientStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.QueryClient.prototype.clientState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Query/ClientState', + request, + metadata || {}, + methodDescriptor_Query_ClientState, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.QueryClientStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.QueryPromiseClient.prototype.clientState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Query/ClientState', + request, + metadata || {}, + methodDescriptor_Query_ClientState); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.QueryClientStatesRequest, + * !proto.ibc.core.client.v1.QueryClientStatesResponse>} + */ +const methodDescriptor_Query_ClientStates = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Query/ClientStates', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.QueryClientStatesRequest, + proto.ibc.core.client.v1.QueryClientStatesResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryClientStatesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryClientStatesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.QueryClientStatesRequest, + * !proto.ibc.core.client.v1.QueryClientStatesResponse>} + */ +const methodInfo_Query_ClientStates = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.QueryClientStatesResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryClientStatesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryClientStatesResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.QueryClientStatesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.QueryClientStatesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.QueryClient.prototype.clientStates = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Query/ClientStates', + request, + metadata || {}, + methodDescriptor_Query_ClientStates, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.QueryClientStatesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.QueryPromiseClient.prototype.clientStates = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Query/ClientStates', + request, + metadata || {}, + methodDescriptor_Query_ClientStates); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.QueryConsensusStateRequest, + * !proto.ibc.core.client.v1.QueryConsensusStateResponse>} + */ +const methodDescriptor_Query_ConsensusState = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Query/ConsensusState', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.QueryConsensusStateRequest, + proto.ibc.core.client.v1.QueryConsensusStateResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryConsensusStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.QueryConsensusStateRequest, + * !proto.ibc.core.client.v1.QueryConsensusStateResponse>} + */ +const methodInfo_Query_ConsensusState = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.QueryConsensusStateResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryConsensusStateResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.QueryConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.QueryConsensusStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.QueryClient.prototype.consensusState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Query/ConsensusState', + request, + metadata || {}, + methodDescriptor_Query_ConsensusState, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.QueryConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.QueryPromiseClient.prototype.consensusState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Query/ConsensusState', + request, + metadata || {}, + methodDescriptor_Query_ConsensusState); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.QueryConsensusStatesRequest, + * !proto.ibc.core.client.v1.QueryConsensusStatesResponse>} + */ +const methodDescriptor_Query_ConsensusStates = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Query/ConsensusStates', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.QueryConsensusStatesRequest, + proto.ibc.core.client.v1.QueryConsensusStatesResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryConsensusStatesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryConsensusStatesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.QueryConsensusStatesRequest, + * !proto.ibc.core.client.v1.QueryConsensusStatesResponse>} + */ +const methodInfo_Query_ConsensusStates = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.QueryConsensusStatesResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryConsensusStatesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryConsensusStatesResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.QueryConsensusStatesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.QueryConsensusStatesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.QueryClient.prototype.consensusStates = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Query/ConsensusStates', + request, + metadata || {}, + methodDescriptor_Query_ConsensusStates, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.QueryConsensusStatesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.QueryPromiseClient.prototype.consensusStates = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Query/ConsensusStates', + request, + metadata || {}, + methodDescriptor_Query_ConsensusStates); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.QueryClientParamsRequest, + * !proto.ibc.core.client.v1.QueryClientParamsResponse>} + */ +const methodDescriptor_Query_ClientParams = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Query/ClientParams', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.QueryClientParamsRequest, + proto.ibc.core.client.v1.QueryClientParamsResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.QueryClientParamsRequest, + * !proto.ibc.core.client.v1.QueryClientParamsResponse>} + */ +const methodInfo_Query_ClientParams = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.QueryClientParamsResponse, + /** + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.QueryClientParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.QueryClientParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.QueryClient.prototype.clientParams = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Query/ClientParams', + request, + metadata || {}, + methodDescriptor_Query_ClientParams, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.QueryClientParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.QueryPromiseClient.prototype.clientParams = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Query/ClientParams', + request, + metadata || {}, + methodDescriptor_Query_ClientParams); +}; + + +module.exports = proto.ibc.core.client.v1; + diff --git a/src/types/proto-types/ibc/core/client/v1/query_pb.js b/src/types/proto-types/ibc/core/client/v1/query_pb.js new file mode 100644 index 00000000..73796fba --- /dev/null +++ b/src/types/proto-types/ibc/core/client/v1/query_pb.js @@ -0,0 +1,2113 @@ +// source: ibc/core/client/v1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js'); +goog.object.extend(proto, ibc_core_client_v1_client_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'); +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.ibc.core.client.v1.QueryClientParamsRequest', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryClientParamsResponse', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStateRequest', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStateResponse', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStatesRequest', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.QueryClientStatesResponse', 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); +goog.exportSymbol('proto.ibc.core.client.v1.QueryConsensusStatesResponse', 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.client.v1.QueryClientStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryClientStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryClientStateRequest.displayName = 'proto.ibc.core.client.v1.QueryClientStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryClientStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryClientStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryClientStateResponse.displayName = 'proto.ibc.core.client.v1.QueryClientStateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryClientStatesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryClientStatesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryClientStatesRequest.displayName = 'proto.ibc.core.client.v1.QueryClientStatesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryClientStatesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.client.v1.QueryClientStatesResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryClientStatesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryClientStatesResponse.displayName = 'proto.ibc.core.client.v1.QueryClientStatesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConsensusStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryConsensusStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryConsensusStateRequest.displayName = 'proto.ibc.core.client.v1.QueryConsensusStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConsensusStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryConsensusStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryConsensusStateResponse.displayName = 'proto.ibc.core.client.v1.QueryConsensusStateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConsensusStatesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryConsensusStatesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryConsensusStatesRequest.displayName = 'proto.ibc.core.client.v1.QueryConsensusStatesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConsensusStatesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.client.v1.QueryConsensusStatesResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryConsensusStatesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + 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.QueryClientParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryClientParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryClientParamsRequest.displayName = 'proto.ibc.core.client.v1.QueryClientParamsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryClientParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.QueryClientParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.QueryClientParamsResponse.displayName = 'proto.ibc.core.client.v1.QueryClientParamsResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.QueryClientStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryClientStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: 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.core.client.v1.QueryClientStateRequest} + */ +proto.ibc.core.client.v1.QueryClientStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryClientStateRequest; + return proto.ibc.core.client.v1.QueryClientStateRequest.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.QueryClientStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryClientStateRequest} + */ +proto.ibc.core.client.v1.QueryClientStateRequest.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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.QueryClientStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryClientStateRequest.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.QueryClientStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientStateRequest.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.QueryClientStateRequest.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.QueryClientStateRequest} returns this + */ +proto.ibc.core.client.v1.QueryClientStateRequest.prototype.setClientId = 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.core.client.v1.QueryClientStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryClientStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + clientState: (f = msg.getClientState()) && google_protobuf_any_pb.Any.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.client.v1.QueryClientStateResponse} + */ +proto.ibc.core.client.v1.QueryClientStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryClientStateResponse; + return proto.ibc.core.client.v1.QueryClientStateResponse.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.QueryClientStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryClientStateResponse} + */ +proto.ibc.core.client.v1.QueryClientStateResponse.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.setClientState(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.client.v1.QueryClientStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryClientStateResponse.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.QueryClientStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.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 google.protobuf.Any client_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.QueryClientStateResponse.prototype.getClientState = 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.QueryClientStateResponse} returns this +*/ +proto.ibc.core.client.v1.QueryClientStateResponse.prototype.setClientState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryClientStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryClientStateResponse.prototype.clearClientState = function() { + return this.setClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryClientStateResponse.prototype.hasClientState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.client.v1.QueryClientStateResponse.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.QueryClientStateResponse.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.QueryClientStateResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.client.v1.QueryClientStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryClientStateResponse.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.QueryClientStateResponse.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.QueryClientStateResponse} returns this +*/ +proto.ibc.core.client.v1.QueryClientStateResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryClientStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryClientStateResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryClientStateResponse.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.client.v1.QueryClientStatesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientStatesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryClientStatesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientStatesRequest.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.core.client.v1.QueryClientStatesRequest} + */ +proto.ibc.core.client.v1.QueryClientStatesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryClientStatesRequest; + return proto.ibc.core.client.v1.QueryClientStatesRequest.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.QueryClientStatesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryClientStatesRequest} + */ +proto.ibc.core.client.v1.QueryClientStatesRequest.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.core.client.v1.QueryClientStatesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryClientStatesRequest.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.QueryClientStatesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientStatesRequest.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.core.client.v1.QueryClientStatesRequest.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.core.client.v1.QueryClientStatesRequest} returns this +*/ +proto.ibc.core.client.v1.QueryClientStatesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryClientStatesRequest} returns this + */ +proto.ibc.core.client.v1.QueryClientStatesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryClientStatesRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.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.core.client.v1.QueryClientStatesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientStatesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryClientStatesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + clientStatesList: jspb.Message.toObjectList(msg.getClientStatesList(), + ibc_core_client_v1_client_pb.IdentifiedClientState.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.core.client.v1.QueryClientStatesResponse} + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryClientStatesResponse; + return proto.ibc.core.client.v1.QueryClientStatesResponse.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.QueryClientStatesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryClientStatesResponse} + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.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.IdentifiedClientState; + reader.readMessage(value,ibc_core_client_v1_client_pb.IdentifiedClientState.deserializeBinaryFromReader); + msg.addClientStates(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.core.client.v1.QueryClientStatesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryClientStatesResponse.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.QueryClientStatesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientStatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_client_v1_client_pb.IdentifiedClientState.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated IdentifiedClientState client_states = 1; + * @return {!Array} + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.prototype.getClientStatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_client_v1_client_pb.IdentifiedClientState, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.QueryClientStatesResponse} returns this +*/ +proto.ibc.core.client.v1.QueryClientStatesResponse.prototype.setClientStatesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.client.v1.IdentifiedClientState=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.IdentifiedClientState} + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.prototype.addClientStates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.client.v1.IdentifiedClientState, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.client.v1.QueryClientStatesResponse} returns this + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.prototype.clearClientStatesList = function() { + return this.setClientStatesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.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.QueryClientStatesResponse} returns this +*/ +proto.ibc.core.client.v1.QueryClientStatesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryClientStatesResponse} returns this + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryClientStatesResponse.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.core.client.v1.QueryConsensusStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryConsensusStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConsensusStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + revisionNumber: jspb.Message.getFieldWithDefault(msg, 2, 0), + revisionHeight: jspb.Message.getFieldWithDefault(msg, 3, 0), + latestHeight: 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.core.client.v1.QueryConsensusStateRequest} + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryConsensusStateRequest; + return proto.ibc.core.client.v1.QueryConsensusStateRequest.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.QueryConsensusStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryConsensusStateRequest} + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.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.setRevisionNumber(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRevisionHeight(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLatestHeight(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.QueryConsensusStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryConsensusStateRequest.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.QueryConsensusStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRevisionNumber(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getRevisionHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getLatestHeight(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStateRequest} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 revision_number = 2; + * @return {number} + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.prototype.getRevisionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStateRequest} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.prototype.setRevisionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 revision_height = 3; + * @return {number} + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.prototype.getRevisionHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStateRequest} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.prototype.setRevisionHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bool latest_height = 4; + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.prototype.getLatestHeight = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStateRequest} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateRequest.prototype.setLatestHeight = 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.core.client.v1.QueryConsensusStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryConsensusStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConsensusStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + consensusState: (f = msg.getConsensusState()) && google_protobuf_any_pb.Any.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.client.v1.QueryConsensusStateResponse} + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryConsensusStateResponse; + return proto.ibc.core.client.v1.QueryConsensusStateResponse.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.QueryConsensusStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryConsensusStateResponse} + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.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.setConsensusState(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.client.v1.QueryConsensusStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryConsensusStateResponse.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.QueryConsensusStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConsensusState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.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 google.protobuf.Any consensus_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.prototype.getConsensusState = 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.QueryConsensusStateResponse} returns this +*/ +proto.ibc.core.client.v1.QueryConsensusStateResponse.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryConsensusStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.prototype.hasConsensusState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.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.QueryConsensusStateResponse.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.QueryConsensusStateResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.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.QueryConsensusStateResponse.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.QueryConsensusStateResponse} returns this +*/ +proto.ibc.core.client.v1.QueryConsensusStateResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryConsensusStateResponse} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryConsensusStateResponse.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.client.v1.QueryConsensusStatesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryConsensusStatesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConsensusStatesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: 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.ibc.core.client.v1.QueryConsensusStatesRequest} + */ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryConsensusStatesRequest; + return proto.ibc.core.client.v1.QueryConsensusStatesRequest.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.QueryConsensusStatesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryConsensusStatesRequest} + */ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.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 = 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.core.client.v1.QueryConsensusStatesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryConsensusStatesRequest.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.QueryConsensusStatesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + 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 client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStatesRequest} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.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.QueryConsensusStatesRequest.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.QueryConsensusStatesRequest} returns this +*/ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryConsensusStatesRequest} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryConsensusStatesRequest.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.QueryConsensusStatesResponse.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.core.client.v1.QueryConsensusStatesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryConsensusStatesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConsensusStatesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + consensusStatesList: jspb.Message.toObjectList(msg.getConsensusStatesList(), + ibc_core_client_v1_client_pb.ConsensusStateWithHeight.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.core.client.v1.QueryConsensusStatesResponse} + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.QueryConsensusStatesResponse; + return proto.ibc.core.client.v1.QueryConsensusStatesResponse.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.QueryConsensusStatesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryConsensusStatesResponse} + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.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.ConsensusStateWithHeight; + reader.readMessage(value,ibc_core_client_v1_client_pb.ConsensusStateWithHeight.deserializeBinaryFromReader); + msg.addConsensusStates(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.core.client.v1.QueryConsensusStatesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryConsensusStatesResponse.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.QueryConsensusStatesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConsensusStatesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_client_v1_client_pb.ConsensusStateWithHeight.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ConsensusStateWithHeight consensus_states = 1; + * @return {!Array} + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.prototype.getConsensusStatesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_client_v1_client_pb.ConsensusStateWithHeight, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.client.v1.QueryConsensusStatesResponse} returns this +*/ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.prototype.setConsensusStatesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.client.v1.ConsensusStateWithHeight=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.client.v1.ConsensusStateWithHeight} + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.prototype.addConsensusStates = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.client.v1.ConsensusStateWithHeight, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.client.v1.QueryConsensusStatesResponse} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.prototype.clearConsensusStatesList = function() { + return this.setConsensusStatesList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.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.QueryConsensusStatesResponse} returns this +*/ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.QueryConsensusStatesResponse} returns this + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryConsensusStatesResponse.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.core.client.v1.QueryClientParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientParamsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryClientParamsRequest} 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) { + 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.QueryClientParamsRequest} + */ +proto.ibc.core.client.v1.QueryClientParamsRequest.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryClientParamsRequest} + */ +proto.ibc.core.client.v1.QueryClientParamsRequest.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.QueryClientParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryClientParamsRequest.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.QueryClientParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientParamsRequest.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.QueryClientParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.QueryClientParamsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryClientParamsResponse} 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) { + var f, obj = { + 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.QueryClientParamsResponse} + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.QueryClientParamsResponse} + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.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.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.QueryClientParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.QueryClientParamsResponse.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.QueryClientParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_client_v1_client_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * 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 + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.QueryClientParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.ibc.core.client.v1); diff --git a/src/types/proto-types/ibc/core/client/v1/tx_grpc_web_pb.js b/src/types/proto-types/ibc/core/client/v1/tx_grpc_web_pb.js new file mode 100644 index 00000000..aadf7bbb --- /dev/null +++ b/src/types/proto-types/ibc/core/client/v1/tx_grpc_web_pb.js @@ -0,0 +1,403 @@ +/** + * @fileoverview gRPC-Web generated client stub for ibc.core.client.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js') +const proto = {}; +proto.ibc = {}; +proto.ibc.core = {}; +proto.ibc.core.client = {}; +proto.ibc.core.client.v1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.client.v1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.client.v1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.MsgCreateClient, + * !proto.ibc.core.client.v1.MsgCreateClientResponse>} + */ +const methodDescriptor_Msg_CreateClient = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Msg/CreateClient', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.MsgCreateClient, + proto.ibc.core.client.v1.MsgCreateClientResponse, + /** + * @param {!proto.ibc.core.client.v1.MsgCreateClient} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.MsgCreateClientResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.MsgCreateClient, + * !proto.ibc.core.client.v1.MsgCreateClientResponse>} + */ +const methodInfo_Msg_CreateClient = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.MsgCreateClientResponse, + /** + * @param {!proto.ibc.core.client.v1.MsgCreateClient} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.MsgCreateClientResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.MsgCreateClient} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.MsgCreateClientResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.MsgClient.prototype.createClient = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Msg/CreateClient', + request, + metadata || {}, + methodDescriptor_Msg_CreateClient, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.MsgCreateClient} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.MsgPromiseClient.prototype.createClient = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Msg/CreateClient', + request, + metadata || {}, + methodDescriptor_Msg_CreateClient); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.MsgUpdateClient, + * !proto.ibc.core.client.v1.MsgUpdateClientResponse>} + */ +const methodDescriptor_Msg_UpdateClient = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Msg/UpdateClient', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.MsgUpdateClient, + proto.ibc.core.client.v1.MsgUpdateClientResponse, + /** + * @param {!proto.ibc.core.client.v1.MsgUpdateClient} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.MsgUpdateClientResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.MsgUpdateClient, + * !proto.ibc.core.client.v1.MsgUpdateClientResponse>} + */ +const methodInfo_Msg_UpdateClient = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.MsgUpdateClientResponse, + /** + * @param {!proto.ibc.core.client.v1.MsgUpdateClient} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.MsgUpdateClientResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.MsgUpdateClient} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.MsgUpdateClientResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.MsgClient.prototype.updateClient = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Msg/UpdateClient', + request, + metadata || {}, + methodDescriptor_Msg_UpdateClient, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.MsgUpdateClient} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.MsgPromiseClient.prototype.updateClient = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Msg/UpdateClient', + request, + metadata || {}, + methodDescriptor_Msg_UpdateClient); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.MsgUpgradeClient, + * !proto.ibc.core.client.v1.MsgUpgradeClientResponse>} + */ +const methodDescriptor_Msg_UpgradeClient = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Msg/UpgradeClient', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.MsgUpgradeClient, + proto.ibc.core.client.v1.MsgUpgradeClientResponse, + /** + * @param {!proto.ibc.core.client.v1.MsgUpgradeClient} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.MsgUpgradeClientResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.MsgUpgradeClient, + * !proto.ibc.core.client.v1.MsgUpgradeClientResponse>} + */ +const methodInfo_Msg_UpgradeClient = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.MsgUpgradeClientResponse, + /** + * @param {!proto.ibc.core.client.v1.MsgUpgradeClient} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.MsgUpgradeClientResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.MsgUpgradeClient} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.MsgUpgradeClientResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.MsgClient.prototype.upgradeClient = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Msg/UpgradeClient', + request, + metadata || {}, + methodDescriptor_Msg_UpgradeClient, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.MsgUpgradeClient} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.MsgPromiseClient.prototype.upgradeClient = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Msg/UpgradeClient', + request, + metadata || {}, + methodDescriptor_Msg_UpgradeClient); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.client.v1.MsgSubmitMisbehaviour, + * !proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse>} + */ +const methodDescriptor_Msg_SubmitMisbehaviour = new grpc.web.MethodDescriptor( + '/ibc.core.client.v1.Msg/SubmitMisbehaviour', + grpc.web.MethodType.UNARY, + proto.ibc.core.client.v1.MsgSubmitMisbehaviour, + proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse, + /** + * @param {!proto.ibc.core.client.v1.MsgSubmitMisbehaviour} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.client.v1.MsgSubmitMisbehaviour, + * !proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse>} + */ +const methodInfo_Msg_SubmitMisbehaviour = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse, + /** + * @param {!proto.ibc.core.client.v1.MsgSubmitMisbehaviour} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.client.v1.MsgSubmitMisbehaviour} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.client.v1.MsgClient.prototype.submitMisbehaviour = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.client.v1.Msg/SubmitMisbehaviour', + request, + metadata || {}, + methodDescriptor_Msg_SubmitMisbehaviour, + callback); +}; + + +/** + * @param {!proto.ibc.core.client.v1.MsgSubmitMisbehaviour} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.client.v1.MsgPromiseClient.prototype.submitMisbehaviour = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.client.v1.Msg/SubmitMisbehaviour', + request, + metadata || {}, + methodDescriptor_Msg_SubmitMisbehaviour); +}; + + +module.exports = proto.ibc.core.client.v1; + diff --git a/src/types/proto-types/ibc/core/client/v1/tx_pb.js b/src/types/proto-types/ibc/core/client/v1/tx_pb.js new file mode 100644 index 00000000..396b7462 --- /dev/null +++ b/src/types/proto-types/ibc/core/client/v1/tx_pb.js @@ -0,0 +1,1625 @@ +// source: ibc/core/client/v1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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'); +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.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.MsgUpgradeClient', null, global); +goog.exportSymbol('proto.ibc.core.client.v1.MsgUpgradeClientResponse', 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.client.v1.MsgCreateClient = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgCreateClient, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgCreateClient.displayName = 'proto.ibc.core.client.v1.MsgCreateClient'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgCreateClientResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgCreateClientResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgCreateClientResponse.displayName = 'proto.ibc.core.client.v1.MsgCreateClientResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgUpdateClient = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgUpdateClient, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgUpdateClient.displayName = 'proto.ibc.core.client.v1.MsgUpdateClient'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgUpdateClientResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgUpdateClientResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgUpdateClientResponse.displayName = 'proto.ibc.core.client.v1.MsgUpdateClientResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgUpgradeClient = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgUpgradeClient, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgUpgradeClient.displayName = 'proto.ibc.core.client.v1.MsgUpgradeClient'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgUpgradeClientResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgUpgradeClientResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgUpgradeClientResponse.displayName = 'proto.ibc.core.client.v1.MsgUpgradeClientResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgSubmitMisbehaviour = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgSubmitMisbehaviour, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgSubmitMisbehaviour.displayName = 'proto.ibc.core.client.v1.MsgSubmitMisbehaviour'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgSubmitMisbehaviourResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.displayName = 'proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.MsgCreateClient.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgCreateClient.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgCreateClient} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgCreateClient.toObject = function(includeInstance, msg) { + var f, obj = { + clientState: (f = msg.getClientState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + consensusState: (f = msg.getConsensusState()) && 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.MsgCreateClient} + */ +proto.ibc.core.client.v1.MsgCreateClient.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgCreateClient; + return proto.ibc.core.client.v1.MsgCreateClient.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.MsgCreateClient} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgCreateClient} + */ +proto.ibc.core.client.v1.MsgCreateClient.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.setClientState(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; + 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.MsgCreateClient.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgCreateClient.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.MsgCreateClient} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgCreateClient.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getConsensusState(); + 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 google.protobuf.Any client_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.MsgCreateClient.prototype.getClientState = 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.MsgCreateClient} returns this +*/ +proto.ibc.core.client.v1.MsgCreateClient.prototype.setClientState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.MsgCreateClient} returns this + */ +proto.ibc.core.client.v1.MsgCreateClient.prototype.clearClientState = function() { + return this.setClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.MsgCreateClient.prototype.hasClientState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Any consensus_state = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.MsgCreateClient.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.core.client.v1.MsgCreateClient} returns this +*/ +proto.ibc.core.client.v1.MsgCreateClient.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.MsgCreateClient} returns this + */ +proto.ibc.core.client.v1.MsgCreateClient.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.MsgCreateClient.prototype.hasConsensusState = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string signer = 3; + * @return {string} + */ +proto.ibc.core.client.v1.MsgCreateClient.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgCreateClient} returns this + */ +proto.ibc.core.client.v1.MsgCreateClient.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.MsgCreateClientResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgCreateClientResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgCreateClientResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgCreateClientResponse.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.MsgCreateClientResponse} + */ +proto.ibc.core.client.v1.MsgCreateClientResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgCreateClientResponse; + return proto.ibc.core.client.v1.MsgCreateClientResponse.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.MsgCreateClientResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgCreateClientResponse} + */ +proto.ibc.core.client.v1.MsgCreateClientResponse.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.MsgCreateClientResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgCreateClientResponse.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.MsgCreateClientResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgCreateClientResponse.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.MsgUpdateClient.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgUpdateClient.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgUpdateClient} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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), + 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.MsgUpdateClient} + */ +proto.ibc.core.client.v1.MsgUpdateClient.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgUpdateClient; + return proto.ibc.core.client.v1.MsgUpdateClient.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.MsgUpdateClient} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgUpdateClient} + */ +proto.ibc.core.client.v1.MsgUpdateClient.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 = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setHeader(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.MsgUpdateClient.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgUpdateClient.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.MsgUpdateClient} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpdateClient.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHeader(); + 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 string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.MsgUpdateClient.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgUpdateClient} returns this + */ +proto.ibc.core.client.v1.MsgUpdateClient.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any header = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.MsgUpdateClient.prototype.getHeader = 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.MsgUpdateClient} returns this +*/ +proto.ibc.core.client.v1.MsgUpdateClient.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 2, 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.MsgUpdateClient.prototype.hasHeader = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string signer = 3; + * @return {string} + */ +proto.ibc.core.client.v1.MsgUpdateClient.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgUpdateClient} returns this + */ +proto.ibc.core.client.v1.MsgUpdateClient.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.MsgUpdateClientResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgUpdateClientResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgUpdateClientResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpdateClientResponse.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.MsgUpdateClientResponse} + */ +proto.ibc.core.client.v1.MsgUpdateClientResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgUpdateClientResponse; + return proto.ibc.core.client.v1.MsgUpdateClientResponse.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.MsgUpdateClientResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgUpdateClientResponse} + */ +proto.ibc.core.client.v1.MsgUpdateClientResponse.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.MsgUpdateClientResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgUpdateClientResponse.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.MsgUpdateClientResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpdateClientResponse.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.MsgUpgradeClient.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgUpgradeClient.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgUpgradeClient} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpgradeClient.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + clientState: (f = msg.getClientState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + consensusState: (f = msg.getConsensusState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + proofUpgradeClient: msg.getProofUpgradeClient_asB64(), + proofUpgradeConsensusState: msg.getProofUpgradeConsensusState_asB64(), + 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.client.v1.MsgUpgradeClient} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgUpgradeClient; + return proto.ibc.core.client.v1.MsgUpgradeClient.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.MsgUpgradeClient} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgUpgradeClient} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.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 = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setClientState(value); + break; + case 3: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setConsensusState(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofUpgradeClient(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofUpgradeConsensusState(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.client.v1.MsgUpgradeClient.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgUpgradeClient.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.MsgUpgradeClient} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpgradeClient.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getClientState(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getConsensusState(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getProofUpgradeClient_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getProofUpgradeConsensusState_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgUpgradeClient} returns this + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any client_state = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.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.core.client.v1.MsgUpgradeClient} returns this +*/ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.setClientState = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.MsgUpgradeClient} returns this + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.clearClientState = function() { + return this.setClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.hasClientState = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Any consensus_state = 3; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getConsensusState = 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.core.client.v1.MsgUpgradeClient} returns this +*/ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.MsgUpgradeClient} returns this + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.hasConsensusState = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes proof_upgrade_client = 4; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getProofUpgradeClient = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * optional bytes proof_upgrade_client = 4; + * This is a type-conversion wrapper around `getProofUpgradeClient()` + * @return {string} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getProofUpgradeClient_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofUpgradeClient())); +}; + + +/** + * optional bytes proof_upgrade_client = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofUpgradeClient()` + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getProofUpgradeClient_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofUpgradeClient())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.client.v1.MsgUpgradeClient} returns this + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.setProofUpgradeClient = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bytes proof_upgrade_consensus_state = 5; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getProofUpgradeConsensusState = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes proof_upgrade_consensus_state = 5; + * This is a type-conversion wrapper around `getProofUpgradeConsensusState()` + * @return {string} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getProofUpgradeConsensusState_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofUpgradeConsensusState())); +}; + + +/** + * optional bytes proof_upgrade_consensus_state = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofUpgradeConsensusState()` + * @return {!Uint8Array} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getProofUpgradeConsensusState_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofUpgradeConsensusState())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.client.v1.MsgUpgradeClient} returns this + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.setProofUpgradeConsensusState = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional string signer = 6; + * @return {string} + */ +proto.ibc.core.client.v1.MsgUpgradeClient.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgUpgradeClient} returns this + */ +proto.ibc.core.client.v1.MsgUpgradeClient.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.client.v1.MsgUpgradeClientResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgUpgradeClientResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgUpgradeClientResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpgradeClientResponse.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.MsgUpgradeClientResponse} + */ +proto.ibc.core.client.v1.MsgUpgradeClientResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgUpgradeClientResponse; + return proto.ibc.core.client.v1.MsgUpgradeClientResponse.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.MsgUpgradeClientResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgUpgradeClientResponse} + */ +proto.ibc.core.client.v1.MsgUpgradeClientResponse.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.MsgUpgradeClientResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgUpgradeClientResponse.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.MsgUpgradeClientResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgUpgradeClientResponse.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.MsgSubmitMisbehaviour.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgSubmitMisbehaviour.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgSubmitMisbehaviour} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + misbehaviour: (f = msg.getMisbehaviour()) && 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.MsgSubmitMisbehaviour} + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgSubmitMisbehaviour; + return proto.ibc.core.client.v1.MsgSubmitMisbehaviour.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.MsgSubmitMisbehaviour} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgSubmitMisbehaviour} + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.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 = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setMisbehaviour(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.MsgSubmitMisbehaviour.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgSubmitMisbehaviour.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.MsgSubmitMisbehaviour} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getMisbehaviour(); + 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 string client_id = 1; + * @return {string} + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgSubmitMisbehaviour} returns this + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Any misbehaviour = 2; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.prototype.getMisbehaviour = 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.MsgSubmitMisbehaviour} returns this +*/ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.prototype.setMisbehaviour = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.client.v1.MsgSubmitMisbehaviour} returns this + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.prototype.clearMisbehaviour = function() { + return this.setMisbehaviour(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.prototype.hasMisbehaviour = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string signer = 3; + * @return {string} + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.client.v1.MsgSubmitMisbehaviour} returns this + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviour.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.MsgSubmitMisbehaviourResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgSubmitMisbehaviourResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.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.MsgSubmitMisbehaviourResponse} + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse; + return proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.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.MsgSubmitMisbehaviourResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse} + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.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.MsgSubmitMisbehaviourResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.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.MsgSubmitMisbehaviourResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.client.v1.MsgSubmitMisbehaviourResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.ibc.core.client.v1); diff --git a/src/types/proto-types/ibc/core/commitment/v1/commitment_pb.js b/src/types/proto-types/ibc/core/commitment/v1/commitment_pb.js new file mode 100644 index 00000000..e7eaa7c5 --- /dev/null +++ b/src/types/proto-types/ibc/core/commitment/v1/commitment_pb.js @@ -0,0 +1,731 @@ +// source: ibc/core/commitment/v1/commitment.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 confio_proofs_pb = require('../../../../confio/proofs_pb.js'); +goog.object.extend(proto, confio_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); +goog.exportSymbol('proto.ibc.core.commitment.v1.MerkleRoot', 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.commitment.v1.MerkleRoot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.commitment.v1.MerkleRoot, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.commitment.v1.MerkleRoot.displayName = 'proto.ibc.core.commitment.v1.MerkleRoot'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.commitment.v1.MerklePrefix = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.commitment.v1.MerklePrefix, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.commitment.v1.MerklePrefix.displayName = 'proto.ibc.core.commitment.v1.MerklePrefix'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.commitment.v1.MerklePath = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.commitment.v1.MerklePath.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.commitment.v1.MerklePath, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.commitment.v1.MerklePath.displayName = 'proto.ibc.core.commitment.v1.MerklePath'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.commitment.v1.MerkleProof = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.commitment.v1.MerkleProof.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.commitment.v1.MerkleProof, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.commitment.v1.MerkleProof.displayName = 'proto.ibc.core.commitment.v1.MerkleProof'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.commitment.v1.MerkleRoot.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.commitment.v1.MerkleRoot.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.commitment.v1.MerkleRoot} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.commitment.v1.MerkleRoot.toObject = function(includeInstance, msg) { + var f, obj = { + hash: msg.getHash_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.core.commitment.v1.MerkleRoot} + */ +proto.ibc.core.commitment.v1.MerkleRoot.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.commitment.v1.MerkleRoot; + return proto.ibc.core.commitment.v1.MerkleRoot.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.commitment.v1.MerkleRoot} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.commitment.v1.MerkleRoot} + */ +proto.ibc.core.commitment.v1.MerkleRoot.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.setHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.commitment.v1.MerkleRoot.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.commitment.v1.MerkleRoot.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.commitment.v1.MerkleRoot} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.commitment.v1.MerkleRoot.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.commitment.v1.MerkleRoot.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.ibc.core.commitment.v1.MerkleRoot.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.ibc.core.commitment.v1.MerkleRoot.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.commitment.v1.MerkleRoot} returns this + */ +proto.ibc.core.commitment.v1.MerkleRoot.prototype.setHash = 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.core.commitment.v1.MerklePrefix.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.commitment.v1.MerklePrefix.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.commitment.v1.MerklePrefix} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.commitment.v1.MerklePrefix.toObject = function(includeInstance, msg) { + var f, obj = { + keyPrefix: msg.getKeyPrefix_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.core.commitment.v1.MerklePrefix} + */ +proto.ibc.core.commitment.v1.MerklePrefix.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.commitment.v1.MerklePrefix; + return proto.ibc.core.commitment.v1.MerklePrefix.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.commitment.v1.MerklePrefix} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.commitment.v1.MerklePrefix} + */ +proto.ibc.core.commitment.v1.MerklePrefix.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.setKeyPrefix(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.commitment.v1.MerklePrefix.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.commitment.v1.MerklePrefix.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.commitment.v1.MerklePrefix} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.commitment.v1.MerklePrefix.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyPrefix_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes key_prefix = 1; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.commitment.v1.MerklePrefix.prototype.getKeyPrefix = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes key_prefix = 1; + * This is a type-conversion wrapper around `getKeyPrefix()` + * @return {string} + */ +proto.ibc.core.commitment.v1.MerklePrefix.prototype.getKeyPrefix_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKeyPrefix())); +}; + + +/** + * optional bytes key_prefix = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getKeyPrefix()` + * @return {!Uint8Array} + */ +proto.ibc.core.commitment.v1.MerklePrefix.prototype.getKeyPrefix_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKeyPrefix())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.commitment.v1.MerklePrefix} returns this + */ +proto.ibc.core.commitment.v1.MerklePrefix.prototype.setKeyPrefix = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.commitment.v1.MerklePath.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.core.commitment.v1.MerklePath.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.commitment.v1.MerklePath.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.commitment.v1.MerklePath} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.commitment.v1.MerklePath.toObject = function(includeInstance, msg) { + var f, obj = { + keyPathList: (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.ibc.core.commitment.v1.MerklePath} + */ +proto.ibc.core.commitment.v1.MerklePath.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.commitment.v1.MerklePath; + return proto.ibc.core.commitment.v1.MerklePath.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.commitment.v1.MerklePath} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.commitment.v1.MerklePath} + */ +proto.ibc.core.commitment.v1.MerklePath.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.addKeyPath(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.commitment.v1.MerklePath.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.commitment.v1.MerklePath.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.commitment.v1.MerklePath} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.commitment.v1.MerklePath.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyPathList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string key_path = 1; + * @return {!Array} + */ +proto.ibc.core.commitment.v1.MerklePath.prototype.getKeyPathList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.commitment.v1.MerklePath} returns this + */ +proto.ibc.core.commitment.v1.MerklePath.prototype.setKeyPathList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.commitment.v1.MerklePath} returns this + */ +proto.ibc.core.commitment.v1.MerklePath.prototype.addKeyPath = 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.core.commitment.v1.MerklePath} returns this + */ +proto.ibc.core.commitment.v1.MerklePath.prototype.clearKeyPathList = function() { + return this.setKeyPathList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.commitment.v1.MerkleProof.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.core.commitment.v1.MerkleProof.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.commitment.v1.MerkleProof.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.commitment.v1.MerkleProof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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) + }; + + 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.commitment.v1.MerkleProof} + */ +proto.ibc.core.commitment.v1.MerkleProof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.commitment.v1.MerkleProof; + return proto.ibc.core.commitment.v1.MerkleProof.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.commitment.v1.MerkleProof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.commitment.v1.MerkleProof} + */ +proto.ibc.core.commitment.v1.MerkleProof.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new confio_proofs_pb.CommitmentProof; + reader.readMessage(value,confio_proofs_pb.CommitmentProof.deserializeBinaryFromReader); + msg.addProofs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.commitment.v1.MerkleProof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.commitment.v1.MerkleProof.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.commitment.v1.MerkleProof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.commitment.v1.MerkleProof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProofsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + confio_proofs_pb.CommitmentProof.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ics23.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)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.commitment.v1.MerkleProof} returns this +*/ +proto.ibc.core.commitment.v1.MerkleProof.prototype.setProofsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ics23.CommitmentProof=} opt_value + * @param {number=} opt_index + * @return {!proto.ics23.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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.commitment.v1.MerkleProof} returns this + */ +proto.ibc.core.commitment.v1.MerkleProof.prototype.clearProofsList = function() { + return this.setProofsList([]); +}; + + +goog.object.extend(exports, proto.ibc.core.commitment.v1); diff --git a/src/types/proto-types/ibc/core/connection/v1/connection_pb.js b/src/types/proto-types/ibc/core/connection/v1/connection_pb.js new file mode 100644 index 00000000..ed54cebd --- /dev/null +++ b/src/types/proto-types/ibc/core/connection/v1/connection_pb.js @@ -0,0 +1,1533 @@ +// source: ibc/core/connection/v1/connection.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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_commitment_v1_commitment_pb = require('../../../../ibc/core/commitment/v1/commitment_pb.js'); +goog.object.extend(proto, ibc_core_commitment_v1_commitment_pb); +goog.exportSymbol('proto.ibc.core.connection.v1.ClientPaths', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.ConnectionEnd', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.ConnectionPaths', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.Counterparty', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.IdentifiedConnection', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.State', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.Version', 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.connection.v1.ConnectionEnd = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.ConnectionEnd.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.ConnectionEnd, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.ConnectionEnd.displayName = 'proto.ibc.core.connection.v1.ConnectionEnd'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.IdentifiedConnection = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.IdentifiedConnection.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.IdentifiedConnection, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.IdentifiedConnection.displayName = 'proto.ibc.core.connection.v1.IdentifiedConnection'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Counterparty = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.Counterparty, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.Counterparty.displayName = 'proto.ibc.core.connection.v1.Counterparty'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ClientPaths = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.ClientPaths.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.ClientPaths, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.ClientPaths.displayName = 'proto.ibc.core.connection.v1.ClientPaths'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ConnectionPaths = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.ConnectionPaths.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.ConnectionPaths, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.ConnectionPaths.displayName = 'proto.ibc.core.connection.v1.ConnectionPaths'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Version = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.Version.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.Version, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.Version.displayName = 'proto.ibc.core.connection.v1.Version'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.v1.ConnectionEnd.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.connection.v1.ConnectionEnd.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.ConnectionEnd.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ConnectionEnd} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.ConnectionEnd.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + versionsList: jspb.Message.toObjectList(msg.getVersionsList(), + proto.ibc.core.connection.v1.Version.toObject, includeInstance), + state: jspb.Message.getFieldWithDefault(msg, 3, 0), + counterparty: (f = msg.getCounterparty()) && proto.ibc.core.connection.v1.Counterparty.toObject(includeInstance, f), + delayPeriod: 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.ibc.core.connection.v1.ConnectionEnd} + */ +proto.ibc.core.connection.v1.ConnectionEnd.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.ConnectionEnd; + return proto.ibc.core.connection.v1.ConnectionEnd.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.ConnectionEnd} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.ConnectionEnd} + */ +proto.ibc.core.connection.v1.ConnectionEnd.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 = new proto.ibc.core.connection.v1.Version; + reader.readMessage(value,proto.ibc.core.connection.v1.Version.deserializeBinaryFromReader); + msg.addVersions(value); + break; + case 3: + var value = /** @type {!proto.ibc.core.connection.v1.State} */ (reader.readEnum()); + msg.setState(value); + break; + case 4: + var value = new proto.ibc.core.connection.v1.Counterparty; + reader.readMessage(value,proto.ibc.core.connection.v1.Counterparty.deserializeBinaryFromReader); + msg.setCounterparty(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDelayPeriod(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.ConnectionEnd.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.ConnectionEnd.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.ConnectionEnd} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.ConnectionEnd.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.ibc.core.connection.v1.Version.serializeBinaryToWriter + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getCounterparty(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.ibc.core.connection.v1.Counterparty.serializeBinaryToWriter + ); + } + f = message.getDelayPeriod(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.ConnectionEnd} returns this + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated Version versions = 2; + * @return {!Array} + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.getVersionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.core.connection.v1.Version, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.ConnectionEnd} returns this +*/ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.setVersionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.Version=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.Version} + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.addVersions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.core.connection.v1.Version, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.connection.v1.ConnectionEnd} returns this + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.clearVersionsList = function() { + return this.setVersionsList([]); +}; + + +/** + * optional State state = 3; + * @return {!proto.ibc.core.connection.v1.State} + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.getState = function() { + return /** @type {!proto.ibc.core.connection.v1.State} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.State} value + * @return {!proto.ibc.core.connection.v1.ConnectionEnd} returns this + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional Counterparty counterparty = 4; + * @return {?proto.ibc.core.connection.v1.Counterparty} + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.getCounterparty = function() { + return /** @type{?proto.ibc.core.connection.v1.Counterparty} */ ( + jspb.Message.getWrapperField(this, proto.ibc.core.connection.v1.Counterparty, 4)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.Counterparty|undefined} value + * @return {!proto.ibc.core.connection.v1.ConnectionEnd} returns this +*/ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.setCounterparty = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.ConnectionEnd} returns this + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.clearCounterparty = function() { + return this.setCounterparty(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.hasCounterparty = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint64 delay_period = 5; + * @return {number} + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.getDelayPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.connection.v1.ConnectionEnd} returns this + */ +proto.ibc.core.connection.v1.ConnectionEnd.prototype.setDelayPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.v1.IdentifiedConnection.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.connection.v1.IdentifiedConnection.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.IdentifiedConnection.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.IdentifiedConnection} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.IdentifiedConnection.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + clientId: jspb.Message.getFieldWithDefault(msg, 2, ""), + versionsList: jspb.Message.toObjectList(msg.getVersionsList(), + proto.ibc.core.connection.v1.Version.toObject, includeInstance), + state: jspb.Message.getFieldWithDefault(msg, 4, 0), + counterparty: (f = msg.getCounterparty()) && proto.ibc.core.connection.v1.Counterparty.toObject(includeInstance, f), + delayPeriod: 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.connection.v1.IdentifiedConnection} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.IdentifiedConnection; + return proto.ibc.core.connection.v1.IdentifiedConnection.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.IdentifiedConnection} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setClientId(value); + break; + case 3: + var value = new proto.ibc.core.connection.v1.Version; + reader.readMessage(value,proto.ibc.core.connection.v1.Version.deserializeBinaryFromReader); + msg.addVersions(value); + break; + case 4: + var value = /** @type {!proto.ibc.core.connection.v1.State} */ (reader.readEnum()); + msg.setState(value); + break; + case 5: + var value = new proto.ibc.core.connection.v1.Counterparty; + reader.readMessage(value,proto.ibc.core.connection.v1.Counterparty.deserializeBinaryFromReader); + msg.setCounterparty(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDelayPeriod(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.IdentifiedConnection.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.IdentifiedConnection.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.IdentifiedConnection} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.IdentifiedConnection.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.ibc.core.connection.v1.Version.serializeBinaryToWriter + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getCounterparty(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.ibc.core.connection.v1.Counterparty.serializeBinaryToWriter + ); + } + f = message.getDelayPeriod(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} returns this + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string client_id = 2; + * @return {string} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} returns this + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated Version versions = 3; + * @return {!Array} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.getVersionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.ibc.core.connection.v1.Version, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} returns this +*/ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.setVersionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.Version=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.Version} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.addVersions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.ibc.core.connection.v1.Version, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} returns this + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.clearVersionsList = function() { + return this.setVersionsList([]); +}; + + +/** + * optional State state = 4; + * @return {!proto.ibc.core.connection.v1.State} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.getState = function() { + return /** @type {!proto.ibc.core.connection.v1.State} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.State} value + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} returns this + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional Counterparty counterparty = 5; + * @return {?proto.ibc.core.connection.v1.Counterparty} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.getCounterparty = function() { + return /** @type{?proto.ibc.core.connection.v1.Counterparty} */ ( + jspb.Message.getWrapperField(this, proto.ibc.core.connection.v1.Counterparty, 5)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.Counterparty|undefined} value + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} returns this +*/ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.setCounterparty = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} returns this + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.clearCounterparty = function() { + return this.setCounterparty(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.hasCounterparty = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional uint64 delay_period = 6; + * @return {number} + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.getDelayPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} returns this + */ +proto.ibc.core.connection.v1.IdentifiedConnection.prototype.setDelayPeriod = 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.connection.v1.Counterparty.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.Counterparty.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Counterparty} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.Counterparty.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + connectionId: jspb.Message.getFieldWithDefault(msg, 2, ""), + prefix: (f = msg.getPrefix()) && ibc_core_commitment_v1_commitment_pb.MerklePrefix.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.Counterparty} + */ +proto.ibc.core.connection.v1.Counterparty.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.Counterparty; + return proto.ibc.core.connection.v1.Counterparty.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.Counterparty} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.Counterparty} + */ +proto.ibc.core.connection.v1.Counterparty.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 {string} */ (reader.readString()); + msg.setConnectionId(value); + break; + case 3: + var value = new ibc_core_commitment_v1_commitment_pb.MerklePrefix; + reader.readMessage(value,ibc_core_commitment_v1_commitment_pb.MerklePrefix.deserializeBinaryFromReader); + msg.setPrefix(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.Counterparty.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.Counterparty.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.Counterparty} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.Counterparty.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPrefix(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_commitment_v1_commitment_pb.MerklePrefix.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.Counterparty.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.Counterparty} returns this + */ +proto.ibc.core.connection.v1.Counterparty.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string connection_id = 2; + * @return {string} + */ +proto.ibc.core.connection.v1.Counterparty.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.Counterparty} returns this + */ +proto.ibc.core.connection.v1.Counterparty.prototype.setConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional ibc.core.commitment.v1.MerklePrefix prefix = 3; + * @return {?proto.ibc.core.commitment.v1.MerklePrefix} + */ +proto.ibc.core.connection.v1.Counterparty.prototype.getPrefix = function() { + return /** @type{?proto.ibc.core.commitment.v1.MerklePrefix} */ ( + jspb.Message.getWrapperField(this, ibc_core_commitment_v1_commitment_pb.MerklePrefix, 3)); +}; + + +/** + * @param {?proto.ibc.core.commitment.v1.MerklePrefix|undefined} value + * @return {!proto.ibc.core.connection.v1.Counterparty} returns this +*/ +proto.ibc.core.connection.v1.Counterparty.prototype.setPrefix = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.Counterparty} returns this + */ +proto.ibc.core.connection.v1.Counterparty.prototype.clearPrefix = function() { + return this.setPrefix(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.Counterparty.prototype.hasPrefix = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.v1.ClientPaths.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.core.connection.v1.ClientPaths.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.ClientPaths.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ClientPaths} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.ClientPaths.toObject = function(includeInstance, msg) { + var f, obj = { + pathsList: (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.ibc.core.connection.v1.ClientPaths} + */ +proto.ibc.core.connection.v1.ClientPaths.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.ClientPaths; + return proto.ibc.core.connection.v1.ClientPaths.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.ClientPaths} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.ClientPaths} + */ +proto.ibc.core.connection.v1.ClientPaths.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.addPaths(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.ClientPaths.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.ClientPaths.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.ClientPaths} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.ClientPaths.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPathsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string paths = 1; + * @return {!Array} + */ +proto.ibc.core.connection.v1.ClientPaths.prototype.getPathsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.ClientPaths} returns this + */ +proto.ibc.core.connection.v1.ClientPaths.prototype.setPathsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.ClientPaths} returns this + */ +proto.ibc.core.connection.v1.ClientPaths.prototype.addPaths = 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.core.connection.v1.ClientPaths} returns this + */ +proto.ibc.core.connection.v1.ClientPaths.prototype.clearPathsList = function() { + return this.setPathsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.v1.ConnectionPaths.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.connection.v1.ConnectionPaths.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.ConnectionPaths.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ConnectionPaths} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.ConnectionPaths.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + pathsList: (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.core.connection.v1.ConnectionPaths} + */ +proto.ibc.core.connection.v1.ConnectionPaths.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.ConnectionPaths; + return proto.ibc.core.connection.v1.ConnectionPaths.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.ConnectionPaths} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.ConnectionPaths} + */ +proto.ibc.core.connection.v1.ConnectionPaths.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 {string} */ (reader.readString()); + msg.addPaths(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.ConnectionPaths.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.ConnectionPaths.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.ConnectionPaths} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.ConnectionPaths.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPathsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.ConnectionPaths.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.ConnectionPaths} returns this + */ +proto.ibc.core.connection.v1.ConnectionPaths.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string paths = 2; + * @return {!Array} + */ +proto.ibc.core.connection.v1.ConnectionPaths.prototype.getPathsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.ConnectionPaths} returns this + */ +proto.ibc.core.connection.v1.ConnectionPaths.prototype.setPathsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.ConnectionPaths} returns this + */ +proto.ibc.core.connection.v1.ConnectionPaths.prototype.addPaths = 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.connection.v1.ConnectionPaths} returns this + */ +proto.ibc.core.connection.v1.ConnectionPaths.prototype.clearPathsList = function() { + return this.setPathsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.v1.Version.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.connection.v1.Version.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.Version.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Version} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.Version.toObject = function(includeInstance, msg) { + var f, obj = { + identifier: jspb.Message.getFieldWithDefault(msg, 1, ""), + featuresList: (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.core.connection.v1.Version} + */ +proto.ibc.core.connection.v1.Version.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.Version; + return proto.ibc.core.connection.v1.Version.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.Version} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.Version} + */ +proto.ibc.core.connection.v1.Version.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.setIdentifier(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addFeatures(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.Version.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.Version.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.Version} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.Version.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentifier(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFeaturesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional string identifier = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.Version.prototype.getIdentifier = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.Version} returns this + */ +proto.ibc.core.connection.v1.Version.prototype.setIdentifier = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string features = 2; + * @return {!Array} + */ +proto.ibc.core.connection.v1.Version.prototype.getFeaturesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.Version} returns this + */ +proto.ibc.core.connection.v1.Version.prototype.setFeaturesList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.Version} returns this + */ +proto.ibc.core.connection.v1.Version.prototype.addFeatures = 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.connection.v1.Version} returns this + */ +proto.ibc.core.connection.v1.Version.prototype.clearFeaturesList = function() { + return this.setFeaturesList([]); +}; + + +/** + * @enum {number} + */ +proto.ibc.core.connection.v1.State = { + STATE_UNINITIALIZED_UNSPECIFIED: 0, + STATE_INIT: 1, + STATE_TRYOPEN: 2, + STATE_OPEN: 3 +}; + +goog.object.extend(exports, proto.ibc.core.connection.v1); diff --git a/src/types/proto-types/ibc/core/connection/v1/genesis_pb.js b/src/types/proto-types/ibc/core/connection/v1/genesis_pb.js new file mode 100644 index 00000000..64ca51f1 --- /dev/null +++ b/src/types/proto-types/ibc/core/connection/v1/genesis_pb.js @@ -0,0 +1,284 @@ +// source: ibc/core/connection/v1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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_connection_v1_connection_pb = require('../../../../ibc/core/connection/v1/connection_pb.js'); +goog.object.extend(proto, ibc_core_connection_v1_connection_pb); +goog.exportSymbol('proto.ibc.core.connection.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.core.connection.v1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.GenesisState.displayName = 'proto.ibc.core.connection.v1.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.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.ibc.core.connection.v1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.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.core.connection.v1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + connectionsList: jspb.Message.toObjectList(msg.getConnectionsList(), + ibc_core_connection_v1_connection_pb.IdentifiedConnection.toObject, includeInstance), + clientConnectionPathsList: jspb.Message.toObjectList(msg.getClientConnectionPathsList(), + ibc_core_connection_v1_connection_pb.ConnectionPaths.toObject, includeInstance), + nextConnectionSequence: 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.connection.v1.GenesisState} + */ +proto.ibc.core.connection.v1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.GenesisState; + return proto.ibc.core.connection.v1.GenesisState.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.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.GenesisState} + */ +proto.ibc.core.connection.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_core_connection_v1_connection_pb.IdentifiedConnection; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.IdentifiedConnection.deserializeBinaryFromReader); + msg.addConnections(value); + break; + case 2: + var value = new ibc_core_connection_v1_connection_pb.ConnectionPaths; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.ConnectionPaths.deserializeBinaryFromReader); + msg.addClientConnectionPaths(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setNextConnectionSequence(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.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.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.core.connection.v1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_connection_v1_connection_pb.IdentifiedConnection.serializeBinaryToWriter + ); + } + f = message.getClientConnectionPathsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + ibc_core_connection_v1_connection_pb.ConnectionPaths.serializeBinaryToWriter + ); + } + f = message.getNextConnectionSequence(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * repeated IdentifiedConnection connections = 1; + * @return {!Array} + */ +proto.ibc.core.connection.v1.GenesisState.prototype.getConnectionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_connection_v1_connection_pb.IdentifiedConnection, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.GenesisState} returns this +*/ +proto.ibc.core.connection.v1.GenesisState.prototype.setConnectionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.IdentifiedConnection=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} + */ +proto.ibc.core.connection.v1.GenesisState.prototype.addConnections = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.connection.v1.IdentifiedConnection, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.connection.v1.GenesisState} returns this + */ +proto.ibc.core.connection.v1.GenesisState.prototype.clearConnectionsList = function() { + return this.setConnectionsList([]); +}; + + +/** + * repeated ConnectionPaths client_connection_paths = 2; + * @return {!Array} + */ +proto.ibc.core.connection.v1.GenesisState.prototype.getClientConnectionPathsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_connection_v1_connection_pb.ConnectionPaths, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.GenesisState} returns this +*/ +proto.ibc.core.connection.v1.GenesisState.prototype.setClientConnectionPathsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.ConnectionPaths=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.ConnectionPaths} + */ +proto.ibc.core.connection.v1.GenesisState.prototype.addClientConnectionPaths = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.ibc.core.connection.v1.ConnectionPaths, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.connection.v1.GenesisState} returns this + */ +proto.ibc.core.connection.v1.GenesisState.prototype.clearClientConnectionPathsList = function() { + return this.setClientConnectionPathsList([]); +}; + + +/** + * optional uint64 next_connection_sequence = 3; + * @return {number} + */ +proto.ibc.core.connection.v1.GenesisState.prototype.getNextConnectionSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.connection.v1.GenesisState} returns this + */ +proto.ibc.core.connection.v1.GenesisState.prototype.setNextConnectionSequence = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +goog.object.extend(exports, proto.ibc.core.connection.v1); diff --git a/src/types/proto-types/ibc/core/connection/v1/query_grpc_web_pb.js b/src/types/proto-types/ibc/core/connection/v1/query_grpc_web_pb.js new file mode 100644 index 00000000..3e42472d --- /dev/null +++ b/src/types/proto-types/ibc/core/connection/v1/query_grpc_web_pb.js @@ -0,0 +1,489 @@ +/** + * @fileoverview gRPC-Web generated client stub for ibc.core.connection.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../../../cosmos/base/query/v1beta1/pagination_pb.js') + +var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js') + +var ibc_core_connection_v1_connection_pb = require('../../../../ibc/core/connection/v1/connection_pb.js') + +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') +const proto = {}; +proto.ibc = {}; +proto.ibc.core = {}; +proto.ibc.core.connection = {}; +proto.ibc.core.connection.v1 = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.connection.v1.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.connection.v1.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.QueryConnectionRequest, + * !proto.ibc.core.connection.v1.QueryConnectionResponse>} + */ +const methodDescriptor_Query_Connection = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Query/Connection', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.QueryConnectionRequest, + proto.ibc.core.connection.v1.QueryConnectionResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryConnectionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryConnectionResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.QueryConnectionRequest, + * !proto.ibc.core.connection.v1.QueryConnectionResponse>} + */ +const methodInfo_Query_Connection = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.QueryConnectionResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryConnectionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryConnectionResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.QueryConnectionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.QueryConnectionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.QueryClient.prototype.connection = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Query/Connection', + request, + metadata || {}, + methodDescriptor_Query_Connection, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.QueryConnectionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.QueryPromiseClient.prototype.connection = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Query/Connection', + request, + metadata || {}, + methodDescriptor_Query_Connection); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.QueryConnectionsRequest, + * !proto.ibc.core.connection.v1.QueryConnectionsResponse>} + */ +const methodDescriptor_Query_Connections = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Query/Connections', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.QueryConnectionsRequest, + proto.ibc.core.connection.v1.QueryConnectionsResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryConnectionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryConnectionsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.QueryConnectionsRequest, + * !proto.ibc.core.connection.v1.QueryConnectionsResponse>} + */ +const methodInfo_Query_Connections = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.QueryConnectionsResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryConnectionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryConnectionsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.QueryConnectionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.QueryConnectionsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.QueryClient.prototype.connections = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Query/Connections', + request, + metadata || {}, + methodDescriptor_Query_Connections, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.QueryConnectionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.QueryPromiseClient.prototype.connections = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Query/Connections', + request, + metadata || {}, + methodDescriptor_Query_Connections); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.QueryClientConnectionsRequest, + * !proto.ibc.core.connection.v1.QueryClientConnectionsResponse>} + */ +const methodDescriptor_Query_ClientConnections = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Query/ClientConnections', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.QueryClientConnectionsRequest, + proto.ibc.core.connection.v1.QueryClientConnectionsResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryClientConnectionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryClientConnectionsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.QueryClientConnectionsRequest, + * !proto.ibc.core.connection.v1.QueryClientConnectionsResponse>} + */ +const methodInfo_Query_ClientConnections = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.QueryClientConnectionsResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryClientConnectionsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryClientConnectionsResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.QueryClientConnectionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.QueryClientConnectionsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.QueryClient.prototype.clientConnections = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Query/ClientConnections', + request, + metadata || {}, + methodDescriptor_Query_ClientConnections, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.QueryClientConnectionsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.QueryPromiseClient.prototype.clientConnections = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Query/ClientConnections', + request, + metadata || {}, + methodDescriptor_Query_ClientConnections); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.QueryConnectionClientStateRequest, + * !proto.ibc.core.connection.v1.QueryConnectionClientStateResponse>} + */ +const methodDescriptor_Query_ConnectionClientState = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Query/ConnectionClientState', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.QueryConnectionClientStateRequest, + proto.ibc.core.connection.v1.QueryConnectionClientStateResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryConnectionClientStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.QueryConnectionClientStateRequest, + * !proto.ibc.core.connection.v1.QueryConnectionClientStateResponse>} + */ +const methodInfo_Query_ConnectionClientState = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.QueryConnectionClientStateResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryConnectionClientStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.QueryConnectionClientStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.QueryConnectionClientStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.QueryClient.prototype.connectionClientState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Query/ConnectionClientState', + request, + metadata || {}, + methodDescriptor_Query_ConnectionClientState, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.QueryConnectionClientStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.QueryPromiseClient.prototype.connectionClientState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Query/ConnectionClientState', + request, + metadata || {}, + methodDescriptor_Query_ConnectionClientState); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest, + * !proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse>} + */ +const methodDescriptor_Query_ConnectionConsensusState = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Query/ConnectionConsensusState', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest, + proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest, + * !proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse>} + */ +const methodInfo_Query_ConnectionConsensusState = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse, + /** + * @param {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.QueryClient.prototype.connectionConsensusState = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Query/ConnectionConsensusState', + request, + metadata || {}, + methodDescriptor_Query_ConnectionConsensusState, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.QueryPromiseClient.prototype.connectionConsensusState = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Query/ConnectionConsensusState', + request, + metadata || {}, + methodDescriptor_Query_ConnectionConsensusState); +}; + + +module.exports = proto.ibc.core.connection.v1; + diff --git a/src/types/proto-types/ibc/core/connection/v1/query_pb.js b/src/types/proto-types/ibc/core/connection/v1/query_pb.js new file mode 100644 index 00000000..7f16656f --- /dev/null +++ b/src/types/proto-types/ibc/core/connection/v1/query_pb.js @@ -0,0 +1,2299 @@ +// source: ibc/core/connection/v1/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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_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_connection_v1_connection_pb = require('../../../../ibc/core/connection/v1/connection_pb.js'); +goog.object.extend(proto, ibc_core_connection_v1_connection_pb); +var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_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.core.connection.v1.QueryClientConnectionsRequest', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.QueryClientConnectionsResponse', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionClientStateRequest', null, global); +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.QueryConnectionRequest', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionResponse', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionsRequest', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.QueryConnectionsResponse', 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.connection.v1.QueryConnectionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionRequest.displayName = 'proto.ibc.core.connection.v1.QueryConnectionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionResponse.displayName = 'proto.ibc.core.connection.v1.QueryConnectionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionsRequest.displayName = 'proto.ibc.core.connection.v1.QueryConnectionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.QueryConnectionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionsResponse.displayName = 'proto.ibc.core.connection.v1.QueryConnectionsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryClientConnectionsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryClientConnectionsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryClientConnectionsRequest.displayName = 'proto.ibc.core.connection.v1.QueryClientConnectionsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryClientConnectionsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.QueryClientConnectionsResponse.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryClientConnectionsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryClientConnectionsResponse.displayName = 'proto.ibc.core.connection.v1.QueryClientConnectionsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionClientStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionClientStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.displayName = 'proto.ibc.core.connection.v1.QueryConnectionClientStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionClientStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionClientStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.displayName = 'proto.ibc.core.connection.v1.QueryConnectionClientStateResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionConsensusStateRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.displayName = 'proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.QueryConnectionConsensusStateResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.displayName = 'proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.QueryConnectionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + connectionId: 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.core.connection.v1.QueryConnectionRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionRequest; + return proto.ibc.core.connection.v1.QueryConnectionRequest.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.QueryConnectionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.QueryConnectionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionRequest.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.QueryConnectionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string connection_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.QueryConnectionRequest.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionRequest} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionRequest.prototype.setConnectionId = 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.core.connection.v1.QueryConnectionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + connection: (f = msg.getConnection()) && ibc_core_connection_v1_connection_pb.ConnectionEnd.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.connection.v1.QueryConnectionResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionResponse; + return proto.ibc.core.connection.v1.QueryConnectionResponse.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.QueryConnectionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.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.ConnectionEnd; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.ConnectionEnd.deserializeBinaryFromReader); + msg.setConnection(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.connection.v1.QueryConnectionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionResponse.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.QueryConnectionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnection(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_connection_v1_connection_pb.ConnectionEnd.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 ConnectionEnd connection = 1; + * @return {?proto.ibc.core.connection.v1.ConnectionEnd} + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.prototype.getConnection = function() { + return /** @type{?proto.ibc.core.connection.v1.ConnectionEnd} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.ConnectionEnd, 1)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.ConnectionEnd|undefined} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionResponse.prototype.setConnection = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.prototype.clearConnection = function() { + return this.setConnection(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.prototype.hasConnection = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.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.connection.v1.QueryConnectionResponse.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.connection.v1.QueryConnectionResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.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.connection.v1.QueryConnectionResponse.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.connection.v1.QueryConnectionResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionResponse.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.connection.v1.QueryConnectionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionsRequest.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.core.connection.v1.QueryConnectionsRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionsRequest; + return proto.ibc.core.connection.v1.QueryConnectionsRequest.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.QueryConnectionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionsRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionsRequest.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.core.connection.v1.QueryConnectionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionsRequest.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.QueryConnectionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionsRequest.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.core.connection.v1.QueryConnectionsRequest.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.core.connection.v1.QueryConnectionsRequest} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionsRequest.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionsRequest} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionsRequest.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionsRequest.prototype.hasPagination = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.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.core.connection.v1.QueryConnectionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + connectionsList: jspb.Message.toObjectList(msg.getConnectionsList(), + ibc_core_connection_v1_connection_pb.IdentifiedConnection.toObject, includeInstance), + pagination: (f = msg.getPagination()) && cosmos_base_query_v1beta1_pagination_pb.PageResponse.toObject(includeInstance, f), + height: (f = msg.getHeight()) && 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.connection.v1.QueryConnectionsResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionsResponse; + return proto.ibc.core.connection.v1.QueryConnectionsResponse.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.QueryConnectionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionsResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.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.IdentifiedConnection; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.IdentifiedConnection.deserializeBinaryFromReader); + msg.addConnections(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; + case 3: + 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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionsResponse.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.QueryConnectionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + ibc_core_connection_v1_connection_pb.IdentifiedConnection.serializeBinaryToWriter + ); + } + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated IdentifiedConnection connections = 1; + * @return {!Array} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.getConnectionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_connection_v1_connection_pb.IdentifiedConnection, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionsResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.setConnectionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.IdentifiedConnection=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.IdentifiedConnection} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.addConnections = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.ibc.core.connection.v1.IdentifiedConnection, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.connection.v1.QueryConnectionsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.clearConnectionsList = function() { + return this.setConnectionsList([]); +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse pagination = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.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.connection.v1.QueryConnectionsResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.setPagination = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.clearPagination = function() { + return this.setPagination(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.hasPagination = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ibc.core.client.v1.Height height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.getHeight = 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.connection.v1.QueryConnectionsResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionsResponse.prototype.hasHeight = 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.connection.v1.QueryClientConnectionsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryClientConnectionsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryClientConnectionsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryClientConnectionsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: 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.core.connection.v1.QueryClientConnectionsRequest} + */ +proto.ibc.core.connection.v1.QueryClientConnectionsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryClientConnectionsRequest; + return proto.ibc.core.connection.v1.QueryClientConnectionsRequest.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.QueryClientConnectionsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryClientConnectionsRequest} + */ +proto.ibc.core.connection.v1.QueryClientConnectionsRequest.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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.QueryClientConnectionsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryClientConnectionsRequest.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.QueryClientConnectionsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryClientConnectionsRequest.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.connection.v1.QueryClientConnectionsRequest.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.QueryClientConnectionsRequest} returns this + */ +proto.ibc.core.connection.v1.QueryClientConnectionsRequest.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.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.core.connection.v1.QueryClientConnectionsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryClientConnectionsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryClientConnectionsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + connectionPathsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.connection.v1.QueryClientConnectionsResponse} + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryClientConnectionsResponse; + return proto.ibc.core.connection.v1.QueryClientConnectionsResponse.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.QueryClientConnectionsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryClientConnectionsResponse} + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.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.addConnectionPaths(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.connection.v1.QueryClientConnectionsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryClientConnectionsResponse.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.QueryClientConnectionsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionPathsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 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 + ); + } +}; + + +/** + * repeated string connection_paths = 1; + * @return {!Array} + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.prototype.getConnectionPathsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.QueryClientConnectionsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.prototype.setConnectionPathsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.QueryClientConnectionsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.prototype.addConnectionPaths = 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.core.connection.v1.QueryClientConnectionsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.prototype.clearConnectionPathsList = function() { + return this.setConnectionPathsList([]); +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.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.connection.v1.QueryClientConnectionsResponse.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.connection.v1.QueryClientConnectionsResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.QueryClientConnectionsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.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.connection.v1.QueryClientConnectionsResponse.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.connection.v1.QueryClientConnectionsResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryClientConnectionsResponse} returns this + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryClientConnectionsResponse.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.connection.v1.QueryConnectionClientStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionClientStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + connectionId: 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.core.connection.v1.QueryConnectionClientStateRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionClientStateRequest; + return proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.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.QueryConnectionClientStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionClientStateRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.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.QueryConnectionClientStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string connection_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionClientStateRequest} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateRequest.prototype.setConnectionId = 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.core.connection.v1.QueryConnectionClientStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionClientStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + identifiedClientState: (f = msg.getIdentifiedClientState()) && ibc_core_client_v1_client_pb.IdentifiedClientState.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.connection.v1.QueryConnectionClientStateResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionClientStateResponse; + return proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.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.QueryConnectionClientStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionClientStateResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.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.IdentifiedClientState; + reader.readMessage(value,ibc_core_client_v1_client_pb.IdentifiedClientState.deserializeBinaryFromReader); + msg.setIdentifiedClientState(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.connection.v1.QueryConnectionClientStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.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.QueryConnectionClientStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentifiedClientState(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_client_v1_client_pb.IdentifiedClientState.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 ibc.core.client.v1.IdentifiedClientState identified_client_state = 1; + * @return {?proto.ibc.core.client.v1.IdentifiedClientState} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.prototype.getIdentifiedClientState = function() { + return /** @type{?proto.ibc.core.client.v1.IdentifiedClientState} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.IdentifiedClientState, 1)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.IdentifiedClientState|undefined} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionClientStateResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.prototype.setIdentifiedClientState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionClientStateResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.prototype.clearIdentifiedClientState = function() { + return this.setIdentifiedClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.prototype.hasIdentifiedClientState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes proof = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.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.connection.v1.QueryConnectionClientStateResponse.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.connection.v1.QueryConnectionClientStateResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionClientStateResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.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.connection.v1.QueryConnectionClientStateResponse.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.connection.v1.QueryConnectionClientStateResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionClientStateResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionClientStateResponse.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.connection.v1.QueryConnectionConsensusStateRequest.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionConsensusStateRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.toObject = function(includeInstance, msg) { + var f, obj = { + connectionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + revisionNumber: jspb.Message.getFieldWithDefault(msg, 2, 0), + revisionHeight: 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.connection.v1.QueryConnectionConsensusStateRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest; + return proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.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.QueryConnectionConsensusStateRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.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 {number} */ (reader.readUint64()); + msg.setRevisionNumber(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRevisionHeight(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.QueryConnectionConsensusStateRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.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.QueryConnectionConsensusStateRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRevisionNumber(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getRevisionHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional string connection_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.prototype.setConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 revision_number = 2; + * @return {number} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.prototype.getRevisionNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.prototype.setRevisionNumber = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 revision_height = 3; + * @return {number} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.prototype.getRevisionHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateRequest.prototype.setRevisionHeight = 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.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.QueryConnectionConsensusStateResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.toObject = function(includeInstance, msg) { + var f, obj = { + consensusState: (f = msg.getConsensusState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + clientId: jspb.Message.getFieldWithDefault(msg, 2, ""), + 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.connection.v1.QueryConnectionConsensusStateResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse; + return proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.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.QueryConnectionConsensusStateResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.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.setConsensusState(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setClientId(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProof(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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.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.QueryConnectionConsensusStateResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConsensusState(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getProof_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 + ); + } +}; + + +/** + * optional google.protobuf.Any consensus_state = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.getConsensusState = 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.connection.v1.QueryConnectionConsensusStateResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.setConsensusState = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.clearConsensusState = function() { + return this.setConsensusState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.hasConsensusState = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string client_id = 2; + * @return {string} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bytes proof = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.getProof = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes proof = 3; + * This is a type-conversion wrapper around `getProof()` + * @return {string} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.getProof_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProof())); +}; + + +/** + * optional bytes proof = 3; + * 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.connection.v1.QueryConnectionConsensusStateResponse.prototype.getProof_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProof())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.setProof = 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.connection.v1.QueryConnectionConsensusStateResponse.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.connection.v1.QueryConnectionConsensusStateResponse} returns this +*/ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse} returns this + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.QueryConnectionConsensusStateResponse.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +goog.object.extend(exports, proto.ibc.core.connection.v1); diff --git a/src/types/proto-types/ibc/core/connection/v1/tx_grpc_web_pb.js b/src/types/proto-types/ibc/core/connection/v1/tx_grpc_web_pb.js new file mode 100644 index 00000000..1b0dcafa --- /dev/null +++ b/src/types/proto-types/ibc/core/connection/v1/tx_grpc_web_pb.js @@ -0,0 +1,405 @@ +/** + * @fileoverview gRPC-Web generated client stub for ibc.core.connection.v1 + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js') + +var ibc_core_connection_v1_connection_pb = require('../../../../ibc/core/connection/v1/connection_pb.js') +const proto = {}; +proto.ibc = {}; +proto.ibc.core = {}; +proto.ibc.core.connection = {}; +proto.ibc.core.connection.v1 = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.connection.v1.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.ibc.core.connection.v1.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.MsgConnectionOpenInit, + * !proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse>} + */ +const methodDescriptor_Msg_ConnectionOpenInit = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Msg/ConnectionOpenInit', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.MsgConnectionOpenInit, + proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse, + /** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.MsgConnectionOpenInit, + * !proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse>} + */ +const methodInfo_Msg_ConnectionOpenInit = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse, + /** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.MsgClient.prototype.connectionOpenInit = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Msg/ConnectionOpenInit', + request, + metadata || {}, + methodDescriptor_Msg_ConnectionOpenInit, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.MsgPromiseClient.prototype.connectionOpenInit = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Msg/ConnectionOpenInit', + request, + metadata || {}, + methodDescriptor_Msg_ConnectionOpenInit); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.MsgConnectionOpenTry, + * !proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse>} + */ +const methodDescriptor_Msg_ConnectionOpenTry = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Msg/ConnectionOpenTry', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.MsgConnectionOpenTry, + proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse, + /** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.MsgConnectionOpenTry, + * !proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse>} + */ +const methodInfo_Msg_ConnectionOpenTry = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse, + /** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.MsgClient.prototype.connectionOpenTry = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Msg/ConnectionOpenTry', + request, + metadata || {}, + methodDescriptor_Msg_ConnectionOpenTry, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.MsgPromiseClient.prototype.connectionOpenTry = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Msg/ConnectionOpenTry', + request, + metadata || {}, + methodDescriptor_Msg_ConnectionOpenTry); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.MsgConnectionOpenAck, + * !proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse>} + */ +const methodDescriptor_Msg_ConnectionOpenAck = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Msg/ConnectionOpenAck', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.MsgConnectionOpenAck, + proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse, + /** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.MsgConnectionOpenAck, + * !proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse>} + */ +const methodInfo_Msg_ConnectionOpenAck = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse, + /** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.MsgClient.prototype.connectionOpenAck = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Msg/ConnectionOpenAck', + request, + metadata || {}, + methodDescriptor_Msg_ConnectionOpenAck, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.MsgPromiseClient.prototype.connectionOpenAck = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Msg/ConnectionOpenAck', + request, + metadata || {}, + methodDescriptor_Msg_ConnectionOpenAck); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.ibc.core.connection.v1.MsgConnectionOpenConfirm, + * !proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse>} + */ +const methodDescriptor_Msg_ConnectionOpenConfirm = new grpc.web.MethodDescriptor( + '/ibc.core.connection.v1.Msg/ConnectionOpenConfirm', + grpc.web.MethodType.UNARY, + proto.ibc.core.connection.v1.MsgConnectionOpenConfirm, + proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse, + /** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.ibc.core.connection.v1.MsgConnectionOpenConfirm, + * !proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse>} + */ +const methodInfo_Msg_ConnectionOpenConfirm = new grpc.web.AbstractClientBase.MethodInfo( + proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse, + /** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.deserializeBinary +); + + +/** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.ibc.core.connection.v1.MsgClient.prototype.connectionOpenConfirm = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/ibc.core.connection.v1.Msg/ConnectionOpenConfirm', + request, + metadata || {}, + methodDescriptor_Msg_ConnectionOpenConfirm, + callback); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.ibc.core.connection.v1.MsgPromiseClient.prototype.connectionOpenConfirm = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/ibc.core.connection.v1.Msg/ConnectionOpenConfirm', + request, + metadata || {}, + methodDescriptor_Msg_ConnectionOpenConfirm); +}; + + +module.exports = proto.ibc.core.connection.v1; + diff --git a/src/types/proto-types/ibc/core/connection/v1/tx_pb.js b/src/types/proto-types/ibc/core/connection/v1/tx_pb.js new file mode 100644 index 00000000..9c3604ed --- /dev/null +++ b/src/types/proto-types/ibc/core/connection/v1/tx_pb.js @@ -0,0 +1,2362 @@ +// source: ibc/core/connection/v1/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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'); +goog.object.extend(proto, ibc_core_client_v1_client_pb); +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); +goog.exportSymbol('proto.ibc.core.connection.v1.MsgConnectionOpenAck', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.MsgConnectionOpenConfirm', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse', null, global); +goog.exportSymbol('proto.ibc.core.connection.v1.MsgConnectionOpenInit', null, global); +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); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgConnectionOpenInit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgConnectionOpenInit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgConnectionOpenInit.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenInit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgConnectionOpenInitResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgConnectionOpenTry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.connection.v1.MsgConnectionOpenTry.repeatedFields_, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgConnectionOpenTry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgConnectionOpenTry.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenTry'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgConnectionOpenTryResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgConnectionOpenAck = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgConnectionOpenAck, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgConnectionOpenAck.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenAck'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgConnectionOpenAckResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgConnectionOpenConfirm = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgConnectionOpenConfirm, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenConfirm'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.MsgConnectionOpenConfirmResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.displayName = 'proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.MsgConnectionOpenInit.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgConnectionOpenInit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgConnectionOpenInit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + counterparty: (f = msg.getCounterparty()) && ibc_core_connection_v1_connection_pb.Counterparty.toObject(includeInstance, f), + version: (f = msg.getVersion()) && ibc_core_connection_v1_connection_pb.Version.toObject(includeInstance, f), + delayPeriod: 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.connection.v1.MsgConnectionOpenInit} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgConnectionOpenInit; + return proto.ibc.core.connection.v1.MsgConnectionOpenInit.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.MsgConnectionOpenInit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.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 = new ibc_core_connection_v1_connection_pb.Counterparty; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.Counterparty.deserializeBinaryFromReader); + msg.setCounterparty(value); + break; + case 3: + var value = new ibc_core_connection_v1_connection_pb.Version; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.Version.deserializeBinaryFromReader); + msg.setVersion(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDelayPeriod(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.connection.v1.MsgConnectionOpenInit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgConnectionOpenInit.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.MsgConnectionOpenInit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCounterparty(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_connection_v1_connection_pb.Counterparty.serializeBinaryToWriter + ); + } + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_connection_v1_connection_pb.Version.serializeBinaryToWriter + ); + } + f = message.getDelayPeriod(); + if (f !== 0) { + writer.writeUint64( + 4, + f + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Counterparty counterparty = 2; + * @return {?proto.ibc.core.connection.v1.Counterparty} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.getCounterparty = function() { + return /** @type{?proto.ibc.core.connection.v1.Counterparty} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.Counterparty, 2)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.Counterparty|undefined} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.setCounterparty = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.clearCounterparty = function() { + return this.setCounterparty(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.hasCounterparty = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Version version = 3; + * @return {?proto.ibc.core.connection.v1.Version} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.getVersion = function() { + return /** @type{?proto.ibc.core.connection.v1.Version} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.Version, 3)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.Version|undefined} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.clearVersion = function() { + return this.setVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.hasVersion = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional uint64 delay_period = 4; + * @return {number} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.getDelayPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.setDelayPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string signer = 5; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInit} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInit.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.connection.v1.MsgConnectionOpenInitResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgConnectionOpenInitResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.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.MsgConnectionOpenInitResponse} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse; + return proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.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.MsgConnectionOpenInitResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.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.MsgConnectionOpenInitResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.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.MsgConnectionOpenInitResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenInitResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.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.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgConnectionOpenTry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgConnectionOpenTry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + previousConnectionId: jspb.Message.getFieldWithDefault(msg, 2, ""), + clientState: (f = msg.getClientState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + counterparty: (f = msg.getCounterparty()) && ibc_core_connection_v1_connection_pb.Counterparty.toObject(includeInstance, f), + delayPeriod: jspb.Message.getFieldWithDefault(msg, 5, 0), + counterpartyVersionsList: jspb.Message.toObjectList(msg.getCounterpartyVersionsList(), + ibc_core_connection_v1_connection_pb.Version.toObject, includeInstance), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + proofInit: msg.getProofInit_asB64(), + 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, "") + }; + + 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.MsgConnectionOpenTry} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgConnectionOpenTry; + return proto.ibc.core.connection.v1.MsgConnectionOpenTry.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.MsgConnectionOpenTry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.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 {string} */ (reader.readString()); + msg.setPreviousConnectionId(value); + break; + case 3: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setClientState(value); + break; + case 4: + var value = new ibc_core_connection_v1_connection_pb.Counterparty; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.Counterparty.deserializeBinaryFromReader); + msg.setCounterparty(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDelayPeriod(value); + break; + case 6: + var value = new ibc_core_connection_v1_connection_pb.Version; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.Version.deserializeBinaryFromReader); + msg.addCounterpartyVersions(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 {!Uint8Array} */ (reader.readBytes()); + msg.setProofInit(value); + break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofClient(value); + break; + case 10: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofConsensus(value); + break; + case 11: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setConsensusHeight(value); + break; + case 12: + 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.connection.v1.MsgConnectionOpenTry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgConnectionOpenTry.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.MsgConnectionOpenTry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPreviousConnectionId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getClientState(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getCounterparty(); + if (f != null) { + writer.writeMessage( + 4, + f, + ibc_core_connection_v1_connection_pb.Counterparty.serializeBinaryToWriter + ); + } + f = message.getDelayPeriod(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getCounterpartyVersionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + ibc_core_connection_v1_connection_pb.Version.serializeBinaryToWriter + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 7, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getProofInit_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } + f = message.getProofClient_asU8(); + if (f.length > 0) { + writer.writeBytes( + 9, + f + ); + } + f = message.getProofConsensus_asU8(); + if (f.length > 0) { + writer.writeBytes( + 10, + f + ); + } + f = message.getConsensusHeight(); + if (f != null) { + writer.writeMessage( + 11, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string previous_connection_id = 2; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getPreviousConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setPreviousConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Any client_state = 3; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getClientState = 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.core.connection.v1.MsgConnectionOpenTry} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setClientState = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.clearClientState = function() { + return this.setClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.hasClientState = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Counterparty counterparty = 4; + * @return {?proto.ibc.core.connection.v1.Counterparty} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getCounterparty = function() { + return /** @type{?proto.ibc.core.connection.v1.Counterparty} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.Counterparty, 4)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.Counterparty|undefined} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setCounterparty = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.clearCounterparty = function() { + return this.setCounterparty(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.hasCounterparty = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional uint64 delay_period = 5; + * @return {number} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getDelayPeriod = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setDelayPeriod = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * repeated Version counterparty_versions = 6; + * @return {!Array} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getCounterpartyVersionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, ibc_core_connection_v1_connection_pb.Version, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setCounterpartyVersionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); +}; + + +/** + * @param {!proto.ibc.core.connection.v1.Version=} opt_value + * @param {number=} opt_index + * @return {!proto.ibc.core.connection.v1.Version} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.addCounterpartyVersions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.ibc.core.connection.v1.Version, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.clearCounterpartyVersionsList = function() { + return this.setCounterpartyVersionsList([]); +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 7; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.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.connection.v1.MsgConnectionOpenTry} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional bytes proof_init = 8; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getProofInit = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes proof_init = 8; + * This is a type-conversion wrapper around `getProofInit()` + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getProofInit_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofInit())); +}; + + +/** + * optional bytes proof_init = 8; + * 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.connection.v1.MsgConnectionOpenTry.prototype.getProofInit_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofInit())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setProofInit = function(value) { + return jspb.Message.setProto3BytesField(this, 8, value); +}; + + +/** + * optional bytes proof_client = 9; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getProofClient = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * optional bytes proof_client = 9; + * This is a type-conversion wrapper around `getProofClient()` + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getProofClient_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofClient())); +}; + + +/** + * optional bytes proof_client = 9; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofClient()` + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getProofClient_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofClient())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setProofClient = function(value) { + return jspb.Message.setProto3BytesField(this, 9, value); +}; + + +/** + * optional bytes proof_consensus = 10; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getProofConsensus = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * optional bytes proof_consensus = 10; + * This is a type-conversion wrapper around `getProofConsensus()` + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getProofConsensus_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofConsensus())); +}; + + +/** + * optional bytes proof_consensus = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofConsensus()` + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getProofConsensus_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofConsensus())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setProofConsensus = function(value) { + return jspb.Message.setProto3BytesField(this, 10, value); +}; + + +/** + * optional ibc.core.client.v1.Height consensus_height = 11; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getConsensusHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 11)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setConsensusHeight = function(value) { + return jspb.Message.setWrapperField(this, 11, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.clearConsensusHeight = function() { + return this.setConsensusHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.hasConsensusHeight = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional string signer = 12; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTry} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTry.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(this, 12, 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.connection.v1.MsgConnectionOpenTryResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgConnectionOpenTryResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.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.MsgConnectionOpenTryResponse} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse; + return proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.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.MsgConnectionOpenTryResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.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.MsgConnectionOpenTryResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.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.MsgConnectionOpenTryResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenTryResponse.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.MsgConnectionOpenAck.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgConnectionOpenAck.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgConnectionOpenAck} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.toObject = function(includeInstance, msg) { + var f, obj = { + connectionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + counterpartyConnectionId: jspb.Message.getFieldWithDefault(msg, 2, ""), + version: (f = msg.getVersion()) && ibc_core_connection_v1_connection_pb.Version.toObject(includeInstance, f), + clientState: (f = msg.getClientState()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), + proofHeight: (f = msg.getProofHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + proofTry: msg.getProofTry_asB64(), + 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, "") + }; + + 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.MsgConnectionOpenAck} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgConnectionOpenAck; + return proto.ibc.core.connection.v1.MsgConnectionOpenAck.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.MsgConnectionOpenAck} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.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.setCounterpartyConnectionId(value); + break; + case 3: + var value = new ibc_core_connection_v1_connection_pb.Version; + reader.readMessage(value,ibc_core_connection_v1_connection_pb.Version.deserializeBinaryFromReader); + msg.setVersion(value); + break; + case 4: + var value = new google_protobuf_any_pb.Any; + reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); + msg.setClientState(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 {!Uint8Array} */ (reader.readBytes()); + msg.setProofTry(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofClient(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setProofConsensus(value); + break; + case 9: + var value = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setConsensusHeight(value); + break; + case 10: + 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.connection.v1.MsgConnectionOpenAck.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgConnectionOpenAck.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.MsgConnectionOpenAck} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCounterpartyConnectionId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_connection_v1_connection_pb.Version.serializeBinaryToWriter + ); + } + f = message.getClientState(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } + f = message.getProofHeight(); + if (f != null) { + writer.writeMessage( + 5, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getProofTry_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getProofClient_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getProofConsensus_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } + f = message.getConsensusHeight(); + if (f != null) { + writer.writeMessage( + 9, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getSigner(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } +}; + + +/** + * optional string connection_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string counterparty_connection_id = 2; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getCounterpartyConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setCounterpartyConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional Version version = 3; + * @return {?proto.ibc.core.connection.v1.Version} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getVersion = function() { + return /** @type{?proto.ibc.core.connection.v1.Version} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_connection_pb.Version, 3)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.Version|undefined} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.clearVersion = function() { + return this.setVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.hasVersion = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Any client_state = 4; + * @return {?proto.google.protobuf.Any} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getClientState = 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.connection.v1.MsgConnectionOpenAck} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setClientState = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.clearClientState = function() { + return this.setClientState(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.hasClientState = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional ibc.core.client.v1.Height proof_height = 5; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.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.connection.v1.MsgConnectionOpenAck} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes proof_try = 6; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getProofTry = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes proof_try = 6; + * This is a type-conversion wrapper around `getProofTry()` + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getProofTry_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofTry())); +}; + + +/** + * optional bytes proof_try = 6; + * 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.connection.v1.MsgConnectionOpenAck.prototype.getProofTry_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofTry())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setProofTry = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional bytes proof_client = 7; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getProofClient = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes proof_client = 7; + * This is a type-conversion wrapper around `getProofClient()` + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getProofClient_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofClient())); +}; + + +/** + * optional bytes proof_client = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofClient()` + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getProofClient_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofClient())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setProofClient = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional bytes proof_consensus = 8; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getProofConsensus = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes proof_consensus = 8; + * This is a type-conversion wrapper around `getProofConsensus()` + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getProofConsensus_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofConsensus())); +}; + + +/** + * optional bytes proof_consensus = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getProofConsensus()` + * @return {!Uint8Array} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getProofConsensus_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofConsensus())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setProofConsensus = function(value) { + return jspb.Message.setProto3BytesField(this, 8, value); +}; + + +/** + * optional ibc.core.client.v1.Height consensus_height = 9; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getConsensusHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 9)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setConsensusHeight = function(value) { + return jspb.Message.setWrapperField(this, 9, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.clearConsensusHeight = function() { + return this.setConsensusHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.hasConsensusHeight = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional string signer = 10; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAck} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAck.prototype.setSigner = function(value) { + return jspb.Message.setProto3StringField(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.ibc.core.connection.v1.MsgConnectionOpenAckResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgConnectionOpenAckResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.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.MsgConnectionOpenAckResponse} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse; + return proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.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.MsgConnectionOpenAckResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.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.MsgConnectionOpenAckResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.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.MsgConnectionOpenAckResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenAckResponse.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.MsgConnectionOpenConfirm.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgConnectionOpenConfirm} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.toObject = function(includeInstance, msg) { + var f, obj = { + connectionId: jspb.Message.getFieldWithDefault(msg, 1, ""), + proofAck: msg.getProofAck_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.connection.v1.MsgConnectionOpenConfirm} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgConnectionOpenConfirm; + return proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.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.MsgConnectionOpenConfirm} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.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 {!Uint8Array} */ (reader.readBytes()); + msg.setProofAck(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.connection.v1.MsgConnectionOpenConfirm.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.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.MsgConnectionOpenConfirm} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConnectionId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProofAck_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 string connection_id = 1; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.getConnectionId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.setConnectionId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes proof_ack = 2; + * @return {!(string|Uint8Array)} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.getProofAck = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes proof_ack = 2; + * This is a type-conversion wrapper around `getProofAck()` + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.getProofAck_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProofAck())); +}; + + +/** + * optional bytes proof_ack = 2; + * 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.connection.v1.MsgConnectionOpenConfirm.prototype.getProofAck_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProofAck())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.setProofAck = 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.connection.v1.MsgConnectionOpenConfirm.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.connection.v1.MsgConnectionOpenConfirm} returns this +*/ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.setProofHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.clearProofHeight = function() { + return this.setProofHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.hasProofHeight = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string signer = 4; + * @return {string} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.prototype.getSigner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirm} returns this + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirm.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.connection.v1.MsgConnectionOpenConfirmResponse.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.MsgConnectionOpenConfirmResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.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.MsgConnectionOpenConfirmResponse} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse; + return proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.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.MsgConnectionOpenConfirmResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.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.MsgConnectionOpenConfirmResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.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.MsgConnectionOpenConfirmResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.ibc.core.connection.v1); diff --git a/src/types/proto-types/ibc/core/types/v1/genesis_pb.js b/src/types/proto-types/ibc/core/types/v1/genesis_pb.js new file mode 100644 index 00000000..6445d08f --- /dev/null +++ b/src/types/proto-types/ibc/core/types/v1/genesis_pb.js @@ -0,0 +1,298 @@ +// source: ibc/core/types/v1/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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_genesis_pb = require('../../../../ibc/core/client/v1/genesis_pb.js'); +goog.object.extend(proto, ibc_core_client_v1_genesis_pb); +var ibc_core_connection_v1_genesis_pb = require('../../../../ibc/core/connection/v1/genesis_pb.js'); +goog.object.extend(proto, ibc_core_connection_v1_genesis_pb); +var ibc_core_channel_v1_genesis_pb = require('../../../../ibc/core/channel/v1/genesis_pb.js'); +goog.object.extend(proto, ibc_core_channel_v1_genesis_pb); +goog.exportSymbol('proto.ibc.core.types.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.core.types.v1.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.core.types.v1.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.core.types.v1.GenesisState.displayName = 'proto.ibc.core.types.v1.GenesisState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.types.v1.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.core.types.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.core.types.v1.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.types.v1.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + clientGenesis: (f = msg.getClientGenesis()) && ibc_core_client_v1_genesis_pb.GenesisState.toObject(includeInstance, f), + connectionGenesis: (f = msg.getConnectionGenesis()) && ibc_core_connection_v1_genesis_pb.GenesisState.toObject(includeInstance, f), + channelGenesis: (f = msg.getChannelGenesis()) && ibc_core_channel_v1_genesis_pb.GenesisState.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.types.v1.GenesisState} + */ +proto.ibc.core.types.v1.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.core.types.v1.GenesisState; + return proto.ibc.core.types.v1.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.core.types.v1.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.core.types.v1.GenesisState} + */ +proto.ibc.core.types.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_core_client_v1_genesis_pb.GenesisState; + reader.readMessage(value,ibc_core_client_v1_genesis_pb.GenesisState.deserializeBinaryFromReader); + msg.setClientGenesis(value); + break; + case 2: + var value = new ibc_core_connection_v1_genesis_pb.GenesisState; + reader.readMessage(value,ibc_core_connection_v1_genesis_pb.GenesisState.deserializeBinaryFromReader); + msg.setConnectionGenesis(value); + break; + case 3: + var value = new ibc_core_channel_v1_genesis_pb.GenesisState; + reader.readMessage(value,ibc_core_channel_v1_genesis_pb.GenesisState.deserializeBinaryFromReader); + msg.setChannelGenesis(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.core.types.v1.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.core.types.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.core.types.v1.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.core.types.v1.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientGenesis(); + if (f != null) { + writer.writeMessage( + 1, + f, + ibc_core_client_v1_genesis_pb.GenesisState.serializeBinaryToWriter + ); + } + f = message.getConnectionGenesis(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_connection_v1_genesis_pb.GenesisState.serializeBinaryToWriter + ); + } + f = message.getChannelGenesis(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_channel_v1_genesis_pb.GenesisState.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ibc.core.client.v1.GenesisState client_genesis = 1; + * @return {?proto.ibc.core.client.v1.GenesisState} + */ +proto.ibc.core.types.v1.GenesisState.prototype.getClientGenesis = function() { + return /** @type{?proto.ibc.core.client.v1.GenesisState} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_genesis_pb.GenesisState, 1)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.GenesisState|undefined} value + * @return {!proto.ibc.core.types.v1.GenesisState} returns this +*/ +proto.ibc.core.types.v1.GenesisState.prototype.setClientGenesis = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.types.v1.GenesisState} returns this + */ +proto.ibc.core.types.v1.GenesisState.prototype.clearClientGenesis = function() { + return this.setClientGenesis(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.types.v1.GenesisState.prototype.hasClientGenesis = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ibc.core.connection.v1.GenesisState connection_genesis = 2; + * @return {?proto.ibc.core.connection.v1.GenesisState} + */ +proto.ibc.core.types.v1.GenesisState.prototype.getConnectionGenesis = function() { + return /** @type{?proto.ibc.core.connection.v1.GenesisState} */ ( + jspb.Message.getWrapperField(this, ibc_core_connection_v1_genesis_pb.GenesisState, 2)); +}; + + +/** + * @param {?proto.ibc.core.connection.v1.GenesisState|undefined} value + * @return {!proto.ibc.core.types.v1.GenesisState} returns this +*/ +proto.ibc.core.types.v1.GenesisState.prototype.setConnectionGenesis = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.types.v1.GenesisState} returns this + */ +proto.ibc.core.types.v1.GenesisState.prototype.clearConnectionGenesis = function() { + return this.setConnectionGenesis(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.types.v1.GenesisState.prototype.hasConnectionGenesis = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ibc.core.channel.v1.GenesisState channel_genesis = 3; + * @return {?proto.ibc.core.channel.v1.GenesisState} + */ +proto.ibc.core.types.v1.GenesisState.prototype.getChannelGenesis = function() { + return /** @type{?proto.ibc.core.channel.v1.GenesisState} */ ( + jspb.Message.getWrapperField(this, ibc_core_channel_v1_genesis_pb.GenesisState, 3)); +}; + + +/** + * @param {?proto.ibc.core.channel.v1.GenesisState|undefined} value + * @return {!proto.ibc.core.types.v1.GenesisState} returns this +*/ +proto.ibc.core.types.v1.GenesisState.prototype.setChannelGenesis = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.core.types.v1.GenesisState} returns this + */ +proto.ibc.core.types.v1.GenesisState.prototype.clearChannelGenesis = function() { + return this.setChannelGenesis(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.core.types.v1.GenesisState.prototype.hasChannelGenesis = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +goog.object.extend(exports, proto.ibc.core.types.v1); diff --git a/src/types/proto-types/ibc/lightclients/localhost/v1/localhost_pb.js b/src/types/proto-types/ibc/lightclients/localhost/v1/localhost_pb.js new file mode 100644 index 00000000..2a00f505 --- /dev/null +++ b/src/types/proto-types/ibc/lightclients/localhost/v1/localhost_pb.js @@ -0,0 +1,222 @@ +// source: ibc/lightclients/localhost/v1/localhost.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.ibc.lightclients.localhost.v1.ClientState', 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.localhost.v1.ClientState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.localhost.v1.ClientState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.localhost.v1.ClientState.displayName = 'proto.ibc.lightclients.localhost.v1.ClientState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.localhost.v1.ClientState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.localhost.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.localhost.v1.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) { + var f, obj = { + chainId: jspb.Message.getFieldWithDefault(msg, 1, ""), + height: (f = msg.getHeight()) && 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.localhost.v1.ClientState} + */ +proto.ibc.lightclients.localhost.v1.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); +}; + + +/** + * 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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.localhost.v1.ClientState} + */ +proto.ibc.lightclients.localhost.v1.ClientState.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 = new ibc_core_client_v1_client_pb.Height; + reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader); + msg.setHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.localhost.v1.ClientState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.localhost.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.localhost.v1.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) { + var f = undefined; + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHeight(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } +}; + + +/** + * 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; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.lightclients.localhost.v1.ClientState.prototype.getHeight = function() { + return /** @type{?proto.ibc.core.client.v1.Height} */ ( + jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 2)); +}; + + +/** + * @param {?proto.ibc.core.client.v1.Height|undefined} value + * @return {!proto.ibc.lightclients.localhost.v1.ClientState} returns this +*/ +proto.ibc.lightclients.localhost.v1.ClientState.prototype.setHeight = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.localhost.v1.ClientState} returns this + */ +proto.ibc.lightclients.localhost.v1.ClientState.prototype.clearHeight = function() { + return this.setHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.localhost.v1.ClientState.prototype.hasHeight = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.ibc.lightclients.localhost.v1); diff --git a/src/types/proto-types/ibc/lightclients/solomachine/v1/solomachine_pb.js b/src/types/proto-types/ibc/lightclients/solomachine/v1/solomachine_pb.js new file mode 100644 index 00000000..c1c458ce --- /dev/null +++ b/src/types/proto-types/ibc/lightclients/solomachine/v1/solomachine_pb.js @@ -0,0 +1,3882 @@ +// source: ibc/lightclients/solomachine/v1/solomachine.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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/src/types/proto-types/ibc/lightclients/tendermint/v1/tendermint_pb.js b/src/types/proto-types/ibc/lightclients/tendermint/v1/tendermint_pb.js new file mode 100644 index 00000000..cdc957f0 --- /dev/null +++ b/src/types/proto-types/ibc/lightclients/tendermint/v1/tendermint_pb.js @@ -0,0 +1,1698 @@ +// source: ibc/lightclients/tendermint/v1/tendermint.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 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'); +goog.object.extend(proto, google_protobuf_timestamp_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 gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.ibc.lightclients.tendermint.v1.ClientState', null, global); +goog.exportSymbol('proto.ibc.lightclients.tendermint.v1.ConsensusState', null, global); +goog.exportSymbol('proto.ibc.lightclients.tendermint.v1.Fraction', null, global); +goog.exportSymbol('proto.ibc.lightclients.tendermint.v1.Header', null, global); +goog.exportSymbol('proto.ibc.lightclients.tendermint.v1.Misbehaviour', 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.tendermint.v1.ClientState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.lightclients.tendermint.v1.ClientState.repeatedFields_, null); +}; +goog.inherits(proto.ibc.lightclients.tendermint.v1.ClientState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.tendermint.v1.ClientState.displayName = 'proto.ibc.lightclients.tendermint.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.tendermint.v1.ConsensusState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.tendermint.v1.ConsensusState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.tendermint.v1.ConsensusState.displayName = 'proto.ibc.lightclients.tendermint.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.tendermint.v1.Misbehaviour = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.tendermint.v1.Misbehaviour, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.tendermint.v1.Misbehaviour.displayName = 'proto.ibc.lightclients.tendermint.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.tendermint.v1.Header = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.tendermint.v1.Header, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.tendermint.v1.Header.displayName = 'proto.ibc.lightclients.tendermint.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.tendermint.v1.Fraction = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.ibc.lightclients.tendermint.v1.Fraction, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.ibc.lightclients.tendermint.v1.Fraction.displayName = 'proto.ibc.lightclients.tendermint.v1.Fraction'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.ibc.lightclients.tendermint.v1.ClientState.repeatedFields_ = [8,9]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.tendermint.v1.ClientState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.tendermint.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.tendermint.v1.ClientState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.ClientState.toObject = function(includeInstance, msg) { + var f, obj = { + chainId: jspb.Message.getFieldWithDefault(msg, 1, ""), + trustLevel: (f = msg.getTrustLevel()) && proto.ibc.lightclients.tendermint.v1.Fraction.toObject(includeInstance, f), + trustingPeriod: (f = msg.getTrustingPeriod()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + unbondingPeriod: (f = msg.getUnbondingPeriod()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + maxClockDrift: (f = msg.getMaxClockDrift()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + 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), + upgradePathList: (f = jspb.Message.getRepeatedField(msg, 9)) == null ? undefined : f, + allowUpdateAfterExpiry: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + allowUpdateAfterMisbehaviour: 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.ibc.lightclients.tendermint.v1.ClientState} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.tendermint.v1.ClientState; + return proto.ibc.lightclients.tendermint.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.tendermint.v1.ClientState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.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 = new proto.ibc.lightclients.tendermint.v1.Fraction; + reader.readMessage(value,proto.ibc.lightclients.tendermint.v1.Fraction.deserializeBinaryFromReader); + msg.setTrustLevel(value); + break; + case 3: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setTrustingPeriod(value); + break; + case 4: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setUnbondingPeriod(value); + break; + case 5: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setMaxClockDrift(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.setFrozenHeight(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.setLatestHeight(value); + break; + case 8: + var value = new confio_proofs_pb.ProofSpec; + reader.readMessage(value,confio_proofs_pb.ProofSpec.deserializeBinaryFromReader); + msg.addProofSpecs(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.addUpgradePath(value); + break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAllowUpdateAfterExpiry(value); + break; + case 11: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAllowUpdateAfterMisbehaviour(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.tendermint.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.tendermint.v1.ClientState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.ClientState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTrustLevel(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.ibc.lightclients.tendermint.v1.Fraction.serializeBinaryToWriter + ); + } + f = message.getTrustingPeriod(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getUnbondingPeriod(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getMaxClockDrift(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getFrozenHeight(); + if (f != null) { + writer.writeMessage( + 6, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getLatestHeight(); + if (f != null) { + writer.writeMessage( + 7, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getProofSpecsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + confio_proofs_pb.ProofSpec.serializeBinaryToWriter + ); + } + f = message.getUpgradePathList(); + if (f.length > 0) { + writer.writeRepeatedString( + 9, + f + ); + } + f = message.getAllowUpdateAfterExpiry(); + if (f) { + writer.writeBool( + 10, + f + ); + } + f = message.getAllowUpdateAfterMisbehaviour(); + if (f) { + writer.writeBool( + 11, + f + ); + } +}; + + +/** + * optional string chain_id = 1; + * @return {string} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Fraction trust_level = 2; + * @return {?proto.ibc.lightclients.tendermint.v1.Fraction} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getTrustLevel = function() { + return /** @type{?proto.ibc.lightclients.tendermint.v1.Fraction} */ ( + jspb.Message.getWrapperField(this, proto.ibc.lightclients.tendermint.v1.Fraction, 2)); +}; + + +/** + * @param {?proto.ibc.lightclients.tendermint.v1.Fraction|undefined} value + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setTrustLevel = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.clearTrustLevel = function() { + return this.setTrustLevel(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.hasTrustLevel = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional google.protobuf.Duration trusting_period = 3; + * @return {?proto.google.protobuf.Duration} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getTrustingPeriod = 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.ibc.lightclients.tendermint.v1.ClientState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setTrustingPeriod = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.clearTrustingPeriod = function() { + return this.setTrustingPeriod(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.hasTrustingPeriod = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional google.protobuf.Duration unbonding_period = 4; + * @return {?proto.google.protobuf.Duration} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getUnbondingPeriod = 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.ibc.lightclients.tendermint.v1.ClientState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setUnbondingPeriod = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.clearUnbondingPeriod = function() { + return this.setUnbondingPeriod(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.hasUnbondingPeriod = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Duration max_clock_drift = 5; + * @return {?proto.google.protobuf.Duration} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getMaxClockDrift = 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.ibc.lightclients.tendermint.v1.ClientState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setMaxClockDrift = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.clearMaxClockDrift = function() { + return this.setMaxClockDrift(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.hasMaxClockDrift = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional ibc.core.client.v1.Height frozen_height = 6; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getFrozenHeight = 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.lightclients.tendermint.v1.ClientState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setFrozenHeight = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.clearFrozenHeight = function() { + return this.setFrozenHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.hasFrozenHeight = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional ibc.core.client.v1.Height latest_height = 7; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getLatestHeight = 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.lightclients.tendermint.v1.ClientState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setLatestHeight = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.clearLatestHeight = function() { + return this.setLatestHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.hasLatestHeight = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * repeated ics23.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)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setProofSpecsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.ics23.ProofSpec=} opt_value + * @param {number=} opt_index + * @return {!proto.ics23.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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.clearProofSpecsList = function() { + return this.setProofSpecsList([]); +}; + + +/** + * repeated string upgrade_path = 9; + * @return {!Array} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getUpgradePathList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setUpgradePathList = function(value) { + return jspb.Message.setField(this, 9, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.addUpgradePath = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 9, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.clearUpgradePathList = function() { + return this.setUpgradePathList([]); +}; + + +/** + * optional bool allow_update_after_expiry = 10; + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getAllowUpdateAfterExpiry = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setAllowUpdateAfterExpiry = function(value) { + return jspb.Message.setProto3BooleanField(this, 10, value); +}; + + +/** + * optional bool allow_update_after_misbehaviour = 11; + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.getAllowUpdateAfterMisbehaviour = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.ibc.lightclients.tendermint.v1.ClientState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ClientState.prototype.setAllowUpdateAfterMisbehaviour = function(value) { + return jspb.Message.setProto3BooleanField(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.ibc.lightclients.tendermint.v1.ConsensusState.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.tendermint.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.tendermint.v1.ConsensusState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.toObject = function(includeInstance, msg) { + var f, obj = { + timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + root: (f = msg.getRoot()) && ibc_core_commitment_v1_commitment_pb.MerkleRoot.toObject(includeInstance, f), + nextValidatorsHash: msg.getNextValidatorsHash_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.tendermint.v1.ConsensusState} + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.tendermint.v1.ConsensusState; + return proto.ibc.lightclients.tendermint.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.tendermint.v1.ConsensusState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.tendermint.v1.ConsensusState} + */ +proto.ibc.lightclients.tendermint.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_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 2: + var value = new ibc_core_commitment_v1_commitment_pb.MerkleRoot; + reader.readMessage(value,ibc_core_commitment_v1_commitment_pb.MerkleRoot.deserializeBinaryFromReader); + msg.setRoot(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNextValidatorsHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.tendermint.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.tendermint.v1.ConsensusState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getRoot(); + if (f != null) { + writer.writeMessage( + 2, + f, + ibc_core_commitment_v1_commitment_pb.MerkleRoot.serializeBinaryToWriter + ); + } + f = message.getNextValidatorsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.getTimestamp = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.ibc.lightclients.tendermint.v1.ConsensusState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.ConsensusState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ibc.core.commitment.v1.MerkleRoot root = 2; + * @return {?proto.ibc.core.commitment.v1.MerkleRoot} + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.getRoot = function() { + return /** @type{?proto.ibc.core.commitment.v1.MerkleRoot} */ ( + jspb.Message.getWrapperField(this, ibc_core_commitment_v1_commitment_pb.MerkleRoot, 2)); +}; + + +/** + * @param {?proto.ibc.core.commitment.v1.MerkleRoot|undefined} value + * @return {!proto.ibc.lightclients.tendermint.v1.ConsensusState} returns this +*/ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.setRoot = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.ConsensusState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.clearRoot = function() { + return this.setRoot(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.hasRoot = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional bytes next_validators_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.getNextValidatorsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes next_validators_hash = 3; + * This is a type-conversion wrapper around `getNextValidatorsHash()` + * @return {string} + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.getNextValidatorsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNextValidatorsHash())); +}; + + +/** + * optional bytes next_validators_hash = 3; + * 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.ibc.lightclients.tendermint.v1.ConsensusState.prototype.getNextValidatorsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNextValidatorsHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.ibc.lightclients.tendermint.v1.ConsensusState} returns this + */ +proto.ibc.lightclients.tendermint.v1.ConsensusState.prototype.setNextValidatorsHash = 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.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.tendermint.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.tendermint.v1.Misbehaviour} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.toObject = function(includeInstance, msg) { + var f, obj = { + clientId: jspb.Message.getFieldWithDefault(msg, 1, ""), + header1: (f = msg.getHeader1()) && proto.ibc.lightclients.tendermint.v1.Header.toObject(includeInstance, f), + header2: (f = msg.getHeader2()) && proto.ibc.lightclients.tendermint.v1.Header.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.tendermint.v1.Misbehaviour} + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.tendermint.v1.Misbehaviour; + return proto.ibc.lightclients.tendermint.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.tendermint.v1.Misbehaviour} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.tendermint.v1.Misbehaviour} + */ +proto.ibc.lightclients.tendermint.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 = new proto.ibc.lightclients.tendermint.v1.Header; + reader.readMessage(value,proto.ibc.lightclients.tendermint.v1.Header.deserializeBinaryFromReader); + msg.setHeader1(value); + break; + case 3: + var value = new proto.ibc.lightclients.tendermint.v1.Header; + reader.readMessage(value,proto.ibc.lightclients.tendermint.v1.Header.deserializeBinaryFromReader); + msg.setHeader2(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.tendermint.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.tendermint.v1.Misbehaviour} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getClientId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHeader1(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.ibc.lightclients.tendermint.v1.Header.serializeBinaryToWriter + ); + } + f = message.getHeader2(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.ibc.lightclients.tendermint.v1.Header.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string client_id = 1; + * @return {string} + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.getClientId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.ibc.lightclients.tendermint.v1.Misbehaviour} returns this + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.setClientId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional Header header_1 = 2; + * @return {?proto.ibc.lightclients.tendermint.v1.Header} + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.getHeader1 = function() { + return /** @type{?proto.ibc.lightclients.tendermint.v1.Header} */ ( + jspb.Message.getWrapperField(this, proto.ibc.lightclients.tendermint.v1.Header, 2)); +}; + + +/** + * @param {?proto.ibc.lightclients.tendermint.v1.Header|undefined} value + * @return {!proto.ibc.lightclients.tendermint.v1.Misbehaviour} returns this +*/ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.setHeader1 = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.Misbehaviour} returns this + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.clearHeader1 = function() { + return this.setHeader1(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.hasHeader1 = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional Header header_2 = 3; + * @return {?proto.ibc.lightclients.tendermint.v1.Header} + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.getHeader2 = function() { + return /** @type{?proto.ibc.lightclients.tendermint.v1.Header} */ ( + jspb.Message.getWrapperField(this, proto.ibc.lightclients.tendermint.v1.Header, 3)); +}; + + +/** + * @param {?proto.ibc.lightclients.tendermint.v1.Header|undefined} value + * @return {!proto.ibc.lightclients.tendermint.v1.Misbehaviour} returns this +*/ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.setHeader2 = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.Misbehaviour} returns this + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.clearHeader2 = function() { + return this.setHeader2(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.Misbehaviour.prototype.hasHeader2 = 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.tendermint.v1.Header.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.tendermint.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.tendermint.v1.Header} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.Header.toObject = function(includeInstance, msg) { + var f, obj = { + signedHeader: (f = msg.getSignedHeader()) && tendermint_types_types_pb.SignedHeader.toObject(includeInstance, f), + validatorSet: (f = msg.getValidatorSet()) && tendermint_types_validator_pb.ValidatorSet.toObject(includeInstance, f), + trustedHeight: (f = msg.getTrustedHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f), + trustedValidators: (f = msg.getTrustedValidators()) && tendermint_types_validator_pb.ValidatorSet.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.tendermint.v1.Header} + */ +proto.ibc.lightclients.tendermint.v1.Header.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.tendermint.v1.Header; + return proto.ibc.lightclients.tendermint.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.tendermint.v1.Header} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.tendermint.v1.Header} + */ +proto.ibc.lightclients.tendermint.v1.Header.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.SignedHeader; + reader.readMessage(value,tendermint_types_types_pb.SignedHeader.deserializeBinaryFromReader); + msg.setSignedHeader(value); + break; + case 2: + var value = new tendermint_types_validator_pb.ValidatorSet; + reader.readMessage(value,tendermint_types_validator_pb.ValidatorSet.deserializeBinaryFromReader); + msg.setValidatorSet(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.setTrustedHeight(value); + break; + case 4: + var value = new tendermint_types_validator_pb.ValidatorSet; + reader.readMessage(value,tendermint_types_validator_pb.ValidatorSet.deserializeBinaryFromReader); + msg.setTrustedValidators(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.tendermint.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.tendermint.v1.Header} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.Header.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignedHeader(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.SignedHeader.serializeBinaryToWriter + ); + } + f = message.getValidatorSet(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_validator_pb.ValidatorSet.serializeBinaryToWriter + ); + } + f = message.getTrustedHeight(); + if (f != null) { + writer.writeMessage( + 3, + f, + ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter + ); + } + f = message.getTrustedValidators(); + if (f != null) { + writer.writeMessage( + 4, + f, + tendermint_types_validator_pb.ValidatorSet.serializeBinaryToWriter + ); + } +}; + + +/** + * optional tendermint.types.SignedHeader signed_header = 1; + * @return {?proto.tendermint.types.SignedHeader} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.getSignedHeader = function() { + return /** @type{?proto.tendermint.types.SignedHeader} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.SignedHeader, 1)); +}; + + +/** + * @param {?proto.tendermint.types.SignedHeader|undefined} value + * @return {!proto.ibc.lightclients.tendermint.v1.Header} returns this +*/ +proto.ibc.lightclients.tendermint.v1.Header.prototype.setSignedHeader = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.Header} returns this + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.clearSignedHeader = function() { + return this.setSignedHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.hasSignedHeader = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional tendermint.types.ValidatorSet validator_set = 2; + * @return {?proto.tendermint.types.ValidatorSet} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.getValidatorSet = function() { + return /** @type{?proto.tendermint.types.ValidatorSet} */ ( + jspb.Message.getWrapperField(this, tendermint_types_validator_pb.ValidatorSet, 2)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorSet|undefined} value + * @return {!proto.ibc.lightclients.tendermint.v1.Header} returns this +*/ +proto.ibc.lightclients.tendermint.v1.Header.prototype.setValidatorSet = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.Header} returns this + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.clearValidatorSet = function() { + return this.setValidatorSet(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.hasValidatorSet = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ibc.core.client.v1.Height trusted_height = 3; + * @return {?proto.ibc.core.client.v1.Height} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.getTrustedHeight = 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.tendermint.v1.Header} returns this +*/ +proto.ibc.lightclients.tendermint.v1.Header.prototype.setTrustedHeight = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.Header} returns this + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.clearTrustedHeight = function() { + return this.setTrustedHeight(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.hasTrustedHeight = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional tendermint.types.ValidatorSet trusted_validators = 4; + * @return {?proto.tendermint.types.ValidatorSet} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.getTrustedValidators = function() { + return /** @type{?proto.tendermint.types.ValidatorSet} */ ( + jspb.Message.getWrapperField(this, tendermint_types_validator_pb.ValidatorSet, 4)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorSet|undefined} value + * @return {!proto.ibc.lightclients.tendermint.v1.Header} returns this +*/ +proto.ibc.lightclients.tendermint.v1.Header.prototype.setTrustedValidators = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.ibc.lightclients.tendermint.v1.Header} returns this + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.clearTrustedValidators = function() { + return this.setTrustedValidators(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.ibc.lightclients.tendermint.v1.Header.prototype.hasTrustedValidators = 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.tendermint.v1.Fraction.prototype.toObject = function(opt_includeInstance) { + return proto.ibc.lightclients.tendermint.v1.Fraction.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.tendermint.v1.Fraction} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.Fraction.toObject = function(includeInstance, msg) { + var f, obj = { + numerator: jspb.Message.getFieldWithDefault(msg, 1, 0), + denominator: 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.tendermint.v1.Fraction} + */ +proto.ibc.lightclients.tendermint.v1.Fraction.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.ibc.lightclients.tendermint.v1.Fraction; + return proto.ibc.lightclients.tendermint.v1.Fraction.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.ibc.lightclients.tendermint.v1.Fraction} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.ibc.lightclients.tendermint.v1.Fraction} + */ +proto.ibc.lightclients.tendermint.v1.Fraction.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.setNumerator(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDenominator(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.ibc.lightclients.tendermint.v1.Fraction.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.ibc.lightclients.tendermint.v1.Fraction.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.tendermint.v1.Fraction} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.ibc.lightclients.tendermint.v1.Fraction.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNumerator(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getDenominator(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 numerator = 1; + * @return {number} + */ +proto.ibc.lightclients.tendermint.v1.Fraction.prototype.getNumerator = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.tendermint.v1.Fraction} returns this + */ +proto.ibc.lightclients.tendermint.v1.Fraction.prototype.setNumerator = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 denominator = 2; + * @return {number} + */ +proto.ibc.lightclients.tendermint.v1.Fraction.prototype.getDenominator = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.ibc.lightclients.tendermint.v1.Fraction} returns this + */ +proto.ibc.lightclients.tendermint.v1.Fraction.prototype.setDenominator = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.ibc.lightclients.tendermint.v1); diff --git a/src/types/proto-types/irismod/coinswap/coinswap_pb.js b/src/types/proto-types/irismod/coinswap/coinswap_pb.js new file mode 100644 index 00000000..eda19bcf --- /dev/null +++ b/src/types/proto-types/irismod/coinswap/coinswap_pb.js @@ -0,0 +1,628 @@ +// source: irismod/coinswap/coinswap.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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.irismod.coinswap.Input', null, global); +goog.exportSymbol('proto.irismod.coinswap.Output', null, global); +goog.exportSymbol('proto.irismod.coinswap.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.irismod.coinswap.Input = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.Input, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.Input.displayName = 'proto.irismod.coinswap.Input'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.coinswap.Output = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.Output, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.Output.displayName = 'proto.irismod.coinswap.Output'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.coinswap.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.Params.displayName = 'proto.irismod.coinswap.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.irismod.coinswap.Input.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.Input.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.Input} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.Input.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + coin: (f = msg.getCoin()) && 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.irismod.coinswap.Input} + */ +proto.irismod.coinswap.Input.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.Input; + return proto.irismod.coinswap.Input.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.Input} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.Input} + */ +proto.irismod.coinswap.Input.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.setCoin(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.Input.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.Input.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.Input} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.Input.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCoin(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.irismod.coinswap.Input.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Input} returns this + */ +proto.irismod.coinswap.Input.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin coin = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.Input.prototype.getCoin = 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.irismod.coinswap.Input} returns this +*/ +proto.irismod.coinswap.Input.prototype.setCoin = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.Input} returns this + */ +proto.irismod.coinswap.Input.prototype.clearCoin = function() { + return this.setCoin(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.Input.prototype.hasCoin = 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.irismod.coinswap.Output.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.Output.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.Output} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.Output.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + coin: (f = msg.getCoin()) && 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.irismod.coinswap.Output} + */ +proto.irismod.coinswap.Output.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.Output; + return proto.irismod.coinswap.Output.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.Output} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.Output} + */ +proto.irismod.coinswap.Output.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.setCoin(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.Output.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.Output.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.Output} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.Output.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCoin(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.irismod.coinswap.Output.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Output} returns this + */ +proto.irismod.coinswap.Output.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin coin = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.Output.prototype.getCoin = 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.irismod.coinswap.Output} returns this +*/ +proto.irismod.coinswap.Output.prototype.setCoin = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.Output} returns this + */ +proto.irismod.coinswap.Output.prototype.clearCoin = function() { + return this.setCoin(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.Output.prototype.hasCoin = 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.irismod.coinswap.Params.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.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.irismod.coinswap.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.Params.toObject = function(includeInstance, msg) { + var f, obj = { + fee: (f = msg.getFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + standardDenom: 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.irismod.coinswap.Params} + */ +proto.irismod.coinswap.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.Params; + return proto.irismod.coinswap.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.Params} + */ +proto.irismod.coinswap.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.setFee(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setStandardDenom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.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.irismod.coinswap.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFee(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getStandardDenom(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin fee = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.Params.prototype.getFee = 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.irismod.coinswap.Params} returns this +*/ +proto.irismod.coinswap.Params.prototype.setFee = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.Params} returns this + */ +proto.irismod.coinswap.Params.prototype.clearFee = function() { + return this.setFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.Params.prototype.hasFee = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string standard_denom = 2; + * @return {string} + */ +proto.irismod.coinswap.Params.prototype.getStandardDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.Params} returns this + */ +proto.irismod.coinswap.Params.prototype.setStandardDenom = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.irismod.coinswap); diff --git a/src/types/proto-types/irismod/coinswap/genesis_pb.js b/src/types/proto-types/irismod/coinswap/genesis_pb.js new file mode 100644 index 00000000..b8e31866 --- /dev/null +++ b/src/types/proto-types/irismod/coinswap/genesis_pb.js @@ -0,0 +1,192 @@ +// source: irismod/coinswap/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 irismod_coinswap_coinswap_pb = require('../../irismod/coinswap/coinswap_pb.js'); +goog.object.extend(proto, irismod_coinswap_coinswap_pb); +goog.exportSymbol('proto.irismod.coinswap.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.irismod.coinswap.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.GenesisState.displayName = 'proto.irismod.coinswap.GenesisState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.coinswap.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.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.irismod.coinswap.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && irismod_coinswap_coinswap_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.irismod.coinswap.GenesisState} + */ +proto.irismod.coinswap.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.GenesisState; + return proto.irismod.coinswap.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.GenesisState} + */ +proto.irismod.coinswap.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_coinswap_coinswap_pb.Params; + reader.readMessage(value,irismod_coinswap_coinswap_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.irismod.coinswap.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.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.irismod.coinswap.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_coinswap_coinswap_pb.Params.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.irismod.coinswap.Params} + */ +proto.irismod.coinswap.GenesisState.prototype.getParams = function() { + return /** @type{?proto.irismod.coinswap.Params} */ ( + jspb.Message.getWrapperField(this, irismod_coinswap_coinswap_pb.Params, 1)); +}; + + +/** + * @param {?proto.irismod.coinswap.Params|undefined} value + * @return {!proto.irismod.coinswap.GenesisState} returns this +*/ +proto.irismod.coinswap.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.GenesisState} returns this + */ +proto.irismod.coinswap.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.irismod.coinswap); diff --git a/src/types/proto-types/irismod/coinswap/query_grpc_web_pb.js b/src/types/proto-types/irismod/coinswap/query_grpc_web_pb.js new file mode 100644 index 00000000..d3141770 --- /dev/null +++ b/src/types/proto-types/irismod/coinswap/query_grpc_web_pb.js @@ -0,0 +1,161 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.coinswap + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.coinswap = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.coinswap.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.coinswap.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.coinswap.QueryLiquidityRequest, + * !proto.irismod.coinswap.QueryLiquidityResponse>} + */ +const methodDescriptor_Query_Liquidity = new grpc.web.MethodDescriptor( + '/irismod.coinswap.Query/Liquidity', + grpc.web.MethodType.UNARY, + proto.irismod.coinswap.QueryLiquidityRequest, + proto.irismod.coinswap.QueryLiquidityResponse, + /** + * @param {!proto.irismod.coinswap.QueryLiquidityRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.coinswap.QueryLiquidityRequest, + * !proto.irismod.coinswap.QueryLiquidityResponse>} + */ +const methodInfo_Query_Liquidity = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.coinswap.QueryLiquidityResponse, + /** + * @param {!proto.irismod.coinswap.QueryLiquidityRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.coinswap.QueryLiquidityRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.coinswap.QueryLiquidityResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.coinswap.QueryClient.prototype.liquidity = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.coinswap.Query/Liquidity', + request, + metadata || {}, + methodDescriptor_Query_Liquidity, + callback); +}; + + +/** + * @param {!proto.irismod.coinswap.QueryLiquidityRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.coinswap.QueryPromiseClient.prototype.liquidity = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.coinswap.Query/Liquidity', + request, + metadata || {}, + methodDescriptor_Query_Liquidity); +}; + + +module.exports = proto.irismod.coinswap; + diff --git a/src/types/proto-types/irismod/coinswap/query_pb.js b/src/types/proto-types/irismod/coinswap/query_pb.js new file mode 100644 index 00000000..bf9166da --- /dev/null +++ b/src/types/proto-types/irismod/coinswap/query_pb.js @@ -0,0 +1,478 @@ +// source: irismod/coinswap/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 google_api_annotations_pb = require('../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityRequest', null, global); +goog.exportSymbol('proto.irismod.coinswap.QueryLiquidityResponse', 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.irismod.coinswap.QueryLiquidityRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.QueryLiquidityRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.QueryLiquidityRequest.displayName = 'proto.irismod.coinswap.QueryLiquidityRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.coinswap.QueryLiquidityResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.QueryLiquidityResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.QueryLiquidityResponse.displayName = 'proto.irismod.coinswap.QueryLiquidityResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.coinswap.QueryLiquidityRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.QueryLiquidityRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.QueryLiquidityRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityRequest.toObject = function(includeInstance, msg) { + var f, obj = { + id: 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.irismod.coinswap.QueryLiquidityRequest} + */ +proto.irismod.coinswap.QueryLiquidityRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.QueryLiquidityRequest; + return proto.irismod.coinswap.QueryLiquidityRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.QueryLiquidityRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.QueryLiquidityRequest} + */ +proto.irismod.coinswap.QueryLiquidityRequest.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.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.QueryLiquidityRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.QueryLiquidityRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.QueryLiquidityRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.coinswap.QueryLiquidityRequest.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.QueryLiquidityRequest} returns this + */ +proto.irismod.coinswap.QueryLiquidityRequest.prototype.setId = 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.irismod.coinswap.QueryLiquidityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.QueryLiquidityResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.QueryLiquidityResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityResponse.toObject = function(includeInstance, msg) { + var f, obj = { + standard: (f = msg.getStandard()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + token: (f = msg.getToken()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + liquidity: (f = msg.getLiquidity()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + fee: 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.irismod.coinswap.QueryLiquidityResponse} + */ +proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.QueryLiquidityResponse; + return proto.irismod.coinswap.QueryLiquidityResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.QueryLiquidityResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.QueryLiquidityResponse} + */ +proto.irismod.coinswap.QueryLiquidityResponse.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.setStandard(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setToken(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setLiquidity(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.QueryLiquidityResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.QueryLiquidityResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.QueryLiquidityResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStandard(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getToken(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getLiquidity(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getFee(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin standard = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.getStandard = 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.irismod.coinswap.QueryLiquidityResponse} returns this +*/ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.setStandard = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearStandard = function() { + return this.setStandard(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.hasStandard = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional cosmos.base.v1beta1.Coin token = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.getToken = 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.irismod.coinswap.QueryLiquidityResponse} returns this +*/ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.setToken = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearToken = function() { + return this.setToken(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.hasToken = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional cosmos.base.v1beta1.Coin liquidity = 3; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.getLiquidity = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this +*/ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.setLiquidity = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.clearLiquidity = function() { + return this.setLiquidity(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.hasLiquidity = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string fee = 4; + * @return {string} + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.getFee = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.QueryLiquidityResponse} returns this + */ +proto.irismod.coinswap.QueryLiquidityResponse.prototype.setFee = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +goog.object.extend(exports, proto.irismod.coinswap); diff --git a/src/types/proto-types/irismod/coinswap/tx_grpc_web_pb.js b/src/types/proto-types/irismod/coinswap/tx_grpc_web_pb.js new file mode 100644 index 00000000..70903fe0 --- /dev/null +++ b/src/types/proto-types/irismod/coinswap/tx_grpc_web_pb.js @@ -0,0 +1,321 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.coinswap + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var irismod_coinswap_coinswap_pb = require('../../irismod/coinswap/coinswap_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.coinswap = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.coinswap.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.coinswap.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.coinswap.MsgAddLiquidity, + * !proto.irismod.coinswap.MsgAddLiquidityResponse>} + */ +const methodDescriptor_Msg_AddLiquidity = new grpc.web.MethodDescriptor( + '/irismod.coinswap.Msg/AddLiquidity', + grpc.web.MethodType.UNARY, + proto.irismod.coinswap.MsgAddLiquidity, + proto.irismod.coinswap.MsgAddLiquidityResponse, + /** + * @param {!proto.irismod.coinswap.MsgAddLiquidity} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.MsgAddLiquidityResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.coinswap.MsgAddLiquidity, + * !proto.irismod.coinswap.MsgAddLiquidityResponse>} + */ +const methodInfo_Msg_AddLiquidity = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.coinswap.MsgAddLiquidityResponse, + /** + * @param {!proto.irismod.coinswap.MsgAddLiquidity} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.MsgAddLiquidityResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.coinswap.MsgAddLiquidity} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.coinswap.MsgAddLiquidityResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.coinswap.MsgClient.prototype.addLiquidity = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.coinswap.Msg/AddLiquidity', + request, + metadata || {}, + methodDescriptor_Msg_AddLiquidity, + callback); +}; + + +/** + * @param {!proto.irismod.coinswap.MsgAddLiquidity} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.coinswap.MsgPromiseClient.prototype.addLiquidity = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.coinswap.Msg/AddLiquidity', + request, + metadata || {}, + methodDescriptor_Msg_AddLiquidity); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.coinswap.MsgRemoveLiquidity, + * !proto.irismod.coinswap.MsgRemoveLiquidityResponse>} + */ +const methodDescriptor_Msg_RemoveLiquidity = new grpc.web.MethodDescriptor( + '/irismod.coinswap.Msg/RemoveLiquidity', + grpc.web.MethodType.UNARY, + proto.irismod.coinswap.MsgRemoveLiquidity, + proto.irismod.coinswap.MsgRemoveLiquidityResponse, + /** + * @param {!proto.irismod.coinswap.MsgRemoveLiquidity} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.MsgRemoveLiquidityResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.coinswap.MsgRemoveLiquidity, + * !proto.irismod.coinswap.MsgRemoveLiquidityResponse>} + */ +const methodInfo_Msg_RemoveLiquidity = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.coinswap.MsgRemoveLiquidityResponse, + /** + * @param {!proto.irismod.coinswap.MsgRemoveLiquidity} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.MsgRemoveLiquidityResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.coinswap.MsgRemoveLiquidity} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.coinswap.MsgRemoveLiquidityResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.coinswap.MsgClient.prototype.removeLiquidity = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.coinswap.Msg/RemoveLiquidity', + request, + metadata || {}, + methodDescriptor_Msg_RemoveLiquidity, + callback); +}; + + +/** + * @param {!proto.irismod.coinswap.MsgRemoveLiquidity} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.coinswap.MsgPromiseClient.prototype.removeLiquidity = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.coinswap.Msg/RemoveLiquidity', + request, + metadata || {}, + methodDescriptor_Msg_RemoveLiquidity); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.coinswap.MsgSwapOrder, + * !proto.irismod.coinswap.MsgSwapCoinResponse>} + */ +const methodDescriptor_Msg_SwapCoin = new grpc.web.MethodDescriptor( + '/irismod.coinswap.Msg/SwapCoin', + grpc.web.MethodType.UNARY, + proto.irismod.coinswap.MsgSwapOrder, + proto.irismod.coinswap.MsgSwapCoinResponse, + /** + * @param {!proto.irismod.coinswap.MsgSwapOrder} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.MsgSwapCoinResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.coinswap.MsgSwapOrder, + * !proto.irismod.coinswap.MsgSwapCoinResponse>} + */ +const methodInfo_Msg_SwapCoin = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.coinswap.MsgSwapCoinResponse, + /** + * @param {!proto.irismod.coinswap.MsgSwapOrder} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.coinswap.MsgSwapCoinResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.coinswap.MsgSwapOrder} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.coinswap.MsgSwapCoinResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.coinswap.MsgClient.prototype.swapCoin = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.coinswap.Msg/SwapCoin', + request, + metadata || {}, + methodDescriptor_Msg_SwapCoin, + callback); +}; + + +/** + * @param {!proto.irismod.coinswap.MsgSwapOrder} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.coinswap.MsgPromiseClient.prototype.swapCoin = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.coinswap.Msg/SwapCoin', + request, + metadata || {}, + methodDescriptor_Msg_SwapCoin); +}; + + +module.exports = proto.irismod.coinswap; + diff --git a/src/types/proto-types/irismod/coinswap/tx_pb.js b/src/types/proto-types/irismod/coinswap/tx_pb.js new file mode 100644 index 00000000..ba9db291 --- /dev/null +++ b/src/types/proto-types/irismod/coinswap/tx_pb.js @@ -0,0 +1,1369 @@ +// source: irismod/coinswap/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var irismod_coinswap_coinswap_pb = require('../../irismod/coinswap/coinswap_pb.js'); +goog.object.extend(proto, irismod_coinswap_coinswap_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.irismod.coinswap.MsgAddLiquidity', null, global); +goog.exportSymbol('proto.irismod.coinswap.MsgAddLiquidityResponse', null, global); +goog.exportSymbol('proto.irismod.coinswap.MsgRemoveLiquidity', null, global); +goog.exportSymbol('proto.irismod.coinswap.MsgRemoveLiquidityResponse', null, global); +goog.exportSymbol('proto.irismod.coinswap.MsgSwapCoinResponse', null, global); +goog.exportSymbol('proto.irismod.coinswap.MsgSwapOrder', 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.irismod.coinswap.MsgAddLiquidity = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.MsgAddLiquidity, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.MsgAddLiquidity.displayName = 'proto.irismod.coinswap.MsgAddLiquidity'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.coinswap.MsgAddLiquidityResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.MsgAddLiquidityResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.MsgAddLiquidityResponse.displayName = 'proto.irismod.coinswap.MsgAddLiquidityResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.coinswap.MsgRemoveLiquidity = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.MsgRemoveLiquidity, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.MsgRemoveLiquidity.displayName = 'proto.irismod.coinswap.MsgRemoveLiquidity'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.coinswap.MsgRemoveLiquidityResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.coinswap.MsgRemoveLiquidityResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.MsgRemoveLiquidityResponse.displayName = 'proto.irismod.coinswap.MsgRemoveLiquidityResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.coinswap.MsgSwapOrder = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.MsgSwapOrder, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.MsgSwapOrder.displayName = 'proto.irismod.coinswap.MsgSwapOrder'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.coinswap.MsgSwapCoinResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.coinswap.MsgSwapCoinResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.coinswap.MsgSwapCoinResponse.displayName = 'proto.irismod.coinswap.MsgSwapCoinResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.MsgAddLiquidity.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.MsgAddLiquidity} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgAddLiquidity.toObject = function(includeInstance, msg) { + var f, obj = { + maxToken: (f = msg.getMaxToken()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + exactStandardAmt: jspb.Message.getFieldWithDefault(msg, 2, ""), + minLiquidity: jspb.Message.getFieldWithDefault(msg, 3, ""), + deadline: jspb.Message.getFieldWithDefault(msg, 4, 0), + sender: 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.irismod.coinswap.MsgAddLiquidity} + */ +proto.irismod.coinswap.MsgAddLiquidity.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.MsgAddLiquidity; + return proto.irismod.coinswap.MsgAddLiquidity.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.MsgAddLiquidity} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.MsgAddLiquidity} + */ +proto.irismod.coinswap.MsgAddLiquidity.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.setMaxToken(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setExactStandardAmt(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMinLiquidity(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setDeadline(value); + break; + case 5: + 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.irismod.coinswap.MsgAddLiquidity.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.MsgAddLiquidity.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.MsgAddLiquidity} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgAddLiquidity.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxToken(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getExactStandardAmt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMinLiquidity(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDeadline(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin max_token = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.getMaxToken = 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.irismod.coinswap.MsgAddLiquidity} returns this +*/ +proto.irismod.coinswap.MsgAddLiquidity.prototype.setMaxToken = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.MsgAddLiquidity} returns this + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.clearMaxToken = function() { + return this.setMaxToken(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.hasMaxToken = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string exact_standard_amt = 2; + * @return {string} + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.getExactStandardAmt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.MsgAddLiquidity} returns this + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.setExactStandardAmt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string min_liquidity = 3; + * @return {string} + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.getMinLiquidity = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.MsgAddLiquidity} returns this + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.setMinLiquidity = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int64 deadline = 4; + * @return {number} + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.getDeadline = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.coinswap.MsgAddLiquidity} returns this + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.setDeadline = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string sender = 5; + * @return {string} + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.MsgAddLiquidity} returns this + */ +proto.irismod.coinswap.MsgAddLiquidity.prototype.setSender = 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.irismod.coinswap.MsgAddLiquidityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.MsgAddLiquidityResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.MsgAddLiquidityResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgAddLiquidityResponse.toObject = function(includeInstance, msg) { + var f, obj = { + mintToken: (f = msg.getMintToken()) && 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.irismod.coinswap.MsgAddLiquidityResponse} + */ +proto.irismod.coinswap.MsgAddLiquidityResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.MsgAddLiquidityResponse; + return proto.irismod.coinswap.MsgAddLiquidityResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.MsgAddLiquidityResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.MsgAddLiquidityResponse} + */ +proto.irismod.coinswap.MsgAddLiquidityResponse.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.setMintToken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.MsgAddLiquidityResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.MsgAddLiquidityResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.MsgAddLiquidityResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgAddLiquidityResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMintToken(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin mint_token = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.MsgAddLiquidityResponse.prototype.getMintToken = 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.irismod.coinswap.MsgAddLiquidityResponse} returns this +*/ +proto.irismod.coinswap.MsgAddLiquidityResponse.prototype.setMintToken = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.MsgAddLiquidityResponse} returns this + */ +proto.irismod.coinswap.MsgAddLiquidityResponse.prototype.clearMintToken = function() { + return this.setMintToken(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.MsgAddLiquidityResponse.prototype.hasMintToken = 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.irismod.coinswap.MsgRemoveLiquidity.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.MsgRemoveLiquidity.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.MsgRemoveLiquidity} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgRemoveLiquidity.toObject = function(includeInstance, msg) { + var f, obj = { + withdrawLiquidity: (f = msg.getWithdrawLiquidity()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + minToken: jspb.Message.getFieldWithDefault(msg, 2, ""), + minStandardAmt: jspb.Message.getFieldWithDefault(msg, 3, ""), + deadline: jspb.Message.getFieldWithDefault(msg, 4, 0), + sender: 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.irismod.coinswap.MsgRemoveLiquidity} + */ +proto.irismod.coinswap.MsgRemoveLiquidity.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.MsgRemoveLiquidity; + return proto.irismod.coinswap.MsgRemoveLiquidity.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.MsgRemoveLiquidity} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.MsgRemoveLiquidity} + */ +proto.irismod.coinswap.MsgRemoveLiquidity.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.setWithdrawLiquidity(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMinToken(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMinStandardAmt(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setDeadline(value); + break; + case 5: + 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.irismod.coinswap.MsgRemoveLiquidity.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.MsgRemoveLiquidity.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.MsgRemoveLiquidity} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgRemoveLiquidity.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWithdrawLiquidity(); + if (f != null) { + writer.writeMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getMinToken(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMinStandardAmt(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getDeadline(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional cosmos.base.v1beta1.Coin withdraw_liquidity = 1; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.getWithdrawLiquidity = 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.irismod.coinswap.MsgRemoveLiquidity} returns this +*/ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.setWithdrawLiquidity = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.MsgRemoveLiquidity} returns this + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.clearWithdrawLiquidity = function() { + return this.setWithdrawLiquidity(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.hasWithdrawLiquidity = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string min_token = 2; + * @return {string} + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.getMinToken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.MsgRemoveLiquidity} returns this + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.setMinToken = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string min_standard_amt = 3; + * @return {string} + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.getMinStandardAmt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.MsgRemoveLiquidity} returns this + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.setMinStandardAmt = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int64 deadline = 4; + * @return {number} + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.getDeadline = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.coinswap.MsgRemoveLiquidity} returns this + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.setDeadline = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string sender = 5; + * @return {string} + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.coinswap.MsgRemoveLiquidity} returns this + */ +proto.irismod.coinswap.MsgRemoveLiquidity.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.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.irismod.coinswap.MsgRemoveLiquidityResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.MsgRemoveLiquidityResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.MsgRemoveLiquidityResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.toObject = function(includeInstance, msg) { + var f, obj = { + withdrawCoinsList: jspb.Message.toObjectList(msg.getWithdrawCoinsList(), + 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.irismod.coinswap.MsgRemoveLiquidityResponse} + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.MsgRemoveLiquidityResponse; + return proto.irismod.coinswap.MsgRemoveLiquidityResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.MsgRemoveLiquidityResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.MsgRemoveLiquidityResponse} + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.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.addWithdrawCoins(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.MsgRemoveLiquidityResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.MsgRemoveLiquidityResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWithdrawCoinsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin withdraw_coins = 1; + * @return {!Array} + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.prototype.getWithdrawCoinsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.coinswap.MsgRemoveLiquidityResponse} returns this +*/ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.prototype.setWithdrawCoinsList = 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.irismod.coinswap.MsgRemoveLiquidityResponse.prototype.addWithdrawCoins = 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.irismod.coinswap.MsgRemoveLiquidityResponse} returns this + */ +proto.irismod.coinswap.MsgRemoveLiquidityResponse.prototype.clearWithdrawCoinsList = function() { + return this.setWithdrawCoinsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.MsgSwapOrder.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.MsgSwapOrder} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgSwapOrder.toObject = function(includeInstance, msg) { + var f, obj = { + input: (f = msg.getInput()) && irismod_coinswap_coinswap_pb.Input.toObject(includeInstance, f), + output: (f = msg.getOutput()) && irismod_coinswap_coinswap_pb.Output.toObject(includeInstance, f), + deadline: jspb.Message.getFieldWithDefault(msg, 3, 0), + isBuyOrder: 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.irismod.coinswap.MsgSwapOrder} + */ +proto.irismod.coinswap.MsgSwapOrder.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.MsgSwapOrder; + return proto.irismod.coinswap.MsgSwapOrder.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.MsgSwapOrder} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.MsgSwapOrder} + */ +proto.irismod.coinswap.MsgSwapOrder.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_coinswap_coinswap_pb.Input; + reader.readMessage(value,irismod_coinswap_coinswap_pb.Input.deserializeBinaryFromReader); + msg.setInput(value); + break; + case 2: + var value = new irismod_coinswap_coinswap_pb.Output; + reader.readMessage(value,irismod_coinswap_coinswap_pb.Output.deserializeBinaryFromReader); + msg.setOutput(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setDeadline(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIsBuyOrder(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.MsgSwapOrder.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.MsgSwapOrder} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgSwapOrder.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInput(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_coinswap_coinswap_pb.Input.serializeBinaryToWriter + ); + } + f = message.getOutput(); + if (f != null) { + writer.writeMessage( + 2, + f, + irismod_coinswap_coinswap_pb.Output.serializeBinaryToWriter + ); + } + f = message.getDeadline(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getIsBuyOrder(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional Input input = 1; + * @return {?proto.irismod.coinswap.Input} + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.getInput = function() { + return /** @type{?proto.irismod.coinswap.Input} */ ( + jspb.Message.getWrapperField(this, irismod_coinswap_coinswap_pb.Input, 1)); +}; + + +/** + * @param {?proto.irismod.coinswap.Input|undefined} value + * @return {!proto.irismod.coinswap.MsgSwapOrder} returns this +*/ +proto.irismod.coinswap.MsgSwapOrder.prototype.setInput = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.MsgSwapOrder} returns this + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.clearInput = function() { + return this.setInput(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.hasInput = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Output output = 2; + * @return {?proto.irismod.coinswap.Output} + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.getOutput = function() { + return /** @type{?proto.irismod.coinswap.Output} */ ( + jspb.Message.getWrapperField(this, irismod_coinswap_coinswap_pb.Output, 2)); +}; + + +/** + * @param {?proto.irismod.coinswap.Output|undefined} value + * @return {!proto.irismod.coinswap.MsgSwapOrder} returns this +*/ +proto.irismod.coinswap.MsgSwapOrder.prototype.setOutput = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.coinswap.MsgSwapOrder} returns this + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.clearOutput = function() { + return this.setOutput(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.hasOutput = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 deadline = 3; + * @return {number} + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.getDeadline = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.coinswap.MsgSwapOrder} returns this + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.setDeadline = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bool is_buy_order = 4; + * @return {boolean} + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.getIsBuyOrder = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.coinswap.MsgSwapOrder} returns this + */ +proto.irismod.coinswap.MsgSwapOrder.prototype.setIsBuyOrder = 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.irismod.coinswap.MsgSwapCoinResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.coinswap.MsgSwapCoinResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.coinswap.MsgSwapCoinResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgSwapCoinResponse.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.irismod.coinswap.MsgSwapCoinResponse} + */ +proto.irismod.coinswap.MsgSwapCoinResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.coinswap.MsgSwapCoinResponse; + return proto.irismod.coinswap.MsgSwapCoinResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.coinswap.MsgSwapCoinResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.coinswap.MsgSwapCoinResponse} + */ +proto.irismod.coinswap.MsgSwapCoinResponse.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.irismod.coinswap.MsgSwapCoinResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.coinswap.MsgSwapCoinResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.coinswap.MsgSwapCoinResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.coinswap.MsgSwapCoinResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.irismod.coinswap); diff --git a/src/types/proto-types/irismod/htlc/genesis_pb.js b/src/types/proto-types/irismod/htlc/genesis_pb.js new file mode 100644 index 00000000..44c3dcdf --- /dev/null +++ b/src/types/proto-types/irismod/htlc/genesis_pb.js @@ -0,0 +1,174 @@ +// source: irismod/htlc/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 irismod_htlc_htlc_pb = require('../../irismod/htlc/htlc_pb.js'); +goog.object.extend(proto, irismod_htlc_htlc_pb); +goog.exportSymbol('proto.irismod.htlc.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.irismod.htlc.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.htlc.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.GenesisState.displayName = 'proto.irismod.htlc.GenesisState'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.htlc.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.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.irismod.htlc.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + pendingHtlcsMap: (f = msg.getPendingHtlcsMap()) ? f.toObject(includeInstance, proto.irismod.htlc.HTLC.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.htlc.GenesisState} + */ +proto.irismod.htlc.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.GenesisState; + return proto.irismod.htlc.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.GenesisState} + */ +proto.irismod.htlc.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getPendingHtlcsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.irismod.htlc.HTLC.deserializeBinaryFromReader, "", new proto.irismod.htlc.HTLC()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.htlc.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.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.irismod.htlc.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPendingHtlcsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.irismod.htlc.HTLC.serializeBinaryToWriter); + } +}; + + +/** + * map pending_htlcs = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.irismod.htlc.GenesisState.prototype.getPendingHtlcsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.irismod.htlc.HTLC)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.irismod.htlc.GenesisState} returns this + */ +proto.irismod.htlc.GenesisState.prototype.clearPendingHtlcsMap = function() { + this.getPendingHtlcsMap().clear(); + return this;}; + + +goog.object.extend(exports, proto.irismod.htlc); diff --git a/src/types/proto-types/irismod/htlc/htlc_pb.js b/src/types/proto-types/irismod/htlc/htlc_pb.js new file mode 100644 index 00000000..9848300d --- /dev/null +++ b/src/types/proto-types/irismod/htlc/htlc_pb.js @@ -0,0 +1,422 @@ +// source: irismod/htlc/htlc.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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.irismod.htlc.HTLC', null, global); +goog.exportSymbol('proto.irismod.htlc.HTLCState', 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.irismod.htlc.HTLC = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.htlc.HTLC.repeatedFields_, null); +}; +goog.inherits(proto.irismod.htlc.HTLC, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.HTLC.displayName = 'proto.irismod.htlc.HTLC'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.htlc.HTLC.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.irismod.htlc.HTLC.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.HTLC.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.HTLC} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.HTLC.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + to: jspb.Message.getFieldWithDefault(msg, 2, ""), + receiverOnOtherChain: jspb.Message.getFieldWithDefault(msg, 3, ""), + amountList: jspb.Message.toObjectList(msg.getAmountList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + secret: jspb.Message.getFieldWithDefault(msg, 5, ""), + timestamp: jspb.Message.getFieldWithDefault(msg, 6, 0), + expirationHeight: jspb.Message.getFieldWithDefault(msg, 7, 0), + state: 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.irismod.htlc.HTLC} + */ +proto.irismod.htlc.HTLC.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.HTLC; + return proto.irismod.htlc.HTLC.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.HTLC} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.HTLC} + */ +proto.irismod.htlc.HTLC.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 {string} */ (reader.readString()); + msg.setTo(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setReceiverOnOtherChain(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addAmount(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSecret(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpirationHeight(value); + break; + case 8: + var value = /** @type {!proto.irismod.htlc.HTLCState} */ (reader.readEnum()); + msg.setState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.htlc.HTLC.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.HTLC.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.HTLC} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.HTLC.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTo(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getReceiverOnOtherChain(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAmountList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getSecret(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getExpirationHeight(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 8, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.irismod.htlc.HTLC.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.HTLC} returns this + */ +proto.irismod.htlc.HTLC.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string to = 2; + * @return {string} + */ +proto.irismod.htlc.HTLC.prototype.getTo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.HTLC} returns this + */ +proto.irismod.htlc.HTLC.prototype.setTo = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string receiver_on_other_chain = 3; + * @return {string} + */ +proto.irismod.htlc.HTLC.prototype.getReceiverOnOtherChain = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.HTLC} returns this + */ +proto.irismod.htlc.HTLC.prototype.setReceiverOnOtherChain = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 4; + * @return {!Array} + */ +proto.irismod.htlc.HTLC.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.htlc.HTLC} returns this +*/ +proto.irismod.htlc.HTLC.prototype.setAmountList = 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.irismod.htlc.HTLC.prototype.addAmount = 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.irismod.htlc.HTLC} returns this + */ +proto.irismod.htlc.HTLC.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + +/** + * optional string secret = 5; + * @return {string} + */ +proto.irismod.htlc.HTLC.prototype.getSecret = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.HTLC} returns this + */ +proto.irismod.htlc.HTLC.prototype.setSecret = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional uint64 timestamp = 6; + * @return {number} + */ +proto.irismod.htlc.HTLC.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.htlc.HTLC} returns this + */ +proto.irismod.htlc.HTLC.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint64 expiration_height = 7; + * @return {number} + */ +proto.irismod.htlc.HTLC.prototype.getExpirationHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.htlc.HTLC} returns this + */ +proto.irismod.htlc.HTLC.prototype.setExpirationHeight = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional HTLCState state = 8; + * @return {!proto.irismod.htlc.HTLCState} + */ +proto.irismod.htlc.HTLC.prototype.getState = function() { + return /** @type {!proto.irismod.htlc.HTLCState} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {!proto.irismod.htlc.HTLCState} value + * @return {!proto.irismod.htlc.HTLC} returns this + */ +proto.irismod.htlc.HTLC.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 8, value); +}; + + +/** + * @enum {number} + */ +proto.irismod.htlc.HTLCState = { + HTLC_STATE_OPEN: 0, + HTLC_STATE_COMPLETED: 1, + HTLC_STATE_EXPIRED: 2, + HTLC_STATE_REFUNDED: 3 +}; + +goog.object.extend(exports, proto.irismod.htlc); diff --git a/src/types/proto-types/irismod/htlc/query_grpc_web_pb.js b/src/types/proto-types/irismod/htlc/query_grpc_web_pb.js new file mode 100644 index 00000000..96f0b129 --- /dev/null +++ b/src/types/proto-types/irismod/htlc/query_grpc_web_pb.js @@ -0,0 +1,159 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.htlc + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var irismod_htlc_htlc_pb = require('../../irismod/htlc/htlc_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.htlc = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.htlc.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.htlc.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.htlc.QueryHTLCRequest, + * !proto.irismod.htlc.QueryHTLCResponse>} + */ +const methodDescriptor_Query_HTLC = new grpc.web.MethodDescriptor( + '/irismod.htlc.Query/HTLC', + grpc.web.MethodType.UNARY, + proto.irismod.htlc.QueryHTLCRequest, + proto.irismod.htlc.QueryHTLCResponse, + /** + * @param {!proto.irismod.htlc.QueryHTLCRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.htlc.QueryHTLCResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.htlc.QueryHTLCRequest, + * !proto.irismod.htlc.QueryHTLCResponse>} + */ +const methodInfo_Query_HTLC = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.htlc.QueryHTLCResponse, + /** + * @param {!proto.irismod.htlc.QueryHTLCRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.htlc.QueryHTLCResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.htlc.QueryHTLCRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.htlc.QueryHTLCResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.htlc.QueryClient.prototype.hTLC = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.htlc.Query/HTLC', + request, + metadata || {}, + methodDescriptor_Query_HTLC, + callback); +}; + + +/** + * @param {!proto.irismod.htlc.QueryHTLCRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.htlc.QueryPromiseClient.prototype.hTLC = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.htlc.Query/HTLC', + request, + metadata || {}, + methodDescriptor_Query_HTLC); +}; + + +module.exports = proto.irismod.htlc; + diff --git a/src/types/proto-types/irismod/htlc/query_pb.js b/src/types/proto-types/irismod/htlc/query_pb.js new file mode 100644 index 00000000..396104f1 --- /dev/null +++ b/src/types/proto-types/irismod/htlc/query_pb.js @@ -0,0 +1,344 @@ +// source: irismod/htlc/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var irismod_htlc_htlc_pb = require('../../irismod/htlc/htlc_pb.js'); +goog.object.extend(proto, irismod_htlc_htlc_pb); +goog.exportSymbol('proto.irismod.htlc.QueryHTLCRequest', null, global); +goog.exportSymbol('proto.irismod.htlc.QueryHTLCResponse', 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.irismod.htlc.QueryHTLCRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.htlc.QueryHTLCRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.QueryHTLCRequest.displayName = 'proto.irismod.htlc.QueryHTLCRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.htlc.QueryHTLCResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.htlc.QueryHTLCResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.QueryHTLCResponse.displayName = 'proto.irismod.htlc.QueryHTLCResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.htlc.QueryHTLCRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.QueryHTLCRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.QueryHTLCRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.QueryHTLCRequest.toObject = function(includeInstance, msg) { + var f, obj = { + hashLock: 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.irismod.htlc.QueryHTLCRequest} + */ +proto.irismod.htlc.QueryHTLCRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.QueryHTLCRequest; + return proto.irismod.htlc.QueryHTLCRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.QueryHTLCRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.QueryHTLCRequest} + */ +proto.irismod.htlc.QueryHTLCRequest.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.setHashLock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.htlc.QueryHTLCRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.QueryHTLCRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.QueryHTLCRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.QueryHTLCRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHashLock(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string hash_lock = 1; + * @return {string} + */ +proto.irismod.htlc.QueryHTLCRequest.prototype.getHashLock = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.QueryHTLCRequest} returns this + */ +proto.irismod.htlc.QueryHTLCRequest.prototype.setHashLock = 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.irismod.htlc.QueryHTLCResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.QueryHTLCResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.QueryHTLCResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.QueryHTLCResponse.toObject = function(includeInstance, msg) { + var f, obj = { + htlc: (f = msg.getHtlc()) && irismod_htlc_htlc_pb.HTLC.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.irismod.htlc.QueryHTLCResponse} + */ +proto.irismod.htlc.QueryHTLCResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.QueryHTLCResponse; + return proto.irismod.htlc.QueryHTLCResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.QueryHTLCResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.QueryHTLCResponse} + */ +proto.irismod.htlc.QueryHTLCResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_htlc_htlc_pb.HTLC; + reader.readMessage(value,irismod_htlc_htlc_pb.HTLC.deserializeBinaryFromReader); + msg.setHtlc(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.htlc.QueryHTLCResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.QueryHTLCResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.QueryHTLCResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.QueryHTLCResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHtlc(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_htlc_htlc_pb.HTLC.serializeBinaryToWriter + ); + } +}; + + +/** + * optional HTLC htlc = 1; + * @return {?proto.irismod.htlc.HTLC} + */ +proto.irismod.htlc.QueryHTLCResponse.prototype.getHtlc = function() { + return /** @type{?proto.irismod.htlc.HTLC} */ ( + jspb.Message.getWrapperField(this, irismod_htlc_htlc_pb.HTLC, 1)); +}; + + +/** + * @param {?proto.irismod.htlc.HTLC|undefined} value + * @return {!proto.irismod.htlc.QueryHTLCResponse} returns this +*/ +proto.irismod.htlc.QueryHTLCResponse.prototype.setHtlc = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.htlc.QueryHTLCResponse} returns this + */ +proto.irismod.htlc.QueryHTLCResponse.prototype.clearHtlc = function() { + return this.setHtlc(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.htlc.QueryHTLCResponse.prototype.hasHtlc = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.irismod.htlc); diff --git a/src/types/proto-types/irismod/htlc/tx_grpc_web_pb.js b/src/types/proto-types/irismod/htlc/tx_grpc_web_pb.js new file mode 100644 index 00000000..177843c1 --- /dev/null +++ b/src/types/proto-types/irismod/htlc/tx_grpc_web_pb.js @@ -0,0 +1,319 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.htlc + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.htlc = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.htlc.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.htlc.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.htlc.MsgCreateHTLC, + * !proto.irismod.htlc.MsgCreateHTLCResponse>} + */ +const methodDescriptor_Msg_CreateHTLC = new grpc.web.MethodDescriptor( + '/irismod.htlc.Msg/CreateHTLC', + grpc.web.MethodType.UNARY, + proto.irismod.htlc.MsgCreateHTLC, + proto.irismod.htlc.MsgCreateHTLCResponse, + /** + * @param {!proto.irismod.htlc.MsgCreateHTLC} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.htlc.MsgCreateHTLCResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.htlc.MsgCreateHTLC, + * !proto.irismod.htlc.MsgCreateHTLCResponse>} + */ +const methodInfo_Msg_CreateHTLC = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.htlc.MsgCreateHTLCResponse, + /** + * @param {!proto.irismod.htlc.MsgCreateHTLC} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.htlc.MsgCreateHTLCResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.htlc.MsgCreateHTLC} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.htlc.MsgCreateHTLCResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.htlc.MsgClient.prototype.createHTLC = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.htlc.Msg/CreateHTLC', + request, + metadata || {}, + methodDescriptor_Msg_CreateHTLC, + callback); +}; + + +/** + * @param {!proto.irismod.htlc.MsgCreateHTLC} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.htlc.MsgPromiseClient.prototype.createHTLC = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.htlc.Msg/CreateHTLC', + request, + metadata || {}, + methodDescriptor_Msg_CreateHTLC); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.htlc.MsgClaimHTLC, + * !proto.irismod.htlc.MsgClaimHTLCResponse>} + */ +const methodDescriptor_Msg_ClaimHTLC = new grpc.web.MethodDescriptor( + '/irismod.htlc.Msg/ClaimHTLC', + grpc.web.MethodType.UNARY, + proto.irismod.htlc.MsgClaimHTLC, + proto.irismod.htlc.MsgClaimHTLCResponse, + /** + * @param {!proto.irismod.htlc.MsgClaimHTLC} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.htlc.MsgClaimHTLCResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.htlc.MsgClaimHTLC, + * !proto.irismod.htlc.MsgClaimHTLCResponse>} + */ +const methodInfo_Msg_ClaimHTLC = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.htlc.MsgClaimHTLCResponse, + /** + * @param {!proto.irismod.htlc.MsgClaimHTLC} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.htlc.MsgClaimHTLCResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.htlc.MsgClaimHTLC} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.htlc.MsgClaimHTLCResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.htlc.MsgClient.prototype.claimHTLC = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.htlc.Msg/ClaimHTLC', + request, + metadata || {}, + methodDescriptor_Msg_ClaimHTLC, + callback); +}; + + +/** + * @param {!proto.irismod.htlc.MsgClaimHTLC} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.htlc.MsgPromiseClient.prototype.claimHTLC = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.htlc.Msg/ClaimHTLC', + request, + metadata || {}, + methodDescriptor_Msg_ClaimHTLC); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.htlc.MsgRefundHTLC, + * !proto.irismod.htlc.MsgRefundHTLCResponse>} + */ +const methodDescriptor_Msg_RefundHTLC = new grpc.web.MethodDescriptor( + '/irismod.htlc.Msg/RefundHTLC', + grpc.web.MethodType.UNARY, + proto.irismod.htlc.MsgRefundHTLC, + proto.irismod.htlc.MsgRefundHTLCResponse, + /** + * @param {!proto.irismod.htlc.MsgRefundHTLC} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.htlc.MsgRefundHTLCResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.htlc.MsgRefundHTLC, + * !proto.irismod.htlc.MsgRefundHTLCResponse>} + */ +const methodInfo_Msg_RefundHTLC = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.htlc.MsgRefundHTLCResponse, + /** + * @param {!proto.irismod.htlc.MsgRefundHTLC} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.htlc.MsgRefundHTLCResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.htlc.MsgRefundHTLC} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.htlc.MsgRefundHTLCResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.htlc.MsgClient.prototype.refundHTLC = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.htlc.Msg/RefundHTLC', + request, + metadata || {}, + methodDescriptor_Msg_RefundHTLC, + callback); +}; + + +/** + * @param {!proto.irismod.htlc.MsgRefundHTLC} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.htlc.MsgPromiseClient.prototype.refundHTLC = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.htlc.Msg/RefundHTLC', + request, + metadata || {}, + methodDescriptor_Msg_RefundHTLC); +}; + + +module.exports = proto.irismod.htlc; + diff --git a/src/types/proto-types/irismod/htlc/tx_pb.js b/src/types/proto-types/irismod/htlc/tx_pb.js new file mode 100644 index 00000000..96709c6c --- /dev/null +++ b/src/types/proto-types/irismod/htlc/tx_pb.js @@ -0,0 +1,1144 @@ +// source: irismod/htlc/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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.irismod.htlc.MsgClaimHTLC', null, global); +goog.exportSymbol('proto.irismod.htlc.MsgClaimHTLCResponse', null, global); +goog.exportSymbol('proto.irismod.htlc.MsgCreateHTLC', null, global); +goog.exportSymbol('proto.irismod.htlc.MsgCreateHTLCResponse', null, global); +goog.exportSymbol('proto.irismod.htlc.MsgRefundHTLC', null, global); +goog.exportSymbol('proto.irismod.htlc.MsgRefundHTLCResponse', 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.irismod.htlc.MsgCreateHTLC = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.htlc.MsgCreateHTLC.repeatedFields_, null); +}; +goog.inherits(proto.irismod.htlc.MsgCreateHTLC, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.MsgCreateHTLC.displayName = 'proto.irismod.htlc.MsgCreateHTLC'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.htlc.MsgCreateHTLCResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.htlc.MsgCreateHTLCResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.MsgCreateHTLCResponse.displayName = 'proto.irismod.htlc.MsgCreateHTLCResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.htlc.MsgClaimHTLC = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.htlc.MsgClaimHTLC, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.MsgClaimHTLC.displayName = 'proto.irismod.htlc.MsgClaimHTLC'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.htlc.MsgClaimHTLCResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.htlc.MsgClaimHTLCResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.MsgClaimHTLCResponse.displayName = 'proto.irismod.htlc.MsgClaimHTLCResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.htlc.MsgRefundHTLC = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.htlc.MsgRefundHTLC, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.MsgRefundHTLC.displayName = 'proto.irismod.htlc.MsgRefundHTLC'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.htlc.MsgRefundHTLCResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.htlc.MsgRefundHTLCResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.htlc.MsgRefundHTLCResponse.displayName = 'proto.irismod.htlc.MsgRefundHTLCResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.htlc.MsgCreateHTLC.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.irismod.htlc.MsgCreateHTLC.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.MsgCreateHTLC.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.MsgCreateHTLC} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgCreateHTLC.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + to: jspb.Message.getFieldWithDefault(msg, 2, ""), + receiverOnOtherChain: jspb.Message.getFieldWithDefault(msg, 3, ""), + amountList: jspb.Message.toObjectList(msg.getAmountList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + hashLock: jspb.Message.getFieldWithDefault(msg, 5, ""), + timestamp: jspb.Message.getFieldWithDefault(msg, 6, 0), + timeLock: 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.irismod.htlc.MsgCreateHTLC} + */ +proto.irismod.htlc.MsgCreateHTLC.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.MsgCreateHTLC; + return proto.irismod.htlc.MsgCreateHTLC.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.MsgCreateHTLC} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.MsgCreateHTLC} + */ +proto.irismod.htlc.MsgCreateHTLC.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 {string} */ (reader.readString()); + msg.setTo(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setReceiverOnOtherChain(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addAmount(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setHashLock(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimestamp(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTimeLock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.MsgCreateHTLC.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.MsgCreateHTLC} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgCreateHTLC.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTo(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getReceiverOnOtherChain(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAmountList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getHashLock(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getTimestamp(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getTimeLock(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgCreateHTLC} returns this + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string to = 2; + * @return {string} + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.getTo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgCreateHTLC} returns this + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.setTo = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string receiver_on_other_chain = 3; + * @return {string} + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.getReceiverOnOtherChain = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgCreateHTLC} returns this + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.setReceiverOnOtherChain = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin amount = 4; + * @return {!Array} + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.getAmountList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.htlc.MsgCreateHTLC} returns this +*/ +proto.irismod.htlc.MsgCreateHTLC.prototype.setAmountList = 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.irismod.htlc.MsgCreateHTLC.prototype.addAmount = 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.irismod.htlc.MsgCreateHTLC} returns this + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.clearAmountList = function() { + return this.setAmountList([]); +}; + + +/** + * optional string hash_lock = 5; + * @return {string} + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.getHashLock = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgCreateHTLC} returns this + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.setHashLock = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional uint64 timestamp = 6; + * @return {number} + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.getTimestamp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.htlc.MsgCreateHTLC} returns this + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.setTimestamp = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional uint64 time_lock = 7; + * @return {number} + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.getTimeLock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.htlc.MsgCreateHTLC} returns this + */ +proto.irismod.htlc.MsgCreateHTLC.prototype.setTimeLock = 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.irismod.htlc.MsgCreateHTLCResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.MsgCreateHTLCResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.MsgCreateHTLCResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgCreateHTLCResponse.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.irismod.htlc.MsgCreateHTLCResponse} + */ +proto.irismod.htlc.MsgCreateHTLCResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.MsgCreateHTLCResponse; + return proto.irismod.htlc.MsgCreateHTLCResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.MsgCreateHTLCResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.MsgCreateHTLCResponse} + */ +proto.irismod.htlc.MsgCreateHTLCResponse.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.irismod.htlc.MsgCreateHTLCResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.MsgCreateHTLCResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.MsgCreateHTLCResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgCreateHTLCResponse.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.irismod.htlc.MsgClaimHTLC.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.MsgClaimHTLC.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.MsgClaimHTLC} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgClaimHTLC.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + hashLock: jspb.Message.getFieldWithDefault(msg, 2, ""), + secret: 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.irismod.htlc.MsgClaimHTLC} + */ +proto.irismod.htlc.MsgClaimHTLC.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.MsgClaimHTLC; + return proto.irismod.htlc.MsgClaimHTLC.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.MsgClaimHTLC} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.MsgClaimHTLC} + */ +proto.irismod.htlc.MsgClaimHTLC.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 {string} */ (reader.readString()); + msg.setHashLock(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSecret(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.htlc.MsgClaimHTLC.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.MsgClaimHTLC.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.MsgClaimHTLC} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgClaimHTLC.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHashLock(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSecret(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.irismod.htlc.MsgClaimHTLC.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgClaimHTLC} returns this + */ +proto.irismod.htlc.MsgClaimHTLC.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string hash_lock = 2; + * @return {string} + */ +proto.irismod.htlc.MsgClaimHTLC.prototype.getHashLock = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgClaimHTLC} returns this + */ +proto.irismod.htlc.MsgClaimHTLC.prototype.setHashLock = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string secret = 3; + * @return {string} + */ +proto.irismod.htlc.MsgClaimHTLC.prototype.getSecret = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgClaimHTLC} returns this + */ +proto.irismod.htlc.MsgClaimHTLC.prototype.setSecret = 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.irismod.htlc.MsgClaimHTLCResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.MsgClaimHTLCResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.MsgClaimHTLCResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgClaimHTLCResponse.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.irismod.htlc.MsgClaimHTLCResponse} + */ +proto.irismod.htlc.MsgClaimHTLCResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.MsgClaimHTLCResponse; + return proto.irismod.htlc.MsgClaimHTLCResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.MsgClaimHTLCResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.MsgClaimHTLCResponse} + */ +proto.irismod.htlc.MsgClaimHTLCResponse.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.irismod.htlc.MsgClaimHTLCResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.MsgClaimHTLCResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.MsgClaimHTLCResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgClaimHTLCResponse.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.irismod.htlc.MsgRefundHTLC.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.MsgRefundHTLC.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.MsgRefundHTLC} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgRefundHTLC.toObject = function(includeInstance, msg) { + var f, obj = { + sender: jspb.Message.getFieldWithDefault(msg, 1, ""), + hashLock: 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.irismod.htlc.MsgRefundHTLC} + */ +proto.irismod.htlc.MsgRefundHTLC.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.MsgRefundHTLC; + return proto.irismod.htlc.MsgRefundHTLC.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.MsgRefundHTLC} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.MsgRefundHTLC} + */ +proto.irismod.htlc.MsgRefundHTLC.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 {string} */ (reader.readString()); + msg.setHashLock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.htlc.MsgRefundHTLC.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.MsgRefundHTLC.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.MsgRefundHTLC} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgRefundHTLC.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHashLock(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string sender = 1; + * @return {string} + */ +proto.irismod.htlc.MsgRefundHTLC.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgRefundHTLC} returns this + */ +proto.irismod.htlc.MsgRefundHTLC.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string hash_lock = 2; + * @return {string} + */ +proto.irismod.htlc.MsgRefundHTLC.prototype.getHashLock = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.htlc.MsgRefundHTLC} returns this + */ +proto.irismod.htlc.MsgRefundHTLC.prototype.setHashLock = 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.irismod.htlc.MsgRefundHTLCResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.htlc.MsgRefundHTLCResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.htlc.MsgRefundHTLCResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgRefundHTLCResponse.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.irismod.htlc.MsgRefundHTLCResponse} + */ +proto.irismod.htlc.MsgRefundHTLCResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.htlc.MsgRefundHTLCResponse; + return proto.irismod.htlc.MsgRefundHTLCResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.htlc.MsgRefundHTLCResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.htlc.MsgRefundHTLCResponse} + */ +proto.irismod.htlc.MsgRefundHTLCResponse.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.irismod.htlc.MsgRefundHTLCResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.htlc.MsgRefundHTLCResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.htlc.MsgRefundHTLCResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.htlc.MsgRefundHTLCResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.irismod.htlc); diff --git a/src/types/proto-types/irismod/nft/genesis_pb.js b/src/types/proto-types/irismod/nft/genesis_pb.js new file mode 100644 index 00000000..e76d08af --- /dev/null +++ b/src/types/proto-types/irismod/nft/genesis_pb.js @@ -0,0 +1,201 @@ +// source: irismod/nft/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 irismod_nft_nft_pb = require('../../irismod/nft/nft_pb.js'); +goog.object.extend(proto, irismod_nft_nft_pb); +goog.exportSymbol('proto.irismod.nft.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.irismod.nft.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.nft.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.irismod.nft.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.GenesisState.displayName = 'proto.irismod.nft.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.nft.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.irismod.nft.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.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.irismod.nft.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + collectionsList: jspb.Message.toObjectList(msg.getCollectionsList(), + irismod_nft_nft_pb.Collection.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.irismod.nft.GenesisState} + */ +proto.irismod.nft.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.GenesisState; + return proto.irismod.nft.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.GenesisState} + */ +proto.irismod.nft.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_nft_nft_pb.Collection; + reader.readMessage(value,irismod_nft_nft_pb.Collection.deserializeBinaryFromReader); + msg.addCollections(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.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.irismod.nft.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCollectionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_nft_nft_pb.Collection.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Collection collections = 1; + * @return {!Array} + */ +proto.irismod.nft.GenesisState.prototype.getCollectionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_nft_nft_pb.Collection, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.nft.GenesisState} returns this +*/ +proto.irismod.nft.GenesisState.prototype.setCollectionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.nft.Collection=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.nft.Collection} + */ +proto.irismod.nft.GenesisState.prototype.addCollections = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.nft.Collection, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.nft.GenesisState} returns this + */ +proto.irismod.nft.GenesisState.prototype.clearCollectionsList = function() { + return this.setCollectionsList([]); +}; + + +goog.object.extend(exports, proto.irismod.nft); diff --git a/src/types/proto-types/irismod/nft/nft_pb.js b/src/types/proto-types/irismod/nft/nft_pb.js new file mode 100644 index 00000000..dedb84c0 --- /dev/null +++ b/src/types/proto-types/irismod/nft/nft_pb.js @@ -0,0 +1,1184 @@ +// source: irismod/nft/nft.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.irismod.nft.BaseNFT', null, global); +goog.exportSymbol('proto.irismod.nft.Collection', null, global); +goog.exportSymbol('proto.irismod.nft.Denom', null, global); +goog.exportSymbol('proto.irismod.nft.IDCollection', null, global); +goog.exportSymbol('proto.irismod.nft.Owner', 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.irismod.nft.BaseNFT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.BaseNFT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.BaseNFT.displayName = 'proto.irismod.nft.BaseNFT'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.Denom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.Denom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.Denom.displayName = 'proto.irismod.nft.Denom'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.IDCollection = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.nft.IDCollection.repeatedFields_, null); +}; +goog.inherits(proto.irismod.nft.IDCollection, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.IDCollection.displayName = 'proto.irismod.nft.IDCollection'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.Owner = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.nft.Owner.repeatedFields_, null); +}; +goog.inherits(proto.irismod.nft.Owner, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.Owner.displayName = 'proto.irismod.nft.Owner'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.Collection = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.nft.Collection.repeatedFields_, null); +}; +goog.inherits(proto.irismod.nft.Collection, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.Collection.displayName = 'proto.irismod.nft.Collection'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.nft.BaseNFT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.BaseNFT.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.BaseNFT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.BaseNFT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + uri: jspb.Message.getFieldWithDefault(msg, 3, ""), + data: jspb.Message.getFieldWithDefault(msg, 4, ""), + owner: 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.irismod.nft.BaseNFT} + */ +proto.irismod.nft.BaseNFT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.BaseNFT; + return proto.irismod.nft.BaseNFT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.BaseNFT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.BaseNFT} + */ +proto.irismod.nft.BaseNFT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setUri(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.BaseNFT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.BaseNFT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.BaseNFT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.BaseNFT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getUri(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.nft.BaseNFT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.BaseNFT} returns this + */ +proto.irismod.nft.BaseNFT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.irismod.nft.BaseNFT.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.BaseNFT} returns this + */ +proto.irismod.nft.BaseNFT.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string uri = 3; + * @return {string} + */ +proto.irismod.nft.BaseNFT.prototype.getUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.BaseNFT} returns this + */ +proto.irismod.nft.BaseNFT.prototype.setUri = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string data = 4; + * @return {string} + */ +proto.irismod.nft.BaseNFT.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.BaseNFT} returns this + */ +proto.irismod.nft.BaseNFT.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string owner = 5; + * @return {string} + */ +proto.irismod.nft.BaseNFT.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.BaseNFT} returns this + */ +proto.irismod.nft.BaseNFT.prototype.setOwner = 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.irismod.nft.Denom.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.Denom.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.Denom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.Denom.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + schema: jspb.Message.getFieldWithDefault(msg, 3, ""), + 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.irismod.nft.Denom} + */ +proto.irismod.nft.Denom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.Denom; + return proto.irismod.nft.Denom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.Denom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.Denom} + */ +proto.irismod.nft.Denom.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSchema(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.irismod.nft.Denom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.Denom.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.Denom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.Denom.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSchema(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string schema = 3; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getSchema = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setSchema = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string creator = 4; + * @return {string} + */ +proto.irismod.nft.Denom.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Denom} returns this + */ +proto.irismod.nft.Denom.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.nft.IDCollection.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.irismod.nft.IDCollection.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.IDCollection.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.IDCollection} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.IDCollection.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + tokenIdsList: (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.irismod.nft.IDCollection} + */ +proto.irismod.nft.IDCollection.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.IDCollection; + return proto.irismod.nft.IDCollection.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.IDCollection} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.IDCollection} + */ +proto.irismod.nft.IDCollection.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.setDenomId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addTokenIds(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.IDCollection.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.IDCollection.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.IDCollection} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.IDCollection.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTokenIdsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.nft.IDCollection.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.IDCollection} returns this + */ +proto.irismod.nft.IDCollection.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string token_ids = 2; + * @return {!Array} + */ +proto.irismod.nft.IDCollection.prototype.getTokenIdsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.nft.IDCollection} returns this + */ +proto.irismod.nft.IDCollection.prototype.setTokenIdsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.nft.IDCollection} returns this + */ +proto.irismod.nft.IDCollection.prototype.addTokenIds = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.nft.IDCollection} returns this + */ +proto.irismod.nft.IDCollection.prototype.clearTokenIdsList = function() { + return this.setTokenIdsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.nft.Owner.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.irismod.nft.Owner.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.Owner.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.Owner} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.Owner.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + idCollectionsList: jspb.Message.toObjectList(msg.getIdCollectionsList(), + proto.irismod.nft.IDCollection.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.irismod.nft.Owner} + */ +proto.irismod.nft.Owner.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.Owner; + return proto.irismod.nft.Owner.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.Owner} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.Owner} + */ +proto.irismod.nft.Owner.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.irismod.nft.IDCollection; + reader.readMessage(value,proto.irismod.nft.IDCollection.deserializeBinaryFromReader); + msg.addIdCollections(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.Owner.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.Owner.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.Owner} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.Owner.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIdCollectionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.irismod.nft.IDCollection.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.irismod.nft.Owner.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.Owner} returns this + */ +proto.irismod.nft.Owner.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated IDCollection id_collections = 2; + * @return {!Array} + */ +proto.irismod.nft.Owner.prototype.getIdCollectionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.nft.IDCollection, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.nft.Owner} returns this +*/ +proto.irismod.nft.Owner.prototype.setIdCollectionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.nft.IDCollection=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.nft.IDCollection} + */ +proto.irismod.nft.Owner.prototype.addIdCollections = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.nft.IDCollection, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.nft.Owner} returns this + */ +proto.irismod.nft.Owner.prototype.clearIdCollectionsList = function() { + return this.setIdCollectionsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.nft.Collection.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.irismod.nft.Collection.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.Collection.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.Collection} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.Collection.toObject = function(includeInstance, msg) { + var f, obj = { + denom: (f = msg.getDenom()) && proto.irismod.nft.Denom.toObject(includeInstance, f), + nftsList: jspb.Message.toObjectList(msg.getNftsList(), + proto.irismod.nft.BaseNFT.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.irismod.nft.Collection} + */ +proto.irismod.nft.Collection.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.Collection; + return proto.irismod.nft.Collection.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.Collection} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.Collection} + */ +proto.irismod.nft.Collection.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.nft.Denom; + reader.readMessage(value,proto.irismod.nft.Denom.deserializeBinaryFromReader); + msg.setDenom(value); + break; + case 2: + var value = new proto.irismod.nft.BaseNFT; + reader.readMessage(value,proto.irismod.nft.BaseNFT.deserializeBinaryFromReader); + msg.addNfts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.Collection.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.Collection.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.Collection} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.Collection.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenom(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.irismod.nft.Denom.serializeBinaryToWriter + ); + } + f = message.getNftsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.irismod.nft.BaseNFT.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Denom denom = 1; + * @return {?proto.irismod.nft.Denom} + */ +proto.irismod.nft.Collection.prototype.getDenom = function() { + return /** @type{?proto.irismod.nft.Denom} */ ( + jspb.Message.getWrapperField(this, proto.irismod.nft.Denom, 1)); +}; + + +/** + * @param {?proto.irismod.nft.Denom|undefined} value + * @return {!proto.irismod.nft.Collection} returns this +*/ +proto.irismod.nft.Collection.prototype.setDenom = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.Collection} returns this + */ +proto.irismod.nft.Collection.prototype.clearDenom = function() { + return this.setDenom(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.Collection.prototype.hasDenom = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated BaseNFT nfts = 2; + * @return {!Array} + */ +proto.irismod.nft.Collection.prototype.getNftsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.nft.BaseNFT, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.nft.Collection} returns this +*/ +proto.irismod.nft.Collection.prototype.setNftsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.nft.BaseNFT=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.nft.BaseNFT} + */ +proto.irismod.nft.Collection.prototype.addNfts = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.nft.BaseNFT, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.nft.Collection} returns this + */ +proto.irismod.nft.Collection.prototype.clearNftsList = function() { + return this.setNftsList([]); +}; + + +goog.object.extend(exports, proto.irismod.nft); diff --git a/src/types/proto-types/irismod/nft/query_grpc_web_pb.js b/src/types/proto-types/irismod/nft/query_grpc_web_pb.js new file mode 100644 index 00000000..9d6e6643 --- /dev/null +++ b/src/types/proto-types/irismod/nft/query_grpc_web_pb.js @@ -0,0 +1,561 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.nft + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var irismod_nft_nft_pb = require('../../irismod/nft/nft_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.nft = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.nft.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.nft.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.QuerySupplyRequest, + * !proto.irismod.nft.QuerySupplyResponse>} + */ +const methodDescriptor_Query_Supply = new grpc.web.MethodDescriptor( + '/irismod.nft.Query/Supply', + grpc.web.MethodType.UNARY, + proto.irismod.nft.QuerySupplyRequest, + proto.irismod.nft.QuerySupplyResponse, + /** + * @param {!proto.irismod.nft.QuerySupplyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QuerySupplyResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.QuerySupplyRequest, + * !proto.irismod.nft.QuerySupplyResponse>} + */ +const methodInfo_Query_Supply = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.QuerySupplyResponse, + /** + * @param {!proto.irismod.nft.QuerySupplyRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QuerySupplyResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.QuerySupplyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.QuerySupplyResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.QueryClient.prototype.supply = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Query/Supply', + request, + metadata || {}, + methodDescriptor_Query_Supply, + callback); +}; + + +/** + * @param {!proto.irismod.nft.QuerySupplyRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.QueryPromiseClient.prototype.supply = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Query/Supply', + request, + metadata || {}, + methodDescriptor_Query_Supply); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.QueryOwnerRequest, + * !proto.irismod.nft.QueryOwnerResponse>} + */ +const methodDescriptor_Query_Owner = new grpc.web.MethodDescriptor( + '/irismod.nft.Query/Owner', + grpc.web.MethodType.UNARY, + proto.irismod.nft.QueryOwnerRequest, + proto.irismod.nft.QueryOwnerResponse, + /** + * @param {!proto.irismod.nft.QueryOwnerRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryOwnerResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.QueryOwnerRequest, + * !proto.irismod.nft.QueryOwnerResponse>} + */ +const methodInfo_Query_Owner = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.QueryOwnerResponse, + /** + * @param {!proto.irismod.nft.QueryOwnerRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryOwnerResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.QueryOwnerRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.QueryOwnerResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.QueryClient.prototype.owner = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Query/Owner', + request, + metadata || {}, + methodDescriptor_Query_Owner, + callback); +}; + + +/** + * @param {!proto.irismod.nft.QueryOwnerRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.QueryPromiseClient.prototype.owner = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Query/Owner', + request, + metadata || {}, + methodDescriptor_Query_Owner); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.QueryCollectionRequest, + * !proto.irismod.nft.QueryCollectionResponse>} + */ +const methodDescriptor_Query_Collection = new grpc.web.MethodDescriptor( + '/irismod.nft.Query/Collection', + grpc.web.MethodType.UNARY, + proto.irismod.nft.QueryCollectionRequest, + proto.irismod.nft.QueryCollectionResponse, + /** + * @param {!proto.irismod.nft.QueryCollectionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryCollectionResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.QueryCollectionRequest, + * !proto.irismod.nft.QueryCollectionResponse>} + */ +const methodInfo_Query_Collection = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.QueryCollectionResponse, + /** + * @param {!proto.irismod.nft.QueryCollectionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryCollectionResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.QueryCollectionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.QueryCollectionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.QueryClient.prototype.collection = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Query/Collection', + request, + metadata || {}, + methodDescriptor_Query_Collection, + callback); +}; + + +/** + * @param {!proto.irismod.nft.QueryCollectionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.QueryPromiseClient.prototype.collection = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Query/Collection', + request, + metadata || {}, + methodDescriptor_Query_Collection); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.QueryDenomRequest, + * !proto.irismod.nft.QueryDenomResponse>} + */ +const methodDescriptor_Query_Denom = new grpc.web.MethodDescriptor( + '/irismod.nft.Query/Denom', + grpc.web.MethodType.UNARY, + proto.irismod.nft.QueryDenomRequest, + proto.irismod.nft.QueryDenomResponse, + /** + * @param {!proto.irismod.nft.QueryDenomRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryDenomResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.QueryDenomRequest, + * !proto.irismod.nft.QueryDenomResponse>} + */ +const methodInfo_Query_Denom = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.QueryDenomResponse, + /** + * @param {!proto.irismod.nft.QueryDenomRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryDenomResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.QueryDenomRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.QueryDenomResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.QueryClient.prototype.denom = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Query/Denom', + request, + metadata || {}, + methodDescriptor_Query_Denom, + callback); +}; + + +/** + * @param {!proto.irismod.nft.QueryDenomRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.QueryPromiseClient.prototype.denom = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Query/Denom', + request, + metadata || {}, + methodDescriptor_Query_Denom); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.QueryDenomsRequest, + * !proto.irismod.nft.QueryDenomsResponse>} + */ +const methodDescriptor_Query_Denoms = new grpc.web.MethodDescriptor( + '/irismod.nft.Query/Denoms', + grpc.web.MethodType.UNARY, + proto.irismod.nft.QueryDenomsRequest, + proto.irismod.nft.QueryDenomsResponse, + /** + * @param {!proto.irismod.nft.QueryDenomsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryDenomsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.QueryDenomsRequest, + * !proto.irismod.nft.QueryDenomsResponse>} + */ +const methodInfo_Query_Denoms = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.QueryDenomsResponse, + /** + * @param {!proto.irismod.nft.QueryDenomsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryDenomsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.QueryDenomsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.QueryDenomsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.QueryClient.prototype.denoms = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Query/Denoms', + request, + metadata || {}, + methodDescriptor_Query_Denoms, + callback); +}; + + +/** + * @param {!proto.irismod.nft.QueryDenomsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.QueryPromiseClient.prototype.denoms = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Query/Denoms', + request, + metadata || {}, + methodDescriptor_Query_Denoms); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.QueryNFTRequest, + * !proto.irismod.nft.QueryNFTResponse>} + */ +const methodDescriptor_Query_NFT = new grpc.web.MethodDescriptor( + '/irismod.nft.Query/NFT', + grpc.web.MethodType.UNARY, + proto.irismod.nft.QueryNFTRequest, + proto.irismod.nft.QueryNFTResponse, + /** + * @param {!proto.irismod.nft.QueryNFTRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryNFTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.QueryNFTRequest, + * !proto.irismod.nft.QueryNFTResponse>} + */ +const methodInfo_Query_NFT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.QueryNFTResponse, + /** + * @param {!proto.irismod.nft.QueryNFTRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.QueryNFTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.QueryNFTRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.QueryNFTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.QueryClient.prototype.nFT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Query/NFT', + request, + metadata || {}, + methodDescriptor_Query_NFT, + callback); +}; + + +/** + * @param {!proto.irismod.nft.QueryNFTRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.QueryPromiseClient.prototype.nFT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Query/NFT', + request, + metadata || {}, + methodDescriptor_Query_NFT); +}; + + +module.exports = proto.irismod.nft; + diff --git a/src/types/proto-types/irismod/nft/query_pb.js b/src/types/proto-types/irismod/nft/query_pb.js new file mode 100644 index 00000000..aa45c68d --- /dev/null +++ b/src/types/proto-types/irismod/nft/query_pb.js @@ -0,0 +1,2020 @@ +// source: irismod/nft/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_api_annotations_pb = require('../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var irismod_nft_nft_pb = require('../../irismod/nft/nft_pb.js'); +goog.object.extend(proto, irismod_nft_nft_pb); +goog.exportSymbol('proto.irismod.nft.QueryCollectionRequest', null, global); +goog.exportSymbol('proto.irismod.nft.QueryCollectionResponse', null, global); +goog.exportSymbol('proto.irismod.nft.QueryDenomRequest', null, global); +goog.exportSymbol('proto.irismod.nft.QueryDenomResponse', null, global); +goog.exportSymbol('proto.irismod.nft.QueryDenomsRequest', null, global); +goog.exportSymbol('proto.irismod.nft.QueryDenomsResponse', null, global); +goog.exportSymbol('proto.irismod.nft.QueryNFTRequest', null, global); +goog.exportSymbol('proto.irismod.nft.QueryNFTResponse', null, global); +goog.exportSymbol('proto.irismod.nft.QueryOwnerRequest', null, global); +goog.exportSymbol('proto.irismod.nft.QueryOwnerResponse', null, global); +goog.exportSymbol('proto.irismod.nft.QuerySupplyRequest', null, global); +goog.exportSymbol('proto.irismod.nft.QuerySupplyResponse', 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.irismod.nft.QuerySupplyRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QuerySupplyRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QuerySupplyRequest.displayName = 'proto.irismod.nft.QuerySupplyRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QuerySupplyResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QuerySupplyResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QuerySupplyResponse.displayName = 'proto.irismod.nft.QuerySupplyResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryOwnerRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryOwnerRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryOwnerRequest.displayName = 'proto.irismod.nft.QueryOwnerRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryOwnerResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryOwnerResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryOwnerResponse.displayName = 'proto.irismod.nft.QueryOwnerResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryCollectionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryCollectionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryCollectionRequest.displayName = 'proto.irismod.nft.QueryCollectionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryCollectionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryCollectionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryCollectionResponse.displayName = 'proto.irismod.nft.QueryCollectionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryDenomRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryDenomRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryDenomRequest.displayName = 'proto.irismod.nft.QueryDenomRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryDenomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryDenomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryDenomResponse.displayName = 'proto.irismod.nft.QueryDenomResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryDenomsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryDenomsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryDenomsRequest.displayName = 'proto.irismod.nft.QueryDenomsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryDenomsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.nft.QueryDenomsResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.nft.QueryDenomsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryDenomsResponse.displayName = 'proto.irismod.nft.QueryDenomsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryNFTRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryNFTRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryNFTRequest.displayName = 'proto.irismod.nft.QueryNFTRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.QueryNFTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.QueryNFTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.QueryNFTResponse.displayName = 'proto.irismod.nft.QueryNFTResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.nft.QuerySupplyRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QuerySupplyRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QuerySupplyRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QuerySupplyRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + owner: 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.irismod.nft.QuerySupplyRequest} + */ +proto.irismod.nft.QuerySupplyRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QuerySupplyRequest; + return proto.irismod.nft.QuerySupplyRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QuerySupplyRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QuerySupplyRequest} + */ +proto.irismod.nft.QuerySupplyRequest.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.setDenomId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QuerySupplyRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QuerySupplyRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QuerySupplyRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QuerySupplyRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.nft.QuerySupplyRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.QuerySupplyRequest} returns this + */ +proto.irismod.nft.QuerySupplyRequest.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string owner = 2; + * @return {string} + */ +proto.irismod.nft.QuerySupplyRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.QuerySupplyRequest} returns this + */ +proto.irismod.nft.QuerySupplyRequest.prototype.setOwner = 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.irismod.nft.QuerySupplyResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QuerySupplyResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QuerySupplyResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QuerySupplyResponse.toObject = function(includeInstance, msg) { + var f, obj = { + amount: 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.irismod.nft.QuerySupplyResponse} + */ +proto.irismod.nft.QuerySupplyResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QuerySupplyResponse; + return proto.irismod.nft.QuerySupplyResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QuerySupplyResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QuerySupplyResponse} + */ +proto.irismod.nft.QuerySupplyResponse.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.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QuerySupplyResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QuerySupplyResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QuerySupplyResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QuerySupplyResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 amount = 1; + * @return {number} + */ +proto.irismod.nft.QuerySupplyResponse.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.nft.QuerySupplyResponse} returns this + */ +proto.irismod.nft.QuerySupplyResponse.prototype.setAmount = 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.irismod.nft.QueryOwnerRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryOwnerRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryOwnerRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryOwnerRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + owner: 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.irismod.nft.QueryOwnerRequest} + */ +proto.irismod.nft.QueryOwnerRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryOwnerRequest; + return proto.irismod.nft.QueryOwnerRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryOwnerRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryOwnerRequest} + */ +proto.irismod.nft.QueryOwnerRequest.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.setDenomId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryOwnerRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryOwnerRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryOwnerRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryOwnerRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.nft.QueryOwnerRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.QueryOwnerRequest} returns this + */ +proto.irismod.nft.QueryOwnerRequest.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string owner = 2; + * @return {string} + */ +proto.irismod.nft.QueryOwnerRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.QueryOwnerRequest} returns this + */ +proto.irismod.nft.QueryOwnerRequest.prototype.setOwner = 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.irismod.nft.QueryOwnerResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryOwnerResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryOwnerResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryOwnerResponse.toObject = function(includeInstance, msg) { + var f, obj = { + owner: (f = msg.getOwner()) && irismod_nft_nft_pb.Owner.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.irismod.nft.QueryOwnerResponse} + */ +proto.irismod.nft.QueryOwnerResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryOwnerResponse; + return proto.irismod.nft.QueryOwnerResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryOwnerResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryOwnerResponse} + */ +proto.irismod.nft.QueryOwnerResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_nft_nft_pb.Owner; + reader.readMessage(value,irismod_nft_nft_pb.Owner.deserializeBinaryFromReader); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryOwnerResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryOwnerResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryOwnerResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryOwnerResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_nft_nft_pb.Owner.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Owner owner = 1; + * @return {?proto.irismod.nft.Owner} + */ +proto.irismod.nft.QueryOwnerResponse.prototype.getOwner = function() { + return /** @type{?proto.irismod.nft.Owner} */ ( + jspb.Message.getWrapperField(this, irismod_nft_nft_pb.Owner, 1)); +}; + + +/** + * @param {?proto.irismod.nft.Owner|undefined} value + * @return {!proto.irismod.nft.QueryOwnerResponse} returns this +*/ +proto.irismod.nft.QueryOwnerResponse.prototype.setOwner = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryOwnerResponse} returns this + */ +proto.irismod.nft.QueryOwnerResponse.prototype.clearOwner = function() { + return this.setOwner(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryOwnerResponse.prototype.hasOwner = 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.irismod.nft.QueryCollectionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryCollectionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryCollectionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryCollectionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: 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.irismod.nft.QueryCollectionRequest} + */ +proto.irismod.nft.QueryCollectionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryCollectionRequest; + return proto.irismod.nft.QueryCollectionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryCollectionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryCollectionRequest} + */ +proto.irismod.nft.QueryCollectionRequest.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.setDenomId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryCollectionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryCollectionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryCollectionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryCollectionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.nft.QueryCollectionRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.QueryCollectionRequest} returns this + */ +proto.irismod.nft.QueryCollectionRequest.prototype.setDenomId = 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.irismod.nft.QueryCollectionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryCollectionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryCollectionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryCollectionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + collection: (f = msg.getCollection()) && irismod_nft_nft_pb.Collection.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.irismod.nft.QueryCollectionResponse} + */ +proto.irismod.nft.QueryCollectionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryCollectionResponse; + return proto.irismod.nft.QueryCollectionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryCollectionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryCollectionResponse} + */ +proto.irismod.nft.QueryCollectionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_nft_nft_pb.Collection; + reader.readMessage(value,irismod_nft_nft_pb.Collection.deserializeBinaryFromReader); + msg.setCollection(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryCollectionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryCollectionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryCollectionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryCollectionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCollection(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_nft_nft_pb.Collection.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Collection collection = 1; + * @return {?proto.irismod.nft.Collection} + */ +proto.irismod.nft.QueryCollectionResponse.prototype.getCollection = function() { + return /** @type{?proto.irismod.nft.Collection} */ ( + jspb.Message.getWrapperField(this, irismod_nft_nft_pb.Collection, 1)); +}; + + +/** + * @param {?proto.irismod.nft.Collection|undefined} value + * @return {!proto.irismod.nft.QueryCollectionResponse} returns this +*/ +proto.irismod.nft.QueryCollectionResponse.prototype.setCollection = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryCollectionResponse} returns this + */ +proto.irismod.nft.QueryCollectionResponse.prototype.clearCollection = function() { + return this.setCollection(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryCollectionResponse.prototype.hasCollection = 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.irismod.nft.QueryDenomRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryDenomRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryDenomRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryDenomRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: 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.irismod.nft.QueryDenomRequest} + */ +proto.irismod.nft.QueryDenomRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryDenomRequest; + return proto.irismod.nft.QueryDenomRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryDenomRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryDenomRequest} + */ +proto.irismod.nft.QueryDenomRequest.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.setDenomId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryDenomRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryDenomRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryDenomRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryDenomRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.nft.QueryDenomRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.QueryDenomRequest} returns this + */ +proto.irismod.nft.QueryDenomRequest.prototype.setDenomId = 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.irismod.nft.QueryDenomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryDenomResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryDenomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryDenomResponse.toObject = function(includeInstance, msg) { + var f, obj = { + denom: (f = msg.getDenom()) && irismod_nft_nft_pb.Denom.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.irismod.nft.QueryDenomResponse} + */ +proto.irismod.nft.QueryDenomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryDenomResponse; + return proto.irismod.nft.QueryDenomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryDenomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryDenomResponse} + */ +proto.irismod.nft.QueryDenomResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_nft_nft_pb.Denom; + reader.readMessage(value,irismod_nft_nft_pb.Denom.deserializeBinaryFromReader); + msg.setDenom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryDenomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryDenomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryDenomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryDenomResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenom(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_nft_nft_pb.Denom.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Denom denom = 1; + * @return {?proto.irismod.nft.Denom} + */ +proto.irismod.nft.QueryDenomResponse.prototype.getDenom = function() { + return /** @type{?proto.irismod.nft.Denom} */ ( + jspb.Message.getWrapperField(this, irismod_nft_nft_pb.Denom, 1)); +}; + + +/** + * @param {?proto.irismod.nft.Denom|undefined} value + * @return {!proto.irismod.nft.QueryDenomResponse} returns this +*/ +proto.irismod.nft.QueryDenomResponse.prototype.setDenom = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryDenomResponse} returns this + */ +proto.irismod.nft.QueryDenomResponse.prototype.clearDenom = function() { + return this.setDenom(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryDenomResponse.prototype.hasDenom = 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.irismod.nft.QueryDenomsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryDenomsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryDenomsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryDenomsRequest.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.irismod.nft.QueryDenomsRequest} + */ +proto.irismod.nft.QueryDenomsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryDenomsRequest; + return proto.irismod.nft.QueryDenomsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryDenomsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryDenomsRequest} + */ +proto.irismod.nft.QueryDenomsRequest.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.irismod.nft.QueryDenomsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryDenomsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryDenomsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryDenomsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.nft.QueryDenomsResponse.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.irismod.nft.QueryDenomsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryDenomsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryDenomsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryDenomsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + denomsList: jspb.Message.toObjectList(msg.getDenomsList(), + irismod_nft_nft_pb.Denom.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.irismod.nft.QueryDenomsResponse} + */ +proto.irismod.nft.QueryDenomsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryDenomsResponse; + return proto.irismod.nft.QueryDenomsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryDenomsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryDenomsResponse} + */ +proto.irismod.nft.QueryDenomsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_nft_nft_pb.Denom; + reader.readMessage(value,irismod_nft_nft_pb.Denom.deserializeBinaryFromReader); + msg.addDenoms(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryDenomsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryDenomsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryDenomsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryDenomsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_nft_nft_pb.Denom.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Denom denoms = 1; + * @return {!Array} + */ +proto.irismod.nft.QueryDenomsResponse.prototype.getDenomsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_nft_nft_pb.Denom, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.nft.QueryDenomsResponse} returns this +*/ +proto.irismod.nft.QueryDenomsResponse.prototype.setDenomsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.nft.Denom=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.nft.Denom} + */ +proto.irismod.nft.QueryDenomsResponse.prototype.addDenoms = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.nft.Denom, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.nft.QueryDenomsResponse} returns this + */ +proto.irismod.nft.QueryDenomsResponse.prototype.clearDenomsList = function() { + return this.setDenomsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.nft.QueryNFTRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryNFTRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryNFTRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryNFTRequest.toObject = function(includeInstance, msg) { + var f, obj = { + denomId: jspb.Message.getFieldWithDefault(msg, 1, ""), + tokenId: 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.irismod.nft.QueryNFTRequest} + */ +proto.irismod.nft.QueryNFTRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryNFTRequest; + return proto.irismod.nft.QueryNFTRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryNFTRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryNFTRequest} + */ +proto.irismod.nft.QueryNFTRequest.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.setDenomId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setTokenId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryNFTRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryNFTRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryNFTRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryNFTRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTokenId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string denom_id = 1; + * @return {string} + */ +proto.irismod.nft.QueryNFTRequest.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.QueryNFTRequest} returns this + */ +proto.irismod.nft.QueryNFTRequest.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string token_id = 2; + * @return {string} + */ +proto.irismod.nft.QueryNFTRequest.prototype.getTokenId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.QueryNFTRequest} returns this + */ +proto.irismod.nft.QueryNFTRequest.prototype.setTokenId = 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.irismod.nft.QueryNFTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.QueryNFTResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.QueryNFTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryNFTResponse.toObject = function(includeInstance, msg) { + var f, obj = { + nft: (f = msg.getNft()) && irismod_nft_nft_pb.BaseNFT.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.irismod.nft.QueryNFTResponse} + */ +proto.irismod.nft.QueryNFTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.QueryNFTResponse; + return proto.irismod.nft.QueryNFTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.QueryNFTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.QueryNFTResponse} + */ +proto.irismod.nft.QueryNFTResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_nft_nft_pb.BaseNFT; + reader.readMessage(value,irismod_nft_nft_pb.BaseNFT.deserializeBinaryFromReader); + msg.setNft(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.QueryNFTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.QueryNFTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.QueryNFTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.QueryNFTResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNft(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_nft_nft_pb.BaseNFT.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BaseNFT nft = 1; + * @return {?proto.irismod.nft.BaseNFT} + */ +proto.irismod.nft.QueryNFTResponse.prototype.getNft = function() { + return /** @type{?proto.irismod.nft.BaseNFT} */ ( + jspb.Message.getWrapperField(this, irismod_nft_nft_pb.BaseNFT, 1)); +}; + + +/** + * @param {?proto.irismod.nft.BaseNFT|undefined} value + * @return {!proto.irismod.nft.QueryNFTResponse} returns this +*/ +proto.irismod.nft.QueryNFTResponse.prototype.setNft = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.nft.QueryNFTResponse} returns this + */ +proto.irismod.nft.QueryNFTResponse.prototype.clearNft = function() { + return this.setNft(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.nft.QueryNFTResponse.prototype.hasNft = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.irismod.nft); diff --git a/src/types/proto-types/irismod/nft/tx_grpc_web_pb.js b/src/types/proto-types/irismod/nft/tx_grpc_web_pb.js new file mode 100644 index 00000000..06011161 --- /dev/null +++ b/src/types/proto-types/irismod/nft/tx_grpc_web_pb.js @@ -0,0 +1,477 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.nft + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.nft = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.nft.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.nft.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.MsgIssueDenom, + * !proto.irismod.nft.MsgIssueDenomResponse>} + */ +const methodDescriptor_Msg_IssueDenom = new grpc.web.MethodDescriptor( + '/irismod.nft.Msg/IssueDenom', + grpc.web.MethodType.UNARY, + proto.irismod.nft.MsgIssueDenom, + proto.irismod.nft.MsgIssueDenomResponse, + /** + * @param {!proto.irismod.nft.MsgIssueDenom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgIssueDenomResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.MsgIssueDenom, + * !proto.irismod.nft.MsgIssueDenomResponse>} + */ +const methodInfo_Msg_IssueDenom = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.MsgIssueDenomResponse, + /** + * @param {!proto.irismod.nft.MsgIssueDenom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgIssueDenomResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.MsgIssueDenom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.MsgIssueDenomResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.MsgClient.prototype.issueDenom = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Msg/IssueDenom', + request, + metadata || {}, + methodDescriptor_Msg_IssueDenom, + callback); +}; + + +/** + * @param {!proto.irismod.nft.MsgIssueDenom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.MsgPromiseClient.prototype.issueDenom = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Msg/IssueDenom', + request, + metadata || {}, + methodDescriptor_Msg_IssueDenom); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.MsgMintNFT, + * !proto.irismod.nft.MsgMintNFTResponse>} + */ +const methodDescriptor_Msg_MintNFT = new grpc.web.MethodDescriptor( + '/irismod.nft.Msg/MintNFT', + grpc.web.MethodType.UNARY, + proto.irismod.nft.MsgMintNFT, + proto.irismod.nft.MsgMintNFTResponse, + /** + * @param {!proto.irismod.nft.MsgMintNFT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgMintNFTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.MsgMintNFT, + * !proto.irismod.nft.MsgMintNFTResponse>} + */ +const methodInfo_Msg_MintNFT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.MsgMintNFTResponse, + /** + * @param {!proto.irismod.nft.MsgMintNFT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgMintNFTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.MsgMintNFT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.MsgMintNFTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.MsgClient.prototype.mintNFT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Msg/MintNFT', + request, + metadata || {}, + methodDescriptor_Msg_MintNFT, + callback); +}; + + +/** + * @param {!proto.irismod.nft.MsgMintNFT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.MsgPromiseClient.prototype.mintNFT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Msg/MintNFT', + request, + metadata || {}, + methodDescriptor_Msg_MintNFT); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.MsgEditNFT, + * !proto.irismod.nft.MsgEditNFTResponse>} + */ +const methodDescriptor_Msg_EditNFT = new grpc.web.MethodDescriptor( + '/irismod.nft.Msg/EditNFT', + grpc.web.MethodType.UNARY, + proto.irismod.nft.MsgEditNFT, + proto.irismod.nft.MsgEditNFTResponse, + /** + * @param {!proto.irismod.nft.MsgEditNFT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgEditNFTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.MsgEditNFT, + * !proto.irismod.nft.MsgEditNFTResponse>} + */ +const methodInfo_Msg_EditNFT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.MsgEditNFTResponse, + /** + * @param {!proto.irismod.nft.MsgEditNFT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgEditNFTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.MsgEditNFT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.MsgEditNFTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.MsgClient.prototype.editNFT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Msg/EditNFT', + request, + metadata || {}, + methodDescriptor_Msg_EditNFT, + callback); +}; + + +/** + * @param {!proto.irismod.nft.MsgEditNFT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.MsgPromiseClient.prototype.editNFT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Msg/EditNFT', + request, + metadata || {}, + methodDescriptor_Msg_EditNFT); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.MsgTransferNFT, + * !proto.irismod.nft.MsgTransferNFTResponse>} + */ +const methodDescriptor_Msg_TransferNFT = new grpc.web.MethodDescriptor( + '/irismod.nft.Msg/TransferNFT', + grpc.web.MethodType.UNARY, + proto.irismod.nft.MsgTransferNFT, + proto.irismod.nft.MsgTransferNFTResponse, + /** + * @param {!proto.irismod.nft.MsgTransferNFT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgTransferNFTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.MsgTransferNFT, + * !proto.irismod.nft.MsgTransferNFTResponse>} + */ +const methodInfo_Msg_TransferNFT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.MsgTransferNFTResponse, + /** + * @param {!proto.irismod.nft.MsgTransferNFT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgTransferNFTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.MsgTransferNFT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.MsgTransferNFTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.MsgClient.prototype.transferNFT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Msg/TransferNFT', + request, + metadata || {}, + methodDescriptor_Msg_TransferNFT, + callback); +}; + + +/** + * @param {!proto.irismod.nft.MsgTransferNFT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.MsgPromiseClient.prototype.transferNFT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Msg/TransferNFT', + request, + metadata || {}, + methodDescriptor_Msg_TransferNFT); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.nft.MsgBurnNFT, + * !proto.irismod.nft.MsgBurnNFTResponse>} + */ +const methodDescriptor_Msg_BurnNFT = new grpc.web.MethodDescriptor( + '/irismod.nft.Msg/BurnNFT', + grpc.web.MethodType.UNARY, + proto.irismod.nft.MsgBurnNFT, + proto.irismod.nft.MsgBurnNFTResponse, + /** + * @param {!proto.irismod.nft.MsgBurnNFT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgBurnNFTResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.nft.MsgBurnNFT, + * !proto.irismod.nft.MsgBurnNFTResponse>} + */ +const methodInfo_Msg_BurnNFT = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.nft.MsgBurnNFTResponse, + /** + * @param {!proto.irismod.nft.MsgBurnNFT} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.nft.MsgBurnNFTResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.nft.MsgBurnNFT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.nft.MsgBurnNFTResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.nft.MsgClient.prototype.burnNFT = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.nft.Msg/BurnNFT', + request, + metadata || {}, + methodDescriptor_Msg_BurnNFT, + callback); +}; + + +/** + * @param {!proto.irismod.nft.MsgBurnNFT} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.nft.MsgPromiseClient.prototype.burnNFT = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.nft.Msg/BurnNFT', + request, + metadata || {}, + methodDescriptor_Msg_BurnNFT); +}; + + +module.exports = proto.irismod.nft; + diff --git a/src/types/proto-types/irismod/nft/tx_pb.js b/src/types/proto-types/irismod/nft/tx_pb.js new file mode 100644 index 00000000..608d9eac --- /dev/null +++ b/src/types/proto-types/irismod/nft/tx_pb.js @@ -0,0 +1,2052 @@ +// source: irismod/nft/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.irismod.nft.MsgBurnNFT', null, global); +goog.exportSymbol('proto.irismod.nft.MsgBurnNFTResponse', null, global); +goog.exportSymbol('proto.irismod.nft.MsgEditNFT', null, global); +goog.exportSymbol('proto.irismod.nft.MsgEditNFTResponse', null, global); +goog.exportSymbol('proto.irismod.nft.MsgIssueDenom', null, global); +goog.exportSymbol('proto.irismod.nft.MsgIssueDenomResponse', null, global); +goog.exportSymbol('proto.irismod.nft.MsgMintNFT', null, global); +goog.exportSymbol('proto.irismod.nft.MsgMintNFTResponse', null, global); +goog.exportSymbol('proto.irismod.nft.MsgTransferNFT', null, global); +goog.exportSymbol('proto.irismod.nft.MsgTransferNFTResponse', 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.irismod.nft.MsgIssueDenom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgIssueDenom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgIssueDenom.displayName = 'proto.irismod.nft.MsgIssueDenom'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgIssueDenomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgIssueDenomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgIssueDenomResponse.displayName = 'proto.irismod.nft.MsgIssueDenomResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgTransferNFT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgTransferNFT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgTransferNFT.displayName = 'proto.irismod.nft.MsgTransferNFT'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgTransferNFTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgTransferNFTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgTransferNFTResponse.displayName = 'proto.irismod.nft.MsgTransferNFTResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgEditNFT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgEditNFT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgEditNFT.displayName = 'proto.irismod.nft.MsgEditNFT'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgEditNFTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgEditNFTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgEditNFTResponse.displayName = 'proto.irismod.nft.MsgEditNFTResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgMintNFT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgMintNFT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgMintNFT.displayName = 'proto.irismod.nft.MsgMintNFT'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgMintNFTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgMintNFTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgMintNFTResponse.displayName = 'proto.irismod.nft.MsgMintNFTResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgBurnNFT = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgBurnNFT, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgBurnNFT.displayName = 'proto.irismod.nft.MsgBurnNFT'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.nft.MsgBurnNFTResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.nft.MsgBurnNFTResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.nft.MsgBurnNFTResponse.displayName = 'proto.irismod.nft.MsgBurnNFTResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.nft.MsgIssueDenom.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgIssueDenom.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgIssueDenom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgIssueDenom.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + schema: jspb.Message.getFieldWithDefault(msg, 3, ""), + 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.irismod.nft.MsgIssueDenom} + */ +proto.irismod.nft.MsgIssueDenom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgIssueDenom; + return proto.irismod.nft.MsgIssueDenom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgIssueDenom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgIssueDenom} + */ +proto.irismod.nft.MsgIssueDenom.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSchema(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.irismod.nft.MsgIssueDenom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgIssueDenom.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgIssueDenom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgIssueDenom.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSchema(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string schema = 3; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getSchema = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.prototype.setSchema = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string sender = 4; + * @return {string} + */ +proto.irismod.nft.MsgIssueDenom.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgIssueDenom} returns this + */ +proto.irismod.nft.MsgIssueDenom.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.irismod.nft.MsgIssueDenomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgIssueDenomResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgIssueDenomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgIssueDenomResponse.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.irismod.nft.MsgIssueDenomResponse} + */ +proto.irismod.nft.MsgIssueDenomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgIssueDenomResponse; + return proto.irismod.nft.MsgIssueDenomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgIssueDenomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgIssueDenomResponse} + */ +proto.irismod.nft.MsgIssueDenomResponse.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.irismod.nft.MsgIssueDenomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgIssueDenomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgIssueDenomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgIssueDenomResponse.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.irismod.nft.MsgTransferNFT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgTransferNFT.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgTransferNFT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgTransferNFT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + uri: jspb.Message.getFieldWithDefault(msg, 4, ""), + data: jspb.Message.getFieldWithDefault(msg, 5, ""), + sender: jspb.Message.getFieldWithDefault(msg, 6, ""), + recipient: 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.irismod.nft.MsgTransferNFT} + */ +proto.irismod.nft.MsgTransferNFT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgTransferNFT; + return proto.irismod.nft.MsgTransferNFT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgTransferNFT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgTransferNFT} + */ +proto.irismod.nft.MsgTransferNFT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setUri(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setRecipient(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.MsgTransferNFT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgTransferNFT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgTransferNFT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgTransferNFT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getUri(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getRecipient(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.nft.MsgTransferNFT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferNFT} returns this + */ +proto.irismod.nft.MsgTransferNFT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.nft.MsgTransferNFT.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferNFT} returns this + */ +proto.irismod.nft.MsgTransferNFT.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string name = 3; + * @return {string} + */ +proto.irismod.nft.MsgTransferNFT.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferNFT} returns this + */ +proto.irismod.nft.MsgTransferNFT.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string uri = 4; + * @return {string} + */ +proto.irismod.nft.MsgTransferNFT.prototype.getUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferNFT} returns this + */ +proto.irismod.nft.MsgTransferNFT.prototype.setUri = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string data = 5; + * @return {string} + */ +proto.irismod.nft.MsgTransferNFT.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferNFT} returns this + */ +proto.irismod.nft.MsgTransferNFT.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string sender = 6; + * @return {string} + */ +proto.irismod.nft.MsgTransferNFT.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferNFT} returns this + */ +proto.irismod.nft.MsgTransferNFT.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string recipient = 7; + * @return {string} + */ +proto.irismod.nft.MsgTransferNFT.prototype.getRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgTransferNFT} returns this + */ +proto.irismod.nft.MsgTransferNFT.prototype.setRecipient = 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.irismod.nft.MsgTransferNFTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgTransferNFTResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgTransferNFTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgTransferNFTResponse.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.irismod.nft.MsgTransferNFTResponse} + */ +proto.irismod.nft.MsgTransferNFTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgTransferNFTResponse; + return proto.irismod.nft.MsgTransferNFTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgTransferNFTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgTransferNFTResponse} + */ +proto.irismod.nft.MsgTransferNFTResponse.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.irismod.nft.MsgTransferNFTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgTransferNFTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgTransferNFTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgTransferNFTResponse.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.irismod.nft.MsgEditNFT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgEditNFT.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgEditNFT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgEditNFT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + uri: jspb.Message.getFieldWithDefault(msg, 4, ""), + data: jspb.Message.getFieldWithDefault(msg, 5, ""), + sender: 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.irismod.nft.MsgEditNFT} + */ +proto.irismod.nft.MsgEditNFT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgEditNFT; + return proto.irismod.nft.MsgEditNFT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgEditNFT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgEditNFT} + */ +proto.irismod.nft.MsgEditNFT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setUri(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 6: + 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.irismod.nft.MsgEditNFT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgEditNFT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgEditNFT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgEditNFT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getUri(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.nft.MsgEditNFT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgEditNFT} returns this + */ +proto.irismod.nft.MsgEditNFT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.nft.MsgEditNFT.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgEditNFT} returns this + */ +proto.irismod.nft.MsgEditNFT.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string name = 3; + * @return {string} + */ +proto.irismod.nft.MsgEditNFT.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgEditNFT} returns this + */ +proto.irismod.nft.MsgEditNFT.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string uri = 4; + * @return {string} + */ +proto.irismod.nft.MsgEditNFT.prototype.getUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgEditNFT} returns this + */ +proto.irismod.nft.MsgEditNFT.prototype.setUri = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string data = 5; + * @return {string} + */ +proto.irismod.nft.MsgEditNFT.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgEditNFT} returns this + */ +proto.irismod.nft.MsgEditNFT.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string sender = 6; + * @return {string} + */ +proto.irismod.nft.MsgEditNFT.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgEditNFT} returns this + */ +proto.irismod.nft.MsgEditNFT.prototype.setSender = 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.irismod.nft.MsgEditNFTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgEditNFTResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgEditNFTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgEditNFTResponse.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.irismod.nft.MsgEditNFTResponse} + */ +proto.irismod.nft.MsgEditNFTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgEditNFTResponse; + return proto.irismod.nft.MsgEditNFTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgEditNFTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgEditNFTResponse} + */ +proto.irismod.nft.MsgEditNFTResponse.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.irismod.nft.MsgEditNFTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgEditNFTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgEditNFTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgEditNFTResponse.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.irismod.nft.MsgMintNFT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgMintNFT.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgMintNFT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgMintNFT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + uri: jspb.Message.getFieldWithDefault(msg, 4, ""), + data: jspb.Message.getFieldWithDefault(msg, 5, ""), + sender: jspb.Message.getFieldWithDefault(msg, 6, ""), + recipient: 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.irismod.nft.MsgMintNFT} + */ +proto.irismod.nft.MsgMintNFT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgMintNFT; + return proto.irismod.nft.MsgMintNFT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgMintNFT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgMintNFT} + */ +proto.irismod.nft.MsgMintNFT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setUri(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setSender(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setRecipient(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.nft.MsgMintNFT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgMintNFT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgMintNFT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgMintNFT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getUri(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getRecipient(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.nft.MsgMintNFT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgMintNFT} returns this + */ +proto.irismod.nft.MsgMintNFT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.nft.MsgMintNFT.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgMintNFT} returns this + */ +proto.irismod.nft.MsgMintNFT.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string name = 3; + * @return {string} + */ +proto.irismod.nft.MsgMintNFT.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgMintNFT} returns this + */ +proto.irismod.nft.MsgMintNFT.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string uri = 4; + * @return {string} + */ +proto.irismod.nft.MsgMintNFT.prototype.getUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgMintNFT} returns this + */ +proto.irismod.nft.MsgMintNFT.prototype.setUri = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string data = 5; + * @return {string} + */ +proto.irismod.nft.MsgMintNFT.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgMintNFT} returns this + */ +proto.irismod.nft.MsgMintNFT.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string sender = 6; + * @return {string} + */ +proto.irismod.nft.MsgMintNFT.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgMintNFT} returns this + */ +proto.irismod.nft.MsgMintNFT.prototype.setSender = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string recipient = 7; + * @return {string} + */ +proto.irismod.nft.MsgMintNFT.prototype.getRecipient = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgMintNFT} returns this + */ +proto.irismod.nft.MsgMintNFT.prototype.setRecipient = 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.irismod.nft.MsgMintNFTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgMintNFTResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgMintNFTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgMintNFTResponse.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.irismod.nft.MsgMintNFTResponse} + */ +proto.irismod.nft.MsgMintNFTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgMintNFTResponse; + return proto.irismod.nft.MsgMintNFTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgMintNFTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgMintNFTResponse} + */ +proto.irismod.nft.MsgMintNFTResponse.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.irismod.nft.MsgMintNFTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgMintNFTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgMintNFTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgMintNFTResponse.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.irismod.nft.MsgBurnNFT.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgBurnNFT.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgBurnNFT} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgBurnNFT.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + denomId: jspb.Message.getFieldWithDefault(msg, 2, ""), + 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.irismod.nft.MsgBurnNFT} + */ +proto.irismod.nft.MsgBurnNFT.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgBurnNFT; + return proto.irismod.nft.MsgBurnNFT.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgBurnNFT} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgBurnNFT} + */ +proto.irismod.nft.MsgBurnNFT.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDenomId(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.irismod.nft.MsgBurnNFT.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgBurnNFT.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgBurnNFT} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgBurnNFT.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDenomId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSender(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.nft.MsgBurnNFT.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgBurnNFT} returns this + */ +proto.irismod.nft.MsgBurnNFT.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string denom_id = 2; + * @return {string} + */ +proto.irismod.nft.MsgBurnNFT.prototype.getDenomId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgBurnNFT} returns this + */ +proto.irismod.nft.MsgBurnNFT.prototype.setDenomId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string sender = 3; + * @return {string} + */ +proto.irismod.nft.MsgBurnNFT.prototype.getSender = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.nft.MsgBurnNFT} returns this + */ +proto.irismod.nft.MsgBurnNFT.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.irismod.nft.MsgBurnNFTResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.nft.MsgBurnNFTResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.nft.MsgBurnNFTResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgBurnNFTResponse.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.irismod.nft.MsgBurnNFTResponse} + */ +proto.irismod.nft.MsgBurnNFTResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.nft.MsgBurnNFTResponse; + return proto.irismod.nft.MsgBurnNFTResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.nft.MsgBurnNFTResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.nft.MsgBurnNFTResponse} + */ +proto.irismod.nft.MsgBurnNFTResponse.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.irismod.nft.MsgBurnNFTResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.nft.MsgBurnNFTResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.nft.MsgBurnNFTResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.nft.MsgBurnNFTResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.irismod.nft); diff --git a/src/types/proto-types/irismod/oracle/genesis_pb.js b/src/types/proto-types/irismod/oracle/genesis_pb.js new file mode 100644 index 00000000..aee063b6 --- /dev/null +++ b/src/types/proto-types/irismod/oracle/genesis_pb.js @@ -0,0 +1,466 @@ +// source: irismod/oracle/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var irismod_oracle_oracle_pb = require('../../irismod/oracle/oracle_pb.js'); +goog.object.extend(proto, irismod_oracle_oracle_pb); +var irismod_service_service_pb = require('../../irismod/service/service_pb.js'); +goog.object.extend(proto, irismod_service_service_pb); +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.irismod.oracle.FeedEntry', null, global); +goog.exportSymbol('proto.irismod.oracle.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.irismod.oracle.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.oracle.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.irismod.oracle.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.GenesisState.displayName = 'proto.irismod.oracle.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.irismod.oracle.FeedEntry = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.oracle.FeedEntry.repeatedFields_, null); +}; +goog.inherits(proto.irismod.oracle.FeedEntry, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.FeedEntry.displayName = 'proto.irismod.oracle.FeedEntry'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.oracle.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.irismod.oracle.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.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.irismod.oracle.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + entriesList: jspb.Message.toObjectList(msg.getEntriesList(), + proto.irismod.oracle.FeedEntry.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.irismod.oracle.GenesisState} + */ +proto.irismod.oracle.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.GenesisState; + return proto.irismod.oracle.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.GenesisState} + */ +proto.irismod.oracle.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.oracle.FeedEntry; + reader.readMessage(value,proto.irismod.oracle.FeedEntry.deserializeBinaryFromReader); + msg.addEntries(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.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.irismod.oracle.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEntriesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.irismod.oracle.FeedEntry.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated FeedEntry entries = 1; + * @return {!Array} + */ +proto.irismod.oracle.GenesisState.prototype.getEntriesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.oracle.FeedEntry, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.GenesisState} returns this +*/ +proto.irismod.oracle.GenesisState.prototype.setEntriesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.oracle.FeedEntry=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.oracle.FeedEntry} + */ +proto.irismod.oracle.GenesisState.prototype.addEntries = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.oracle.FeedEntry, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.oracle.GenesisState} returns this + */ +proto.irismod.oracle.GenesisState.prototype.clearEntriesList = function() { + return this.setEntriesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.oracle.FeedEntry.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.irismod.oracle.FeedEntry.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.FeedEntry.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.FeedEntry} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.FeedEntry.toObject = function(includeInstance, msg) { + var f, obj = { + feed: (f = msg.getFeed()) && irismod_oracle_oracle_pb.Feed.toObject(includeInstance, f), + state: jspb.Message.getFieldWithDefault(msg, 2, 0), + valuesList: jspb.Message.toObjectList(msg.getValuesList(), + irismod_oracle_oracle_pb.FeedValue.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.irismod.oracle.FeedEntry} + */ +proto.irismod.oracle.FeedEntry.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.FeedEntry; + return proto.irismod.oracle.FeedEntry.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.FeedEntry} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.FeedEntry} + */ +proto.irismod.oracle.FeedEntry.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_oracle_oracle_pb.Feed; + reader.readMessage(value,irismod_oracle_oracle_pb.Feed.deserializeBinaryFromReader); + msg.setFeed(value); + break; + case 2: + var value = /** @type {!proto.irismod.service.RequestContextState} */ (reader.readEnum()); + msg.setState(value); + break; + case 3: + var value = new irismod_oracle_oracle_pb.FeedValue; + reader.readMessage(value,irismod_oracle_oracle_pb.FeedValue.deserializeBinaryFromReader); + msg.addValues(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.FeedEntry.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.FeedEntry.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.FeedEntry} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.FeedEntry.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeed(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_oracle_oracle_pb.Feed.serializeBinaryToWriter + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getValuesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + irismod_oracle_oracle_pb.FeedValue.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Feed feed = 1; + * @return {?proto.irismod.oracle.Feed} + */ +proto.irismod.oracle.FeedEntry.prototype.getFeed = function() { + return /** @type{?proto.irismod.oracle.Feed} */ ( + jspb.Message.getWrapperField(this, irismod_oracle_oracle_pb.Feed, 1)); +}; + + +/** + * @param {?proto.irismod.oracle.Feed|undefined} value + * @return {!proto.irismod.oracle.FeedEntry} returns this +*/ +proto.irismod.oracle.FeedEntry.prototype.setFeed = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.oracle.FeedEntry} returns this + */ +proto.irismod.oracle.FeedEntry.prototype.clearFeed = function() { + return this.setFeed(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.oracle.FeedEntry.prototype.hasFeed = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional irismod.service.RequestContextState state = 2; + * @return {!proto.irismod.service.RequestContextState} + */ +proto.irismod.oracle.FeedEntry.prototype.getState = function() { + return /** @type {!proto.irismod.service.RequestContextState} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.irismod.service.RequestContextState} value + * @return {!proto.irismod.oracle.FeedEntry} returns this + */ +proto.irismod.oracle.FeedEntry.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * repeated FeedValue values = 3; + * @return {!Array} + */ +proto.irismod.oracle.FeedEntry.prototype.getValuesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_oracle_oracle_pb.FeedValue, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.FeedEntry} returns this +*/ +proto.irismod.oracle.FeedEntry.prototype.setValuesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.irismod.oracle.FeedValue=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.oracle.FeedValue} + */ +proto.irismod.oracle.FeedEntry.prototype.addValues = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.irismod.oracle.FeedValue, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.oracle.FeedEntry} returns this + */ +proto.irismod.oracle.FeedEntry.prototype.clearValuesList = function() { + return this.setValuesList([]); +}; + + +goog.object.extend(exports, proto.irismod.oracle); diff --git a/src/types/proto-types/irismod/oracle/oracle_pb.js b/src/types/proto-types/irismod/oracle/oracle_pb.js new file mode 100644 index 00000000..6a469481 --- /dev/null +++ b/src/types/proto-types/irismod/oracle/oracle_pb.js @@ -0,0 +1,554 @@ +// source: irismod/oracle/oracle.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.irismod.oracle.Feed', null, global); +goog.exportSymbol('proto.irismod.oracle.FeedValue', 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.irismod.oracle.Feed = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.Feed, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.Feed.displayName = 'proto.irismod.oracle.Feed'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.FeedValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.FeedValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.FeedValue.displayName = 'proto.irismod.oracle.FeedValue'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.oracle.Feed.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.Feed.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.Feed} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.Feed.toObject = function(includeInstance, msg) { + var f, obj = { + feedName: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + aggregateFunc: jspb.Message.getFieldWithDefault(msg, 3, ""), + valueJsonPath: jspb.Message.getFieldWithDefault(msg, 4, ""), + latestHistory: jspb.Message.getFieldWithDefault(msg, 5, 0), + requestContextId: jspb.Message.getFieldWithDefault(msg, 6, ""), + creator: 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.irismod.oracle.Feed} + */ +proto.irismod.oracle.Feed.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.Feed; + return proto.irismod.oracle.Feed.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.Feed} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.Feed} + */ +proto.irismod.oracle.Feed.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.setFeedName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAggregateFunc(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setValueJsonPath(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLatestHistory(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setRequestContextId(value); + break; + case 7: + 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.irismod.oracle.Feed.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.Feed.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.Feed} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.Feed.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAggregateFunc(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getValueJsonPath(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getLatestHistory(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string feed_name = 1; + * @return {string} + */ +proto.irismod.oracle.Feed.prototype.getFeedName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.Feed} returns this + */ +proto.irismod.oracle.Feed.prototype.setFeedName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.irismod.oracle.Feed.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.Feed} returns this + */ +proto.irismod.oracle.Feed.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string aggregate_func = 3; + * @return {string} + */ +proto.irismod.oracle.Feed.prototype.getAggregateFunc = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.Feed} returns this + */ +proto.irismod.oracle.Feed.prototype.setAggregateFunc = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string value_json_path = 4; + * @return {string} + */ +proto.irismod.oracle.Feed.prototype.getValueJsonPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.Feed} returns this + */ +proto.irismod.oracle.Feed.prototype.setValueJsonPath = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional uint64 latest_history = 5; + * @return {number} + */ +proto.irismod.oracle.Feed.prototype.getLatestHistory = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.Feed} returns this + */ +proto.irismod.oracle.Feed.prototype.setLatestHistory = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string request_context_id = 6; + * @return {string} + */ +proto.irismod.oracle.Feed.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.Feed} returns this + */ +proto.irismod.oracle.Feed.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string creator = 7; + * @return {string} + */ +proto.irismod.oracle.Feed.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.Feed} returns this + */ +proto.irismod.oracle.Feed.prototype.setCreator = 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.irismod.oracle.FeedValue.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.FeedValue.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.FeedValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.FeedValue.toObject = function(includeInstance, msg) { + var f, obj = { + data: jspb.Message.getFieldWithDefault(msg, 1, ""), + timestamp: (f = msg.getTimestamp()) && 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.irismod.oracle.FeedValue} + */ +proto.irismod.oracle.FeedValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.FeedValue; + return proto.irismod.oracle.FeedValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.FeedValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.FeedValue} + */ +proto.irismod.oracle.FeedValue.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.setData(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.FeedValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.FeedValue.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.FeedValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.FeedValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string data = 1; + * @return {string} + */ +proto.irismod.oracle.FeedValue.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.FeedValue} returns this + */ +proto.irismod.oracle.FeedValue.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.irismod.oracle.FeedValue.prototype.getTimestamp = 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.irismod.oracle.FeedValue} returns this +*/ +proto.irismod.oracle.FeedValue.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.oracle.FeedValue} returns this + */ +proto.irismod.oracle.FeedValue.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.oracle.FeedValue.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.irismod.oracle); diff --git a/src/types/proto-types/irismod/oracle/query_grpc_web_pb.js b/src/types/proto-types/irismod/oracle/query_grpc_web_pb.js new file mode 100644 index 00000000..3b1b58b5 --- /dev/null +++ b/src/types/proto-types/irismod/oracle/query_grpc_web_pb.js @@ -0,0 +1,325 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.oracle + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var irismod_oracle_oracle_pb = require('../../irismod/oracle/oracle_pb.js') + +var irismod_service_service_pb = require('../../irismod/service/service_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.oracle = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.oracle.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.oracle.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.oracle.QueryFeedRequest, + * !proto.irismod.oracle.QueryFeedResponse>} + */ +const methodDescriptor_Query_Feed = new grpc.web.MethodDescriptor( + '/irismod.oracle.Query/Feed', + grpc.web.MethodType.UNARY, + proto.irismod.oracle.QueryFeedRequest, + proto.irismod.oracle.QueryFeedResponse, + /** + * @param {!proto.irismod.oracle.QueryFeedRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.QueryFeedResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.oracle.QueryFeedRequest, + * !proto.irismod.oracle.QueryFeedResponse>} + */ +const methodInfo_Query_Feed = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.oracle.QueryFeedResponse, + /** + * @param {!proto.irismod.oracle.QueryFeedRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.QueryFeedResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.oracle.QueryFeedRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.oracle.QueryFeedResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.oracle.QueryClient.prototype.feed = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.oracle.Query/Feed', + request, + metadata || {}, + methodDescriptor_Query_Feed, + callback); +}; + + +/** + * @param {!proto.irismod.oracle.QueryFeedRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.oracle.QueryPromiseClient.prototype.feed = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.oracle.Query/Feed', + request, + metadata || {}, + methodDescriptor_Query_Feed); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.oracle.QueryFeedsRequest, + * !proto.irismod.oracle.QueryFeedsResponse>} + */ +const methodDescriptor_Query_Feeds = new grpc.web.MethodDescriptor( + '/irismod.oracle.Query/Feeds', + grpc.web.MethodType.UNARY, + proto.irismod.oracle.QueryFeedsRequest, + proto.irismod.oracle.QueryFeedsResponse, + /** + * @param {!proto.irismod.oracle.QueryFeedsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.QueryFeedsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.oracle.QueryFeedsRequest, + * !proto.irismod.oracle.QueryFeedsResponse>} + */ +const methodInfo_Query_Feeds = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.oracle.QueryFeedsResponse, + /** + * @param {!proto.irismod.oracle.QueryFeedsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.QueryFeedsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.oracle.QueryFeedsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.oracle.QueryFeedsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.oracle.QueryClient.prototype.feeds = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.oracle.Query/Feeds', + request, + metadata || {}, + methodDescriptor_Query_Feeds, + callback); +}; + + +/** + * @param {!proto.irismod.oracle.QueryFeedsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.oracle.QueryPromiseClient.prototype.feeds = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.oracle.Query/Feeds', + request, + metadata || {}, + methodDescriptor_Query_Feeds); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.oracle.QueryFeedValueRequest, + * !proto.irismod.oracle.QueryFeedValueResponse>} + */ +const methodDescriptor_Query_FeedValue = new grpc.web.MethodDescriptor( + '/irismod.oracle.Query/FeedValue', + grpc.web.MethodType.UNARY, + proto.irismod.oracle.QueryFeedValueRequest, + proto.irismod.oracle.QueryFeedValueResponse, + /** + * @param {!proto.irismod.oracle.QueryFeedValueRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.QueryFeedValueResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.oracle.QueryFeedValueRequest, + * !proto.irismod.oracle.QueryFeedValueResponse>} + */ +const methodInfo_Query_FeedValue = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.oracle.QueryFeedValueResponse, + /** + * @param {!proto.irismod.oracle.QueryFeedValueRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.QueryFeedValueResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.oracle.QueryFeedValueRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.oracle.QueryFeedValueResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.oracle.QueryClient.prototype.feedValue = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.oracle.Query/FeedValue', + request, + metadata || {}, + methodDescriptor_Query_FeedValue, + callback); +}; + + +/** + * @param {!proto.irismod.oracle.QueryFeedValueRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.oracle.QueryPromiseClient.prototype.feedValue = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.oracle.Query/FeedValue', + request, + metadata || {}, + methodDescriptor_Query_FeedValue); +}; + + +module.exports = proto.irismod.oracle; + diff --git a/src/types/proto-types/irismod/oracle/query_pb.js b/src/types/proto-types/irismod/oracle/query_pb.js new file mode 100644 index 00000000..45b15ee6 --- /dev/null +++ b/src/types/proto-types/irismod/oracle/query_pb.js @@ -0,0 +1,1480 @@ +// source: irismod/oracle/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var irismod_oracle_oracle_pb = require('../../irismod/oracle/oracle_pb.js'); +goog.object.extend(proto, irismod_oracle_oracle_pb); +var irismod_service_service_pb = require('../../irismod/service/service_pb.js'); +goog.object.extend(proto, irismod_service_service_pb); +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); +goog.exportSymbol('proto.irismod.oracle.FeedContext', null, global); +goog.exportSymbol('proto.irismod.oracle.QueryFeedRequest', null, global); +goog.exportSymbol('proto.irismod.oracle.QueryFeedResponse', null, global); +goog.exportSymbol('proto.irismod.oracle.QueryFeedValueRequest', null, global); +goog.exportSymbol('proto.irismod.oracle.QueryFeedValueResponse', null, global); +goog.exportSymbol('proto.irismod.oracle.QueryFeedsRequest', null, global); +goog.exportSymbol('proto.irismod.oracle.QueryFeedsResponse', 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.irismod.oracle.QueryFeedRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.QueryFeedRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.QueryFeedRequest.displayName = 'proto.irismod.oracle.QueryFeedRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.QueryFeedResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.QueryFeedResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.QueryFeedResponse.displayName = 'proto.irismod.oracle.QueryFeedResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.QueryFeedsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.QueryFeedsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.QueryFeedsRequest.displayName = 'proto.irismod.oracle.QueryFeedsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.QueryFeedsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.oracle.QueryFeedsResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.oracle.QueryFeedsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.QueryFeedsResponse.displayName = 'proto.irismod.oracle.QueryFeedsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.QueryFeedValueRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.QueryFeedValueRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.QueryFeedValueRequest.displayName = 'proto.irismod.oracle.QueryFeedValueRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.QueryFeedValueResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.oracle.QueryFeedValueResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.oracle.QueryFeedValueResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.QueryFeedValueResponse.displayName = 'proto.irismod.oracle.QueryFeedValueResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.FeedContext = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.oracle.FeedContext.repeatedFields_, null); +}; +goog.inherits(proto.irismod.oracle.FeedContext, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.FeedContext.displayName = 'proto.irismod.oracle.FeedContext'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.oracle.QueryFeedRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.QueryFeedRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.QueryFeedRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedRequest.toObject = function(includeInstance, msg) { + var f, obj = { + feedName: 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.irismod.oracle.QueryFeedRequest} + */ +proto.irismod.oracle.QueryFeedRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.QueryFeedRequest; + return proto.irismod.oracle.QueryFeedRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.QueryFeedRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.QueryFeedRequest} + */ +proto.irismod.oracle.QueryFeedRequest.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.setFeedName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.QueryFeedRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.QueryFeedRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.QueryFeedRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string feed_name = 1; + * @return {string} + */ +proto.irismod.oracle.QueryFeedRequest.prototype.getFeedName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.QueryFeedRequest} returns this + */ +proto.irismod.oracle.QueryFeedRequest.prototype.setFeedName = 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.irismod.oracle.QueryFeedResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.QueryFeedResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.QueryFeedResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedResponse.toObject = function(includeInstance, msg) { + var f, obj = { + feed: (f = msg.getFeed()) && proto.irismod.oracle.FeedContext.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.irismod.oracle.QueryFeedResponse} + */ +proto.irismod.oracle.QueryFeedResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.QueryFeedResponse; + return proto.irismod.oracle.QueryFeedResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.QueryFeedResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.QueryFeedResponse} + */ +proto.irismod.oracle.QueryFeedResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.oracle.FeedContext; + reader.readMessage(value,proto.irismod.oracle.FeedContext.deserializeBinaryFromReader); + msg.setFeed(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.QueryFeedResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.QueryFeedResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.QueryFeedResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeed(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.irismod.oracle.FeedContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional FeedContext feed = 1; + * @return {?proto.irismod.oracle.FeedContext} + */ +proto.irismod.oracle.QueryFeedResponse.prototype.getFeed = function() { + return /** @type{?proto.irismod.oracle.FeedContext} */ ( + jspb.Message.getWrapperField(this, proto.irismod.oracle.FeedContext, 1)); +}; + + +/** + * @param {?proto.irismod.oracle.FeedContext|undefined} value + * @return {!proto.irismod.oracle.QueryFeedResponse} returns this +*/ +proto.irismod.oracle.QueryFeedResponse.prototype.setFeed = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.oracle.QueryFeedResponse} returns this + */ +proto.irismod.oracle.QueryFeedResponse.prototype.clearFeed = function() { + return this.setFeed(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.oracle.QueryFeedResponse.prototype.hasFeed = 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.irismod.oracle.QueryFeedsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.QueryFeedsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.QueryFeedsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + state: 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.irismod.oracle.QueryFeedsRequest} + */ +proto.irismod.oracle.QueryFeedsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.QueryFeedsRequest; + return proto.irismod.oracle.QueryFeedsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.QueryFeedsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.QueryFeedsRequest} + */ +proto.irismod.oracle.QueryFeedsRequest.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.setState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.QueryFeedsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.QueryFeedsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.QueryFeedsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getState(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string state = 1; + * @return {string} + */ +proto.irismod.oracle.QueryFeedsRequest.prototype.getState = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.QueryFeedsRequest} returns this + */ +proto.irismod.oracle.QueryFeedsRequest.prototype.setState = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.oracle.QueryFeedsResponse.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.irismod.oracle.QueryFeedsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.QueryFeedsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.QueryFeedsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + feedsList: jspb.Message.toObjectList(msg.getFeedsList(), + proto.irismod.oracle.FeedContext.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.irismod.oracle.QueryFeedsResponse} + */ +proto.irismod.oracle.QueryFeedsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.QueryFeedsResponse; + return proto.irismod.oracle.QueryFeedsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.QueryFeedsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.QueryFeedsResponse} + */ +proto.irismod.oracle.QueryFeedsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.irismod.oracle.FeedContext; + reader.readMessage(value,proto.irismod.oracle.FeedContext.deserializeBinaryFromReader); + msg.addFeeds(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.QueryFeedsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.QueryFeedsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.QueryFeedsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.irismod.oracle.FeedContext.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated FeedContext feeds = 1; + * @return {!Array} + */ +proto.irismod.oracle.QueryFeedsResponse.prototype.getFeedsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.oracle.FeedContext, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.QueryFeedsResponse} returns this +*/ +proto.irismod.oracle.QueryFeedsResponse.prototype.setFeedsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.oracle.FeedContext=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.oracle.FeedContext} + */ +proto.irismod.oracle.QueryFeedsResponse.prototype.addFeeds = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.oracle.FeedContext, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.oracle.QueryFeedsResponse} returns this + */ +proto.irismod.oracle.QueryFeedsResponse.prototype.clearFeedsList = function() { + return this.setFeedsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.oracle.QueryFeedValueRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.QueryFeedValueRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.QueryFeedValueRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedValueRequest.toObject = function(includeInstance, msg) { + var f, obj = { + feedName: 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.irismod.oracle.QueryFeedValueRequest} + */ +proto.irismod.oracle.QueryFeedValueRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.QueryFeedValueRequest; + return proto.irismod.oracle.QueryFeedValueRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.QueryFeedValueRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.QueryFeedValueRequest} + */ +proto.irismod.oracle.QueryFeedValueRequest.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.setFeedName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.QueryFeedValueRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.QueryFeedValueRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.QueryFeedValueRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedValueRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string feed_name = 1; + * @return {string} + */ +proto.irismod.oracle.QueryFeedValueRequest.prototype.getFeedName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.QueryFeedValueRequest} returns this + */ +proto.irismod.oracle.QueryFeedValueRequest.prototype.setFeedName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.oracle.QueryFeedValueResponse.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.irismod.oracle.QueryFeedValueResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.QueryFeedValueResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.QueryFeedValueResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedValueResponse.toObject = function(includeInstance, msg) { + var f, obj = { + feedValuesList: jspb.Message.toObjectList(msg.getFeedValuesList(), + irismod_oracle_oracle_pb.FeedValue.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.irismod.oracle.QueryFeedValueResponse} + */ +proto.irismod.oracle.QueryFeedValueResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.QueryFeedValueResponse; + return proto.irismod.oracle.QueryFeedValueResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.QueryFeedValueResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.QueryFeedValueResponse} + */ +proto.irismod.oracle.QueryFeedValueResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_oracle_oracle_pb.FeedValue; + reader.readMessage(value,irismod_oracle_oracle_pb.FeedValue.deserializeBinaryFromReader); + msg.addFeedValues(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.QueryFeedValueResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.QueryFeedValueResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.QueryFeedValueResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.QueryFeedValueResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedValuesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_oracle_oracle_pb.FeedValue.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated FeedValue feed_values = 1; + * @return {!Array} + */ +proto.irismod.oracle.QueryFeedValueResponse.prototype.getFeedValuesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_oracle_oracle_pb.FeedValue, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.QueryFeedValueResponse} returns this +*/ +proto.irismod.oracle.QueryFeedValueResponse.prototype.setFeedValuesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.oracle.FeedValue=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.oracle.FeedValue} + */ +proto.irismod.oracle.QueryFeedValueResponse.prototype.addFeedValues = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.oracle.FeedValue, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.oracle.QueryFeedValueResponse} returns this + */ +proto.irismod.oracle.QueryFeedValueResponse.prototype.clearFeedValuesList = function() { + return this.setFeedValuesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.oracle.FeedContext.repeatedFields_ = [3,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.irismod.oracle.FeedContext.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.FeedContext.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.FeedContext} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.FeedContext.toObject = function(includeInstance, msg) { + var f, obj = { + feed: (f = msg.getFeed()) && irismod_oracle_oracle_pb.Feed.toObject(includeInstance, f), + serviceName: jspb.Message.getFieldWithDefault(msg, 2, ""), + providersList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + input: jspb.Message.getFieldWithDefault(msg, 4, ""), + timeout: jspb.Message.getFieldWithDefault(msg, 5, 0), + serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 7, 0), + responseThreshold: jspb.Message.getFieldWithDefault(msg, 8, 0), + state: 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.irismod.oracle.FeedContext} + */ +proto.irismod.oracle.FeedContext.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.FeedContext; + return proto.irismod.oracle.FeedContext.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.FeedContext} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.FeedContext} + */ +proto.irismod.oracle.FeedContext.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_oracle_oracle_pb.Feed; + reader.readMessage(value,irismod_oracle_oracle_pb.Feed.deserializeBinaryFromReader); + msg.setFeed(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setServiceName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addProviders(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInput(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeout(value); + break; + case 6: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFeeCap(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRepeatedFrequency(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setResponseThreshold(value); + break; + case 9: + var value = /** @type {!proto.irismod.service.RequestContextState} */ (reader.readEnum()); + msg.setState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.FeedContext.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.FeedContext.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.FeedContext} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.FeedContext.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeed(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_oracle_oracle_pb.Feed.serializeBinaryToWriter + ); + } + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getProvidersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getInput(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getTimeout(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getServiceFeeCapList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRepeatedFrequency(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getResponseThreshold(); + if (f !== 0) { + writer.writeUint32( + 8, + f + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 9, + f + ); + } +}; + + +/** + * optional Feed feed = 1; + * @return {?proto.irismod.oracle.Feed} + */ +proto.irismod.oracle.FeedContext.prototype.getFeed = function() { + return /** @type{?proto.irismod.oracle.Feed} */ ( + jspb.Message.getWrapperField(this, irismod_oracle_oracle_pb.Feed, 1)); +}; + + +/** + * @param {?proto.irismod.oracle.Feed|undefined} value + * @return {!proto.irismod.oracle.FeedContext} returns this +*/ +proto.irismod.oracle.FeedContext.prototype.setFeed = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.clearFeed = function() { + return this.setFeed(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.oracle.FeedContext.prototype.hasFeed = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string service_name = 2; + * @return {string} + */ +proto.irismod.oracle.FeedContext.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated string providers = 3; + * @return {!Array} + */ +proto.irismod.oracle.FeedContext.prototype.getProvidersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.setProvidersList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.addProviders = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.clearProvidersList = function() { + return this.setProvidersList([]); +}; + + +/** + * optional string input = 4; + * @return {string} + */ +proto.irismod.oracle.FeedContext.prototype.getInput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.setInput = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 timeout = 5; + * @return {number} + */ +proto.irismod.oracle.FeedContext.prototype.getTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.setTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee_cap = 6; + * @return {!Array} + */ +proto.irismod.oracle.FeedContext.prototype.getServiceFeeCapList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.FeedContext} returns this +*/ +proto.irismod.oracle.FeedContext.prototype.setServiceFeeCapList = 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.irismod.oracle.FeedContext.prototype.addServiceFeeCap = 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.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.clearServiceFeeCapList = function() { + return this.setServiceFeeCapList([]); +}; + + +/** + * optional uint64 repeated_frequency = 7; + * @return {number} + */ +proto.irismod.oracle.FeedContext.prototype.getRepeatedFrequency = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.setRepeatedFrequency = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional uint32 response_threshold = 8; + * @return {number} + */ +proto.irismod.oracle.FeedContext.prototype.getResponseThreshold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.setResponseThreshold = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional irismod.service.RequestContextState state = 9; + * @return {!proto.irismod.service.RequestContextState} + */ +proto.irismod.oracle.FeedContext.prototype.getState = function() { + return /** @type {!proto.irismod.service.RequestContextState} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {!proto.irismod.service.RequestContextState} value + * @return {!proto.irismod.oracle.FeedContext} returns this + */ +proto.irismod.oracle.FeedContext.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 9, value); +}; + + +goog.object.extend(exports, proto.irismod.oracle); diff --git a/src/types/proto-types/irismod/oracle/tx_grpc_web_pb.js b/src/types/proto-types/irismod/oracle/tx_grpc_web_pb.js new file mode 100644 index 00000000..4ed1df1d --- /dev/null +++ b/src/types/proto-types/irismod/oracle/tx_grpc_web_pb.js @@ -0,0 +1,399 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.oracle + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.oracle = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.oracle.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.oracle.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.oracle.MsgCreateFeed, + * !proto.irismod.oracle.MsgCreateFeedResponse>} + */ +const methodDescriptor_Msg_CreateFeed = new grpc.web.MethodDescriptor( + '/irismod.oracle.Msg/CreateFeed', + grpc.web.MethodType.UNARY, + proto.irismod.oracle.MsgCreateFeed, + proto.irismod.oracle.MsgCreateFeedResponse, + /** + * @param {!proto.irismod.oracle.MsgCreateFeed} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.MsgCreateFeedResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.oracle.MsgCreateFeed, + * !proto.irismod.oracle.MsgCreateFeedResponse>} + */ +const methodInfo_Msg_CreateFeed = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.oracle.MsgCreateFeedResponse, + /** + * @param {!proto.irismod.oracle.MsgCreateFeed} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.MsgCreateFeedResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.oracle.MsgCreateFeed} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.oracle.MsgCreateFeedResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.oracle.MsgClient.prototype.createFeed = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.oracle.Msg/CreateFeed', + request, + metadata || {}, + methodDescriptor_Msg_CreateFeed, + callback); +}; + + +/** + * @param {!proto.irismod.oracle.MsgCreateFeed} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.oracle.MsgPromiseClient.prototype.createFeed = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.oracle.Msg/CreateFeed', + request, + metadata || {}, + methodDescriptor_Msg_CreateFeed); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.oracle.MsgEditFeed, + * !proto.irismod.oracle.MsgEditFeedResponse>} + */ +const methodDescriptor_Msg_EditFeed = new grpc.web.MethodDescriptor( + '/irismod.oracle.Msg/EditFeed', + grpc.web.MethodType.UNARY, + proto.irismod.oracle.MsgEditFeed, + proto.irismod.oracle.MsgEditFeedResponse, + /** + * @param {!proto.irismod.oracle.MsgEditFeed} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.MsgEditFeedResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.oracle.MsgEditFeed, + * !proto.irismod.oracle.MsgEditFeedResponse>} + */ +const methodInfo_Msg_EditFeed = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.oracle.MsgEditFeedResponse, + /** + * @param {!proto.irismod.oracle.MsgEditFeed} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.MsgEditFeedResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.oracle.MsgEditFeed} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.oracle.MsgEditFeedResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.oracle.MsgClient.prototype.editFeed = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.oracle.Msg/EditFeed', + request, + metadata || {}, + methodDescriptor_Msg_EditFeed, + callback); +}; + + +/** + * @param {!proto.irismod.oracle.MsgEditFeed} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.oracle.MsgPromiseClient.prototype.editFeed = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.oracle.Msg/EditFeed', + request, + metadata || {}, + methodDescriptor_Msg_EditFeed); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.oracle.MsgStartFeed, + * !proto.irismod.oracle.MsgStartFeedResponse>} + */ +const methodDescriptor_Msg_StartFeed = new grpc.web.MethodDescriptor( + '/irismod.oracle.Msg/StartFeed', + grpc.web.MethodType.UNARY, + proto.irismod.oracle.MsgStartFeed, + proto.irismod.oracle.MsgStartFeedResponse, + /** + * @param {!proto.irismod.oracle.MsgStartFeed} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.MsgStartFeedResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.oracle.MsgStartFeed, + * !proto.irismod.oracle.MsgStartFeedResponse>} + */ +const methodInfo_Msg_StartFeed = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.oracle.MsgStartFeedResponse, + /** + * @param {!proto.irismod.oracle.MsgStartFeed} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.MsgStartFeedResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.oracle.MsgStartFeed} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.oracle.MsgStartFeedResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.oracle.MsgClient.prototype.startFeed = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.oracle.Msg/StartFeed', + request, + metadata || {}, + methodDescriptor_Msg_StartFeed, + callback); +}; + + +/** + * @param {!proto.irismod.oracle.MsgStartFeed} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.oracle.MsgPromiseClient.prototype.startFeed = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.oracle.Msg/StartFeed', + request, + metadata || {}, + methodDescriptor_Msg_StartFeed); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.oracle.MsgPauseFeed, + * !proto.irismod.oracle.MsgPauseFeedResponse>} + */ +const methodDescriptor_Msg_PauseFeed = new grpc.web.MethodDescriptor( + '/irismod.oracle.Msg/PauseFeed', + grpc.web.MethodType.UNARY, + proto.irismod.oracle.MsgPauseFeed, + proto.irismod.oracle.MsgPauseFeedResponse, + /** + * @param {!proto.irismod.oracle.MsgPauseFeed} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.MsgPauseFeedResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.oracle.MsgPauseFeed, + * !proto.irismod.oracle.MsgPauseFeedResponse>} + */ +const methodInfo_Msg_PauseFeed = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.oracle.MsgPauseFeedResponse, + /** + * @param {!proto.irismod.oracle.MsgPauseFeed} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.oracle.MsgPauseFeedResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.oracle.MsgPauseFeed} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.oracle.MsgPauseFeedResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.oracle.MsgClient.prototype.pauseFeed = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.oracle.Msg/PauseFeed', + request, + metadata || {}, + methodDescriptor_Msg_PauseFeed, + callback); +}; + + +/** + * @param {!proto.irismod.oracle.MsgPauseFeed} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.oracle.MsgPromiseClient.prototype.pauseFeed = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.oracle.Msg/PauseFeed', + request, + metadata || {}, + methodDescriptor_Msg_PauseFeed); +}; + + +module.exports = proto.irismod.oracle; + diff --git a/src/types/proto-types/irismod/oracle/tx_pb.js b/src/types/proto-types/irismod/oracle/tx_pb.js new file mode 100644 index 00000000..4d9f9ab8 --- /dev/null +++ b/src/types/proto-types/irismod/oracle/tx_pb.js @@ -0,0 +1,1877 @@ +// source: irismod/oracle/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.irismod.oracle.MsgCreateFeed', null, global); +goog.exportSymbol('proto.irismod.oracle.MsgCreateFeedResponse', null, global); +goog.exportSymbol('proto.irismod.oracle.MsgEditFeed', null, global); +goog.exportSymbol('proto.irismod.oracle.MsgEditFeedResponse', null, global); +goog.exportSymbol('proto.irismod.oracle.MsgPauseFeed', null, global); +goog.exportSymbol('proto.irismod.oracle.MsgPauseFeedResponse', null, global); +goog.exportSymbol('proto.irismod.oracle.MsgStartFeed', null, global); +goog.exportSymbol('proto.irismod.oracle.MsgStartFeedResponse', 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.irismod.oracle.MsgCreateFeed = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.oracle.MsgCreateFeed.repeatedFields_, null); +}; +goog.inherits(proto.irismod.oracle.MsgCreateFeed, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.MsgCreateFeed.displayName = 'proto.irismod.oracle.MsgCreateFeed'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.MsgCreateFeedResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.MsgCreateFeedResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.MsgCreateFeedResponse.displayName = 'proto.irismod.oracle.MsgCreateFeedResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.MsgStartFeed = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.MsgStartFeed, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.MsgStartFeed.displayName = 'proto.irismod.oracle.MsgStartFeed'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.MsgStartFeedResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.MsgStartFeedResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.MsgStartFeedResponse.displayName = 'proto.irismod.oracle.MsgStartFeedResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.MsgPauseFeed = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.MsgPauseFeed, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.MsgPauseFeed.displayName = 'proto.irismod.oracle.MsgPauseFeed'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.MsgPauseFeedResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.MsgPauseFeedResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.MsgPauseFeedResponse.displayName = 'proto.irismod.oracle.MsgPauseFeedResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.MsgEditFeed = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.oracle.MsgEditFeed.repeatedFields_, null); +}; +goog.inherits(proto.irismod.oracle.MsgEditFeed, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.MsgEditFeed.displayName = 'proto.irismod.oracle.MsgEditFeed'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.oracle.MsgEditFeedResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.oracle.MsgEditFeedResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.oracle.MsgEditFeedResponse.displayName = 'proto.irismod.oracle.MsgEditFeedResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.oracle.MsgCreateFeed.repeatedFields_ = [6,9]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.MsgCreateFeed.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.MsgCreateFeed} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgCreateFeed.toObject = function(includeInstance, msg) { + var f, obj = { + feedName: jspb.Message.getFieldWithDefault(msg, 1, ""), + latestHistory: jspb.Message.getFieldWithDefault(msg, 2, 0), + description: jspb.Message.getFieldWithDefault(msg, 3, ""), + creator: jspb.Message.getFieldWithDefault(msg, 4, ""), + serviceName: jspb.Message.getFieldWithDefault(msg, 5, ""), + providersList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, + input: jspb.Message.getFieldWithDefault(msg, 7, ""), + timeout: jspb.Message.getFieldWithDefault(msg, 8, 0), + serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 10, 0), + aggregateFunc: jspb.Message.getFieldWithDefault(msg, 11, ""), + valueJsonPath: jspb.Message.getFieldWithDefault(msg, 12, ""), + responseThreshold: jspb.Message.getFieldWithDefault(msg, 13, 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.irismod.oracle.MsgCreateFeed} + */ +proto.irismod.oracle.MsgCreateFeed.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.MsgCreateFeed; + return proto.irismod.oracle.MsgCreateFeed.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.MsgCreateFeed} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.MsgCreateFeed} + */ +proto.irismod.oracle.MsgCreateFeed.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.setFeedName(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLatestHistory(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setCreator(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setServiceName(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.addProviders(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setInput(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeout(value); + break; + case 9: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFeeCap(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRepeatedFrequency(value); + break; + case 11: + var value = /** @type {string} */ (reader.readString()); + msg.setAggregateFunc(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setValueJsonPath(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint32()); + msg.setResponseThreshold(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.MsgCreateFeed.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.MsgCreateFeed} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgCreateFeed.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getLatestHistory(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getProvidersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 6, + f + ); + } + f = message.getInput(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getTimeout(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getServiceFeeCapList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 9, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRepeatedFrequency(); + if (f !== 0) { + writer.writeUint64( + 10, + f + ); + } + f = message.getAggregateFunc(); + if (f.length > 0) { + writer.writeString( + 11, + f + ); + } + f = message.getValueJsonPath(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getResponseThreshold(); + if (f !== 0) { + writer.writeUint32( + 13, + f + ); + } +}; + + +/** + * optional string feed_name = 1; + * @return {string} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getFeedName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setFeedName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 latest_history = 2; + * @return {number} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getLatestHistory = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setLatestHistory = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string description = 3; + * @return {string} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string creator = 4; + * @return {string} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string service_name = 5; + * @return {string} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * repeated string providers = 6; + * @return {!Array} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getProvidersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setProvidersList = function(value) { + return jspb.Message.setField(this, 6, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.addProviders = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 6, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.clearProvidersList = function() { + return this.setProvidersList([]); +}; + + +/** + * optional string input = 7; + * @return {string} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getInput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setInput = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional int64 timeout = 8; + * @return {number} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee_cap = 9; + * @return {!Array} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getServiceFeeCapList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this +*/ +proto.irismod.oracle.MsgCreateFeed.prototype.setServiceFeeCapList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value + * @param {number=} opt_index + * @return {!proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.addServiceFeeCap = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.clearServiceFeeCapList = function() { + return this.setServiceFeeCapList([]); +}; + + +/** + * optional uint64 repeated_frequency = 10; + * @return {number} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getRepeatedFrequency = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setRepeatedFrequency = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional string aggregate_func = 11; + * @return {string} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getAggregateFunc = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setAggregateFunc = function(value) { + return jspb.Message.setProto3StringField(this, 11, value); +}; + + +/** + * optional string value_json_path = 12; + * @return {string} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getValueJsonPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setValueJsonPath = function(value) { + return jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * optional uint32 response_threshold = 13; + * @return {number} + */ +proto.irismod.oracle.MsgCreateFeed.prototype.getResponseThreshold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.MsgCreateFeed} returns this + */ +proto.irismod.oracle.MsgCreateFeed.prototype.setResponseThreshold = function(value) { + return jspb.Message.setProto3IntField(this, 13, 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.irismod.oracle.MsgCreateFeedResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.MsgCreateFeedResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.MsgCreateFeedResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgCreateFeedResponse.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.irismod.oracle.MsgCreateFeedResponse} + */ +proto.irismod.oracle.MsgCreateFeedResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.MsgCreateFeedResponse; + return proto.irismod.oracle.MsgCreateFeedResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.MsgCreateFeedResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.MsgCreateFeedResponse} + */ +proto.irismod.oracle.MsgCreateFeedResponse.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.irismod.oracle.MsgCreateFeedResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.MsgCreateFeedResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.MsgCreateFeedResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgCreateFeedResponse.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.irismod.oracle.MsgStartFeed.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.MsgStartFeed.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.MsgStartFeed} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgStartFeed.toObject = function(includeInstance, msg) { + var f, obj = { + feedName: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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.irismod.oracle.MsgStartFeed} + */ +proto.irismod.oracle.MsgStartFeed.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.MsgStartFeed; + return proto.irismod.oracle.MsgStartFeed.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.MsgStartFeed} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.MsgStartFeed} + */ +proto.irismod.oracle.MsgStartFeed.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.setFeedName(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.irismod.oracle.MsgStartFeed.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.MsgStartFeed.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.MsgStartFeed} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgStartFeed.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string feed_name = 1; + * @return {string} + */ +proto.irismod.oracle.MsgStartFeed.prototype.getFeedName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgStartFeed} returns this + */ +proto.irismod.oracle.MsgStartFeed.prototype.setFeedName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string creator = 2; + * @return {string} + */ +proto.irismod.oracle.MsgStartFeed.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgStartFeed} returns this + */ +proto.irismod.oracle.MsgStartFeed.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.irismod.oracle.MsgStartFeedResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.MsgStartFeedResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.MsgStartFeedResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgStartFeedResponse.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.irismod.oracle.MsgStartFeedResponse} + */ +proto.irismod.oracle.MsgStartFeedResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.MsgStartFeedResponse; + return proto.irismod.oracle.MsgStartFeedResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.MsgStartFeedResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.MsgStartFeedResponse} + */ +proto.irismod.oracle.MsgStartFeedResponse.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.irismod.oracle.MsgStartFeedResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.MsgStartFeedResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.MsgStartFeedResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgStartFeedResponse.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.irismod.oracle.MsgPauseFeed.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.MsgPauseFeed.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.MsgPauseFeed} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgPauseFeed.toObject = function(includeInstance, msg) { + var f, obj = { + feedName: jspb.Message.getFieldWithDefault(msg, 1, ""), + 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.irismod.oracle.MsgPauseFeed} + */ +proto.irismod.oracle.MsgPauseFeed.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.MsgPauseFeed; + return proto.irismod.oracle.MsgPauseFeed.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.MsgPauseFeed} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.MsgPauseFeed} + */ +proto.irismod.oracle.MsgPauseFeed.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.setFeedName(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.irismod.oracle.MsgPauseFeed.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.MsgPauseFeed.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.MsgPauseFeed} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgPauseFeed.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string feed_name = 1; + * @return {string} + */ +proto.irismod.oracle.MsgPauseFeed.prototype.getFeedName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgPauseFeed} returns this + */ +proto.irismod.oracle.MsgPauseFeed.prototype.setFeedName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string creator = 2; + * @return {string} + */ +proto.irismod.oracle.MsgPauseFeed.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgPauseFeed} returns this + */ +proto.irismod.oracle.MsgPauseFeed.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.irismod.oracle.MsgPauseFeedResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.MsgPauseFeedResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.MsgPauseFeedResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgPauseFeedResponse.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.irismod.oracle.MsgPauseFeedResponse} + */ +proto.irismod.oracle.MsgPauseFeedResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.MsgPauseFeedResponse; + return proto.irismod.oracle.MsgPauseFeedResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.MsgPauseFeedResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.MsgPauseFeedResponse} + */ +proto.irismod.oracle.MsgPauseFeedResponse.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.irismod.oracle.MsgPauseFeedResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.MsgPauseFeedResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.MsgPauseFeedResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgPauseFeedResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.oracle.MsgEditFeed.repeatedFields_ = [4,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.irismod.oracle.MsgEditFeed.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.MsgEditFeed.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.MsgEditFeed} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgEditFeed.toObject = function(includeInstance, msg) { + var f, obj = { + feedName: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + latestHistory: jspb.Message.getFieldWithDefault(msg, 3, 0), + providersList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, + timeout: jspb.Message.getFieldWithDefault(msg, 5, 0), + serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 7, 0), + responseThreshold: jspb.Message.getFieldWithDefault(msg, 8, 0), + creator: 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.irismod.oracle.MsgEditFeed} + */ +proto.irismod.oracle.MsgEditFeed.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.MsgEditFeed; + return proto.irismod.oracle.MsgEditFeed.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.MsgEditFeed} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.MsgEditFeed} + */ +proto.irismod.oracle.MsgEditFeed.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.setFeedName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDescription(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLatestHistory(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.addProviders(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeout(value); + break; + case 6: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFeeCap(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRepeatedFrequency(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint32()); + msg.setResponseThreshold(value); + break; + case 9: + 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.irismod.oracle.MsgEditFeed.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.MsgEditFeed.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.MsgEditFeed} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgEditFeed.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeedName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDescription(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLatestHistory(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getProvidersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 4, + f + ); + } + f = message.getTimeout(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getServiceFeeCapList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRepeatedFrequency(); + if (f !== 0) { + writer.writeUint64( + 7, + f + ); + } + f = message.getResponseThreshold(); + if (f !== 0) { + writer.writeUint32( + 8, + f + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } +}; + + +/** + * optional string feed_name = 1; + * @return {string} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getFeedName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.setFeedName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 latest_history = 3; + * @return {number} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getLatestHistory = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.setLatestHistory = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * repeated string providers = 4; + * @return {!Array} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getProvidersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.setProvidersList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.addProviders = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.clearProvidersList = function() { + return this.setProvidersList([]); +}; + + +/** + * optional int64 timeout = 5; + * @return {number} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.setTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee_cap = 6; + * @return {!Array} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getServiceFeeCapList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this +*/ +proto.irismod.oracle.MsgEditFeed.prototype.setServiceFeeCapList = 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.irismod.oracle.MsgEditFeed.prototype.addServiceFeeCap = 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.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.clearServiceFeeCapList = function() { + return this.setServiceFeeCapList([]); +}; + + +/** + * optional uint64 repeated_frequency = 7; + * @return {number} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getRepeatedFrequency = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.setRepeatedFrequency = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional uint32 response_threshold = 8; + * @return {number} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getResponseThreshold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.setResponseThreshold = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional string creator = 9; + * @return {string} + */ +proto.irismod.oracle.MsgEditFeed.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.oracle.MsgEditFeed} returns this + */ +proto.irismod.oracle.MsgEditFeed.prototype.setCreator = 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.irismod.oracle.MsgEditFeedResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.oracle.MsgEditFeedResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.oracle.MsgEditFeedResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgEditFeedResponse.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.irismod.oracle.MsgEditFeedResponse} + */ +proto.irismod.oracle.MsgEditFeedResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.oracle.MsgEditFeedResponse; + return proto.irismod.oracle.MsgEditFeedResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.oracle.MsgEditFeedResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.oracle.MsgEditFeedResponse} + */ +proto.irismod.oracle.MsgEditFeedResponse.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.irismod.oracle.MsgEditFeedResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.oracle.MsgEditFeedResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.oracle.MsgEditFeedResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.oracle.MsgEditFeedResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.irismod.oracle); diff --git a/src/types/proto-types/irismod/random/genesis_pb.js b/src/types/proto-types/irismod/random/genesis_pb.js new file mode 100644 index 00000000..a6b79784 --- /dev/null +++ b/src/types/proto-types/irismod/random/genesis_pb.js @@ -0,0 +1,356 @@ +// source: irismod/random/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var irismod_random_random_pb = require('../../irismod/random/random_pb.js'); +goog.object.extend(proto, irismod_random_random_pb); +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.irismod.random.GenesisState', null, global); +goog.exportSymbol('proto.irismod.random.Requests', 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.irismod.random.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.random.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.GenesisState.displayName = 'proto.irismod.random.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.irismod.random.Requests = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.random.Requests.repeatedFields_, null); +}; +goog.inherits(proto.irismod.random.Requests, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.Requests.displayName = 'proto.irismod.random.Requests'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.random.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.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.irismod.random.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + pendingRandomRequestsMap: (f = msg.getPendingRandomRequestsMap()) ? f.toObject(includeInstance, proto.irismod.random.Requests.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.random.GenesisState} + */ +proto.irismod.random.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.GenesisState; + return proto.irismod.random.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.GenesisState} + */ +proto.irismod.random.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = msg.getPendingRandomRequestsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.irismod.random.Requests.deserializeBinaryFromReader, "", new proto.irismod.random.Requests()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.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.irismod.random.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPendingRandomRequestsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.irismod.random.Requests.serializeBinaryToWriter); + } +}; + + +/** + * map pending_random_requests = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.irismod.random.GenesisState.prototype.getPendingRandomRequestsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.irismod.random.Requests)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.irismod.random.GenesisState} returns this + */ +proto.irismod.random.GenesisState.prototype.clearPendingRandomRequestsMap = function() { + this.getPendingRandomRequestsMap().clear(); + return this;}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.random.Requests.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.irismod.random.Requests.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.Requests.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.random.Requests} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.Requests.toObject = function(includeInstance, msg) { + var f, obj = { + requestsList: jspb.Message.toObjectList(msg.getRequestsList(), + irismod_random_random_pb.Request.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.irismod.random.Requests} + */ +proto.irismod.random.Requests.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.Requests; + return proto.irismod.random.Requests.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.Requests} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.Requests} + */ +proto.irismod.random.Requests.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_random_random_pb.Request; + reader.readMessage(value,irismod_random_random_pb.Request.deserializeBinaryFromReader); + msg.addRequests(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.Requests.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.Requests.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.random.Requests} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.Requests.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_random_random_pb.Request.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Request requests = 1; + * @return {!Array} + */ +proto.irismod.random.Requests.prototype.getRequestsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_random_random_pb.Request, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.random.Requests} returns this +*/ +proto.irismod.random.Requests.prototype.setRequestsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.random.Request=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.random.Request} + */ +proto.irismod.random.Requests.prototype.addRequests = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.random.Request, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.random.Requests} returns this + */ +proto.irismod.random.Requests.prototype.clearRequestsList = function() { + return this.setRequestsList([]); +}; + + +goog.object.extend(exports, proto.irismod.random); diff --git a/src/types/proto-types/irismod/random/query_grpc_web_pb.js b/src/types/proto-types/irismod/random/query_grpc_web_pb.js new file mode 100644 index 00000000..51d72573 --- /dev/null +++ b/src/types/proto-types/irismod/random/query_grpc_web_pb.js @@ -0,0 +1,241 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.random + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var irismod_random_random_pb = require('../../irismod/random/random_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.random = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.random.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.random.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.random.QueryRandomRequest, + * !proto.irismod.random.QueryRandomResponse>} + */ +const methodDescriptor_Query_Random = new grpc.web.MethodDescriptor( + '/irismod.random.Query/Random', + grpc.web.MethodType.UNARY, + proto.irismod.random.QueryRandomRequest, + proto.irismod.random.QueryRandomResponse, + /** + * @param {!proto.irismod.random.QueryRandomRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.random.QueryRandomResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.random.QueryRandomRequest, + * !proto.irismod.random.QueryRandomResponse>} + */ +const methodInfo_Query_Random = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.random.QueryRandomResponse, + /** + * @param {!proto.irismod.random.QueryRandomRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.random.QueryRandomResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.random.QueryRandomRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.random.QueryRandomResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.random.QueryClient.prototype.random = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.random.Query/Random', + request, + metadata || {}, + methodDescriptor_Query_Random, + callback); +}; + + +/** + * @param {!proto.irismod.random.QueryRandomRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.random.QueryPromiseClient.prototype.random = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.random.Query/Random', + request, + metadata || {}, + methodDescriptor_Query_Random); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.random.QueryRandomRequestQueueRequest, + * !proto.irismod.random.QueryRandomRequestQueueResponse>} + */ +const methodDescriptor_Query_RandomRequestQueue = new grpc.web.MethodDescriptor( + '/irismod.random.Query/RandomRequestQueue', + grpc.web.MethodType.UNARY, + proto.irismod.random.QueryRandomRequestQueueRequest, + proto.irismod.random.QueryRandomRequestQueueResponse, + /** + * @param {!proto.irismod.random.QueryRandomRequestQueueRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.random.QueryRandomRequestQueueResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.random.QueryRandomRequestQueueRequest, + * !proto.irismod.random.QueryRandomRequestQueueResponse>} + */ +const methodInfo_Query_RandomRequestQueue = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.random.QueryRandomRequestQueueResponse, + /** + * @param {!proto.irismod.random.QueryRandomRequestQueueRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.random.QueryRandomRequestQueueResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.random.QueryRandomRequestQueueRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.random.QueryRandomRequestQueueResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.random.QueryClient.prototype.randomRequestQueue = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.random.Query/RandomRequestQueue', + request, + metadata || {}, + methodDescriptor_Query_RandomRequestQueue, + callback); +}; + + +/** + * @param {!proto.irismod.random.QueryRandomRequestQueueRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.random.QueryPromiseClient.prototype.randomRequestQueue = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.random.Query/RandomRequestQueue', + request, + metadata || {}, + methodDescriptor_Query_RandomRequestQueue); +}; + + +module.exports = proto.irismod.random; + diff --git a/src/types/proto-types/irismod/random/query_pb.js b/src/types/proto-types/irismod/random/query_pb.js new file mode 100644 index 00000000..f21f6d48 --- /dev/null +++ b/src/types/proto-types/irismod/random/query_pb.js @@ -0,0 +1,680 @@ +// source: irismod/random/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var irismod_random_random_pb = require('../../irismod/random/random_pb.js'); +goog.object.extend(proto, irismod_random_random_pb); +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); +goog.exportSymbol('proto.irismod.random.QueryRandomRequest', null, global); +goog.exportSymbol('proto.irismod.random.QueryRandomRequestQueueRequest', null, global); +goog.exportSymbol('proto.irismod.random.QueryRandomRequestQueueResponse', null, global); +goog.exportSymbol('proto.irismod.random.QueryRandomResponse', 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.irismod.random.QueryRandomRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.random.QueryRandomRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.QueryRandomRequest.displayName = 'proto.irismod.random.QueryRandomRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.random.QueryRandomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.random.QueryRandomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.QueryRandomResponse.displayName = 'proto.irismod.random.QueryRandomResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.random.QueryRandomRequestQueueRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.random.QueryRandomRequestQueueRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.QueryRandomRequestQueueRequest.displayName = 'proto.irismod.random.QueryRandomRequestQueueRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.random.QueryRandomRequestQueueResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.random.QueryRandomRequestQueueResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.random.QueryRandomRequestQueueResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.QueryRandomRequestQueueResponse.displayName = 'proto.irismod.random.QueryRandomRequestQueueResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.random.QueryRandomRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.QueryRandomRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.random.QueryRandomRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.QueryRandomRequest.toObject = function(includeInstance, msg) { + var f, obj = { + reqId: 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.irismod.random.QueryRandomRequest} + */ +proto.irismod.random.QueryRandomRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.QueryRandomRequest; + return proto.irismod.random.QueryRandomRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.QueryRandomRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.QueryRandomRequest} + */ +proto.irismod.random.QueryRandomRequest.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.setReqId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.QueryRandomRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.QueryRandomRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.random.QueryRandomRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.QueryRandomRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getReqId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string req_id = 1; + * @return {string} + */ +proto.irismod.random.QueryRandomRequest.prototype.getReqId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.random.QueryRandomRequest} returns this + */ +proto.irismod.random.QueryRandomRequest.prototype.setReqId = 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.irismod.random.QueryRandomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.QueryRandomResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.random.QueryRandomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.QueryRandomResponse.toObject = function(includeInstance, msg) { + var f, obj = { + random: (f = msg.getRandom()) && irismod_random_random_pb.Random.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.irismod.random.QueryRandomResponse} + */ +proto.irismod.random.QueryRandomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.QueryRandomResponse; + return proto.irismod.random.QueryRandomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.QueryRandomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.QueryRandomResponse} + */ +proto.irismod.random.QueryRandomResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_random_random_pb.Random; + reader.readMessage(value,irismod_random_random_pb.Random.deserializeBinaryFromReader); + msg.setRandom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.QueryRandomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.QueryRandomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.random.QueryRandomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.QueryRandomResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRandom(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_random_random_pb.Random.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Random random = 1; + * @return {?proto.irismod.random.Random} + */ +proto.irismod.random.QueryRandomResponse.prototype.getRandom = function() { + return /** @type{?proto.irismod.random.Random} */ ( + jspb.Message.getWrapperField(this, irismod_random_random_pb.Random, 1)); +}; + + +/** + * @param {?proto.irismod.random.Random|undefined} value + * @return {!proto.irismod.random.QueryRandomResponse} returns this +*/ +proto.irismod.random.QueryRandomResponse.prototype.setRandom = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.random.QueryRandomResponse} returns this + */ +proto.irismod.random.QueryRandomResponse.prototype.clearRandom = function() { + return this.setRandom(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.random.QueryRandomResponse.prototype.hasRandom = 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.irismod.random.QueryRandomRequestQueueRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.QueryRandomRequestQueueRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.random.QueryRandomRequestQueueRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.QueryRandomRequestQueueRequest.toObject = function(includeInstance, msg) { + var f, obj = { + height: 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.irismod.random.QueryRandomRequestQueueRequest} + */ +proto.irismod.random.QueryRandomRequestQueueRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.QueryRandomRequestQueueRequest; + return proto.irismod.random.QueryRandomRequestQueueRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.QueryRandomRequestQueueRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.QueryRandomRequestQueueRequest} + */ +proto.irismod.random.QueryRandomRequestQueueRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.QueryRandomRequestQueueRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.QueryRandomRequestQueueRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.random.QueryRandomRequestQueueRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.QueryRandomRequestQueueRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.irismod.random.QueryRandomRequestQueueRequest.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.random.QueryRandomRequestQueueRequest} returns this + */ +proto.irismod.random.QueryRandomRequestQueueRequest.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.random.QueryRandomRequestQueueResponse.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.irismod.random.QueryRandomRequestQueueResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.QueryRandomRequestQueueResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.random.QueryRandomRequestQueueResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.QueryRandomRequestQueueResponse.toObject = function(includeInstance, msg) { + var f, obj = { + requestsList: jspb.Message.toObjectList(msg.getRequestsList(), + irismod_random_random_pb.Request.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.irismod.random.QueryRandomRequestQueueResponse} + */ +proto.irismod.random.QueryRandomRequestQueueResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.QueryRandomRequestQueueResponse; + return proto.irismod.random.QueryRandomRequestQueueResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.QueryRandomRequestQueueResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.QueryRandomRequestQueueResponse} + */ +proto.irismod.random.QueryRandomRequestQueueResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_random_random_pb.Request; + reader.readMessage(value,irismod_random_random_pb.Request.deserializeBinaryFromReader); + msg.addRequests(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.QueryRandomRequestQueueResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.QueryRandomRequestQueueResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.random.QueryRandomRequestQueueResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.QueryRandomRequestQueueResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_random_random_pb.Request.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Request requests = 1; + * @return {!Array} + */ +proto.irismod.random.QueryRandomRequestQueueResponse.prototype.getRequestsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_random_random_pb.Request, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.random.QueryRandomRequestQueueResponse} returns this +*/ +proto.irismod.random.QueryRandomRequestQueueResponse.prototype.setRequestsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.random.Request=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.random.Request} + */ +proto.irismod.random.QueryRandomRequestQueueResponse.prototype.addRequests = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.random.Request, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.random.QueryRandomRequestQueueResponse} returns this + */ +proto.irismod.random.QueryRandomRequestQueueResponse.prototype.clearRequestsList = function() { + return this.setRequestsList([]); +}; + + +goog.object.extend(exports, proto.irismod.random); diff --git a/src/types/proto-types/irismod/random/random_pb.js b/src/types/proto-types/irismod/random/random_pb.js new file mode 100644 index 00000000..c6f11ebb --- /dev/null +++ b/src/types/proto-types/irismod/random/random_pb.js @@ -0,0 +1,563 @@ +// source: irismod/random/random.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.irismod.random.Random', null, global); +goog.exportSymbol('proto.irismod.random.Request', 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.irismod.random.Random = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.random.Random, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.Random.displayName = 'proto.irismod.random.Random'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.random.Request = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.random.Request.repeatedFields_, null); +}; +goog.inherits(proto.irismod.random.Request, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.Request.displayName = 'proto.irismod.random.Request'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.random.Random.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.Random.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.random.Random} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.Random.toObject = function(includeInstance, msg) { + var f, obj = { + requestTxHash: jspb.Message.getFieldWithDefault(msg, 1, ""), + height: jspb.Message.getFieldWithDefault(msg, 2, 0), + value: 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.irismod.random.Random} + */ +proto.irismod.random.Random.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.Random; + return proto.irismod.random.Random.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.Random} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.Random} + */ +proto.irismod.random.Random.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.setRequestTxHash(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.Random.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.Random.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.random.Random} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.Random.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestTxHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getValue(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string request_tx_hash = 1; + * @return {string} + */ +proto.irismod.random.Random.prototype.getRequestTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.random.Random} returns this + */ +proto.irismod.random.Random.prototype.setRequestTxHash = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 height = 2; + * @return {number} + */ +proto.irismod.random.Random.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.random.Random} returns this + */ +proto.irismod.random.Random.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string value = 3; + * @return {string} + */ +proto.irismod.random.Random.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.random.Random} returns this + */ +proto.irismod.random.Random.prototype.setValue = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.random.Request.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.irismod.random.Request.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.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.irismod.random.Request} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.Request.toObject = function(includeInstance, msg) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + consumer: jspb.Message.getFieldWithDefault(msg, 2, ""), + txHash: jspb.Message.getFieldWithDefault(msg, 3, ""), + oracle: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + serviceContextId: 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.irismod.random.Request} + */ +proto.irismod.random.Request.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.Request; + return proto.irismod.random.Request.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.Request} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.Request} + */ +proto.irismod.random.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.readInt64()); + msg.setHeight(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTxHash(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOracle(value); + break; + case 5: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFeeCap(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setServiceContextId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.Request.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.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.irismod.random.Request} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.Request.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTxHash(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getOracle(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getServiceFeeCapList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getServiceContextId(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.irismod.random.Request.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.random.Request} returns this + */ +proto.irismod.random.Request.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string consumer = 2; + * @return {string} + */ +proto.irismod.random.Request.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.random.Request} returns this + */ +proto.irismod.random.Request.prototype.setConsumer = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string tx_hash = 3; + * @return {string} + */ +proto.irismod.random.Request.prototype.getTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.random.Request} returns this + */ +proto.irismod.random.Request.prototype.setTxHash = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bool oracle = 4; + * @return {boolean} + */ +proto.irismod.random.Request.prototype.getOracle = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.random.Request} returns this + */ +proto.irismod.random.Request.prototype.setOracle = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee_cap = 5; + * @return {!Array} + */ +proto.irismod.random.Request.prototype.getServiceFeeCapList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.random.Request} returns this +*/ +proto.irismod.random.Request.prototype.setServiceFeeCapList = 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.irismod.random.Request.prototype.addServiceFeeCap = 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.irismod.random.Request} returns this + */ +proto.irismod.random.Request.prototype.clearServiceFeeCapList = function() { + return this.setServiceFeeCapList([]); +}; + + +/** + * optional string service_context_id = 6; + * @return {string} + */ +proto.irismod.random.Request.prototype.getServiceContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.random.Request} returns this + */ +proto.irismod.random.Request.prototype.setServiceContextId = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +goog.object.extend(exports, proto.irismod.random); diff --git a/src/types/proto-types/irismod/random/tx_grpc_web_pb.js b/src/types/proto-types/irismod/random/tx_grpc_web_pb.js new file mode 100644 index 00000000..d527eb1b --- /dev/null +++ b/src/types/proto-types/irismod/random/tx_grpc_web_pb.js @@ -0,0 +1,159 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.random + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.random = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.random.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.random.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.random.MsgRequestRandom, + * !proto.irismod.random.MsgRequestRandomResponse>} + */ +const methodDescriptor_Msg_RequestRandom = new grpc.web.MethodDescriptor( + '/irismod.random.Msg/RequestRandom', + grpc.web.MethodType.UNARY, + proto.irismod.random.MsgRequestRandom, + proto.irismod.random.MsgRequestRandomResponse, + /** + * @param {!proto.irismod.random.MsgRequestRandom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.random.MsgRequestRandomResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.random.MsgRequestRandom, + * !proto.irismod.random.MsgRequestRandomResponse>} + */ +const methodInfo_Msg_RequestRandom = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.random.MsgRequestRandomResponse, + /** + * @param {!proto.irismod.random.MsgRequestRandom} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.random.MsgRequestRandomResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.random.MsgRequestRandom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.random.MsgRequestRandomResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.random.MsgClient.prototype.requestRandom = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.random.Msg/RequestRandom', + request, + metadata || {}, + methodDescriptor_Msg_RequestRandom, + callback); +}; + + +/** + * @param {!proto.irismod.random.MsgRequestRandom} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.random.MsgPromiseClient.prototype.requestRandom = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.random.Msg/RequestRandom', + request, + metadata || {}, + methodDescriptor_Msg_RequestRandom); +}; + + +module.exports = proto.irismod.random; + diff --git a/src/types/proto-types/irismod/random/tx_pb.js b/src/types/proto-types/irismod/random/tx_pb.js new file mode 100644 index 00000000..958fc631 --- /dev/null +++ b/src/types/proto-types/irismod/random/tx_pb.js @@ -0,0 +1,414 @@ +// source: irismod/random/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js'); +goog.object.extend(proto, cosmos_base_v1beta1_coin_pb); +goog.exportSymbol('proto.irismod.random.MsgRequestRandom', null, global); +goog.exportSymbol('proto.irismod.random.MsgRequestRandomResponse', 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.irismod.random.MsgRequestRandom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.random.MsgRequestRandom.repeatedFields_, null); +}; +goog.inherits(proto.irismod.random.MsgRequestRandom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.MsgRequestRandom.displayName = 'proto.irismod.random.MsgRequestRandom'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.random.MsgRequestRandomResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.random.MsgRequestRandomResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.random.MsgRequestRandomResponse.displayName = 'proto.irismod.random.MsgRequestRandomResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.random.MsgRequestRandom.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.irismod.random.MsgRequestRandom.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.MsgRequestRandom.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.random.MsgRequestRandom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.MsgRequestRandom.toObject = function(includeInstance, msg) { + var f, obj = { + blockInterval: jspb.Message.getFieldWithDefault(msg, 1, 0), + consumer: jspb.Message.getFieldWithDefault(msg, 2, ""), + oracle: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), + serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), + 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.irismod.random.MsgRequestRandom} + */ +proto.irismod.random.MsgRequestRandom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.MsgRequestRandom; + return proto.irismod.random.MsgRequestRandom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.MsgRequestRandom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.MsgRequestRandom} + */ +proto.irismod.random.MsgRequestRandom.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.setBlockInterval(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setOracle(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFeeCap(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.random.MsgRequestRandom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.MsgRequestRandom.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.random.MsgRequestRandom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.MsgRequestRandom.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockInterval(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getOracle(); + if (f) { + writer.writeBool( + 3, + f + ); + } + f = message.getServiceFeeCapList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 block_interval = 1; + * @return {number} + */ +proto.irismod.random.MsgRequestRandom.prototype.getBlockInterval = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.random.MsgRequestRandom} returns this + */ +proto.irismod.random.MsgRequestRandom.prototype.setBlockInterval = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string consumer = 2; + * @return {string} + */ +proto.irismod.random.MsgRequestRandom.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.random.MsgRequestRandom} returns this + */ +proto.irismod.random.MsgRequestRandom.prototype.setConsumer = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool oracle = 3; + * @return {boolean} + */ +proto.irismod.random.MsgRequestRandom.prototype.getOracle = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.random.MsgRequestRandom} returns this + */ +proto.irismod.random.MsgRequestRandom.prototype.setOracle = function(value) { + return jspb.Message.setProto3BooleanField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee_cap = 4; + * @return {!Array} + */ +proto.irismod.random.MsgRequestRandom.prototype.getServiceFeeCapList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.random.MsgRequestRandom} returns this +*/ +proto.irismod.random.MsgRequestRandom.prototype.setServiceFeeCapList = 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.irismod.random.MsgRequestRandom.prototype.addServiceFeeCap = 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.irismod.random.MsgRequestRandom} returns this + */ +proto.irismod.random.MsgRequestRandom.prototype.clearServiceFeeCapList = function() { + return this.setServiceFeeCapList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.random.MsgRequestRandomResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.random.MsgRequestRandomResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.random.MsgRequestRandomResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.MsgRequestRandomResponse.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.irismod.random.MsgRequestRandomResponse} + */ +proto.irismod.random.MsgRequestRandomResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.random.MsgRequestRandomResponse; + return proto.irismod.random.MsgRequestRandomResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.random.MsgRequestRandomResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.random.MsgRequestRandomResponse} + */ +proto.irismod.random.MsgRequestRandomResponse.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.irismod.random.MsgRequestRandomResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.random.MsgRequestRandomResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.random.MsgRequestRandomResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.random.MsgRequestRandomResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.irismod.random); diff --git a/src/types/proto-types/irismod/record/genesis_pb.js b/src/types/proto-types/irismod/record/genesis_pb.js new file mode 100644 index 00000000..e12f0d53 --- /dev/null +++ b/src/types/proto-types/irismod/record/genesis_pb.js @@ -0,0 +1,201 @@ +// source: irismod/record/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 irismod_record_record_pb = require('../../irismod/record/record_pb.js'); +goog.object.extend(proto, irismod_record_record_pb); +goog.exportSymbol('proto.irismod.record.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.irismod.record.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.record.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.irismod.record.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.record.GenesisState.displayName = 'proto.irismod.record.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.record.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.irismod.record.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.record.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.irismod.record.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + recordsList: jspb.Message.toObjectList(msg.getRecordsList(), + irismod_record_record_pb.Record.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.irismod.record.GenesisState} + */ +proto.irismod.record.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.record.GenesisState; + return proto.irismod.record.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.record.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.record.GenesisState} + */ +proto.irismod.record.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_record_record_pb.Record; + reader.readMessage(value,irismod_record_record_pb.Record.deserializeBinaryFromReader); + msg.addRecords(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.record.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.record.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.irismod.record.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRecordsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_record_record_pb.Record.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Record records = 1; + * @return {!Array} + */ +proto.irismod.record.GenesisState.prototype.getRecordsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_record_record_pb.Record, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.record.GenesisState} returns this +*/ +proto.irismod.record.GenesisState.prototype.setRecordsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.record.Record=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.record.Record} + */ +proto.irismod.record.GenesisState.prototype.addRecords = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.record.Record, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.record.GenesisState} returns this + */ +proto.irismod.record.GenesisState.prototype.clearRecordsList = function() { + return this.setRecordsList([]); +}; + + +goog.object.extend(exports, proto.irismod.record); diff --git a/src/types/proto-types/irismod/record/query_grpc_web_pb.js b/src/types/proto-types/irismod/record/query_grpc_web_pb.js new file mode 100644 index 00000000..71b32ccd --- /dev/null +++ b/src/types/proto-types/irismod/record/query_grpc_web_pb.js @@ -0,0 +1,159 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.record + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var irismod_record_record_pb = require('../../irismod/record/record_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.record = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.record.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.record.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.record.QueryRecordRequest, + * !proto.irismod.record.QueryRecordResponse>} + */ +const methodDescriptor_Query_Record = new grpc.web.MethodDescriptor( + '/irismod.record.Query/Record', + grpc.web.MethodType.UNARY, + proto.irismod.record.QueryRecordRequest, + proto.irismod.record.QueryRecordResponse, + /** + * @param {!proto.irismod.record.QueryRecordRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.record.QueryRecordResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.record.QueryRecordRequest, + * !proto.irismod.record.QueryRecordResponse>} + */ +const methodInfo_Query_Record = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.record.QueryRecordResponse, + /** + * @param {!proto.irismod.record.QueryRecordRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.record.QueryRecordResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.record.QueryRecordRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.record.QueryRecordResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.record.QueryClient.prototype.record = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.record.Query/Record', + request, + metadata || {}, + methodDescriptor_Query_Record, + callback); +}; + + +/** + * @param {!proto.irismod.record.QueryRecordRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.record.QueryPromiseClient.prototype.record = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.record.Query/Record', + request, + metadata || {}, + methodDescriptor_Query_Record); +}; + + +module.exports = proto.irismod.record; + diff --git a/src/types/proto-types/irismod/record/query_pb.js b/src/types/proto-types/irismod/record/query_pb.js new file mode 100644 index 00000000..2ece5146 --- /dev/null +++ b/src/types/proto-types/irismod/record/query_pb.js @@ -0,0 +1,344 @@ +// source: irismod/record/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var irismod_record_record_pb = require('../../irismod/record/record_pb.js'); +goog.object.extend(proto, irismod_record_record_pb); +var google_api_annotations_pb = require('../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +goog.exportSymbol('proto.irismod.record.QueryRecordRequest', null, global); +goog.exportSymbol('proto.irismod.record.QueryRecordResponse', 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.irismod.record.QueryRecordRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.record.QueryRecordRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.record.QueryRecordRequest.displayName = 'proto.irismod.record.QueryRecordRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.record.QueryRecordResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.record.QueryRecordResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.record.QueryRecordResponse.displayName = 'proto.irismod.record.QueryRecordResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.record.QueryRecordRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.record.QueryRecordRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.record.QueryRecordRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.QueryRecordRequest.toObject = function(includeInstance, msg) { + var f, obj = { + recordId: 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.irismod.record.QueryRecordRequest} + */ +proto.irismod.record.QueryRecordRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.record.QueryRecordRequest; + return proto.irismod.record.QueryRecordRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.record.QueryRecordRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.record.QueryRecordRequest} + */ +proto.irismod.record.QueryRecordRequest.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.setRecordId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.record.QueryRecordRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.record.QueryRecordRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.record.QueryRecordRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.QueryRecordRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRecordId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string record_id = 1; + * @return {string} + */ +proto.irismod.record.QueryRecordRequest.prototype.getRecordId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.QueryRecordRequest} returns this + */ +proto.irismod.record.QueryRecordRequest.prototype.setRecordId = 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.irismod.record.QueryRecordResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.record.QueryRecordResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.record.QueryRecordResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.QueryRecordResponse.toObject = function(includeInstance, msg) { + var f, obj = { + record: (f = msg.getRecord()) && irismod_record_record_pb.Record.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.irismod.record.QueryRecordResponse} + */ +proto.irismod.record.QueryRecordResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.record.QueryRecordResponse; + return proto.irismod.record.QueryRecordResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.record.QueryRecordResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.record.QueryRecordResponse} + */ +proto.irismod.record.QueryRecordResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_record_record_pb.Record; + reader.readMessage(value,irismod_record_record_pb.Record.deserializeBinaryFromReader); + msg.setRecord(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.record.QueryRecordResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.record.QueryRecordResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.record.QueryRecordResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.QueryRecordResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRecord(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_record_record_pb.Record.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Record record = 1; + * @return {?proto.irismod.record.Record} + */ +proto.irismod.record.QueryRecordResponse.prototype.getRecord = function() { + return /** @type{?proto.irismod.record.Record} */ ( + jspb.Message.getWrapperField(this, irismod_record_record_pb.Record, 1)); +}; + + +/** + * @param {?proto.irismod.record.Record|undefined} value + * @return {!proto.irismod.record.QueryRecordResponse} returns this +*/ +proto.irismod.record.QueryRecordResponse.prototype.setRecord = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.record.QueryRecordResponse} returns this + */ +proto.irismod.record.QueryRecordResponse.prototype.clearRecord = function() { + return this.setRecord(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.record.QueryRecordResponse.prototype.hasRecord = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.irismod.record); diff --git a/src/types/proto-types/irismod/record/record_pb.js b/src/types/proto-types/irismod/record/record_pb.js new file mode 100644 index 00000000..8381297c --- /dev/null +++ b/src/types/proto-types/irismod/record/record_pb.js @@ -0,0 +1,501 @@ +// source: irismod/record/record.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.irismod.record.Content', null, global); +goog.exportSymbol('proto.irismod.record.Record', 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.irismod.record.Content = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.record.Content, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.record.Content.displayName = 'proto.irismod.record.Content'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.record.Record = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.record.Record.repeatedFields_, null); +}; +goog.inherits(proto.irismod.record.Record, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.record.Record.displayName = 'proto.irismod.record.Record'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.record.Content.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.record.Content.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.record.Content} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.Content.toObject = function(includeInstance, msg) { + var f, obj = { + digest: jspb.Message.getFieldWithDefault(msg, 1, ""), + digestAlgo: jspb.Message.getFieldWithDefault(msg, 2, ""), + uri: jspb.Message.getFieldWithDefault(msg, 3, ""), + meta: 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.irismod.record.Content} + */ +proto.irismod.record.Content.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.record.Content; + return proto.irismod.record.Content.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.record.Content} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.record.Content} + */ +proto.irismod.record.Content.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.setDigest(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDigestAlgo(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setUri(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMeta(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.record.Content.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.record.Content.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.record.Content} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.Content.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDigest(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDigestAlgo(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getUri(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMeta(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string digest = 1; + * @return {string} + */ +proto.irismod.record.Content.prototype.getDigest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.Content} returns this + */ +proto.irismod.record.Content.prototype.setDigest = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string digest_algo = 2; + * @return {string} + */ +proto.irismod.record.Content.prototype.getDigestAlgo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.Content} returns this + */ +proto.irismod.record.Content.prototype.setDigestAlgo = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string uri = 3; + * @return {string} + */ +proto.irismod.record.Content.prototype.getUri = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.Content} returns this + */ +proto.irismod.record.Content.prototype.setUri = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string meta = 4; + * @return {string} + */ +proto.irismod.record.Content.prototype.getMeta = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.Content} returns this + */ +proto.irismod.record.Content.prototype.setMeta = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.record.Record.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.irismod.record.Record.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.record.Record.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.record.Record} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.Record.toObject = function(includeInstance, msg) { + var f, obj = { + txHash: jspb.Message.getFieldWithDefault(msg, 1, ""), + contentsList: jspb.Message.toObjectList(msg.getContentsList(), + proto.irismod.record.Content.toObject, includeInstance), + creator: 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.irismod.record.Record} + */ +proto.irismod.record.Record.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.record.Record; + return proto.irismod.record.Record.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.record.Record} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.record.Record} + */ +proto.irismod.record.Record.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.setTxHash(value); + break; + case 2: + var value = new proto.irismod.record.Content; + reader.readMessage(value,proto.irismod.record.Content.deserializeBinaryFromReader); + msg.addContents(value); + break; + case 3: + 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.irismod.record.Record.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.record.Record.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.record.Record} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.Record.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxHash(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getContentsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.irismod.record.Content.serializeBinaryToWriter + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string tx_hash = 1; + * @return {string} + */ +proto.irismod.record.Record.prototype.getTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.Record} returns this + */ +proto.irismod.record.Record.prototype.setTxHash = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated Content contents = 2; + * @return {!Array} + */ +proto.irismod.record.Record.prototype.getContentsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.record.Content, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.record.Record} returns this +*/ +proto.irismod.record.Record.prototype.setContentsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.record.Content=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.record.Content} + */ +proto.irismod.record.Record.prototype.addContents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.record.Content, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.record.Record} returns this + */ +proto.irismod.record.Record.prototype.clearContentsList = function() { + return this.setContentsList([]); +}; + + +/** + * optional string creator = 3; + * @return {string} + */ +proto.irismod.record.Record.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.Record} returns this + */ +proto.irismod.record.Record.prototype.setCreator = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.irismod.record); diff --git a/src/types/proto-types/irismod/record/tx_grpc_web_pb.js b/src/types/proto-types/irismod/record/tx_grpc_web_pb.js new file mode 100644 index 00000000..04174a97 --- /dev/null +++ b/src/types/proto-types/irismod/record/tx_grpc_web_pb.js @@ -0,0 +1,159 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.record + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var irismod_record_record_pb = require('../../irismod/record/record_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.record = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.record.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.record.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.record.MsgCreateRecord, + * !proto.irismod.record.MsgCreateRecordResponse>} + */ +const methodDescriptor_Msg_CreateRecord = new grpc.web.MethodDescriptor( + '/irismod.record.Msg/CreateRecord', + grpc.web.MethodType.UNARY, + proto.irismod.record.MsgCreateRecord, + proto.irismod.record.MsgCreateRecordResponse, + /** + * @param {!proto.irismod.record.MsgCreateRecord} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.record.MsgCreateRecordResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.record.MsgCreateRecord, + * !proto.irismod.record.MsgCreateRecordResponse>} + */ +const methodInfo_Msg_CreateRecord = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.record.MsgCreateRecordResponse, + /** + * @param {!proto.irismod.record.MsgCreateRecord} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.record.MsgCreateRecordResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.record.MsgCreateRecord} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.record.MsgCreateRecordResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.record.MsgClient.prototype.createRecord = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.record.Msg/CreateRecord', + request, + metadata || {}, + methodDescriptor_Msg_CreateRecord, + callback); +}; + + +/** + * @param {!proto.irismod.record.MsgCreateRecord} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.record.MsgPromiseClient.prototype.createRecord = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.record.Msg/CreateRecord', + request, + metadata || {}, + methodDescriptor_Msg_CreateRecord); +}; + + +module.exports = proto.irismod.record; + diff --git a/src/types/proto-types/irismod/record/tx_pb.js b/src/types/proto-types/irismod/record/tx_pb.js new file mode 100644 index 00000000..8e45bd7c --- /dev/null +++ b/src/types/proto-types/irismod/record/tx_pb.js @@ -0,0 +1,383 @@ +// source: irismod/record/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +var irismod_record_record_pb = require('../../irismod/record/record_pb.js'); +goog.object.extend(proto, irismod_record_record_pb); +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js'); +goog.object.extend(proto, gogoproto_gogo_pb); +goog.exportSymbol('proto.irismod.record.MsgCreateRecord', null, global); +goog.exportSymbol('proto.irismod.record.MsgCreateRecordResponse', 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.irismod.record.MsgCreateRecord = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.record.MsgCreateRecord.repeatedFields_, null); +}; +goog.inherits(proto.irismod.record.MsgCreateRecord, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.record.MsgCreateRecord.displayName = 'proto.irismod.record.MsgCreateRecord'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.record.MsgCreateRecordResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.record.MsgCreateRecordResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.record.MsgCreateRecordResponse.displayName = 'proto.irismod.record.MsgCreateRecordResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.record.MsgCreateRecord.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.irismod.record.MsgCreateRecord.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.record.MsgCreateRecord.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.record.MsgCreateRecord} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.MsgCreateRecord.toObject = function(includeInstance, msg) { + var f, obj = { + contentsList: jspb.Message.toObjectList(msg.getContentsList(), + irismod_record_record_pb.Content.toObject, includeInstance), + 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.irismod.record.MsgCreateRecord} + */ +proto.irismod.record.MsgCreateRecord.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.record.MsgCreateRecord; + return proto.irismod.record.MsgCreateRecord.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.record.MsgCreateRecord} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.record.MsgCreateRecord} + */ +proto.irismod.record.MsgCreateRecord.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_record_record_pb.Content; + reader.readMessage(value,irismod_record_record_pb.Content.deserializeBinaryFromReader); + msg.addContents(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.irismod.record.MsgCreateRecord.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.record.MsgCreateRecord.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.record.MsgCreateRecord} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.MsgCreateRecord.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getContentsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_record_record_pb.Content.serializeBinaryToWriter + ); + } + f = message.getCreator(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * repeated Content contents = 1; + * @return {!Array} + */ +proto.irismod.record.MsgCreateRecord.prototype.getContentsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_record_record_pb.Content, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.record.MsgCreateRecord} returns this +*/ +proto.irismod.record.MsgCreateRecord.prototype.setContentsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.record.Content=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.record.Content} + */ +proto.irismod.record.MsgCreateRecord.prototype.addContents = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.record.Content, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.record.MsgCreateRecord} returns this + */ +proto.irismod.record.MsgCreateRecord.prototype.clearContentsList = function() { + return this.setContentsList([]); +}; + + +/** + * optional string creator = 2; + * @return {string} + */ +proto.irismod.record.MsgCreateRecord.prototype.getCreator = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.MsgCreateRecord} returns this + */ +proto.irismod.record.MsgCreateRecord.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.irismod.record.MsgCreateRecordResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.record.MsgCreateRecordResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.record.MsgCreateRecordResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.MsgCreateRecordResponse.toObject = function(includeInstance, msg) { + var f, obj = { + id: 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.irismod.record.MsgCreateRecordResponse} + */ +proto.irismod.record.MsgCreateRecordResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.record.MsgCreateRecordResponse; + return proto.irismod.record.MsgCreateRecordResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.record.MsgCreateRecordResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.record.MsgCreateRecordResponse} + */ +proto.irismod.record.MsgCreateRecordResponse.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.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.record.MsgCreateRecordResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.record.MsgCreateRecordResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.record.MsgCreateRecordResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.record.MsgCreateRecordResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.record.MsgCreateRecordResponse.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.record.MsgCreateRecordResponse} returns this + */ +proto.irismod.record.MsgCreateRecordResponse.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +goog.object.extend(exports, proto.irismod.record); diff --git a/src/types/proto-types/irismod/service/genesis_pb.js b/src/types/proto-types/irismod/service/genesis_pb.js new file mode 100644 index 00000000..dc92e95d --- /dev/null +++ b/src/types/proto-types/irismod/service/genesis_pb.js @@ -0,0 +1,371 @@ +// source: irismod/service/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 irismod_service_service_pb = require('../../irismod/service/service_pb.js'); +goog.object.extend(proto, irismod_service_service_pb); +goog.exportSymbol('proto.irismod.service.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.irismod.service.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.GenesisState.displayName = 'proto.irismod.service.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.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.irismod.service.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.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.irismod.service.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && irismod_service_service_pb.Params.toObject(includeInstance, f), + definitionsList: jspb.Message.toObjectList(msg.getDefinitionsList(), + irismod_service_service_pb.ServiceDefinition.toObject, includeInstance), + bindingsList: jspb.Message.toObjectList(msg.getBindingsList(), + irismod_service_service_pb.ServiceBinding.toObject, includeInstance), + withdrawAddressesMap: (f = msg.getWithdrawAddressesMap()) ? f.toObject(includeInstance, undefined) : [], + requestContextsMap: (f = msg.getRequestContextsMap()) ? f.toObject(includeInstance, proto.irismod.service.RequestContext.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.irismod.service.GenesisState} + */ +proto.irismod.service.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.GenesisState; + return proto.irismod.service.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.GenesisState} + */ +proto.irismod.service.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.Params; + reader.readMessage(value,irismod_service_service_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new irismod_service_service_pb.ServiceDefinition; + reader.readMessage(value,irismod_service_service_pb.ServiceDefinition.deserializeBinaryFromReader); + msg.addDefinitions(value); + break; + case 3: + var value = new irismod_service_service_pb.ServiceBinding; + reader.readMessage(value,irismod_service_service_pb.ServiceBinding.deserializeBinaryFromReader); + msg.addBindings(value); + break; + case 4: + var value = msg.getWithdrawAddressesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readBytes, null, "", ""); + }); + break; + case 5: + var value = msg.getRequestContextsMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.irismod.service.RequestContext.deserializeBinaryFromReader, "", new proto.irismod.service.RequestContext()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.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.irismod.service.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_service_service_pb.Params.serializeBinaryToWriter + ); + } + f = message.getDefinitionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + irismod_service_service_pb.ServiceDefinition.serializeBinaryToWriter + ); + } + f = message.getBindingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + irismod_service_service_pb.ServiceBinding.serializeBinaryToWriter + ); + } + f = message.getWithdrawAddressesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeBytes); + } + f = message.getRequestContextsMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.irismod.service.RequestContext.serializeBinaryToWriter); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.irismod.service.Params} + */ +proto.irismod.service.GenesisState.prototype.getParams = function() { + return /** @type{?proto.irismod.service.Params} */ ( + jspb.Message.getWrapperField(this, irismod_service_service_pb.Params, 1)); +}; + + +/** + * @param {?proto.irismod.service.Params|undefined} value + * @return {!proto.irismod.service.GenesisState} returns this +*/ +proto.irismod.service.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.GenesisState} returns this + */ +proto.irismod.service.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated ServiceDefinition definitions = 2; + * @return {!Array} + */ +proto.irismod.service.GenesisState.prototype.getDefinitionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_service_service_pb.ServiceDefinition, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.GenesisState} returns this +*/ +proto.irismod.service.GenesisState.prototype.setDefinitionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.service.ServiceDefinition=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.service.ServiceDefinition} + */ +proto.irismod.service.GenesisState.prototype.addDefinitions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.service.ServiceDefinition, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.GenesisState} returns this + */ +proto.irismod.service.GenesisState.prototype.clearDefinitionsList = function() { + return this.setDefinitionsList([]); +}; + + +/** + * repeated ServiceBinding bindings = 3; + * @return {!Array} + */ +proto.irismod.service.GenesisState.prototype.getBindingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_service_service_pb.ServiceBinding, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.GenesisState} returns this +*/ +proto.irismod.service.GenesisState.prototype.setBindingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.irismod.service.ServiceBinding=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.service.ServiceBinding} + */ +proto.irismod.service.GenesisState.prototype.addBindings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.irismod.service.ServiceBinding, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.GenesisState} returns this + */ +proto.irismod.service.GenesisState.prototype.clearBindingsList = function() { + return this.setBindingsList([]); +}; + + +/** + * map withdraw_addresses = 4; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.irismod.service.GenesisState.prototype.getWithdrawAddressesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 4, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.irismod.service.GenesisState} returns this + */ +proto.irismod.service.GenesisState.prototype.clearWithdrawAddressesMap = function() { + this.getWithdrawAddressesMap().clear(); + return this;}; + + +/** + * map request_contexts = 5; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.irismod.service.GenesisState.prototype.getRequestContextsMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 5, opt_noLazyCreate, + proto.irismod.service.RequestContext)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.irismod.service.GenesisState} returns this + */ +proto.irismod.service.GenesisState.prototype.clearRequestContextsMap = function() { + this.getRequestContextsMap().clear(); + return this;}; + + +goog.object.extend(exports, proto.irismod.service); diff --git a/src/types/proto-types/irismod/service/query_grpc_web_pb.js b/src/types/proto-types/irismod/service/query_grpc_web_pb.js new file mode 100644 index 00000000..dbc6dccd --- /dev/null +++ b/src/types/proto-types/irismod/service/query_grpc_web_pb.js @@ -0,0 +1,1125 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.service + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var irismod_service_service_pb = require('../../irismod/service/service_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.service = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.service.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.service.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryDefinitionRequest, + * !proto.irismod.service.QueryDefinitionResponse>} + */ +const methodDescriptor_Query_Definition = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Definition', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryDefinitionRequest, + proto.irismod.service.QueryDefinitionResponse, + /** + * @param {!proto.irismod.service.QueryDefinitionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryDefinitionResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryDefinitionRequest, + * !proto.irismod.service.QueryDefinitionResponse>} + */ +const methodInfo_Query_Definition = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryDefinitionResponse, + /** + * @param {!proto.irismod.service.QueryDefinitionRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryDefinitionResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryDefinitionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryDefinitionResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.definition = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Definition', + request, + metadata || {}, + methodDescriptor_Query_Definition, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryDefinitionRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.definition = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Definition', + request, + metadata || {}, + methodDescriptor_Query_Definition); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryBindingRequest, + * !proto.irismod.service.QueryBindingResponse>} + */ +const methodDescriptor_Query_Binding = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Binding', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryBindingRequest, + proto.irismod.service.QueryBindingResponse, + /** + * @param {!proto.irismod.service.QueryBindingRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryBindingResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryBindingRequest, + * !proto.irismod.service.QueryBindingResponse>} + */ +const methodInfo_Query_Binding = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryBindingResponse, + /** + * @param {!proto.irismod.service.QueryBindingRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryBindingResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryBindingRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryBindingResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.binding = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Binding', + request, + metadata || {}, + methodDescriptor_Query_Binding, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryBindingRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.binding = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Binding', + request, + metadata || {}, + methodDescriptor_Query_Binding); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryBindingsRequest, + * !proto.irismod.service.QueryBindingsResponse>} + */ +const methodDescriptor_Query_Bindings = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Bindings', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryBindingsRequest, + proto.irismod.service.QueryBindingsResponse, + /** + * @param {!proto.irismod.service.QueryBindingsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryBindingsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryBindingsRequest, + * !proto.irismod.service.QueryBindingsResponse>} + */ +const methodInfo_Query_Bindings = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryBindingsResponse, + /** + * @param {!proto.irismod.service.QueryBindingsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryBindingsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryBindingsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryBindingsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.bindings = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Bindings', + request, + metadata || {}, + methodDescriptor_Query_Bindings, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryBindingsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.bindings = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Bindings', + request, + metadata || {}, + methodDescriptor_Query_Bindings); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryWithdrawAddressRequest, + * !proto.irismod.service.QueryWithdrawAddressResponse>} + */ +const methodDescriptor_Query_WithdrawAddress = new grpc.web.MethodDescriptor( + '/irismod.service.Query/WithdrawAddress', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryWithdrawAddressRequest, + proto.irismod.service.QueryWithdrawAddressResponse, + /** + * @param {!proto.irismod.service.QueryWithdrawAddressRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryWithdrawAddressResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryWithdrawAddressRequest, + * !proto.irismod.service.QueryWithdrawAddressResponse>} + */ +const methodInfo_Query_WithdrawAddress = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryWithdrawAddressResponse, + /** + * @param {!proto.irismod.service.QueryWithdrawAddressRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryWithdrawAddressResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryWithdrawAddressRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryWithdrawAddressResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.withdrawAddress = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/WithdrawAddress', + request, + metadata || {}, + methodDescriptor_Query_WithdrawAddress, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryWithdrawAddressRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.withdrawAddress = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/WithdrawAddress', + request, + metadata || {}, + methodDescriptor_Query_WithdrawAddress); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryRequestContextRequest, + * !proto.irismod.service.QueryRequestContextResponse>} + */ +const methodDescriptor_Query_RequestContext = new grpc.web.MethodDescriptor( + '/irismod.service.Query/RequestContext', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryRequestContextRequest, + proto.irismod.service.QueryRequestContextResponse, + /** + * @param {!proto.irismod.service.QueryRequestContextRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryRequestContextResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryRequestContextRequest, + * !proto.irismod.service.QueryRequestContextResponse>} + */ +const methodInfo_Query_RequestContext = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryRequestContextResponse, + /** + * @param {!proto.irismod.service.QueryRequestContextRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryRequestContextResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryRequestContextRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryRequestContextResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.requestContext = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/RequestContext', + request, + metadata || {}, + methodDescriptor_Query_RequestContext, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryRequestContextRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.requestContext = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/RequestContext', + request, + metadata || {}, + methodDescriptor_Query_RequestContext); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryRequestRequest, + * !proto.irismod.service.QueryRequestResponse>} + */ +const methodDescriptor_Query_Request = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Request', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryRequestRequest, + proto.irismod.service.QueryRequestResponse, + /** + * @param {!proto.irismod.service.QueryRequestRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryRequestResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryRequestRequest, + * !proto.irismod.service.QueryRequestResponse>} + */ +const methodInfo_Query_Request = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryRequestResponse, + /** + * @param {!proto.irismod.service.QueryRequestRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryRequestResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryRequestRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryRequestResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.request = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Request', + request, + metadata || {}, + methodDescriptor_Query_Request, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryRequestRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.request = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Request', + request, + metadata || {}, + methodDescriptor_Query_Request); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryRequestsRequest, + * !proto.irismod.service.QueryRequestsResponse>} + */ +const methodDescriptor_Query_Requests = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Requests', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryRequestsRequest, + proto.irismod.service.QueryRequestsResponse, + /** + * @param {!proto.irismod.service.QueryRequestsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryRequestsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryRequestsRequest, + * !proto.irismod.service.QueryRequestsResponse>} + */ +const methodInfo_Query_Requests = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryRequestsResponse, + /** + * @param {!proto.irismod.service.QueryRequestsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryRequestsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryRequestsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryRequestsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.requests = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Requests', + request, + metadata || {}, + methodDescriptor_Query_Requests, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryRequestsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.requests = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Requests', + request, + metadata || {}, + methodDescriptor_Query_Requests); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryRequestsByReqCtxRequest, + * !proto.irismod.service.QueryRequestsByReqCtxResponse>} + */ +const methodDescriptor_Query_RequestsByReqCtx = new grpc.web.MethodDescriptor( + '/irismod.service.Query/RequestsByReqCtx', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryRequestsByReqCtxRequest, + proto.irismod.service.QueryRequestsByReqCtxResponse, + /** + * @param {!proto.irismod.service.QueryRequestsByReqCtxRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryRequestsByReqCtxResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryRequestsByReqCtxRequest, + * !proto.irismod.service.QueryRequestsByReqCtxResponse>} + */ +const methodInfo_Query_RequestsByReqCtx = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryRequestsByReqCtxResponse, + /** + * @param {!proto.irismod.service.QueryRequestsByReqCtxRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryRequestsByReqCtxResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryRequestsByReqCtxRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryRequestsByReqCtxResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.requestsByReqCtx = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/RequestsByReqCtx', + request, + metadata || {}, + methodDescriptor_Query_RequestsByReqCtx, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryRequestsByReqCtxRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.requestsByReqCtx = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/RequestsByReqCtx', + request, + metadata || {}, + methodDescriptor_Query_RequestsByReqCtx); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryResponseRequest, + * !proto.irismod.service.QueryResponseResponse>} + */ +const methodDescriptor_Query_Response = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Response', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryResponseRequest, + proto.irismod.service.QueryResponseResponse, + /** + * @param {!proto.irismod.service.QueryResponseRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryResponseResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryResponseRequest, + * !proto.irismod.service.QueryResponseResponse>} + */ +const methodInfo_Query_Response = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryResponseResponse, + /** + * @param {!proto.irismod.service.QueryResponseRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryResponseResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryResponseRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryResponseResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.response = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Response', + request, + metadata || {}, + methodDescriptor_Query_Response, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryResponseRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.response = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Response', + request, + metadata || {}, + methodDescriptor_Query_Response); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryResponsesRequest, + * !proto.irismod.service.QueryResponsesResponse>} + */ +const methodDescriptor_Query_Responses = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Responses', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryResponsesRequest, + proto.irismod.service.QueryResponsesResponse, + /** + * @param {!proto.irismod.service.QueryResponsesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryResponsesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryResponsesRequest, + * !proto.irismod.service.QueryResponsesResponse>} + */ +const methodInfo_Query_Responses = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryResponsesResponse, + /** + * @param {!proto.irismod.service.QueryResponsesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryResponsesResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryResponsesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryResponsesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.responses = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Responses', + request, + metadata || {}, + methodDescriptor_Query_Responses, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryResponsesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.responses = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Responses', + request, + metadata || {}, + methodDescriptor_Query_Responses); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryEarnedFeesRequest, + * !proto.irismod.service.QueryEarnedFeesResponse>} + */ +const methodDescriptor_Query_EarnedFees = new grpc.web.MethodDescriptor( + '/irismod.service.Query/EarnedFees', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryEarnedFeesRequest, + proto.irismod.service.QueryEarnedFeesResponse, + /** + * @param {!proto.irismod.service.QueryEarnedFeesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryEarnedFeesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryEarnedFeesRequest, + * !proto.irismod.service.QueryEarnedFeesResponse>} + */ +const methodInfo_Query_EarnedFees = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryEarnedFeesResponse, + /** + * @param {!proto.irismod.service.QueryEarnedFeesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryEarnedFeesResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryEarnedFeesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryEarnedFeesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.earnedFees = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/EarnedFees', + request, + metadata || {}, + methodDescriptor_Query_EarnedFees, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryEarnedFeesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.earnedFees = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/EarnedFees', + request, + metadata || {}, + methodDescriptor_Query_EarnedFees); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QuerySchemaRequest, + * !proto.irismod.service.QuerySchemaResponse>} + */ +const methodDescriptor_Query_Schema = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Schema', + grpc.web.MethodType.UNARY, + proto.irismod.service.QuerySchemaRequest, + proto.irismod.service.QuerySchemaResponse, + /** + * @param {!proto.irismod.service.QuerySchemaRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QuerySchemaResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QuerySchemaRequest, + * !proto.irismod.service.QuerySchemaResponse>} + */ +const methodInfo_Query_Schema = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QuerySchemaResponse, + /** + * @param {!proto.irismod.service.QuerySchemaRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QuerySchemaResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QuerySchemaRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QuerySchemaResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.schema = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Schema', + request, + metadata || {}, + methodDescriptor_Query_Schema, + callback); +}; + + +/** + * @param {!proto.irismod.service.QuerySchemaRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.schema = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Schema', + request, + metadata || {}, + methodDescriptor_Query_Schema); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.QueryParamsRequest, + * !proto.irismod.service.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/irismod.service.Query/Params', + grpc.web.MethodType.UNARY, + proto.irismod.service.QueryParamsRequest, + proto.irismod.service.QueryParamsResponse, + /** + * @param {!proto.irismod.service.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.QueryParamsRequest, + * !proto.irismod.service.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.QueryParamsResponse, + /** + * @param {!proto.irismod.service.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.irismod.service.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +module.exports = proto.irismod.service; + diff --git a/src/types/proto-types/irismod/service/query_pb.js b/src/types/proto-types/irismod/service/query_pb.js new file mode 100644 index 00000000..dde83401 --- /dev/null +++ b/src/types/proto-types/irismod/service/query_pb.js @@ -0,0 +1,4425 @@ +// source: irismod/service/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 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 irismod_service_service_pb = require('../../irismod/service/service_pb.js'); +goog.object.extend(proto, irismod_service_service_pb); +goog.exportSymbol('proto.irismod.service.QueryBindingRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryBindingResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryBindingsRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryBindingsResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryDefinitionRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryDefinitionResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryEarnedFeesRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryEarnedFeesResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryParamsRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryParamsResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryRequestContextRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryRequestContextResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryRequestRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryRequestResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryRequestsByReqCtxRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryRequestsByReqCtxResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryRequestsRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryRequestsResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryResponseRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryResponseResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryResponsesRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryResponsesResponse', null, global); +goog.exportSymbol('proto.irismod.service.QuerySchemaRequest', null, global); +goog.exportSymbol('proto.irismod.service.QuerySchemaResponse', null, global); +goog.exportSymbol('proto.irismod.service.QueryWithdrawAddressRequest', null, global); +goog.exportSymbol('proto.irismod.service.QueryWithdrawAddressResponse', 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.irismod.service.QueryDefinitionRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryDefinitionRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryDefinitionRequest.displayName = 'proto.irismod.service.QueryDefinitionRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryDefinitionResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryDefinitionResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryDefinitionResponse.displayName = 'proto.irismod.service.QueryDefinitionResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryBindingRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryBindingRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryBindingRequest.displayName = 'proto.irismod.service.QueryBindingRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryBindingResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryBindingResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryBindingResponse.displayName = 'proto.irismod.service.QueryBindingResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryBindingsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryBindingsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryBindingsRequest.displayName = 'proto.irismod.service.QueryBindingsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryBindingsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.QueryBindingsResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.QueryBindingsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryBindingsResponse.displayName = 'proto.irismod.service.QueryBindingsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryWithdrawAddressRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryWithdrawAddressRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryWithdrawAddressRequest.displayName = 'proto.irismod.service.QueryWithdrawAddressRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryWithdrawAddressResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryWithdrawAddressResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryWithdrawAddressResponse.displayName = 'proto.irismod.service.QueryWithdrawAddressResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryRequestContextRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryRequestContextRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryRequestContextRequest.displayName = 'proto.irismod.service.QueryRequestContextRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryRequestContextResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryRequestContextResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryRequestContextResponse.displayName = 'proto.irismod.service.QueryRequestContextResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryRequestRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryRequestRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryRequestRequest.displayName = 'proto.irismod.service.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.irismod.service.QueryRequestResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryRequestResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryRequestResponse.displayName = 'proto.irismod.service.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.irismod.service.QueryRequestsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryRequestsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryRequestsRequest.displayName = 'proto.irismod.service.QueryRequestsRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryRequestsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.QueryRequestsResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.QueryRequestsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryRequestsResponse.displayName = 'proto.irismod.service.QueryRequestsResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryRequestsByReqCtxRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryRequestsByReqCtxRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryRequestsByReqCtxRequest.displayName = 'proto.irismod.service.QueryRequestsByReqCtxRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryRequestsByReqCtxResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.QueryRequestsByReqCtxResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.QueryRequestsByReqCtxResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryRequestsByReqCtxResponse.displayName = 'proto.irismod.service.QueryRequestsByReqCtxResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryResponseRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryResponseRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryResponseRequest.displayName = 'proto.irismod.service.QueryResponseRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryResponseResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryResponseResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryResponseResponse.displayName = 'proto.irismod.service.QueryResponseResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryResponsesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryResponsesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryResponsesRequest.displayName = 'proto.irismod.service.QueryResponsesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryResponsesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.QueryResponsesResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.QueryResponsesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryResponsesResponse.displayName = 'proto.irismod.service.QueryResponsesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryEarnedFeesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryEarnedFeesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryEarnedFeesRequest.displayName = 'proto.irismod.service.QueryEarnedFeesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryEarnedFeesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.QueryEarnedFeesResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.QueryEarnedFeesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryEarnedFeesResponse.displayName = 'proto.irismod.service.QueryEarnedFeesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QuerySchemaRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QuerySchemaRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QuerySchemaRequest.displayName = 'proto.irismod.service.QuerySchemaRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QuerySchemaResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QuerySchemaResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QuerySchemaResponse.displayName = 'proto.irismod.service.QuerySchemaResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryParamsRequest.displayName = 'proto.irismod.service.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.irismod.service.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.QueryParamsResponse.displayName = 'proto.irismod.service.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.irismod.service.QueryDefinitionRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryDefinitionRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryDefinitionRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryDefinitionRequest.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: 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.irismod.service.QueryDefinitionRequest} + */ +proto.irismod.service.QueryDefinitionRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryDefinitionRequest; + return proto.irismod.service.QueryDefinitionRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryDefinitionRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryDefinitionRequest} + */ +proto.irismod.service.QueryDefinitionRequest.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.setServiceName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryDefinitionRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryDefinitionRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryDefinitionRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryDefinitionRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.QueryDefinitionRequest.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryDefinitionRequest} returns this + */ +proto.irismod.service.QueryDefinitionRequest.prototype.setServiceName = 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.irismod.service.QueryDefinitionResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryDefinitionResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryDefinitionResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryDefinitionResponse.toObject = function(includeInstance, msg) { + var f, obj = { + serviceDefinition: (f = msg.getServiceDefinition()) && irismod_service_service_pb.ServiceDefinition.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.irismod.service.QueryDefinitionResponse} + */ +proto.irismod.service.QueryDefinitionResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryDefinitionResponse; + return proto.irismod.service.QueryDefinitionResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryDefinitionResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryDefinitionResponse} + */ +proto.irismod.service.QueryDefinitionResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.ServiceDefinition; + reader.readMessage(value,irismod_service_service_pb.ServiceDefinition.deserializeBinaryFromReader); + msg.setServiceDefinition(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryDefinitionResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryDefinitionResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryDefinitionResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryDefinitionResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceDefinition(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_service_service_pb.ServiceDefinition.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ServiceDefinition service_definition = 1; + * @return {?proto.irismod.service.ServiceDefinition} + */ +proto.irismod.service.QueryDefinitionResponse.prototype.getServiceDefinition = function() { + return /** @type{?proto.irismod.service.ServiceDefinition} */ ( + jspb.Message.getWrapperField(this, irismod_service_service_pb.ServiceDefinition, 1)); +}; + + +/** + * @param {?proto.irismod.service.ServiceDefinition|undefined} value + * @return {!proto.irismod.service.QueryDefinitionResponse} returns this +*/ +proto.irismod.service.QueryDefinitionResponse.prototype.setServiceDefinition = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryDefinitionResponse} returns this + */ +proto.irismod.service.QueryDefinitionResponse.prototype.clearServiceDefinition = function() { + return this.setServiceDefinition(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryDefinitionResponse.prototype.hasServiceDefinition = 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.irismod.service.QueryBindingRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryBindingRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryBindingRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryBindingRequest.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: 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.irismod.service.QueryBindingRequest} + */ +proto.irismod.service.QueryBindingRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryBindingRequest; + return proto.irismod.service.QueryBindingRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryBindingRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryBindingRequest} + */ +proto.irismod.service.QueryBindingRequest.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryBindingRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryBindingRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryBindingRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryBindingRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.QueryBindingRequest.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryBindingRequest} returns this + */ +proto.irismod.service.QueryBindingRequest.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.QueryBindingRequest.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryBindingRequest} returns this + */ +proto.irismod.service.QueryBindingRequest.prototype.setProvider = 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.irismod.service.QueryBindingResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryBindingResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryBindingResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryBindingResponse.toObject = function(includeInstance, msg) { + var f, obj = { + serviceBinding: (f = msg.getServiceBinding()) && irismod_service_service_pb.ServiceBinding.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.irismod.service.QueryBindingResponse} + */ +proto.irismod.service.QueryBindingResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryBindingResponse; + return proto.irismod.service.QueryBindingResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryBindingResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryBindingResponse} + */ +proto.irismod.service.QueryBindingResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.ServiceBinding; + reader.readMessage(value,irismod_service_service_pb.ServiceBinding.deserializeBinaryFromReader); + msg.setServiceBinding(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryBindingResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryBindingResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryBindingResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryBindingResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceBinding(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_service_service_pb.ServiceBinding.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ServiceBinding service_binding = 1; + * @return {?proto.irismod.service.ServiceBinding} + */ +proto.irismod.service.QueryBindingResponse.prototype.getServiceBinding = function() { + return /** @type{?proto.irismod.service.ServiceBinding} */ ( + jspb.Message.getWrapperField(this, irismod_service_service_pb.ServiceBinding, 1)); +}; + + +/** + * @param {?proto.irismod.service.ServiceBinding|undefined} value + * @return {!proto.irismod.service.QueryBindingResponse} returns this +*/ +proto.irismod.service.QueryBindingResponse.prototype.setServiceBinding = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryBindingResponse} returns this + */ +proto.irismod.service.QueryBindingResponse.prototype.clearServiceBinding = function() { + return this.setServiceBinding(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryBindingResponse.prototype.hasServiceBinding = 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.irismod.service.QueryBindingsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryBindingsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryBindingsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryBindingsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + owner: 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.irismod.service.QueryBindingsRequest} + */ +proto.irismod.service.QueryBindingsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryBindingsRequest; + return proto.irismod.service.QueryBindingsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryBindingsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryBindingsRequest} + */ +proto.irismod.service.QueryBindingsRequest.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryBindingsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryBindingsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryBindingsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryBindingsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.QueryBindingsRequest.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryBindingsRequest} returns this + */ +proto.irismod.service.QueryBindingsRequest.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string owner = 2; + * @return {string} + */ +proto.irismod.service.QueryBindingsRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryBindingsRequest} returns this + */ +proto.irismod.service.QueryBindingsRequest.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.QueryBindingsResponse.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.irismod.service.QueryBindingsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryBindingsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryBindingsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryBindingsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + serviceBindingsList: jspb.Message.toObjectList(msg.getServiceBindingsList(), + irismod_service_service_pb.ServiceBinding.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.irismod.service.QueryBindingsResponse} + */ +proto.irismod.service.QueryBindingsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryBindingsResponse; + return proto.irismod.service.QueryBindingsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryBindingsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryBindingsResponse} + */ +proto.irismod.service.QueryBindingsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.ServiceBinding; + reader.readMessage(value,irismod_service_service_pb.ServiceBinding.deserializeBinaryFromReader); + msg.addServiceBindings(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryBindingsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryBindingsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryBindingsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryBindingsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceBindingsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_service_service_pb.ServiceBinding.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ServiceBinding service_bindings = 1; + * @return {!Array} + */ +proto.irismod.service.QueryBindingsResponse.prototype.getServiceBindingsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_service_service_pb.ServiceBinding, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.QueryBindingsResponse} returns this +*/ +proto.irismod.service.QueryBindingsResponse.prototype.setServiceBindingsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.service.ServiceBinding=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.service.ServiceBinding} + */ +proto.irismod.service.QueryBindingsResponse.prototype.addServiceBindings = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.service.ServiceBinding, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.QueryBindingsResponse} returns this + */ +proto.irismod.service.QueryBindingsResponse.prototype.clearServiceBindingsList = function() { + return this.setServiceBindingsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.service.QueryWithdrawAddressRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryWithdrawAddressRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryWithdrawAddressRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryWithdrawAddressRequest.toObject = function(includeInstance, msg) { + var f, obj = { + owner: 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.irismod.service.QueryWithdrawAddressRequest} + */ +proto.irismod.service.QueryWithdrawAddressRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryWithdrawAddressRequest; + return proto.irismod.service.QueryWithdrawAddressRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryWithdrawAddressRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryWithdrawAddressRequest} + */ +proto.irismod.service.QueryWithdrawAddressRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryWithdrawAddressRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryWithdrawAddressRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryWithdrawAddressRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryWithdrawAddressRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string owner = 1; + * @return {string} + */ +proto.irismod.service.QueryWithdrawAddressRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryWithdrawAddressRequest} returns this + */ +proto.irismod.service.QueryWithdrawAddressRequest.prototype.setOwner = 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.irismod.service.QueryWithdrawAddressResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryWithdrawAddressResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryWithdrawAddressResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryWithdrawAddressResponse.toObject = function(includeInstance, msg) { + var f, obj = { + withdrawAddress: 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.irismod.service.QueryWithdrawAddressResponse} + */ +proto.irismod.service.QueryWithdrawAddressResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryWithdrawAddressResponse; + return proto.irismod.service.QueryWithdrawAddressResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryWithdrawAddressResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryWithdrawAddressResponse} + */ +proto.irismod.service.QueryWithdrawAddressResponse.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.setWithdrawAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryWithdrawAddressResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryWithdrawAddressResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryWithdrawAddressResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryWithdrawAddressResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWithdrawAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string withdraw_address = 1; + * @return {string} + */ +proto.irismod.service.QueryWithdrawAddressResponse.prototype.getWithdrawAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryWithdrawAddressResponse} returns this + */ +proto.irismod.service.QueryWithdrawAddressResponse.prototype.setWithdrawAddress = 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.irismod.service.QueryRequestContextRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryRequestContextRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryRequestContextRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestContextRequest.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: 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.irismod.service.QueryRequestContextRequest} + */ +proto.irismod.service.QueryRequestContextRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryRequestContextRequest; + return proto.irismod.service.QueryRequestContextRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryRequestContextRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryRequestContextRequest} + */ +proto.irismod.service.QueryRequestContextRequest.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.setRequestContextId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryRequestContextRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryRequestContextRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryRequestContextRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestContextRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.QueryRequestContextRequest.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryRequestContextRequest} returns this + */ +proto.irismod.service.QueryRequestContextRequest.prototype.setRequestContextId = 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.irismod.service.QueryRequestContextResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryRequestContextResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryRequestContextResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestContextResponse.toObject = function(includeInstance, msg) { + var f, obj = { + requestContext: (f = msg.getRequestContext()) && irismod_service_service_pb.RequestContext.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.irismod.service.QueryRequestContextResponse} + */ +proto.irismod.service.QueryRequestContextResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryRequestContextResponse; + return proto.irismod.service.QueryRequestContextResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryRequestContextResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryRequestContextResponse} + */ +proto.irismod.service.QueryRequestContextResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.RequestContext; + reader.readMessage(value,irismod_service_service_pb.RequestContext.deserializeBinaryFromReader); + msg.setRequestContext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryRequestContextResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryRequestContextResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryRequestContextResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestContextResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContext(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_service_service_pb.RequestContext.serializeBinaryToWriter + ); + } +}; + + +/** + * optional RequestContext request_context = 1; + * @return {?proto.irismod.service.RequestContext} + */ +proto.irismod.service.QueryRequestContextResponse.prototype.getRequestContext = function() { + return /** @type{?proto.irismod.service.RequestContext} */ ( + jspb.Message.getWrapperField(this, irismod_service_service_pb.RequestContext, 1)); +}; + + +/** + * @param {?proto.irismod.service.RequestContext|undefined} value + * @return {!proto.irismod.service.QueryRequestContextResponse} returns this +*/ +proto.irismod.service.QueryRequestContextResponse.prototype.setRequestContext = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryRequestContextResponse} returns this + */ +proto.irismod.service.QueryRequestContextResponse.prototype.clearRequestContext = function() { + return this.setRequestContext(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryRequestContextResponse.prototype.hasRequestContext = 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.irismod.service.QueryRequestRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.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.irismod.service.QueryRequestRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestRequest.toObject = function(includeInstance, msg) { + var f, obj = { + requestId: 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.irismod.service.QueryRequestRequest} + */ +proto.irismod.service.QueryRequestRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryRequestRequest; + return proto.irismod.service.QueryRequestRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryRequestRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryRequestRequest} + */ +proto.irismod.service.QueryRequestRequest.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.setRequestId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryRequestRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.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.irismod.service.QueryRequestRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string request_id = 1; + * @return {string} + */ +proto.irismod.service.QueryRequestRequest.prototype.getRequestId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryRequestRequest} returns this + */ +proto.irismod.service.QueryRequestRequest.prototype.setRequestId = 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.irismod.service.QueryRequestResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.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.irismod.service.QueryRequestResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestResponse.toObject = function(includeInstance, msg) { + var f, obj = { + request: (f = msg.getRequest()) && irismod_service_service_pb.Request.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.irismod.service.QueryRequestResponse} + */ +proto.irismod.service.QueryRequestResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryRequestResponse; + return proto.irismod.service.QueryRequestResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryRequestResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryRequestResponse} + */ +proto.irismod.service.QueryRequestResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.Request; + reader.readMessage(value,irismod_service_service_pb.Request.deserializeBinaryFromReader); + msg.setRequest(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryRequestResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.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.irismod.service.QueryRequestResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequest(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_service_service_pb.Request.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Request request = 1; + * @return {?proto.irismod.service.Request} + */ +proto.irismod.service.QueryRequestResponse.prototype.getRequest = function() { + return /** @type{?proto.irismod.service.Request} */ ( + jspb.Message.getWrapperField(this, irismod_service_service_pb.Request, 1)); +}; + + +/** + * @param {?proto.irismod.service.Request|undefined} value + * @return {!proto.irismod.service.QueryRequestResponse} returns this +*/ +proto.irismod.service.QueryRequestResponse.prototype.setRequest = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryRequestResponse} returns this + */ +proto.irismod.service.QueryRequestResponse.prototype.clearRequest = function() { + return this.setRequest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryRequestResponse.prototype.hasRequest = 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.irismod.service.QueryRequestsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryRequestsRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryRequestsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestsRequest.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: 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.irismod.service.QueryRequestsRequest} + */ +proto.irismod.service.QueryRequestsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryRequestsRequest; + return proto.irismod.service.QueryRequestsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryRequestsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryRequestsRequest} + */ +proto.irismod.service.QueryRequestsRequest.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryRequestsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryRequestsRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryRequestsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestsRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.QueryRequestsRequest.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryRequestsRequest} returns this + */ +proto.irismod.service.QueryRequestsRequest.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.QueryRequestsRequest.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryRequestsRequest} returns this + */ +proto.irismod.service.QueryRequestsRequest.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.QueryRequestsResponse.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.irismod.service.QueryRequestsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryRequestsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryRequestsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + requestsList: jspb.Message.toObjectList(msg.getRequestsList(), + irismod_service_service_pb.Request.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.irismod.service.QueryRequestsResponse} + */ +proto.irismod.service.QueryRequestsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryRequestsResponse; + return proto.irismod.service.QueryRequestsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryRequestsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryRequestsResponse} + */ +proto.irismod.service.QueryRequestsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.Request; + reader.readMessage(value,irismod_service_service_pb.Request.deserializeBinaryFromReader); + msg.addRequests(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryRequestsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryRequestsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryRequestsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_service_service_pb.Request.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Request requests = 1; + * @return {!Array} + */ +proto.irismod.service.QueryRequestsResponse.prototype.getRequestsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_service_service_pb.Request, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.QueryRequestsResponse} returns this +*/ +proto.irismod.service.QueryRequestsResponse.prototype.setRequestsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.service.Request=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.service.Request} + */ +proto.irismod.service.QueryRequestsResponse.prototype.addRequests = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.service.Request, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.QueryRequestsResponse} returns this + */ +proto.irismod.service.QueryRequestsResponse.prototype.clearRequestsList = function() { + return this.setRequestsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryRequestsByReqCtxRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryRequestsByReqCtxRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), + batchCounter: 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.irismod.service.QueryRequestsByReqCtxRequest} + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryRequestsByReqCtxRequest; + return proto.irismod.service.QueryRequestsByReqCtxRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryRequestsByReqCtxRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryRequestsByReqCtxRequest} + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.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.setRequestContextId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBatchCounter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryRequestsByReqCtxRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryRequestsByReqCtxRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBatchCounter(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryRequestsByReqCtxRequest} returns this + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 batch_counter = 2; + * @return {number} + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.getBatchCounter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.QueryRequestsByReqCtxRequest} returns this + */ +proto.irismod.service.QueryRequestsByReqCtxRequest.prototype.setBatchCounter = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.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.irismod.service.QueryRequestsByReqCtxResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryRequestsByReqCtxResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryRequestsByReqCtxResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.toObject = function(includeInstance, msg) { + var f, obj = { + requestsList: jspb.Message.toObjectList(msg.getRequestsList(), + irismod_service_service_pb.Request.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.irismod.service.QueryRequestsByReqCtxResponse} + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryRequestsByReqCtxResponse; + return proto.irismod.service.QueryRequestsByReqCtxResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryRequestsByReqCtxResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryRequestsByReqCtxResponse} + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.Request; + reader.readMessage(value,irismod_service_service_pb.Request.deserializeBinaryFromReader); + msg.addRequests(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryRequestsByReqCtxResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryRequestsByReqCtxResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_service_service_pb.Request.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Request requests = 1; + * @return {!Array} + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.getRequestsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_service_service_pb.Request, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.QueryRequestsByReqCtxResponse} returns this +*/ +proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.setRequestsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.service.Request=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.service.Request} + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.addRequests = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.service.Request, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.QueryRequestsByReqCtxResponse} returns this + */ +proto.irismod.service.QueryRequestsByReqCtxResponse.prototype.clearRequestsList = function() { + return this.setRequestsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.service.QueryResponseRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryResponseRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryResponseRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryResponseRequest.toObject = function(includeInstance, msg) { + var f, obj = { + requestId: 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.irismod.service.QueryResponseRequest} + */ +proto.irismod.service.QueryResponseRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryResponseRequest; + return proto.irismod.service.QueryResponseRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryResponseRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryResponseRequest} + */ +proto.irismod.service.QueryResponseRequest.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.setRequestId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryResponseRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryResponseRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryResponseRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryResponseRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string request_id = 1; + * @return {string} + */ +proto.irismod.service.QueryResponseRequest.prototype.getRequestId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryResponseRequest} returns this + */ +proto.irismod.service.QueryResponseRequest.prototype.setRequestId = 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.irismod.service.QueryResponseResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryResponseResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryResponseResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryResponseResponse.toObject = function(includeInstance, msg) { + var f, obj = { + response: (f = msg.getResponse()) && irismod_service_service_pb.Response.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.irismod.service.QueryResponseResponse} + */ +proto.irismod.service.QueryResponseResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryResponseResponse; + return proto.irismod.service.QueryResponseResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryResponseResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryResponseResponse} + */ +proto.irismod.service.QueryResponseResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.Response; + reader.readMessage(value,irismod_service_service_pb.Response.deserializeBinaryFromReader); + msg.setResponse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryResponseResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryResponseResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryResponseResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryResponseResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResponse(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_service_service_pb.Response.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Response response = 1; + * @return {?proto.irismod.service.Response} + */ +proto.irismod.service.QueryResponseResponse.prototype.getResponse = function() { + return /** @type{?proto.irismod.service.Response} */ ( + jspb.Message.getWrapperField(this, irismod_service_service_pb.Response, 1)); +}; + + +/** + * @param {?proto.irismod.service.Response|undefined} value + * @return {!proto.irismod.service.QueryResponseResponse} returns this +*/ +proto.irismod.service.QueryResponseResponse.prototype.setResponse = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryResponseResponse} returns this + */ +proto.irismod.service.QueryResponseResponse.prototype.clearResponse = function() { + return this.setResponse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryResponseResponse.prototype.hasResponse = 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.irismod.service.QueryResponsesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryResponsesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryResponsesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryResponsesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), + batchCounter: 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.irismod.service.QueryResponsesRequest} + */ +proto.irismod.service.QueryResponsesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryResponsesRequest; + return proto.irismod.service.QueryResponsesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryResponsesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryResponsesRequest} + */ +proto.irismod.service.QueryResponsesRequest.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.setRequestContextId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBatchCounter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryResponsesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryResponsesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryResponsesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryResponsesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBatchCounter(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.QueryResponsesRequest.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryResponsesRequest} returns this + */ +proto.irismod.service.QueryResponsesRequest.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 batch_counter = 2; + * @return {number} + */ +proto.irismod.service.QueryResponsesRequest.prototype.getBatchCounter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.QueryResponsesRequest} returns this + */ +proto.irismod.service.QueryResponsesRequest.prototype.setBatchCounter = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.QueryResponsesResponse.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.irismod.service.QueryResponsesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryResponsesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryResponsesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryResponsesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + responsesList: jspb.Message.toObjectList(msg.getResponsesList(), + irismod_service_service_pb.Response.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.irismod.service.QueryResponsesResponse} + */ +proto.irismod.service.QueryResponsesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryResponsesResponse; + return proto.irismod.service.QueryResponsesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryResponsesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryResponsesResponse} + */ +proto.irismod.service.QueryResponsesResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.Response; + reader.readMessage(value,irismod_service_service_pb.Response.deserializeBinaryFromReader); + msg.addResponses(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryResponsesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryResponsesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryResponsesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryResponsesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResponsesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + irismod_service_service_pb.Response.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Response responses = 1; + * @return {!Array} + */ +proto.irismod.service.QueryResponsesResponse.prototype.getResponsesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_service_service_pb.Response, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.QueryResponsesResponse} returns this +*/ +proto.irismod.service.QueryResponsesResponse.prototype.setResponsesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.irismod.service.Response=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.service.Response} + */ +proto.irismod.service.QueryResponsesResponse.prototype.addResponses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.irismod.service.Response, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.QueryResponsesResponse} returns this + */ +proto.irismod.service.QueryResponsesResponse.prototype.clearResponsesList = function() { + return this.setResponsesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.service.QueryEarnedFeesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryEarnedFeesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryEarnedFeesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryEarnedFeesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + provider: 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.irismod.service.QueryEarnedFeesRequest} + */ +proto.irismod.service.QueryEarnedFeesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryEarnedFeesRequest; + return proto.irismod.service.QueryEarnedFeesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryEarnedFeesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryEarnedFeesRequest} + */ +proto.irismod.service.QueryEarnedFeesRequest.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.setProvider(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryEarnedFeesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryEarnedFeesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryEarnedFeesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryEarnedFeesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string provider = 1; + * @return {string} + */ +proto.irismod.service.QueryEarnedFeesRequest.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QueryEarnedFeesRequest} returns this + */ +proto.irismod.service.QueryEarnedFeesRequest.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.QueryEarnedFeesResponse.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.irismod.service.QueryEarnedFeesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QueryEarnedFeesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QueryEarnedFeesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryEarnedFeesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + feesList: jspb.Message.toObjectList(msg.getFeesList(), + 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.irismod.service.QueryEarnedFeesResponse} + */ +proto.irismod.service.QueryEarnedFeesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryEarnedFeesResponse; + return proto.irismod.service.QueryEarnedFeesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryEarnedFeesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryEarnedFeesResponse} + */ +proto.irismod.service.QueryEarnedFeesResponse.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.addFees(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryEarnedFeesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QueryEarnedFeesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QueryEarnedFeesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryEarnedFeesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFeesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin fees = 1; + * @return {!Array} + */ +proto.irismod.service.QueryEarnedFeesResponse.prototype.getFeesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.QueryEarnedFeesResponse} returns this +*/ +proto.irismod.service.QueryEarnedFeesResponse.prototype.setFeesList = 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.irismod.service.QueryEarnedFeesResponse.prototype.addFees = 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.irismod.service.QueryEarnedFeesResponse} returns this + */ +proto.irismod.service.QueryEarnedFeesResponse.prototype.clearFeesList = function() { + return this.setFeesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.service.QuerySchemaRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QuerySchemaRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QuerySchemaRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QuerySchemaRequest.toObject = function(includeInstance, msg) { + var f, obj = { + schemaName: 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.irismod.service.QuerySchemaRequest} + */ +proto.irismod.service.QuerySchemaRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QuerySchemaRequest; + return proto.irismod.service.QuerySchemaRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QuerySchemaRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QuerySchemaRequest} + */ +proto.irismod.service.QuerySchemaRequest.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.setSchemaName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QuerySchemaRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QuerySchemaRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QuerySchemaRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QuerySchemaRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchemaName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string schema_name = 1; + * @return {string} + */ +proto.irismod.service.QuerySchemaRequest.prototype.getSchemaName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QuerySchemaRequest} returns this + */ +proto.irismod.service.QuerySchemaRequest.prototype.setSchemaName = 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.irismod.service.QuerySchemaResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.QuerySchemaResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.QuerySchemaResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QuerySchemaResponse.toObject = function(includeInstance, msg) { + var f, obj = { + schema: 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.irismod.service.QuerySchemaResponse} + */ +proto.irismod.service.QuerySchemaResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QuerySchemaResponse; + return proto.irismod.service.QuerySchemaResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QuerySchemaResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QuerySchemaResponse} + */ +proto.irismod.service.QuerySchemaResponse.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.setSchema(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QuerySchemaResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.QuerySchemaResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.QuerySchemaResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QuerySchemaResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSchema(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string schema = 1; + * @return {string} + */ +proto.irismod.service.QuerySchemaResponse.prototype.getSchema = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.QuerySchemaResponse} returns this + */ +proto.irismod.service.QuerySchemaResponse.prototype.setSchema = 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.irismod.service.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.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.irismod.service.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.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.irismod.service.QueryParamsRequest} + */ +proto.irismod.service.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryParamsRequest; + return proto.irismod.service.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryParamsRequest} + */ +proto.irismod.service.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.irismod.service.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.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.irismod.service.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.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.irismod.service.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.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.irismod.service.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && irismod_service_service_pb.Params.toObject(includeInstance, f), + res: (f = msg.getRes()) && 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.irismod.service.QueryParamsResponse} + */ +proto.irismod.service.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.QueryParamsResponse; + return proto.irismod.service.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.QueryParamsResponse} + */ +proto.irismod.service.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_service_service_pb.Params; + reader.readMessage(value,irismod_service_service_pb.Params.deserializeBinaryFromReader); + msg.setParams(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.setRes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.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.irismod.service.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_service_service_pb.Params.serializeBinaryToWriter + ); + } + f = message.getRes(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.irismod.service.Params} + */ +proto.irismod.service.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.irismod.service.Params} */ ( + jspb.Message.getWrapperField(this, irismod_service_service_pb.Params, 1)); +}; + + +/** + * @param {?proto.irismod.service.Params|undefined} value + * @return {!proto.irismod.service.QueryParamsResponse} returns this +*/ +proto.irismod.service.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryParamsResponse} returns this + */ +proto.irismod.service.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse res = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.service.QueryParamsResponse.prototype.getRes = 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.irismod.service.QueryParamsResponse} returns this +*/ +proto.irismod.service.QueryParamsResponse.prototype.setRes = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.QueryParamsResponse} returns this + */ +proto.irismod.service.QueryParamsResponse.prototype.clearRes = function() { + return this.setRes(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.QueryParamsResponse.prototype.hasRes = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.irismod.service); diff --git a/src/types/proto-types/irismod/service/service_pb.js b/src/types/proto-types/irismod/service/service_pb.js new file mode 100644 index 00000000..a71a67f6 --- /dev/null +++ b/src/types/proto-types/irismod/service/service_pb.js @@ -0,0 +1,3828 @@ +// source: irismod/service/service.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 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'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.irismod.service.CompactRequest', null, global); +goog.exportSymbol('proto.irismod.service.Params', null, global); +goog.exportSymbol('proto.irismod.service.Pricing', null, global); +goog.exportSymbol('proto.irismod.service.PromotionByTime', null, global); +goog.exportSymbol('proto.irismod.service.PromotionByVolume', null, global); +goog.exportSymbol('proto.irismod.service.Request', null, global); +goog.exportSymbol('proto.irismod.service.RequestContext', null, global); +goog.exportSymbol('proto.irismod.service.RequestContextBatchState', null, global); +goog.exportSymbol('proto.irismod.service.RequestContextState', null, global); +goog.exportSymbol('proto.irismod.service.Response', null, global); +goog.exportSymbol('proto.irismod.service.ServiceBinding', null, global); +goog.exportSymbol('proto.irismod.service.ServiceDefinition', 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.irismod.service.ServiceDefinition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.ServiceDefinition.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.ServiceDefinition, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.ServiceDefinition.displayName = 'proto.irismod.service.ServiceDefinition'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.ServiceBinding = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.ServiceBinding.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.ServiceBinding, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.ServiceBinding.displayName = 'proto.irismod.service.ServiceBinding'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.RequestContext = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.RequestContext.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.RequestContext, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.RequestContext.displayName = 'proto.irismod.service.RequestContext'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.Request = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.Request.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.Request, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.Request.displayName = 'proto.irismod.service.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.irismod.service.CompactRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.CompactRequest.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.CompactRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.CompactRequest.displayName = 'proto.irismod.service.CompactRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.Response = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.Response, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.Response.displayName = 'proto.irismod.service.Response'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.Pricing = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.Pricing.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.Pricing, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.Pricing.displayName = 'proto.irismod.service.Pricing'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.PromotionByTime = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.PromotionByTime, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.PromotionByTime.displayName = 'proto.irismod.service.PromotionByTime'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.PromotionByVolume = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.PromotionByVolume, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.PromotionByVolume.displayName = 'proto.irismod.service.PromotionByVolume'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.Params.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.Params.displayName = 'proto.irismod.service.Params'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.ServiceDefinition.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.irismod.service.ServiceDefinition.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.ServiceDefinition.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.ServiceDefinition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.ServiceDefinition.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + tagsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + author: jspb.Message.getFieldWithDefault(msg, 4, ""), + authorDescription: jspb.Message.getFieldWithDefault(msg, 5, ""), + schemas: 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.irismod.service.ServiceDefinition} + */ +proto.irismod.service.ServiceDefinition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.ServiceDefinition; + return proto.irismod.service.ServiceDefinition.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.ServiceDefinition} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.ServiceDefinition} + */ +proto.irismod.service.ServiceDefinition.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.addTags(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthor(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthorDescription(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setSchemas(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.ServiceDefinition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.ServiceDefinition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.ServiceDefinition} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.ServiceDefinition.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.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getAuthor(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getAuthorDescription(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSchemas(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.irismod.service.ServiceDefinition.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceDefinition} returns this + */ +proto.irismod.service.ServiceDefinition.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.irismod.service.ServiceDefinition.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceDefinition} returns this + */ +proto.irismod.service.ServiceDefinition.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated string tags = 3; + * @return {!Array} + */ +proto.irismod.service.ServiceDefinition.prototype.getTagsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.ServiceDefinition} returns this + */ +proto.irismod.service.ServiceDefinition.prototype.setTagsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.service.ServiceDefinition} returns this + */ +proto.irismod.service.ServiceDefinition.prototype.addTags = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.ServiceDefinition} returns this + */ +proto.irismod.service.ServiceDefinition.prototype.clearTagsList = function() { + return this.setTagsList([]); +}; + + +/** + * optional string author = 4; + * @return {string} + */ +proto.irismod.service.ServiceDefinition.prototype.getAuthor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceDefinition} returns this + */ +proto.irismod.service.ServiceDefinition.prototype.setAuthor = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string author_description = 5; + * @return {string} + */ +proto.irismod.service.ServiceDefinition.prototype.getAuthorDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceDefinition} returns this + */ +proto.irismod.service.ServiceDefinition.prototype.setAuthorDescription = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string schemas = 6; + * @return {string} + */ +proto.irismod.service.ServiceDefinition.prototype.getSchemas = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceDefinition} returns this + */ +proto.irismod.service.ServiceDefinition.prototype.setSchemas = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.ServiceBinding.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.irismod.service.ServiceBinding.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.ServiceBinding.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.ServiceBinding} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.ServiceBinding.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: jspb.Message.getFieldWithDefault(msg, 2, ""), + depositList: jspb.Message.toObjectList(msg.getDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + pricing: jspb.Message.getFieldWithDefault(msg, 4, ""), + qos: jspb.Message.getFieldWithDefault(msg, 5, 0), + options: jspb.Message.getFieldWithDefault(msg, 6, ""), + available: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + disabledTime: (f = msg.getDisabledTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + owner: 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.irismod.service.ServiceBinding} + */ +proto.irismod.service.ServiceBinding.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.ServiceBinding; + return proto.irismod.service.ServiceBinding.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.ServiceBinding} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.ServiceBinding} + */ +proto.irismod.service.ServiceBinding.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addDeposit(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPricing(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setQos(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setOptions(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAvailable(value); + break; + case 8: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setDisabledTime(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.ServiceBinding.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.ServiceBinding.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.ServiceBinding} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.ServiceBinding.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPricing(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getQos(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getOptions(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getAvailable(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getDisabledTime(); + if (f != null) { + writer.writeMessage( + 8, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.ServiceBinding.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.ServiceBinding.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin deposit = 3; + * @return {!Array} + */ +proto.irismod.service.ServiceBinding.prototype.getDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.ServiceBinding} returns this +*/ +proto.irismod.service.ServiceBinding.prototype.setDepositList = 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.irismod.service.ServiceBinding.prototype.addDeposit = 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.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.clearDepositList = function() { + return this.setDepositList([]); +}; + + +/** + * optional string pricing = 4; + * @return {string} + */ +proto.irismod.service.ServiceBinding.prototype.getPricing = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.setPricing = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional uint64 qos = 5; + * @return {number} + */ +proto.irismod.service.ServiceBinding.prototype.getQos = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.setQos = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string options = 6; + * @return {string} + */ +proto.irismod.service.ServiceBinding.prototype.getOptions = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.setOptions = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional bool available = 7; + * @return {boolean} + */ +proto.irismod.service.ServiceBinding.prototype.getAvailable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.setAvailable = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional google.protobuf.Timestamp disabled_time = 8; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.irismod.service.ServiceBinding.prototype.getDisabledTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.irismod.service.ServiceBinding} returns this +*/ +proto.irismod.service.ServiceBinding.prototype.setDisabledTime = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.clearDisabledTime = function() { + return this.setDisabledTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.ServiceBinding.prototype.hasDisabledTime = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional string owner = 9; + * @return {string} + */ +proto.irismod.service.ServiceBinding.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.ServiceBinding} returns this + */ +proto.irismod.service.ServiceBinding.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.RequestContext.repeatedFields_ = [2,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.irismod.service.RequestContext.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.RequestContext.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.RequestContext} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.RequestContext.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + providersList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + consumer: jspb.Message.getFieldWithDefault(msg, 3, ""), + input: jspb.Message.getFieldWithDefault(msg, 4, ""), + serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + moduleName: jspb.Message.getFieldWithDefault(msg, 6, ""), + timeout: jspb.Message.getFieldWithDefault(msg, 7, 0), + superMode: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + repeated: jspb.Message.getBooleanFieldWithDefault(msg, 9, false), + repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 10, 0), + repeatedTotal: jspb.Message.getFieldWithDefault(msg, 11, 0), + batchCounter: jspb.Message.getFieldWithDefault(msg, 12, 0), + batchRequestCount: jspb.Message.getFieldWithDefault(msg, 13, 0), + batchResponseCount: jspb.Message.getFieldWithDefault(msg, 14, 0), + batchResponseThreshold: jspb.Message.getFieldWithDefault(msg, 15, 0), + responseThreshold: jspb.Message.getFieldWithDefault(msg, 16, 0), + batchState: jspb.Message.getFieldWithDefault(msg, 17, 0), + state: jspb.Message.getFieldWithDefault(msg, 18, 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.irismod.service.RequestContext} + */ +proto.irismod.service.RequestContext.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.RequestContext; + return proto.irismod.service.RequestContext.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.RequestContext} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.RequestContext} + */ +proto.irismod.service.RequestContext.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addProviders(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInput(value); + break; + case 5: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFeeCap(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setModuleName(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeout(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuperMode(value); + break; + case 9: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRepeated(value); + break; + case 10: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRepeatedFrequency(value); + break; + case 11: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRepeatedTotal(value); + break; + case 12: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBatchCounter(value); + break; + case 13: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBatchRequestCount(value); + break; + case 14: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBatchResponseCount(value); + break; + case 15: + var value = /** @type {number} */ (reader.readUint32()); + msg.setBatchResponseThreshold(value); + break; + case 16: + var value = /** @type {number} */ (reader.readUint32()); + msg.setResponseThreshold(value); + break; + case 17: + var value = /** @type {!proto.irismod.service.RequestContextBatchState} */ (reader.readEnum()); + msg.setBatchState(value); + break; + case 18: + var value = /** @type {!proto.irismod.service.RequestContextState} */ (reader.readEnum()); + msg.setState(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.RequestContext.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.RequestContext.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.RequestContext} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.RequestContext.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvidersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInput(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getServiceFeeCapList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getModuleName(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getTimeout(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getSuperMode(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getRepeated(); + if (f) { + writer.writeBool( + 9, + f + ); + } + f = message.getRepeatedFrequency(); + if (f !== 0) { + writer.writeUint64( + 10, + f + ); + } + f = message.getRepeatedTotal(); + if (f !== 0) { + writer.writeInt64( + 11, + f + ); + } + f = message.getBatchCounter(); + if (f !== 0) { + writer.writeUint64( + 12, + f + ); + } + f = message.getBatchRequestCount(); + if (f !== 0) { + writer.writeUint32( + 13, + f + ); + } + f = message.getBatchResponseCount(); + if (f !== 0) { + writer.writeUint32( + 14, + f + ); + } + f = message.getBatchResponseThreshold(); + if (f !== 0) { + writer.writeUint32( + 15, + f + ); + } + f = message.getResponseThreshold(); + if (f !== 0) { + writer.writeUint32( + 16, + f + ); + } + f = message.getBatchState(); + if (f !== 0.0) { + writer.writeEnum( + 17, + f + ); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum( + 18, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.RequestContext.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string providers = 2; + * @return {!Array} + */ +proto.irismod.service.RequestContext.prototype.getProvidersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setProvidersList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.addProviders = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.clearProvidersList = function() { + return this.setProvidersList([]); +}; + + +/** + * optional string consumer = 3; + * @return {string} + */ +proto.irismod.service.RequestContext.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setConsumer = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string input = 4; + * @return {string} + */ +proto.irismod.service.RequestContext.prototype.getInput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setInput = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee_cap = 5; + * @return {!Array} + */ +proto.irismod.service.RequestContext.prototype.getServiceFeeCapList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.RequestContext} returns this +*/ +proto.irismod.service.RequestContext.prototype.setServiceFeeCapList = 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.irismod.service.RequestContext.prototype.addServiceFeeCap = 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.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.clearServiceFeeCapList = function() { + return this.setServiceFeeCapList([]); +}; + + +/** + * optional string module_name = 6; + * @return {string} + */ +proto.irismod.service.RequestContext.prototype.getModuleName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setModuleName = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional int64 timeout = 7; + * @return {number} + */ +proto.irismod.service.RequestContext.prototype.getTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional bool super_mode = 8; + * @return {boolean} + */ +proto.irismod.service.RequestContext.prototype.getSuperMode = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setSuperMode = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + +/** + * optional bool repeated = 9; + * @return {boolean} + */ +proto.irismod.service.RequestContext.prototype.getRepeated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 9, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setRepeated = function(value) { + return jspb.Message.setProto3BooleanField(this, 9, value); +}; + + +/** + * optional uint64 repeated_frequency = 10; + * @return {number} + */ +proto.irismod.service.RequestContext.prototype.getRepeatedFrequency = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setRepeatedFrequency = function(value) { + return jspb.Message.setProto3IntField(this, 10, value); +}; + + +/** + * optional int64 repeated_total = 11; + * @return {number} + */ +proto.irismod.service.RequestContext.prototype.getRepeatedTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setRepeatedTotal = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + +/** + * optional uint64 batch_counter = 12; + * @return {number} + */ +proto.irismod.service.RequestContext.prototype.getBatchCounter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setBatchCounter = function(value) { + return jspb.Message.setProto3IntField(this, 12, value); +}; + + +/** + * optional uint32 batch_request_count = 13; + * @return {number} + */ +proto.irismod.service.RequestContext.prototype.getBatchRequestCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setBatchRequestCount = function(value) { + return jspb.Message.setProto3IntField(this, 13, value); +}; + + +/** + * optional uint32 batch_response_count = 14; + * @return {number} + */ +proto.irismod.service.RequestContext.prototype.getBatchResponseCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setBatchResponseCount = function(value) { + return jspb.Message.setProto3IntField(this, 14, value); +}; + + +/** + * optional uint32 batch_response_threshold = 15; + * @return {number} + */ +proto.irismod.service.RequestContext.prototype.getBatchResponseThreshold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setBatchResponseThreshold = function(value) { + return jspb.Message.setProto3IntField(this, 15, value); +}; + + +/** + * optional uint32 response_threshold = 16; + * @return {number} + */ +proto.irismod.service.RequestContext.prototype.getResponseThreshold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setResponseThreshold = function(value) { + return jspb.Message.setProto3IntField(this, 16, value); +}; + + +/** + * optional RequestContextBatchState batch_state = 17; + * @return {!proto.irismod.service.RequestContextBatchState} + */ +proto.irismod.service.RequestContext.prototype.getBatchState = function() { + return /** @type {!proto.irismod.service.RequestContextBatchState} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); +}; + + +/** + * @param {!proto.irismod.service.RequestContextBatchState} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setBatchState = function(value) { + return jspb.Message.setProto3EnumField(this, 17, value); +}; + + +/** + * optional RequestContextState state = 18; + * @return {!proto.irismod.service.RequestContextState} + */ +proto.irismod.service.RequestContext.prototype.getState = function() { + return /** @type {!proto.irismod.service.RequestContextState} */ (jspb.Message.getFieldWithDefault(this, 18, 0)); +}; + + +/** + * @param {!proto.irismod.service.RequestContextState} value + * @return {!proto.irismod.service.RequestContext} returns this + */ +proto.irismod.service.RequestContext.prototype.setState = function(value) { + return jspb.Message.setProto3EnumField(this, 18, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.Request.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.irismod.service.Request.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.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.irismod.service.Request} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.Request.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + serviceName: jspb.Message.getFieldWithDefault(msg, 2, ""), + provider: jspb.Message.getFieldWithDefault(msg, 3, ""), + consumer: jspb.Message.getFieldWithDefault(msg, 4, ""), + input: jspb.Message.getFieldWithDefault(msg, 5, ""), + serviceFeeList: jspb.Message.toObjectList(msg.getServiceFeeList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + superMode: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + requestHeight: jspb.Message.getFieldWithDefault(msg, 8, 0), + expirationHeight: jspb.Message.getFieldWithDefault(msg, 9, 0), + requestContextId: jspb.Message.getFieldWithDefault(msg, 10, ""), + requestContextBatchCounter: jspb.Message.getFieldWithDefault(msg, 11, 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.irismod.service.Request} + */ +proto.irismod.service.Request.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.Request; + return proto.irismod.service.Request.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.Request} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.Request} + */ +proto.irismod.service.Request.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setServiceName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setInput(value); + break; + case 6: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFee(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuperMode(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRequestHeight(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpirationHeight(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setRequestContextId(value); + break; + case 11: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestContextBatchCounter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.Request.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.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.irismod.service.Request} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.Request.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getInput(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getServiceFeeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getSuperMode(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getRequestHeight(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getExpirationHeight(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } + f = message.getRequestContextBatchCounter(); + if (f !== 0) { + writer.writeUint64( + 11, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.irismod.service.Request.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string service_name = 2; + * @return {string} + */ +proto.irismod.service.Request.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string provider = 3; + * @return {string} + */ +proto.irismod.service.Request.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string consumer = 4; + * @return {string} + */ +proto.irismod.service.Request.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setConsumer = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string input = 5; + * @return {string} + */ +proto.irismod.service.Request.prototype.getInput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setInput = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee = 6; + * @return {!Array} + */ +proto.irismod.service.Request.prototype.getServiceFeeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.Request} returns this +*/ +proto.irismod.service.Request.prototype.setServiceFeeList = 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.irismod.service.Request.prototype.addServiceFee = 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.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.clearServiceFeeList = function() { + return this.setServiceFeeList([]); +}; + + +/** + * optional bool super_mode = 7; + * @return {boolean} + */ +proto.irismod.service.Request.prototype.getSuperMode = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setSuperMode = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional int64 request_height = 8; + * @return {number} + */ +proto.irismod.service.Request.prototype.getRequestHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setRequestHeight = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional int64 expiration_height = 9; + * @return {number} + */ +proto.irismod.service.Request.prototype.getExpirationHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setExpirationHeight = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional string request_context_id = 10; + * @return {string} + */ +proto.irismod.service.Request.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + +/** + * optional uint64 request_context_batch_counter = 11; + * @return {number} + */ +proto.irismod.service.Request.prototype.getRequestContextBatchCounter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.Request} returns this + */ +proto.irismod.service.Request.prototype.setRequestContextBatchCounter = function(value) { + return jspb.Message.setProto3IntField(this, 11, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.CompactRequest.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.irismod.service.CompactRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.CompactRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.CompactRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.CompactRequest.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), + requestContextBatchCounter: jspb.Message.getFieldWithDefault(msg, 2, 0), + provider: jspb.Message.getFieldWithDefault(msg, 3, ""), + serviceFeeList: jspb.Message.toObjectList(msg.getServiceFeeList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + requestHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), + expirationHeight: 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.irismod.service.CompactRequest} + */ +proto.irismod.service.CompactRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.CompactRequest; + return proto.irismod.service.CompactRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.CompactRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.CompactRequest} + */ +proto.irismod.service.CompactRequest.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.setRequestContextId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestContextBatchCounter(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFee(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRequestHeight(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpirationHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.CompactRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.CompactRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.CompactRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.CompactRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRequestContextBatchCounter(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getServiceFeeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getRequestHeight(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getExpirationHeight(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.CompactRequest.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.CompactRequest} returns this + */ +proto.irismod.service.CompactRequest.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 request_context_batch_counter = 2; + * @return {number} + */ +proto.irismod.service.CompactRequest.prototype.getRequestContextBatchCounter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.CompactRequest} returns this + */ +proto.irismod.service.CompactRequest.prototype.setRequestContextBatchCounter = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string provider = 3; + * @return {string} + */ +proto.irismod.service.CompactRequest.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.CompactRequest} returns this + */ +proto.irismod.service.CompactRequest.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee = 4; + * @return {!Array} + */ +proto.irismod.service.CompactRequest.prototype.getServiceFeeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.CompactRequest} returns this +*/ +proto.irismod.service.CompactRequest.prototype.setServiceFeeList = 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.irismod.service.CompactRequest.prototype.addServiceFee = 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.irismod.service.CompactRequest} returns this + */ +proto.irismod.service.CompactRequest.prototype.clearServiceFeeList = function() { + return this.setServiceFeeList([]); +}; + + +/** + * optional int64 request_height = 5; + * @return {number} + */ +proto.irismod.service.CompactRequest.prototype.getRequestHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.CompactRequest} returns this + */ +proto.irismod.service.CompactRequest.prototype.setRequestHeight = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 expiration_height = 6; + * @return {number} + */ +proto.irismod.service.CompactRequest.prototype.getExpirationHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.CompactRequest} returns this + */ +proto.irismod.service.CompactRequest.prototype.setExpirationHeight = 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.irismod.service.Response.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.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.irismod.service.Response} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.Response.toObject = function(includeInstance, msg) { + var f, obj = { + provider: jspb.Message.getFieldWithDefault(msg, 1, ""), + consumer: jspb.Message.getFieldWithDefault(msg, 2, ""), + result: jspb.Message.getFieldWithDefault(msg, 3, ""), + output: jspb.Message.getFieldWithDefault(msg, 4, ""), + requestContextId: jspb.Message.getFieldWithDefault(msg, 5, ""), + requestContextBatchCounter: 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.irismod.service.Response} + */ +proto.irismod.service.Response.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.Response; + return proto.irismod.service.Response.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.Response} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.Response} + */ +proto.irismod.service.Response.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.setProvider(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setResult(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setOutput(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setRequestContextId(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRequestContextBatchCounter(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.Response.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.Response.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.Response} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.Response.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getResult(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getOutput(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getRequestContextBatchCounter(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } +}; + + +/** + * optional string provider = 1; + * @return {string} + */ +proto.irismod.service.Response.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Response} returns this + */ +proto.irismod.service.Response.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string consumer = 2; + * @return {string} + */ +proto.irismod.service.Response.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Response} returns this + */ +proto.irismod.service.Response.prototype.setConsumer = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string result = 3; + * @return {string} + */ +proto.irismod.service.Response.prototype.getResult = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Response} returns this + */ +proto.irismod.service.Response.prototype.setResult = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string output = 4; + * @return {string} + */ +proto.irismod.service.Response.prototype.getOutput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Response} returns this + */ +proto.irismod.service.Response.prototype.setOutput = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string request_context_id = 5; + * @return {string} + */ +proto.irismod.service.Response.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Response} returns this + */ +proto.irismod.service.Response.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional uint64 request_context_batch_counter = 6; + * @return {number} + */ +proto.irismod.service.Response.prototype.getRequestContextBatchCounter = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.Response} returns this + */ +proto.irismod.service.Response.prototype.setRequestContextBatchCounter = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.Pricing.repeatedFields_ = [6,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.irismod.service.Pricing.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.Pricing.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.Pricing} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.Pricing.toObject = function(includeInstance, msg) { + var f, obj = { + priceList: jspb.Message.toObjectList(msg.getPriceList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + promotionsByTimeList: jspb.Message.toObjectList(msg.getPromotionsByTimeList(), + proto.irismod.service.PromotionByTime.toObject, includeInstance), + promotionsByVolumeList: jspb.Message.toObjectList(msg.getPromotionsByVolumeList(), + proto.irismod.service.PromotionByVolume.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.irismod.service.Pricing} + */ +proto.irismod.service.Pricing.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.Pricing; + return proto.irismod.service.Pricing.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.Pricing} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.Pricing} + */ +proto.irismod.service.Pricing.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 6: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addPrice(value); + break; + case 2: + var value = new proto.irismod.service.PromotionByTime; + reader.readMessage(value,proto.irismod.service.PromotionByTime.deserializeBinaryFromReader); + msg.addPromotionsByTime(value); + break; + case 3: + var value = new proto.irismod.service.PromotionByVolume; + reader.readMessage(value,proto.irismod.service.PromotionByVolume.deserializeBinaryFromReader); + msg.addPromotionsByVolume(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.Pricing.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.Pricing.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.Pricing} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.Pricing.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPriceList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPromotionsByTimeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.irismod.service.PromotionByTime.serializeBinaryToWriter + ); + } + f = message.getPromotionsByVolumeList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.irismod.service.PromotionByVolume.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated cosmos.base.v1beta1.Coin price = 6; + * @return {!Array} + */ +proto.irismod.service.Pricing.prototype.getPriceList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 6)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.Pricing} returns this +*/ +proto.irismod.service.Pricing.prototype.setPriceList = 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.irismod.service.Pricing.prototype.addPrice = 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.irismod.service.Pricing} returns this + */ +proto.irismod.service.Pricing.prototype.clearPriceList = function() { + return this.setPriceList([]); +}; + + +/** + * repeated PromotionByTime promotions_by_time = 2; + * @return {!Array} + */ +proto.irismod.service.Pricing.prototype.getPromotionsByTimeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.service.PromotionByTime, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.Pricing} returns this +*/ +proto.irismod.service.Pricing.prototype.setPromotionsByTimeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.service.PromotionByTime=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.service.PromotionByTime} + */ +proto.irismod.service.Pricing.prototype.addPromotionsByTime = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.service.PromotionByTime, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.Pricing} returns this + */ +proto.irismod.service.Pricing.prototype.clearPromotionsByTimeList = function() { + return this.setPromotionsByTimeList([]); +}; + + +/** + * repeated PromotionByVolume promotions_by_volume = 3; + * @return {!Array} + */ +proto.irismod.service.Pricing.prototype.getPromotionsByVolumeList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.irismod.service.PromotionByVolume, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.Pricing} returns this +*/ +proto.irismod.service.Pricing.prototype.setPromotionsByVolumeList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.irismod.service.PromotionByVolume=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.service.PromotionByVolume} + */ +proto.irismod.service.Pricing.prototype.addPromotionsByVolume = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.irismod.service.PromotionByVolume, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.Pricing} returns this + */ +proto.irismod.service.Pricing.prototype.clearPromotionsByVolumeList = function() { + return this.setPromotionsByVolumeList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.service.PromotionByTime.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.PromotionByTime.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.PromotionByTime} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.PromotionByTime.toObject = function(includeInstance, msg) { + var f, obj = { + startTime: (f = msg.getStartTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + endTime: (f = msg.getEndTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + discount: 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.irismod.service.PromotionByTime} + */ +proto.irismod.service.PromotionByTime.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.PromotionByTime; + return proto.irismod.service.PromotionByTime.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.PromotionByTime} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.PromotionByTime} + */ +proto.irismod.service.PromotionByTime.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setStartTime(value); + break; + case 2: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setEndTime(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDiscount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.PromotionByTime.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.PromotionByTime.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.PromotionByTime} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.PromotionByTime.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartTime(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getEndTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getDiscount(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional google.protobuf.Timestamp start_time = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.irismod.service.PromotionByTime.prototype.getStartTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.irismod.service.PromotionByTime} returns this +*/ +proto.irismod.service.PromotionByTime.prototype.setStartTime = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.PromotionByTime} returns this + */ +proto.irismod.service.PromotionByTime.prototype.clearStartTime = function() { + return this.setStartTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.PromotionByTime.prototype.hasStartTime = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional google.protobuf.Timestamp end_time = 2; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.irismod.service.PromotionByTime.prototype.getEndTime = 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.irismod.service.PromotionByTime} returns this +*/ +proto.irismod.service.PromotionByTime.prototype.setEndTime = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.PromotionByTime} returns this + */ +proto.irismod.service.PromotionByTime.prototype.clearEndTime = function() { + return this.setEndTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.PromotionByTime.prototype.hasEndTime = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string discount = 3; + * @return {string} + */ +proto.irismod.service.PromotionByTime.prototype.getDiscount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.PromotionByTime} returns this + */ +proto.irismod.service.PromotionByTime.prototype.setDiscount = 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.irismod.service.PromotionByVolume.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.PromotionByVolume.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.PromotionByVolume} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.PromotionByVolume.toObject = function(includeInstance, msg) { + var f, obj = { + volume: jspb.Message.getFieldWithDefault(msg, 1, 0), + discount: 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.irismod.service.PromotionByVolume} + */ +proto.irismod.service.PromotionByVolume.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.PromotionByVolume; + return proto.irismod.service.PromotionByVolume.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.PromotionByVolume} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.PromotionByVolume} + */ +proto.irismod.service.PromotionByVolume.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.setVolume(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDiscount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.PromotionByVolume.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.PromotionByVolume.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.PromotionByVolume} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.PromotionByVolume.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVolume(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getDiscount(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint64 volume = 1; + * @return {number} + */ +proto.irismod.service.PromotionByVolume.prototype.getVolume = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.PromotionByVolume} returns this + */ +proto.irismod.service.PromotionByVolume.prototype.setVolume = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string discount = 2; + * @return {string} + */ +proto.irismod.service.PromotionByVolume.prototype.getDiscount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.PromotionByVolume} returns this + */ +proto.irismod.service.PromotionByVolume.prototype.setDiscount = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.Params.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.irismod.service.Params.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.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.irismod.service.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.Params.toObject = function(includeInstance, msg) { + var f, obj = { + maxRequestTimeout: jspb.Message.getFieldWithDefault(msg, 1, 0), + minDepositMultiple: jspb.Message.getFieldWithDefault(msg, 2, 0), + minDepositList: jspb.Message.toObjectList(msg.getMinDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + serviceFeeTax: jspb.Message.getFieldWithDefault(msg, 4, ""), + slashFraction: jspb.Message.getFieldWithDefault(msg, 5, ""), + complaintRetrospect: (f = msg.getComplaintRetrospect()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + arbitrationTimeLimit: (f = msg.getArbitrationTimeLimit()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + txSizeLimit: jspb.Message.getFieldWithDefault(msg, 8, 0), + baseDenom: 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.irismod.service.Params} + */ +proto.irismod.service.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.Params; + return proto.irismod.service.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.Params} + */ +proto.irismod.service.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.readInt64()); + msg.setMaxRequestTimeout(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMinDepositMultiple(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addMinDeposit(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setServiceFeeTax(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSlashFraction(value); + break; + case 6: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setComplaintRetrospect(value); + break; + case 7: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setArbitrationTimeLimit(value); + break; + case 8: + var value = /** @type {number} */ (reader.readUint64()); + msg.setTxSizeLimit(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setBaseDenom(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.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.irismod.service.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxRequestTimeout(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMinDepositMultiple(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getMinDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getServiceFeeTax(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getSlashFraction(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getComplaintRetrospect(); + if (f != null) { + writer.writeMessage( + 6, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getArbitrationTimeLimit(); + if (f != null) { + writer.writeMessage( + 7, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getTxSizeLimit(); + if (f !== 0) { + writer.writeUint64( + 8, + f + ); + } + f = message.getBaseDenom(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } +}; + + +/** + * optional int64 max_request_timeout = 1; + * @return {number} + */ +proto.irismod.service.Params.prototype.getMaxRequestTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.setMaxRequestTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 min_deposit_multiple = 2; + * @return {number} + */ +proto.irismod.service.Params.prototype.getMinDepositMultiple = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.setMinDepositMultiple = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin min_deposit = 3; + * @return {!Array} + */ +proto.irismod.service.Params.prototype.getMinDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.Params} returns this +*/ +proto.irismod.service.Params.prototype.setMinDepositList = 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.irismod.service.Params.prototype.addMinDeposit = 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.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.clearMinDepositList = function() { + return this.setMinDepositList([]); +}; + + +/** + * optional string service_fee_tax = 4; + * @return {string} + */ +proto.irismod.service.Params.prototype.getServiceFeeTax = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.setServiceFeeTax = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string slash_fraction = 5; + * @return {string} + */ +proto.irismod.service.Params.prototype.getSlashFraction = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.setSlashFraction = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional google.protobuf.Duration complaint_retrospect = 6; + * @return {?proto.google.protobuf.Duration} + */ +proto.irismod.service.Params.prototype.getComplaintRetrospect = 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.irismod.service.Params} returns this +*/ +proto.irismod.service.Params.prototype.setComplaintRetrospect = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.clearComplaintRetrospect = function() { + return this.setComplaintRetrospect(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.Params.prototype.hasComplaintRetrospect = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional google.protobuf.Duration arbitration_time_limit = 7; + * @return {?proto.google.protobuf.Duration} + */ +proto.irismod.service.Params.prototype.getArbitrationTimeLimit = 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.irismod.service.Params} returns this +*/ +proto.irismod.service.Params.prototype.setArbitrationTimeLimit = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.clearArbitrationTimeLimit = function() { + return this.setArbitrationTimeLimit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.service.Params.prototype.hasArbitrationTimeLimit = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional uint64 tx_size_limit = 8; + * @return {number} + */ +proto.irismod.service.Params.prototype.getTxSizeLimit = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.setTxSizeLimit = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional string base_denom = 9; + * @return {string} + */ +proto.irismod.service.Params.prototype.getBaseDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.Params} returns this + */ +proto.irismod.service.Params.prototype.setBaseDenom = function(value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * @enum {number} + */ +proto.irismod.service.RequestContextBatchState = { + BATCH_RUNNING: 0, + BATCH_COMPLETED: 1 +}; + +/** + * @enum {number} + */ +proto.irismod.service.RequestContextState = { + RUNNING: 0, + PAUSED: 1, + COMPLETED: 2 +}; + +goog.object.extend(exports, proto.irismod.service); diff --git a/src/types/proto-types/irismod/service/tx_grpc_web_pb.js b/src/types/proto-types/irismod/service/tx_grpc_web_pb.js new file mode 100644 index 00000000..07815aca --- /dev/null +++ b/src/types/proto-types/irismod/service/tx_grpc_web_pb.js @@ -0,0 +1,1199 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.service + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.service = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.service.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.service.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgDefineService, + * !proto.irismod.service.MsgDefineServiceResponse>} + */ +const methodDescriptor_Msg_DefineService = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/DefineService', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgDefineService, + proto.irismod.service.MsgDefineServiceResponse, + /** + * @param {!proto.irismod.service.MsgDefineService} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgDefineServiceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgDefineService, + * !proto.irismod.service.MsgDefineServiceResponse>} + */ +const methodInfo_Msg_DefineService = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgDefineServiceResponse, + /** + * @param {!proto.irismod.service.MsgDefineService} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgDefineServiceResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgDefineService} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgDefineServiceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.defineService = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/DefineService', + request, + metadata || {}, + methodDescriptor_Msg_DefineService, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgDefineService} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.defineService = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/DefineService', + request, + metadata || {}, + methodDescriptor_Msg_DefineService); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgBindService, + * !proto.irismod.service.MsgBindServiceResponse>} + */ +const methodDescriptor_Msg_BindService = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/BindService', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgBindService, + proto.irismod.service.MsgBindServiceResponse, + /** + * @param {!proto.irismod.service.MsgBindService} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgBindServiceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgBindService, + * !proto.irismod.service.MsgBindServiceResponse>} + */ +const methodInfo_Msg_BindService = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgBindServiceResponse, + /** + * @param {!proto.irismod.service.MsgBindService} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgBindServiceResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgBindService} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgBindServiceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.bindService = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/BindService', + request, + metadata || {}, + methodDescriptor_Msg_BindService, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgBindService} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.bindService = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/BindService', + request, + metadata || {}, + methodDescriptor_Msg_BindService); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgUpdateServiceBinding, + * !proto.irismod.service.MsgUpdateServiceBindingResponse>} + */ +const methodDescriptor_Msg_UpdateServiceBinding = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/UpdateServiceBinding', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgUpdateServiceBinding, + proto.irismod.service.MsgUpdateServiceBindingResponse, + /** + * @param {!proto.irismod.service.MsgUpdateServiceBinding} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgUpdateServiceBindingResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgUpdateServiceBinding, + * !proto.irismod.service.MsgUpdateServiceBindingResponse>} + */ +const methodInfo_Msg_UpdateServiceBinding = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgUpdateServiceBindingResponse, + /** + * @param {!proto.irismod.service.MsgUpdateServiceBinding} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgUpdateServiceBindingResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgUpdateServiceBinding} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgUpdateServiceBindingResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.updateServiceBinding = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/UpdateServiceBinding', + request, + metadata || {}, + methodDescriptor_Msg_UpdateServiceBinding, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgUpdateServiceBinding} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.updateServiceBinding = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/UpdateServiceBinding', + request, + metadata || {}, + methodDescriptor_Msg_UpdateServiceBinding); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgSetWithdrawAddress, + * !proto.irismod.service.MsgSetWithdrawAddressResponse>} + */ +const methodDescriptor_Msg_SetWithdrawAddress = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/SetWithdrawAddress', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgSetWithdrawAddress, + proto.irismod.service.MsgSetWithdrawAddressResponse, + /** + * @param {!proto.irismod.service.MsgSetWithdrawAddress} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgSetWithdrawAddressResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgSetWithdrawAddress, + * !proto.irismod.service.MsgSetWithdrawAddressResponse>} + */ +const methodInfo_Msg_SetWithdrawAddress = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgSetWithdrawAddressResponse, + /** + * @param {!proto.irismod.service.MsgSetWithdrawAddress} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgSetWithdrawAddressResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgSetWithdrawAddress} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgSetWithdrawAddressResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.setWithdrawAddress = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/SetWithdrawAddress', + request, + metadata || {}, + methodDescriptor_Msg_SetWithdrawAddress, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgSetWithdrawAddress} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.setWithdrawAddress = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/SetWithdrawAddress', + request, + metadata || {}, + methodDescriptor_Msg_SetWithdrawAddress); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgEnableServiceBinding, + * !proto.irismod.service.MsgEnableServiceBindingResponse>} + */ +const methodDescriptor_Msg_EnableServiceBinding = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/EnableServiceBinding', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgEnableServiceBinding, + proto.irismod.service.MsgEnableServiceBindingResponse, + /** + * @param {!proto.irismod.service.MsgEnableServiceBinding} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgEnableServiceBindingResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgEnableServiceBinding, + * !proto.irismod.service.MsgEnableServiceBindingResponse>} + */ +const methodInfo_Msg_EnableServiceBinding = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgEnableServiceBindingResponse, + /** + * @param {!proto.irismod.service.MsgEnableServiceBinding} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgEnableServiceBindingResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgEnableServiceBinding} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgEnableServiceBindingResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.enableServiceBinding = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/EnableServiceBinding', + request, + metadata || {}, + methodDescriptor_Msg_EnableServiceBinding, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgEnableServiceBinding} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.enableServiceBinding = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/EnableServiceBinding', + request, + metadata || {}, + methodDescriptor_Msg_EnableServiceBinding); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgDisableServiceBinding, + * !proto.irismod.service.MsgDisableServiceBindingResponse>} + */ +const methodDescriptor_Msg_DisableServiceBinding = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/DisableServiceBinding', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgDisableServiceBinding, + proto.irismod.service.MsgDisableServiceBindingResponse, + /** + * @param {!proto.irismod.service.MsgDisableServiceBinding} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgDisableServiceBindingResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgDisableServiceBinding, + * !proto.irismod.service.MsgDisableServiceBindingResponse>} + */ +const methodInfo_Msg_DisableServiceBinding = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgDisableServiceBindingResponse, + /** + * @param {!proto.irismod.service.MsgDisableServiceBinding} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgDisableServiceBindingResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgDisableServiceBinding} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgDisableServiceBindingResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.disableServiceBinding = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/DisableServiceBinding', + request, + metadata || {}, + methodDescriptor_Msg_DisableServiceBinding, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgDisableServiceBinding} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.disableServiceBinding = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/DisableServiceBinding', + request, + metadata || {}, + methodDescriptor_Msg_DisableServiceBinding); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgRefundServiceDeposit, + * !proto.irismod.service.MsgRefundServiceDepositResponse>} + */ +const methodDescriptor_Msg_RefundServiceDeposit = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/RefundServiceDeposit', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgRefundServiceDeposit, + proto.irismod.service.MsgRefundServiceDepositResponse, + /** + * @param {!proto.irismod.service.MsgRefundServiceDeposit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgRefundServiceDepositResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgRefundServiceDeposit, + * !proto.irismod.service.MsgRefundServiceDepositResponse>} + */ +const methodInfo_Msg_RefundServiceDeposit = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgRefundServiceDepositResponse, + /** + * @param {!proto.irismod.service.MsgRefundServiceDeposit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgRefundServiceDepositResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgRefundServiceDeposit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgRefundServiceDepositResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.refundServiceDeposit = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/RefundServiceDeposit', + request, + metadata || {}, + methodDescriptor_Msg_RefundServiceDeposit, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgRefundServiceDeposit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.refundServiceDeposit = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/RefundServiceDeposit', + request, + metadata || {}, + methodDescriptor_Msg_RefundServiceDeposit); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgCallService, + * !proto.irismod.service.MsgCallServiceResponse>} + */ +const methodDescriptor_Msg_CallService = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/CallService', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgCallService, + proto.irismod.service.MsgCallServiceResponse, + /** + * @param {!proto.irismod.service.MsgCallService} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgCallServiceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgCallService, + * !proto.irismod.service.MsgCallServiceResponse>} + */ +const methodInfo_Msg_CallService = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgCallServiceResponse, + /** + * @param {!proto.irismod.service.MsgCallService} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgCallServiceResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgCallService} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgCallServiceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.callService = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/CallService', + request, + metadata || {}, + methodDescriptor_Msg_CallService, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgCallService} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.callService = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/CallService', + request, + metadata || {}, + methodDescriptor_Msg_CallService); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgRespondService, + * !proto.irismod.service.MsgRespondServiceResponse>} + */ +const methodDescriptor_Msg_RespondService = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/RespondService', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgRespondService, + proto.irismod.service.MsgRespondServiceResponse, + /** + * @param {!proto.irismod.service.MsgRespondService} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgRespondServiceResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgRespondService, + * !proto.irismod.service.MsgRespondServiceResponse>} + */ +const methodInfo_Msg_RespondService = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgRespondServiceResponse, + /** + * @param {!proto.irismod.service.MsgRespondService} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgRespondServiceResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgRespondService} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgRespondServiceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.respondService = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/RespondService', + request, + metadata || {}, + methodDescriptor_Msg_RespondService, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgRespondService} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.respondService = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/RespondService', + request, + metadata || {}, + methodDescriptor_Msg_RespondService); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgPauseRequestContext, + * !proto.irismod.service.MsgPauseRequestContextResponse>} + */ +const methodDescriptor_Msg_PauseRequestContext = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/PauseRequestContext', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgPauseRequestContext, + proto.irismod.service.MsgPauseRequestContextResponse, + /** + * @param {!proto.irismod.service.MsgPauseRequestContext} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgPauseRequestContextResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgPauseRequestContext, + * !proto.irismod.service.MsgPauseRequestContextResponse>} + */ +const methodInfo_Msg_PauseRequestContext = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgPauseRequestContextResponse, + /** + * @param {!proto.irismod.service.MsgPauseRequestContext} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgPauseRequestContextResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgPauseRequestContext} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgPauseRequestContextResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.pauseRequestContext = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/PauseRequestContext', + request, + metadata || {}, + methodDescriptor_Msg_PauseRequestContext, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgPauseRequestContext} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.pauseRequestContext = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/PauseRequestContext', + request, + metadata || {}, + methodDescriptor_Msg_PauseRequestContext); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgStartRequestContext, + * !proto.irismod.service.MsgStartRequestContextResponse>} + */ +const methodDescriptor_Msg_StartRequestContext = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/StartRequestContext', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgStartRequestContext, + proto.irismod.service.MsgStartRequestContextResponse, + /** + * @param {!proto.irismod.service.MsgStartRequestContext} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgStartRequestContextResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgStartRequestContext, + * !proto.irismod.service.MsgStartRequestContextResponse>} + */ +const methodInfo_Msg_StartRequestContext = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgStartRequestContextResponse, + /** + * @param {!proto.irismod.service.MsgStartRequestContext} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgStartRequestContextResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgStartRequestContext} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgStartRequestContextResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.startRequestContext = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/StartRequestContext', + request, + metadata || {}, + methodDescriptor_Msg_StartRequestContext, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgStartRequestContext} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.startRequestContext = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/StartRequestContext', + request, + metadata || {}, + methodDescriptor_Msg_StartRequestContext); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgKillRequestContext, + * !proto.irismod.service.MsgKillRequestContextResponse>} + */ +const methodDescriptor_Msg_KillRequestContext = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/KillRequestContext', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgKillRequestContext, + proto.irismod.service.MsgKillRequestContextResponse, + /** + * @param {!proto.irismod.service.MsgKillRequestContext} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgKillRequestContextResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgKillRequestContext, + * !proto.irismod.service.MsgKillRequestContextResponse>} + */ +const methodInfo_Msg_KillRequestContext = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgKillRequestContextResponse, + /** + * @param {!proto.irismod.service.MsgKillRequestContext} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgKillRequestContextResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgKillRequestContext} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgKillRequestContextResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.killRequestContext = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/KillRequestContext', + request, + metadata || {}, + methodDescriptor_Msg_KillRequestContext, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgKillRequestContext} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.killRequestContext = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/KillRequestContext', + request, + metadata || {}, + methodDescriptor_Msg_KillRequestContext); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgUpdateRequestContext, + * !proto.irismod.service.MsgUpdateRequestContextResponse>} + */ +const methodDescriptor_Msg_UpdateRequestContext = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/UpdateRequestContext', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgUpdateRequestContext, + proto.irismod.service.MsgUpdateRequestContextResponse, + /** + * @param {!proto.irismod.service.MsgUpdateRequestContext} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgUpdateRequestContextResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgUpdateRequestContext, + * !proto.irismod.service.MsgUpdateRequestContextResponse>} + */ +const methodInfo_Msg_UpdateRequestContext = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgUpdateRequestContextResponse, + /** + * @param {!proto.irismod.service.MsgUpdateRequestContext} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgUpdateRequestContextResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgUpdateRequestContext} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgUpdateRequestContextResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.updateRequestContext = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/UpdateRequestContext', + request, + metadata || {}, + methodDescriptor_Msg_UpdateRequestContext, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgUpdateRequestContext} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.updateRequestContext = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/UpdateRequestContext', + request, + metadata || {}, + methodDescriptor_Msg_UpdateRequestContext); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.service.MsgWithdrawEarnedFees, + * !proto.irismod.service.MsgWithdrawEarnedFeesResponse>} + */ +const methodDescriptor_Msg_WithdrawEarnedFees = new grpc.web.MethodDescriptor( + '/irismod.service.Msg/WithdrawEarnedFees', + grpc.web.MethodType.UNARY, + proto.irismod.service.MsgWithdrawEarnedFees, + proto.irismod.service.MsgWithdrawEarnedFeesResponse, + /** + * @param {!proto.irismod.service.MsgWithdrawEarnedFees} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgWithdrawEarnedFeesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.service.MsgWithdrawEarnedFees, + * !proto.irismod.service.MsgWithdrawEarnedFeesResponse>} + */ +const methodInfo_Msg_WithdrawEarnedFees = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.service.MsgWithdrawEarnedFeesResponse, + /** + * @param {!proto.irismod.service.MsgWithdrawEarnedFees} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.service.MsgWithdrawEarnedFeesResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.service.MsgWithdrawEarnedFees} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.service.MsgWithdrawEarnedFeesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.service.MsgClient.prototype.withdrawEarnedFees = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.service.Msg/WithdrawEarnedFees', + request, + metadata || {}, + methodDescriptor_Msg_WithdrawEarnedFees, + callback); +}; + + +/** + * @param {!proto.irismod.service.MsgWithdrawEarnedFees} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.service.MsgPromiseClient.prototype.withdrawEarnedFees = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.service.Msg/WithdrawEarnedFees', + request, + metadata || {}, + methodDescriptor_Msg_WithdrawEarnedFees); +}; + + +module.exports = proto.irismod.service; + diff --git a/src/types/proto-types/irismod/service/tx_pb.js b/src/types/proto-types/irismod/service/tx_pb.js new file mode 100644 index 00000000..f075c923 --- /dev/null +++ b/src/types/proto-types/irismod/service/tx_pb.js @@ -0,0 +1,5522 @@ +// source: irismod/service/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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.irismod.service.MsgBindService', null, global); +goog.exportSymbol('proto.irismod.service.MsgBindServiceResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgCallService', null, global); +goog.exportSymbol('proto.irismod.service.MsgCallServiceResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgDefineService', null, global); +goog.exportSymbol('proto.irismod.service.MsgDefineServiceResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgDisableServiceBinding', null, global); +goog.exportSymbol('proto.irismod.service.MsgDisableServiceBindingResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgEnableServiceBinding', null, global); +goog.exportSymbol('proto.irismod.service.MsgEnableServiceBindingResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgKillRequestContext', null, global); +goog.exportSymbol('proto.irismod.service.MsgKillRequestContextResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgPauseRequestContext', null, global); +goog.exportSymbol('proto.irismod.service.MsgPauseRequestContextResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgRefundServiceDeposit', null, global); +goog.exportSymbol('proto.irismod.service.MsgRefundServiceDepositResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgRespondService', null, global); +goog.exportSymbol('proto.irismod.service.MsgRespondServiceResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgSetWithdrawAddress', null, global); +goog.exportSymbol('proto.irismod.service.MsgSetWithdrawAddressResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgStartRequestContext', null, global); +goog.exportSymbol('proto.irismod.service.MsgStartRequestContextResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgUpdateRequestContext', null, global); +goog.exportSymbol('proto.irismod.service.MsgUpdateRequestContextResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgUpdateServiceBinding', null, global); +goog.exportSymbol('proto.irismod.service.MsgUpdateServiceBindingResponse', null, global); +goog.exportSymbol('proto.irismod.service.MsgWithdrawEarnedFees', null, global); +goog.exportSymbol('proto.irismod.service.MsgWithdrawEarnedFeesResponse', 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.irismod.service.MsgDefineService = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.MsgDefineService.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.MsgDefineService, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgDefineService.displayName = 'proto.irismod.service.MsgDefineService'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgDefineServiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgDefineServiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgDefineServiceResponse.displayName = 'proto.irismod.service.MsgDefineServiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgBindService = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.MsgBindService.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.MsgBindService, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgBindService.displayName = 'proto.irismod.service.MsgBindService'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgBindServiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgBindServiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgBindServiceResponse.displayName = 'proto.irismod.service.MsgBindServiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgUpdateServiceBinding = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.MsgUpdateServiceBinding.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.MsgUpdateServiceBinding, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgUpdateServiceBinding.displayName = 'proto.irismod.service.MsgUpdateServiceBinding'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgUpdateServiceBindingResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgUpdateServiceBindingResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgUpdateServiceBindingResponse.displayName = 'proto.irismod.service.MsgUpdateServiceBindingResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgSetWithdrawAddress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgSetWithdrawAddress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgSetWithdrawAddress.displayName = 'proto.irismod.service.MsgSetWithdrawAddress'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgSetWithdrawAddressResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgSetWithdrawAddressResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgSetWithdrawAddressResponse.displayName = 'proto.irismod.service.MsgSetWithdrawAddressResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgDisableServiceBinding = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgDisableServiceBinding, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgDisableServiceBinding.displayName = 'proto.irismod.service.MsgDisableServiceBinding'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgDisableServiceBindingResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgDisableServiceBindingResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgDisableServiceBindingResponse.displayName = 'proto.irismod.service.MsgDisableServiceBindingResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgEnableServiceBinding = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.MsgEnableServiceBinding.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.MsgEnableServiceBinding, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgEnableServiceBinding.displayName = 'proto.irismod.service.MsgEnableServiceBinding'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgEnableServiceBindingResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgEnableServiceBindingResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgEnableServiceBindingResponse.displayName = 'proto.irismod.service.MsgEnableServiceBindingResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgRefundServiceDeposit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgRefundServiceDeposit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgRefundServiceDeposit.displayName = 'proto.irismod.service.MsgRefundServiceDeposit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgRefundServiceDepositResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgRefundServiceDepositResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgRefundServiceDepositResponse.displayName = 'proto.irismod.service.MsgRefundServiceDepositResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgCallService = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.MsgCallService.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.MsgCallService, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgCallService.displayName = 'proto.irismod.service.MsgCallService'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgCallServiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgCallServiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgCallServiceResponse.displayName = 'proto.irismod.service.MsgCallServiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgRespondService = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgRespondService, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgRespondService.displayName = 'proto.irismod.service.MsgRespondService'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgRespondServiceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgRespondServiceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgRespondServiceResponse.displayName = 'proto.irismod.service.MsgRespondServiceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgPauseRequestContext = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgPauseRequestContext, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgPauseRequestContext.displayName = 'proto.irismod.service.MsgPauseRequestContext'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgPauseRequestContextResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgPauseRequestContextResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgPauseRequestContextResponse.displayName = 'proto.irismod.service.MsgPauseRequestContextResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgStartRequestContext = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgStartRequestContext, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgStartRequestContext.displayName = 'proto.irismod.service.MsgStartRequestContext'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgStartRequestContextResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgStartRequestContextResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgStartRequestContextResponse.displayName = 'proto.irismod.service.MsgStartRequestContextResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgKillRequestContext = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgKillRequestContext, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgKillRequestContext.displayName = 'proto.irismod.service.MsgKillRequestContext'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgKillRequestContextResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgKillRequestContextResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgKillRequestContextResponse.displayName = 'proto.irismod.service.MsgKillRequestContextResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgUpdateRequestContext = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.service.MsgUpdateRequestContext.repeatedFields_, null); +}; +goog.inherits(proto.irismod.service.MsgUpdateRequestContext, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgUpdateRequestContext.displayName = 'proto.irismod.service.MsgUpdateRequestContext'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgUpdateRequestContextResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgUpdateRequestContextResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgUpdateRequestContextResponse.displayName = 'proto.irismod.service.MsgUpdateRequestContextResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgWithdrawEarnedFees = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgWithdrawEarnedFees, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgWithdrawEarnedFees.displayName = 'proto.irismod.service.MsgWithdrawEarnedFees'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.service.MsgWithdrawEarnedFeesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.service.MsgWithdrawEarnedFeesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.service.MsgWithdrawEarnedFeesResponse.displayName = 'proto.irismod.service.MsgWithdrawEarnedFeesResponse'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.MsgDefineService.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.irismod.service.MsgDefineService.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgDefineService.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgDefineService} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgDefineService.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + description: jspb.Message.getFieldWithDefault(msg, 2, ""), + tagsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, + author: jspb.Message.getFieldWithDefault(msg, 4, ""), + authorDescription: jspb.Message.getFieldWithDefault(msg, 5, ""), + schemas: 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.irismod.service.MsgDefineService} + */ +proto.irismod.service.MsgDefineService.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgDefineService; + return proto.irismod.service.MsgDefineService.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgDefineService} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgDefineService} + */ +proto.irismod.service.MsgDefineService.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.addTags(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthor(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setAuthorDescription(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setSchemas(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgDefineService.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgDefineService.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgDefineService} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgDefineService.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.getTagsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + f = message.getAuthor(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getAuthorDescription(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSchemas(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.irismod.service.MsgDefineService.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgDefineService} returns this + */ +proto.irismod.service.MsgDefineService.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string description = 2; + * @return {string} + */ +proto.irismod.service.MsgDefineService.prototype.getDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgDefineService} returns this + */ +proto.irismod.service.MsgDefineService.prototype.setDescription = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated string tags = 3; + * @return {!Array} + */ +proto.irismod.service.MsgDefineService.prototype.getTagsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.MsgDefineService} returns this + */ +proto.irismod.service.MsgDefineService.prototype.setTagsList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.service.MsgDefineService} returns this + */ +proto.irismod.service.MsgDefineService.prototype.addTags = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.MsgDefineService} returns this + */ +proto.irismod.service.MsgDefineService.prototype.clearTagsList = function() { + return this.setTagsList([]); +}; + + +/** + * optional string author = 4; + * @return {string} + */ +proto.irismod.service.MsgDefineService.prototype.getAuthor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgDefineService} returns this + */ +proto.irismod.service.MsgDefineService.prototype.setAuthor = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string author_description = 5; + * @return {string} + */ +proto.irismod.service.MsgDefineService.prototype.getAuthorDescription = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgDefineService} returns this + */ +proto.irismod.service.MsgDefineService.prototype.setAuthorDescription = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string schemas = 6; + * @return {string} + */ +proto.irismod.service.MsgDefineService.prototype.getSchemas = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgDefineService} returns this + */ +proto.irismod.service.MsgDefineService.prototype.setSchemas = 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.irismod.service.MsgDefineServiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgDefineServiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgDefineServiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgDefineServiceResponse.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.irismod.service.MsgDefineServiceResponse} + */ +proto.irismod.service.MsgDefineServiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgDefineServiceResponse; + return proto.irismod.service.MsgDefineServiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgDefineServiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgDefineServiceResponse} + */ +proto.irismod.service.MsgDefineServiceResponse.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.irismod.service.MsgDefineServiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgDefineServiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgDefineServiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgDefineServiceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.MsgBindService.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.irismod.service.MsgBindService.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgBindService.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgBindService} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgBindService.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: jspb.Message.getFieldWithDefault(msg, 2, ""), + depositList: jspb.Message.toObjectList(msg.getDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + pricing: jspb.Message.getFieldWithDefault(msg, 4, ""), + qos: jspb.Message.getFieldWithDefault(msg, 5, 0), + options: jspb.Message.getFieldWithDefault(msg, 6, ""), + owner: 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.irismod.service.MsgBindService} + */ +proto.irismod.service.MsgBindService.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgBindService; + return proto.irismod.service.MsgBindService.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgBindService} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgBindService} + */ +proto.irismod.service.MsgBindService.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addDeposit(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPricing(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setQos(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setOptions(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgBindService.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgBindService.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgBindService} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgBindService.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPricing(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getQos(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getOptions(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.MsgBindService.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgBindService} returns this + */ +proto.irismod.service.MsgBindService.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.MsgBindService.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgBindService} returns this + */ +proto.irismod.service.MsgBindService.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin deposit = 3; + * @return {!Array} + */ +proto.irismod.service.MsgBindService.prototype.getDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.MsgBindService} returns this +*/ +proto.irismod.service.MsgBindService.prototype.setDepositList = 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.irismod.service.MsgBindService.prototype.addDeposit = 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.irismod.service.MsgBindService} returns this + */ +proto.irismod.service.MsgBindService.prototype.clearDepositList = function() { + return this.setDepositList([]); +}; + + +/** + * optional string pricing = 4; + * @return {string} + */ +proto.irismod.service.MsgBindService.prototype.getPricing = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgBindService} returns this + */ +proto.irismod.service.MsgBindService.prototype.setPricing = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional uint64 qos = 5; + * @return {number} + */ +proto.irismod.service.MsgBindService.prototype.getQos = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.MsgBindService} returns this + */ +proto.irismod.service.MsgBindService.prototype.setQos = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string options = 6; + * @return {string} + */ +proto.irismod.service.MsgBindService.prototype.getOptions = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgBindService} returns this + */ +proto.irismod.service.MsgBindService.prototype.setOptions = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string owner = 7; + * @return {string} + */ +proto.irismod.service.MsgBindService.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgBindService} returns this + */ +proto.irismod.service.MsgBindService.prototype.setOwner = 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.irismod.service.MsgBindServiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgBindServiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgBindServiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgBindServiceResponse.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.irismod.service.MsgBindServiceResponse} + */ +proto.irismod.service.MsgBindServiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgBindServiceResponse; + return proto.irismod.service.MsgBindServiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgBindServiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgBindServiceResponse} + */ +proto.irismod.service.MsgBindServiceResponse.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.irismod.service.MsgBindServiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgBindServiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgBindServiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgBindServiceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.MsgUpdateServiceBinding.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.irismod.service.MsgUpdateServiceBinding.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgUpdateServiceBinding.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgUpdateServiceBinding} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgUpdateServiceBinding.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: jspb.Message.getFieldWithDefault(msg, 2, ""), + depositList: jspb.Message.toObjectList(msg.getDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + pricing: jspb.Message.getFieldWithDefault(msg, 4, ""), + qos: jspb.Message.getFieldWithDefault(msg, 5, 0), + options: jspb.Message.getFieldWithDefault(msg, 6, ""), + owner: 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.irismod.service.MsgUpdateServiceBinding} + */ +proto.irismod.service.MsgUpdateServiceBinding.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgUpdateServiceBinding; + return proto.irismod.service.MsgUpdateServiceBinding.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgUpdateServiceBinding} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgUpdateServiceBinding} + */ +proto.irismod.service.MsgUpdateServiceBinding.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addDeposit(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPricing(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setQos(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setOptions(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgUpdateServiceBinding.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgUpdateServiceBinding} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgUpdateServiceBinding.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getPricing(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getQos(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getOptions(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgUpdateServiceBinding} returns this + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgUpdateServiceBinding} returns this + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin deposit = 3; + * @return {!Array} + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.getDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.MsgUpdateServiceBinding} returns this +*/ +proto.irismod.service.MsgUpdateServiceBinding.prototype.setDepositList = 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.irismod.service.MsgUpdateServiceBinding.prototype.addDeposit = 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.irismod.service.MsgUpdateServiceBinding} returns this + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.clearDepositList = function() { + return this.setDepositList([]); +}; + + +/** + * optional string pricing = 4; + * @return {string} + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.getPricing = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgUpdateServiceBinding} returns this + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.setPricing = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional uint64 qos = 5; + * @return {number} + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.getQos = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.MsgUpdateServiceBinding} returns this + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.setQos = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string options = 6; + * @return {string} + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.getOptions = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgUpdateServiceBinding} returns this + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.setOptions = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string owner = 7; + * @return {string} + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgUpdateServiceBinding} returns this + */ +proto.irismod.service.MsgUpdateServiceBinding.prototype.setOwner = 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.irismod.service.MsgUpdateServiceBindingResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgUpdateServiceBindingResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgUpdateServiceBindingResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgUpdateServiceBindingResponse.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.irismod.service.MsgUpdateServiceBindingResponse} + */ +proto.irismod.service.MsgUpdateServiceBindingResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgUpdateServiceBindingResponse; + return proto.irismod.service.MsgUpdateServiceBindingResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgUpdateServiceBindingResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgUpdateServiceBindingResponse} + */ +proto.irismod.service.MsgUpdateServiceBindingResponse.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.irismod.service.MsgUpdateServiceBindingResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgUpdateServiceBindingResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgUpdateServiceBindingResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgUpdateServiceBindingResponse.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.irismod.service.MsgSetWithdrawAddress.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgSetWithdrawAddress.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgSetWithdrawAddress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgSetWithdrawAddress.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + withdrawAddress: 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.irismod.service.MsgSetWithdrawAddress} + */ +proto.irismod.service.MsgSetWithdrawAddress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgSetWithdrawAddress; + return proto.irismod.service.MsgSetWithdrawAddress.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgSetWithdrawAddress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgSetWithdrawAddress} + */ +proto.irismod.service.MsgSetWithdrawAddress.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.setWithdrawAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgSetWithdrawAddress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgSetWithdrawAddress.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgSetWithdrawAddress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgSetWithdrawAddress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getWithdrawAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string owner = 1; + * @return {string} + */ +proto.irismod.service.MsgSetWithdrawAddress.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgSetWithdrawAddress} returns this + */ +proto.irismod.service.MsgSetWithdrawAddress.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string withdraw_address = 2; + * @return {string} + */ +proto.irismod.service.MsgSetWithdrawAddress.prototype.getWithdrawAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgSetWithdrawAddress} returns this + */ +proto.irismod.service.MsgSetWithdrawAddress.prototype.setWithdrawAddress = 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.irismod.service.MsgSetWithdrawAddressResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgSetWithdrawAddressResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgSetWithdrawAddressResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgSetWithdrawAddressResponse.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.irismod.service.MsgSetWithdrawAddressResponse} + */ +proto.irismod.service.MsgSetWithdrawAddressResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgSetWithdrawAddressResponse; + return proto.irismod.service.MsgSetWithdrawAddressResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgSetWithdrawAddressResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgSetWithdrawAddressResponse} + */ +proto.irismod.service.MsgSetWithdrawAddressResponse.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.irismod.service.MsgSetWithdrawAddressResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgSetWithdrawAddressResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgSetWithdrawAddressResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgSetWithdrawAddressResponse.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.irismod.service.MsgDisableServiceBinding.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgDisableServiceBinding.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgDisableServiceBinding} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgDisableServiceBinding.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: jspb.Message.getFieldWithDefault(msg, 2, ""), + owner: 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.irismod.service.MsgDisableServiceBinding} + */ +proto.irismod.service.MsgDisableServiceBinding.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgDisableServiceBinding; + return proto.irismod.service.MsgDisableServiceBinding.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgDisableServiceBinding} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgDisableServiceBinding} + */ +proto.irismod.service.MsgDisableServiceBinding.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgDisableServiceBinding.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgDisableServiceBinding.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgDisableServiceBinding} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgDisableServiceBinding.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.MsgDisableServiceBinding.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgDisableServiceBinding} returns this + */ +proto.irismod.service.MsgDisableServiceBinding.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.MsgDisableServiceBinding.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgDisableServiceBinding} returns this + */ +proto.irismod.service.MsgDisableServiceBinding.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string owner = 3; + * @return {string} + */ +proto.irismod.service.MsgDisableServiceBinding.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgDisableServiceBinding} returns this + */ +proto.irismod.service.MsgDisableServiceBinding.prototype.setOwner = 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.irismod.service.MsgDisableServiceBindingResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgDisableServiceBindingResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgDisableServiceBindingResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgDisableServiceBindingResponse.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.irismod.service.MsgDisableServiceBindingResponse} + */ +proto.irismod.service.MsgDisableServiceBindingResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgDisableServiceBindingResponse; + return proto.irismod.service.MsgDisableServiceBindingResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgDisableServiceBindingResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgDisableServiceBindingResponse} + */ +proto.irismod.service.MsgDisableServiceBindingResponse.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.irismod.service.MsgDisableServiceBindingResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgDisableServiceBindingResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgDisableServiceBindingResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgDisableServiceBindingResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.MsgEnableServiceBinding.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.irismod.service.MsgEnableServiceBinding.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgEnableServiceBinding.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgEnableServiceBinding} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgEnableServiceBinding.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: jspb.Message.getFieldWithDefault(msg, 2, ""), + depositList: jspb.Message.toObjectList(msg.getDepositList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + owner: 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.irismod.service.MsgEnableServiceBinding} + */ +proto.irismod.service.MsgEnableServiceBinding.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgEnableServiceBinding; + return proto.irismod.service.MsgEnableServiceBinding.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgEnableServiceBinding} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgEnableServiceBinding} + */ +proto.irismod.service.MsgEnableServiceBinding.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addDeposit(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgEnableServiceBinding.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgEnableServiceBinding} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgEnableServiceBinding.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDepositList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgEnableServiceBinding} returns this + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgEnableServiceBinding} returns this + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin deposit = 3; + * @return {!Array} + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.getDepositList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.MsgEnableServiceBinding} returns this +*/ +proto.irismod.service.MsgEnableServiceBinding.prototype.setDepositList = 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.irismod.service.MsgEnableServiceBinding.prototype.addDeposit = 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.irismod.service.MsgEnableServiceBinding} returns this + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.clearDepositList = function() { + return this.setDepositList([]); +}; + + +/** + * optional string owner = 4; + * @return {string} + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgEnableServiceBinding} returns this + */ +proto.irismod.service.MsgEnableServiceBinding.prototype.setOwner = 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.irismod.service.MsgEnableServiceBindingResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgEnableServiceBindingResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgEnableServiceBindingResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgEnableServiceBindingResponse.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.irismod.service.MsgEnableServiceBindingResponse} + */ +proto.irismod.service.MsgEnableServiceBindingResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgEnableServiceBindingResponse; + return proto.irismod.service.MsgEnableServiceBindingResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgEnableServiceBindingResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgEnableServiceBindingResponse} + */ +proto.irismod.service.MsgEnableServiceBindingResponse.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.irismod.service.MsgEnableServiceBindingResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgEnableServiceBindingResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgEnableServiceBindingResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgEnableServiceBindingResponse.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.irismod.service.MsgRefundServiceDeposit.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgRefundServiceDeposit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgRefundServiceDeposit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgRefundServiceDeposit.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: jspb.Message.getFieldWithDefault(msg, 2, ""), + owner: 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.irismod.service.MsgRefundServiceDeposit} + */ +proto.irismod.service.MsgRefundServiceDeposit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgRefundServiceDeposit; + return proto.irismod.service.MsgRefundServiceDeposit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgRefundServiceDeposit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgRefundServiceDeposit} + */ +proto.irismod.service.MsgRefundServiceDeposit.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgRefundServiceDeposit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgRefundServiceDeposit.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgRefundServiceDeposit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgRefundServiceDeposit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.MsgRefundServiceDeposit.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgRefundServiceDeposit} returns this + */ +proto.irismod.service.MsgRefundServiceDeposit.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.MsgRefundServiceDeposit.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgRefundServiceDeposit} returns this + */ +proto.irismod.service.MsgRefundServiceDeposit.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string owner = 3; + * @return {string} + */ +proto.irismod.service.MsgRefundServiceDeposit.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgRefundServiceDeposit} returns this + */ +proto.irismod.service.MsgRefundServiceDeposit.prototype.setOwner = 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.irismod.service.MsgRefundServiceDepositResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgRefundServiceDepositResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgRefundServiceDepositResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgRefundServiceDepositResponse.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.irismod.service.MsgRefundServiceDepositResponse} + */ +proto.irismod.service.MsgRefundServiceDepositResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgRefundServiceDepositResponse; + return proto.irismod.service.MsgRefundServiceDepositResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgRefundServiceDepositResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgRefundServiceDepositResponse} + */ +proto.irismod.service.MsgRefundServiceDepositResponse.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.irismod.service.MsgRefundServiceDepositResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgRefundServiceDepositResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgRefundServiceDepositResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgRefundServiceDepositResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.MsgCallService.repeatedFields_ = [2,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.irismod.service.MsgCallService.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgCallService.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgCallService} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgCallService.toObject = function(includeInstance, msg) { + var f, obj = { + serviceName: jspb.Message.getFieldWithDefault(msg, 1, ""), + providersList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + consumer: jspb.Message.getFieldWithDefault(msg, 3, ""), + input: jspb.Message.getFieldWithDefault(msg, 4, ""), + serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + timeout: jspb.Message.getFieldWithDefault(msg, 6, 0), + superMode: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + repeated: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), + repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 9, 0), + repeatedTotal: 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.irismod.service.MsgCallService} + */ +proto.irismod.service.MsgCallService.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgCallService; + return proto.irismod.service.MsgCallService.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgCallService} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgCallService} + */ +proto.irismod.service.MsgCallService.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.setServiceName(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addProviders(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInput(value); + break; + case 5: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFeeCap(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeout(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuperMode(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRepeated(value); + break; + case 9: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRepeatedFrequency(value); + break; + case 10: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRepeatedTotal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgCallService.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgCallService.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgCallService} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgCallService.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvidersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInput(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getServiceFeeCapList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getTimeout(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getSuperMode(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getRepeated(); + if (f) { + writer.writeBool( + 8, + f + ); + } + f = message.getRepeatedFrequency(); + if (f !== 0) { + writer.writeUint64( + 9, + f + ); + } + f = message.getRepeatedTotal(); + if (f !== 0) { + writer.writeInt64( + 10, + f + ); + } +}; + + +/** + * optional string service_name = 1; + * @return {string} + */ +proto.irismod.service.MsgCallService.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string providers = 2; + * @return {!Array} + */ +proto.irismod.service.MsgCallService.prototype.getProvidersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setProvidersList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.addProviders = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.clearProvidersList = function() { + return this.setProvidersList([]); +}; + + +/** + * optional string consumer = 3; + * @return {string} + */ +proto.irismod.service.MsgCallService.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setConsumer = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string input = 4; + * @return {string} + */ +proto.irismod.service.MsgCallService.prototype.getInput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setInput = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee_cap = 5; + * @return {!Array} + */ +proto.irismod.service.MsgCallService.prototype.getServiceFeeCapList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.MsgCallService} returns this +*/ +proto.irismod.service.MsgCallService.prototype.setServiceFeeCapList = 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.irismod.service.MsgCallService.prototype.addServiceFeeCap = 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.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.clearServiceFeeCapList = function() { + return this.setServiceFeeCapList([]); +}; + + +/** + * optional int64 timeout = 6; + * @return {number} + */ +proto.irismod.service.MsgCallService.prototype.getTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional bool super_mode = 7; + * @return {boolean} + */ +proto.irismod.service.MsgCallService.prototype.getSuperMode = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setSuperMode = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional bool repeated = 8; + * @return {boolean} + */ +proto.irismod.service.MsgCallService.prototype.getRepeated = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setRepeated = function(value) { + return jspb.Message.setProto3BooleanField(this, 8, value); +}; + + +/** + * optional uint64 repeated_frequency = 9; + * @return {number} + */ +proto.irismod.service.MsgCallService.prototype.getRepeatedFrequency = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setRepeatedFrequency = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional int64 repeated_total = 10; + * @return {number} + */ +proto.irismod.service.MsgCallService.prototype.getRepeatedTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.MsgCallService} returns this + */ +proto.irismod.service.MsgCallService.prototype.setRepeatedTotal = function(value) { + return jspb.Message.setProto3IntField(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.irismod.service.MsgCallServiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgCallServiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgCallServiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgCallServiceResponse.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: 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.irismod.service.MsgCallServiceResponse} + */ +proto.irismod.service.MsgCallServiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgCallServiceResponse; + return proto.irismod.service.MsgCallServiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgCallServiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgCallServiceResponse} + */ +proto.irismod.service.MsgCallServiceResponse.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.setRequestContextId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgCallServiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgCallServiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgCallServiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgCallServiceResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.MsgCallServiceResponse.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgCallServiceResponse} returns this + */ +proto.irismod.service.MsgCallServiceResponse.prototype.setRequestContextId = 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.irismod.service.MsgRespondService.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgRespondService.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgRespondService} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgRespondService.toObject = function(includeInstance, msg) { + var f, obj = { + requestId: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: jspb.Message.getFieldWithDefault(msg, 2, ""), + result: jspb.Message.getFieldWithDefault(msg, 3, ""), + output: 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.irismod.service.MsgRespondService} + */ +proto.irismod.service.MsgRespondService.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgRespondService; + return proto.irismod.service.MsgRespondService.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgRespondService} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgRespondService} + */ +proto.irismod.service.MsgRespondService.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.setRequestId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setProvider(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setResult(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setOutput(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgRespondService.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgRespondService.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgRespondService} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgRespondService.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getResult(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getOutput(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string request_id = 1; + * @return {string} + */ +proto.irismod.service.MsgRespondService.prototype.getRequestId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgRespondService} returns this + */ +proto.irismod.service.MsgRespondService.prototype.setRequestId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.MsgRespondService.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgRespondService} returns this + */ +proto.irismod.service.MsgRespondService.prototype.setProvider = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string result = 3; + * @return {string} + */ +proto.irismod.service.MsgRespondService.prototype.getResult = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgRespondService} returns this + */ +proto.irismod.service.MsgRespondService.prototype.setResult = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string output = 4; + * @return {string} + */ +proto.irismod.service.MsgRespondService.prototype.getOutput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgRespondService} returns this + */ +proto.irismod.service.MsgRespondService.prototype.setOutput = 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.irismod.service.MsgRespondServiceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgRespondServiceResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgRespondServiceResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgRespondServiceResponse.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.irismod.service.MsgRespondServiceResponse} + */ +proto.irismod.service.MsgRespondServiceResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgRespondServiceResponse; + return proto.irismod.service.MsgRespondServiceResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgRespondServiceResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgRespondServiceResponse} + */ +proto.irismod.service.MsgRespondServiceResponse.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.irismod.service.MsgRespondServiceResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgRespondServiceResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgRespondServiceResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgRespondServiceResponse.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.irismod.service.MsgPauseRequestContext.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgPauseRequestContext.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgPauseRequestContext} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgPauseRequestContext.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), + consumer: 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.irismod.service.MsgPauseRequestContext} + */ +proto.irismod.service.MsgPauseRequestContext.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgPauseRequestContext; + return proto.irismod.service.MsgPauseRequestContext.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgPauseRequestContext} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgPauseRequestContext} + */ +proto.irismod.service.MsgPauseRequestContext.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.setRequestContextId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgPauseRequestContext.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgPauseRequestContext.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgPauseRequestContext} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgPauseRequestContext.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.MsgPauseRequestContext.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgPauseRequestContext} returns this + */ +proto.irismod.service.MsgPauseRequestContext.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string consumer = 2; + * @return {string} + */ +proto.irismod.service.MsgPauseRequestContext.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgPauseRequestContext} returns this + */ +proto.irismod.service.MsgPauseRequestContext.prototype.setConsumer = 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.irismod.service.MsgPauseRequestContextResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgPauseRequestContextResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgPauseRequestContextResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgPauseRequestContextResponse.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.irismod.service.MsgPauseRequestContextResponse} + */ +proto.irismod.service.MsgPauseRequestContextResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgPauseRequestContextResponse; + return proto.irismod.service.MsgPauseRequestContextResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgPauseRequestContextResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgPauseRequestContextResponse} + */ +proto.irismod.service.MsgPauseRequestContextResponse.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.irismod.service.MsgPauseRequestContextResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgPauseRequestContextResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgPauseRequestContextResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgPauseRequestContextResponse.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.irismod.service.MsgStartRequestContext.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgStartRequestContext.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgStartRequestContext} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgStartRequestContext.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), + consumer: 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.irismod.service.MsgStartRequestContext} + */ +proto.irismod.service.MsgStartRequestContext.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgStartRequestContext; + return proto.irismod.service.MsgStartRequestContext.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgStartRequestContext} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgStartRequestContext} + */ +proto.irismod.service.MsgStartRequestContext.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.setRequestContextId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgStartRequestContext.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgStartRequestContext.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgStartRequestContext} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgStartRequestContext.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.MsgStartRequestContext.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgStartRequestContext} returns this + */ +proto.irismod.service.MsgStartRequestContext.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string consumer = 2; + * @return {string} + */ +proto.irismod.service.MsgStartRequestContext.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgStartRequestContext} returns this + */ +proto.irismod.service.MsgStartRequestContext.prototype.setConsumer = 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.irismod.service.MsgStartRequestContextResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgStartRequestContextResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgStartRequestContextResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgStartRequestContextResponse.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.irismod.service.MsgStartRequestContextResponse} + */ +proto.irismod.service.MsgStartRequestContextResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgStartRequestContextResponse; + return proto.irismod.service.MsgStartRequestContextResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgStartRequestContextResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgStartRequestContextResponse} + */ +proto.irismod.service.MsgStartRequestContextResponse.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.irismod.service.MsgStartRequestContextResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgStartRequestContextResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgStartRequestContextResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgStartRequestContextResponse.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.irismod.service.MsgKillRequestContext.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgKillRequestContext.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgKillRequestContext} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgKillRequestContext.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), + consumer: 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.irismod.service.MsgKillRequestContext} + */ +proto.irismod.service.MsgKillRequestContext.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgKillRequestContext; + return proto.irismod.service.MsgKillRequestContext.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgKillRequestContext} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgKillRequestContext} + */ +proto.irismod.service.MsgKillRequestContext.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.setRequestContextId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgKillRequestContext.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgKillRequestContext.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgKillRequestContext} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgKillRequestContext.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.MsgKillRequestContext.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgKillRequestContext} returns this + */ +proto.irismod.service.MsgKillRequestContext.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string consumer = 2; + * @return {string} + */ +proto.irismod.service.MsgKillRequestContext.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgKillRequestContext} returns this + */ +proto.irismod.service.MsgKillRequestContext.prototype.setConsumer = 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.irismod.service.MsgKillRequestContextResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgKillRequestContextResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgKillRequestContextResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgKillRequestContextResponse.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.irismod.service.MsgKillRequestContextResponse} + */ +proto.irismod.service.MsgKillRequestContextResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgKillRequestContextResponse; + return proto.irismod.service.MsgKillRequestContextResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgKillRequestContextResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgKillRequestContextResponse} + */ +proto.irismod.service.MsgKillRequestContextResponse.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.irismod.service.MsgKillRequestContextResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgKillRequestContextResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgKillRequestContextResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgKillRequestContextResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.service.MsgUpdateRequestContext.repeatedFields_ = [2,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.irismod.service.MsgUpdateRequestContext.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgUpdateRequestContext.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgUpdateRequestContext} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgUpdateRequestContext.toObject = function(includeInstance, msg) { + var f, obj = { + requestContextId: jspb.Message.getFieldWithDefault(msg, 1, ""), + providersList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, + consumer: jspb.Message.getFieldWithDefault(msg, 3, ""), + serviceFeeCapList: jspb.Message.toObjectList(msg.getServiceFeeCapList(), + cosmos_base_v1beta1_coin_pb.Coin.toObject, includeInstance), + timeout: jspb.Message.getFieldWithDefault(msg, 5, 0), + repeatedFrequency: jspb.Message.getFieldWithDefault(msg, 6, 0), + repeatedTotal: 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.irismod.service.MsgUpdateRequestContext} + */ +proto.irismod.service.MsgUpdateRequestContext.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgUpdateRequestContext; + return proto.irismod.service.MsgUpdateRequestContext.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgUpdateRequestContext} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgUpdateRequestContext} + */ +proto.irismod.service.MsgUpdateRequestContext.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.setRequestContextId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addProviders(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setConsumer(value); + break; + case 4: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.addServiceFeeCap(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeout(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setRepeatedFrequency(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRepeatedTotal(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgUpdateRequestContext.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgUpdateRequestContext} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgUpdateRequestContext.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRequestContextId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvidersList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getConsumer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getServiceFeeCapList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getTimeout(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getRepeatedFrequency(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getRepeatedTotal(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } +}; + + +/** + * optional string request_context_id = 1; + * @return {string} + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.getRequestContextId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.setRequestContextId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated string providers = 2; + * @return {!Array} + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.getProvidersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.setProvidersList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.addProviders = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.clearProvidersList = function() { + return this.setProvidersList([]); +}; + + +/** + * optional string consumer = 3; + * @return {string} + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.getConsumer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.setConsumer = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated cosmos.base.v1beta1.Coin service_fee_cap = 4; + * @return {!Array} + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.getServiceFeeCapList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this +*/ +proto.irismod.service.MsgUpdateRequestContext.prototype.setServiceFeeCapList = 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.irismod.service.MsgUpdateRequestContext.prototype.addServiceFeeCap = 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.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.clearServiceFeeCapList = function() { + return this.setServiceFeeCapList([]); +}; + + +/** + * optional int64 timeout = 5; + * @return {number} + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.getTimeout = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.setTimeout = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 repeated_frequency = 6; + * @return {number} + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.getRepeatedFrequency = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.setRepeatedFrequency = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional int64 repeated_total = 7; + * @return {number} + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.getRepeatedTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.service.MsgUpdateRequestContext} returns this + */ +proto.irismod.service.MsgUpdateRequestContext.prototype.setRepeatedTotal = 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.irismod.service.MsgUpdateRequestContextResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgUpdateRequestContextResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgUpdateRequestContextResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgUpdateRequestContextResponse.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.irismod.service.MsgUpdateRequestContextResponse} + */ +proto.irismod.service.MsgUpdateRequestContextResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgUpdateRequestContextResponse; + return proto.irismod.service.MsgUpdateRequestContextResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgUpdateRequestContextResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgUpdateRequestContextResponse} + */ +proto.irismod.service.MsgUpdateRequestContextResponse.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.irismod.service.MsgUpdateRequestContextResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgUpdateRequestContextResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgUpdateRequestContextResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgUpdateRequestContextResponse.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.irismod.service.MsgWithdrawEarnedFees.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgWithdrawEarnedFees.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgWithdrawEarnedFees} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgWithdrawEarnedFees.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + provider: 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.irismod.service.MsgWithdrawEarnedFees} + */ +proto.irismod.service.MsgWithdrawEarnedFees.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgWithdrawEarnedFees; + return proto.irismod.service.MsgWithdrawEarnedFees.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgWithdrawEarnedFees} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgWithdrawEarnedFees} + */ +proto.irismod.service.MsgWithdrawEarnedFees.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.setProvider(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.service.MsgWithdrawEarnedFees.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgWithdrawEarnedFees.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgWithdrawEarnedFees} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgWithdrawEarnedFees.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getProvider(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string owner = 1; + * @return {string} + */ +proto.irismod.service.MsgWithdrawEarnedFees.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgWithdrawEarnedFees} returns this + */ +proto.irismod.service.MsgWithdrawEarnedFees.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string provider = 2; + * @return {string} + */ +proto.irismod.service.MsgWithdrawEarnedFees.prototype.getProvider = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.service.MsgWithdrawEarnedFees} returns this + */ +proto.irismod.service.MsgWithdrawEarnedFees.prototype.setProvider = 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.irismod.service.MsgWithdrawEarnedFeesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.service.MsgWithdrawEarnedFeesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.service.MsgWithdrawEarnedFeesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgWithdrawEarnedFeesResponse.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.irismod.service.MsgWithdrawEarnedFeesResponse} + */ +proto.irismod.service.MsgWithdrawEarnedFeesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.service.MsgWithdrawEarnedFeesResponse; + return proto.irismod.service.MsgWithdrawEarnedFeesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.service.MsgWithdrawEarnedFeesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.service.MsgWithdrawEarnedFeesResponse} + */ +proto.irismod.service.MsgWithdrawEarnedFeesResponse.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.irismod.service.MsgWithdrawEarnedFeesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.service.MsgWithdrawEarnedFeesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.service.MsgWithdrawEarnedFeesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.service.MsgWithdrawEarnedFeesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.irismod.service); diff --git a/src/types/proto-types/irismod/token/genesis_pb.js b/src/types/proto-types/irismod/token/genesis_pb.js new file mode 100644 index 00000000..b10f95d7 --- /dev/null +++ b/src/types/proto-types/irismod/token/genesis_pb.js @@ -0,0 +1,252 @@ +// source: irismod/token/genesis.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 irismod_token_token_pb = require('../../irismod/token/token_pb.js'); +goog.object.extend(proto, irismod_token_token_pb); +goog.exportSymbol('proto.irismod.token.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.irismod.token.GenesisState = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.token.GenesisState.repeatedFields_, null); +}; +goog.inherits(proto.irismod.token.GenesisState, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.GenesisState.displayName = 'proto.irismod.token.GenesisState'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.token.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.irismod.token.GenesisState.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.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.irismod.token.GenesisState} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.GenesisState.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && irismod_token_token_pb.Params.toObject(includeInstance, f), + tokensList: jspb.Message.toObjectList(msg.getTokensList(), + irismod_token_token_pb.Token.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.irismod.token.GenesisState} + */ +proto.irismod.token.GenesisState.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.GenesisState; + return proto.irismod.token.GenesisState.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.GenesisState} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.GenesisState} + */ +proto.irismod.token.GenesisState.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_token_token_pb.Params; + reader.readMessage(value,irismod_token_token_pb.Params.deserializeBinaryFromReader); + msg.setParams(value); + break; + case 2: + var value = new irismod_token_token_pb.Token; + reader.readMessage(value,irismod_token_token_pb.Token.deserializeBinaryFromReader); + msg.addTokens(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.GenesisState.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.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.irismod.token.GenesisState} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.GenesisState.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_token_token_pb.Params.serializeBinaryToWriter + ); + } + f = message.getTokensList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + irismod_token_token_pb.Token.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.irismod.token.Params} + */ +proto.irismod.token.GenesisState.prototype.getParams = function() { + return /** @type{?proto.irismod.token.Params} */ ( + jspb.Message.getWrapperField(this, irismod_token_token_pb.Params, 1)); +}; + + +/** + * @param {?proto.irismod.token.Params|undefined} value + * @return {!proto.irismod.token.GenesisState} returns this +*/ +proto.irismod.token.GenesisState.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.GenesisState} returns this + */ +proto.irismod.token.GenesisState.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.GenesisState.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated Token tokens = 2; + * @return {!Array} + */ +proto.irismod.token.GenesisState.prototype.getTokensList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, irismod_token_token_pb.Token, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.token.GenesisState} returns this +*/ +proto.irismod.token.GenesisState.prototype.setTokensList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.irismod.token.Token=} opt_value + * @param {number=} opt_index + * @return {!proto.irismod.token.Token} + */ +proto.irismod.token.GenesisState.prototype.addTokens = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.irismod.token.Token, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.irismod.token.GenesisState} returns this + */ +proto.irismod.token.GenesisState.prototype.clearTokensList = function() { + return this.setTokensList([]); +}; + + +goog.object.extend(exports, proto.irismod.token); diff --git a/src/types/proto-types/irismod/token/query_grpc_web_pb.js b/src/types/proto-types/irismod/token/query_grpc_web_pb.js new file mode 100644 index 00000000..42d1cb4f --- /dev/null +++ b/src/types/proto-types/irismod/token/query_grpc_web_pb.js @@ -0,0 +1,409 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.token + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') + +var cosmos_proto_cosmos_pb = require('../../cosmos_proto/cosmos_pb.js') + +var cosmos_base_query_v1beta1_pagination_pb = require('../../cosmos/base/query/v1beta1/pagination_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') + +var google_api_annotations_pb = require('../../google/api/annotations_pb.js') + +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') + +var irismod_token_token_pb = require('../../irismod/token/token_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.token = require('./query_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.token.QueryClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.token.QueryPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.QueryTokenRequest, + * !proto.irismod.token.QueryTokenResponse>} + */ +const methodDescriptor_Query_Token = new grpc.web.MethodDescriptor( + '/irismod.token.Query/Token', + grpc.web.MethodType.UNARY, + proto.irismod.token.QueryTokenRequest, + proto.irismod.token.QueryTokenResponse, + /** + * @param {!proto.irismod.token.QueryTokenRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryTokenResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.QueryTokenRequest, + * !proto.irismod.token.QueryTokenResponse>} + */ +const methodInfo_Query_Token = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.QueryTokenResponse, + /** + * @param {!proto.irismod.token.QueryTokenRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryTokenResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.QueryTokenRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.QueryTokenResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.QueryClient.prototype.token = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Query/Token', + request, + metadata || {}, + methodDescriptor_Query_Token, + callback); +}; + + +/** + * @param {!proto.irismod.token.QueryTokenRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.QueryPromiseClient.prototype.token = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Query/Token', + request, + metadata || {}, + methodDescriptor_Query_Token); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.QueryTokensRequest, + * !proto.irismod.token.QueryTokensResponse>} + */ +const methodDescriptor_Query_Tokens = new grpc.web.MethodDescriptor( + '/irismod.token.Query/Tokens', + grpc.web.MethodType.UNARY, + proto.irismod.token.QueryTokensRequest, + proto.irismod.token.QueryTokensResponse, + /** + * @param {!proto.irismod.token.QueryTokensRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryTokensResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.QueryTokensRequest, + * !proto.irismod.token.QueryTokensResponse>} + */ +const methodInfo_Query_Tokens = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.QueryTokensResponse, + /** + * @param {!proto.irismod.token.QueryTokensRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryTokensResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.QueryTokensRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.QueryTokensResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.QueryClient.prototype.tokens = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Query/Tokens', + request, + metadata || {}, + methodDescriptor_Query_Tokens, + callback); +}; + + +/** + * @param {!proto.irismod.token.QueryTokensRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.QueryPromiseClient.prototype.tokens = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Query/Tokens', + request, + metadata || {}, + methodDescriptor_Query_Tokens); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.QueryFeesRequest, + * !proto.irismod.token.QueryFeesResponse>} + */ +const methodDescriptor_Query_Fees = new grpc.web.MethodDescriptor( + '/irismod.token.Query/Fees', + grpc.web.MethodType.UNARY, + proto.irismod.token.QueryFeesRequest, + proto.irismod.token.QueryFeesResponse, + /** + * @param {!proto.irismod.token.QueryFeesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryFeesResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.QueryFeesRequest, + * !proto.irismod.token.QueryFeesResponse>} + */ +const methodInfo_Query_Fees = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.QueryFeesResponse, + /** + * @param {!proto.irismod.token.QueryFeesRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryFeesResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.QueryFeesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.QueryFeesResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.QueryClient.prototype.fees = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Query/Fees', + request, + metadata || {}, + methodDescriptor_Query_Fees, + callback); +}; + + +/** + * @param {!proto.irismod.token.QueryFeesRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.QueryPromiseClient.prototype.fees = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Query/Fees', + request, + metadata || {}, + methodDescriptor_Query_Fees); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.QueryParamsRequest, + * !proto.irismod.token.QueryParamsResponse>} + */ +const methodDescriptor_Query_Params = new grpc.web.MethodDescriptor( + '/irismod.token.Query/Params', + grpc.web.MethodType.UNARY, + proto.irismod.token.QueryParamsRequest, + proto.irismod.token.QueryParamsResponse, + /** + * @param {!proto.irismod.token.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryParamsResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.QueryParamsRequest, + * !proto.irismod.token.QueryParamsResponse>} + */ +const methodInfo_Query_Params = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.QueryParamsResponse, + /** + * @param {!proto.irismod.token.QueryParamsRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.QueryParamsResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.QueryParamsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.QueryClient.prototype.params = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params, + callback); +}; + + +/** + * @param {!proto.irismod.token.QueryParamsRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.QueryPromiseClient.prototype.params = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Query/Params', + request, + metadata || {}, + methodDescriptor_Query_Params); +}; + + +module.exports = proto.irismod.token; + diff --git a/src/types/proto-types/irismod/token/query_pb.js b/src/types/proto-types/irismod/token/query_pb.js new file mode 100644 index 00000000..08f32097 --- /dev/null +++ b/src/types/proto-types/irismod/token/query_pb.js @@ -0,0 +1,1441 @@ +// source: irismod/token/query.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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_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_api_annotations_pb = require('../../google/api/annotations_pb.js'); +goog.object.extend(proto, google_api_annotations_pb); +var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); +goog.object.extend(proto, google_protobuf_any_pb); +var irismod_token_token_pb = require('../../irismod/token/token_pb.js'); +goog.object.extend(proto, irismod_token_token_pb); +goog.exportSymbol('proto.irismod.token.QueryFeesRequest', null, global); +goog.exportSymbol('proto.irismod.token.QueryFeesResponse', null, global); +goog.exportSymbol('proto.irismod.token.QueryParamsRequest', null, global); +goog.exportSymbol('proto.irismod.token.QueryParamsResponse', null, global); +goog.exportSymbol('proto.irismod.token.QueryTokenRequest', null, global); +goog.exportSymbol('proto.irismod.token.QueryTokenResponse', null, global); +goog.exportSymbol('proto.irismod.token.QueryTokensRequest', null, global); +goog.exportSymbol('proto.irismod.token.QueryTokensResponse', 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.irismod.token.QueryTokenRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.QueryTokenRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryTokenRequest.displayName = 'proto.irismod.token.QueryTokenRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.QueryTokenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.QueryTokenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryTokenResponse.displayName = 'proto.irismod.token.QueryTokenResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.QueryTokensRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.QueryTokensRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryTokensRequest.displayName = 'proto.irismod.token.QueryTokensRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.QueryTokensResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.irismod.token.QueryTokensResponse.repeatedFields_, null); +}; +goog.inherits(proto.irismod.token.QueryTokensResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryTokensResponse.displayName = 'proto.irismod.token.QueryTokensResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.QueryFeesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.QueryFeesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryFeesRequest.displayName = 'proto.irismod.token.QueryFeesRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.QueryFeesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.QueryFeesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryFeesResponse.displayName = 'proto.irismod.token.QueryFeesResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.QueryParamsRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.QueryParamsRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryParamsRequest.displayName = 'proto.irismod.token.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.irismod.token.QueryParamsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.QueryParamsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.QueryParamsResponse.displayName = 'proto.irismod.token.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.irismod.token.QueryTokenRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.QueryTokenRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.QueryTokenRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTokenRequest.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.irismod.token.QueryTokenRequest} + */ +proto.irismod.token.QueryTokenRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryTokenRequest; + return proto.irismod.token.QueryTokenRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryTokenRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryTokenRequest} + */ +proto.irismod.token.QueryTokenRequest.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.irismod.token.QueryTokenRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.QueryTokenRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.QueryTokenRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTokenRequest.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.irismod.token.QueryTokenRequest.prototype.getDenom = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.QueryTokenRequest} returns this + */ +proto.irismod.token.QueryTokenRequest.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.irismod.token.QueryTokenResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.QueryTokenResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.QueryTokenResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTokenResponse.toObject = function(includeInstance, msg) { + var f, obj = { + token: (f = msg.getToken()) && 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.irismod.token.QueryTokenResponse} + */ +proto.irismod.token.QueryTokenResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryTokenResponse; + return proto.irismod.token.QueryTokenResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryTokenResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryTokenResponse} + */ +proto.irismod.token.QueryTokenResponse.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.setToken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.QueryTokenResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.QueryTokenResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.QueryTokenResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTokenResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getToken(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * optional google.protobuf.Any Token = 1; + * @return {?proto.google.protobuf.Any} + */ +proto.irismod.token.QueryTokenResponse.prototype.getToken = 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.irismod.token.QueryTokenResponse} returns this +*/ +proto.irismod.token.QueryTokenResponse.prototype.setToken = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.QueryTokenResponse} returns this + */ +proto.irismod.token.QueryTokenResponse.prototype.clearToken = function() { + return this.setToken(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.QueryTokenResponse.prototype.hasToken = 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.irismod.token.QueryTokensRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.QueryTokensRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.QueryTokensRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTokensRequest.toObject = function(includeInstance, msg) { + var f, obj = { + owner: 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.irismod.token.QueryTokensRequest} + */ +proto.irismod.token.QueryTokensRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryTokensRequest; + return proto.irismod.token.QueryTokensRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryTokensRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryTokensRequest} + */ +proto.irismod.token.QueryTokensRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.QueryTokensRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.QueryTokensRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.QueryTokensRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTokensRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string owner = 1; + * @return {string} + */ +proto.irismod.token.QueryTokensRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.QueryTokensRequest} returns this + */ +proto.irismod.token.QueryTokensRequest.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.irismod.token.QueryTokensResponse.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.irismod.token.QueryTokensResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.QueryTokensResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.QueryTokensResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTokensResponse.toObject = function(includeInstance, msg) { + var f, obj = { + tokensList: jspb.Message.toObjectList(msg.getTokensList(), + 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.irismod.token.QueryTokensResponse} + */ +proto.irismod.token.QueryTokensResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryTokensResponse; + return proto.irismod.token.QueryTokensResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryTokensResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryTokensResponse} + */ +proto.irismod.token.QueryTokensResponse.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.addTokens(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.QueryTokensResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.QueryTokensResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.QueryTokensResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryTokensResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokensList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + google_protobuf_any_pb.Any.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated google.protobuf.Any Tokens = 1; + * @return {!Array} + */ +proto.irismod.token.QueryTokensResponse.prototype.getTokensList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.irismod.token.QueryTokensResponse} returns this +*/ +proto.irismod.token.QueryTokensResponse.prototype.setTokensList = 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.irismod.token.QueryTokensResponse.prototype.addTokens = 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.irismod.token.QueryTokensResponse} returns this + */ +proto.irismod.token.QueryTokensResponse.prototype.clearTokensList = function() { + return this.setTokensList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.token.QueryFeesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.QueryFeesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.QueryFeesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryFeesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + symbol: 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.irismod.token.QueryFeesRequest} + */ +proto.irismod.token.QueryFeesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryFeesRequest; + return proto.irismod.token.QueryFeesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryFeesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryFeesRequest} + */ +proto.irismod.token.QueryFeesRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.QueryFeesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.QueryFeesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.QueryFeesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryFeesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string symbol = 1; + * @return {string} + */ +proto.irismod.token.QueryFeesRequest.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.QueryFeesRequest} returns this + */ +proto.irismod.token.QueryFeesRequest.prototype.setSymbol = 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.irismod.token.QueryFeesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.QueryFeesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.QueryFeesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryFeesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + exist: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + issueFee: (f = msg.getIssueFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + mintFee: (f = msg.getMintFee()) && 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.irismod.token.QueryFeesResponse} + */ +proto.irismod.token.QueryFeesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryFeesResponse; + return proto.irismod.token.QueryFeesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryFeesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryFeesResponse} + */ +proto.irismod.token.QueryFeesResponse.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.setExist(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setIssueFee(value); + break; + case 3: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setMintFee(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.QueryFeesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.QueryFeesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.QueryFeesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryFeesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExist(); + if (f) { + writer.writeBool( + 1, + f + ); + } + f = message.getIssueFee(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getMintFee(); + if (f != null) { + writer.writeMessage( + 3, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bool exist = 1; + * @return {boolean} + */ +proto.irismod.token.QueryFeesResponse.prototype.getExist = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.token.QueryFeesResponse} returns this + */ +proto.irismod.token.QueryFeesResponse.prototype.setExist = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin issue_fee = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.token.QueryFeesResponse.prototype.getIssueFee = 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.irismod.token.QueryFeesResponse} returns this +*/ +proto.irismod.token.QueryFeesResponse.prototype.setIssueFee = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.QueryFeesResponse} returns this + */ +proto.irismod.token.QueryFeesResponse.prototype.clearIssueFee = function() { + return this.setIssueFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.QueryFeesResponse.prototype.hasIssueFee = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional cosmos.base.v1beta1.Coin mint_fee = 3; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.token.QueryFeesResponse.prototype.getMintFee = function() { + return /** @type{?proto.cosmos.base.v1beta1.Coin} */ ( + jspb.Message.getWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 3)); +}; + + +/** + * @param {?proto.cosmos.base.v1beta1.Coin|undefined} value + * @return {!proto.irismod.token.QueryFeesResponse} returns this +*/ +proto.irismod.token.QueryFeesResponse.prototype.setMintFee = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.QueryFeesResponse} returns this + */ +proto.irismod.token.QueryFeesResponse.prototype.clearMintFee = function() { + return this.setMintFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.QueryFeesResponse.prototype.hasMintFee = 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.irismod.token.QueryParamsRequest.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.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.irismod.token.QueryParamsRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.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.irismod.token.QueryParamsRequest} + */ +proto.irismod.token.QueryParamsRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryParamsRequest; + return proto.irismod.token.QueryParamsRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryParamsRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryParamsRequest} + */ +proto.irismod.token.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.irismod.token.QueryParamsRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.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.irismod.token.QueryParamsRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.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.irismod.token.QueryParamsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.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.irismod.token.QueryParamsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryParamsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + params: (f = msg.getParams()) && irismod_token_token_pb.Params.toObject(includeInstance, f), + res: (f = msg.getRes()) && 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.irismod.token.QueryParamsResponse} + */ +proto.irismod.token.QueryParamsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.QueryParamsResponse; + return proto.irismod.token.QueryParamsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.QueryParamsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.QueryParamsResponse} + */ +proto.irismod.token.QueryParamsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new irismod_token_token_pb.Params; + reader.readMessage(value,irismod_token_token_pb.Params.deserializeBinaryFromReader); + msg.setParams(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.setRes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.QueryParamsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.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.irismod.token.QueryParamsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.QueryParamsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + irismod_token_token_pb.Params.serializeBinaryToWriter + ); + } + f = message.getRes(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_query_v1beta1_pagination_pb.PageResponse.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Params params = 1; + * @return {?proto.irismod.token.Params} + */ +proto.irismod.token.QueryParamsResponse.prototype.getParams = function() { + return /** @type{?proto.irismod.token.Params} */ ( + jspb.Message.getWrapperField(this, irismod_token_token_pb.Params, 1)); +}; + + +/** + * @param {?proto.irismod.token.Params|undefined} value + * @return {!proto.irismod.token.QueryParamsResponse} returns this +*/ +proto.irismod.token.QueryParamsResponse.prototype.setParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.QueryParamsResponse} returns this + */ +proto.irismod.token.QueryParamsResponse.prototype.clearParams = function() { + return this.setParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.QueryParamsResponse.prototype.hasParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional cosmos.base.query.v1beta1.PageResponse res = 2; + * @return {?proto.cosmos.base.query.v1beta1.PageResponse} + */ +proto.irismod.token.QueryParamsResponse.prototype.getRes = 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.irismod.token.QueryParamsResponse} returns this +*/ +proto.irismod.token.QueryParamsResponse.prototype.setRes = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.QueryParamsResponse} returns this + */ +proto.irismod.token.QueryParamsResponse.prototype.clearRes = function() { + return this.setRes(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.QueryParamsResponse.prototype.hasRes = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.irismod.token); diff --git a/src/types/proto-types/irismod/token/token_pb.js b/src/types/proto-types/irismod/token/token_pb.js new file mode 100644 index 00000000..497ee9ba --- /dev/null +++ b/src/types/proto-types/irismod/token/token_pb.js @@ -0,0 +1,614 @@ +// source: irismod/token/token.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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.irismod.token.Params', null, global); +goog.exportSymbol('proto.irismod.token.Token', 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.irismod.token.Token = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.Token, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.Token.displayName = 'proto.irismod.token.Token'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.Params = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.Params, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.Params.displayName = 'proto.irismod.token.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.irismod.token.Token.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.Token.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.Token} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.Token.toObject = function(includeInstance, msg) { + var f, obj = { + symbol: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + scale: jspb.Message.getFieldWithDefault(msg, 3, 0), + minUnit: jspb.Message.getFieldWithDefault(msg, 4, ""), + initialSupply: jspb.Message.getFieldWithDefault(msg, 5, 0), + maxSupply: jspb.Message.getFieldWithDefault(msg, 6, 0), + mintable: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + owner: 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.irismod.token.Token} + */ +proto.irismod.token.Token.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.Token; + return proto.irismod.token.Token.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.Token} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.Token} + */ +proto.irismod.token.Token.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 {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setScale(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMinUnit(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInitialSupply(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxSupply(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMintable(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.Token.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.Token.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.Token} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.Token.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getScale(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getMinUnit(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getInitialSupply(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getMaxSupply(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getMintable(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional string symbol = 1; + * @return {string} + */ +proto.irismod.token.Token.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.Token} returns this + */ +proto.irismod.token.Token.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.irismod.token.Token.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.Token} returns this + */ +proto.irismod.token.Token.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint32 scale = 3; + * @return {number} + */ +proto.irismod.token.Token.prototype.getScale = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.Token} returns this + */ +proto.irismod.token.Token.prototype.setScale = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string min_unit = 4; + * @return {string} + */ +proto.irismod.token.Token.prototype.getMinUnit = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.Token} returns this + */ +proto.irismod.token.Token.prototype.setMinUnit = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional uint64 initial_supply = 5; + * @return {number} + */ +proto.irismod.token.Token.prototype.getInitialSupply = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.Token} returns this + */ +proto.irismod.token.Token.prototype.setInitialSupply = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 max_supply = 6; + * @return {number} + */ +proto.irismod.token.Token.prototype.getMaxSupply = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.Token} returns this + */ +proto.irismod.token.Token.prototype.setMaxSupply = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional bool mintable = 7; + * @return {boolean} + */ +proto.irismod.token.Token.prototype.getMintable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.token.Token} returns this + */ +proto.irismod.token.Token.prototype.setMintable = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional string owner = 8; + * @return {string} + */ +proto.irismod.token.Token.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.Token} returns this + */ +proto.irismod.token.Token.prototype.setOwner = 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.irismod.token.Params.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.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.irismod.token.Params} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.Params.toObject = function(includeInstance, msg) { + var f, obj = { + tokenTaxRate: jspb.Message.getFieldWithDefault(msg, 1, ""), + issueTokenBaseFee: (f = msg.getIssueTokenBaseFee()) && cosmos_base_v1beta1_coin_pb.Coin.toObject(includeInstance, f), + mintTokenFeeRatio: 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.irismod.token.Params} + */ +proto.irismod.token.Params.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.Params; + return proto.irismod.token.Params.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.Params} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.Params} + */ +proto.irismod.token.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.setTokenTaxRate(value); + break; + case 2: + var value = new cosmos_base_v1beta1_coin_pb.Coin; + reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader); + msg.setIssueTokenBaseFee(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMintTokenFeeRatio(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.Params.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.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.irismod.token.Params} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.Params.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTokenTaxRate(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIssueTokenBaseFee(); + if (f != null) { + writer.writeMessage( + 2, + f, + cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter + ); + } + f = message.getMintTokenFeeRatio(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string token_tax_rate = 1; + * @return {string} + */ +proto.irismod.token.Params.prototype.getTokenTaxRate = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.Params} returns this + */ +proto.irismod.token.Params.prototype.setTokenTaxRate = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional cosmos.base.v1beta1.Coin issue_token_base_fee = 2; + * @return {?proto.cosmos.base.v1beta1.Coin} + */ +proto.irismod.token.Params.prototype.getIssueTokenBaseFee = 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.irismod.token.Params} returns this +*/ +proto.irismod.token.Params.prototype.setIssueTokenBaseFee = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.irismod.token.Params} returns this + */ +proto.irismod.token.Params.prototype.clearIssueTokenBaseFee = function() { + return this.setIssueTokenBaseFee(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.irismod.token.Params.prototype.hasIssueTokenBaseFee = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional string mint_token_fee_ratio = 3; + * @return {string} + */ +proto.irismod.token.Params.prototype.getMintTokenFeeRatio = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.Params} returns this + */ +proto.irismod.token.Params.prototype.setMintTokenFeeRatio = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +goog.object.extend(exports, proto.irismod.token); diff --git a/src/types/proto-types/irismod/token/tx_grpc_web_pb.js b/src/types/proto-types/irismod/token/tx_grpc_web_pb.js new file mode 100644 index 00000000..6505dba2 --- /dev/null +++ b/src/types/proto-types/irismod/token/tx_grpc_web_pb.js @@ -0,0 +1,397 @@ +/** + * @fileoverview gRPC-Web generated client stub for irismod.token + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') +const proto = {}; +proto.irismod = {}; +proto.irismod.token = require('./tx_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.token.MsgClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.irismod.token.MsgPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.MsgIssueToken, + * !proto.irismod.token.MsgIssueTokenResponse>} + */ +const methodDescriptor_Msg_IssueToken = new grpc.web.MethodDescriptor( + '/irismod.token.Msg/IssueToken', + grpc.web.MethodType.UNARY, + proto.irismod.token.MsgIssueToken, + proto.irismod.token.MsgIssueTokenResponse, + /** + * @param {!proto.irismod.token.MsgIssueToken} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgIssueTokenResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.MsgIssueToken, + * !proto.irismod.token.MsgIssueTokenResponse>} + */ +const methodInfo_Msg_IssueToken = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.MsgIssueTokenResponse, + /** + * @param {!proto.irismod.token.MsgIssueToken} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgIssueTokenResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.MsgIssueToken} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.MsgIssueTokenResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.MsgClient.prototype.issueToken = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Msg/IssueToken', + request, + metadata || {}, + methodDescriptor_Msg_IssueToken, + callback); +}; + + +/** + * @param {!proto.irismod.token.MsgIssueToken} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.MsgPromiseClient.prototype.issueToken = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Msg/IssueToken', + request, + metadata || {}, + methodDescriptor_Msg_IssueToken); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.MsgEditToken, + * !proto.irismod.token.MsgEditTokenResponse>} + */ +const methodDescriptor_Msg_EditToken = new grpc.web.MethodDescriptor( + '/irismod.token.Msg/EditToken', + grpc.web.MethodType.UNARY, + proto.irismod.token.MsgEditToken, + proto.irismod.token.MsgEditTokenResponse, + /** + * @param {!proto.irismod.token.MsgEditToken} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgEditTokenResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.MsgEditToken, + * !proto.irismod.token.MsgEditTokenResponse>} + */ +const methodInfo_Msg_EditToken = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.MsgEditTokenResponse, + /** + * @param {!proto.irismod.token.MsgEditToken} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgEditTokenResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.MsgEditToken} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.MsgEditTokenResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.MsgClient.prototype.editToken = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Msg/EditToken', + request, + metadata || {}, + methodDescriptor_Msg_EditToken, + callback); +}; + + +/** + * @param {!proto.irismod.token.MsgEditToken} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.MsgPromiseClient.prototype.editToken = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Msg/EditToken', + request, + metadata || {}, + methodDescriptor_Msg_EditToken); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.MsgMintToken, + * !proto.irismod.token.MsgMintTokenResponse>} + */ +const methodDescriptor_Msg_MintToken = new grpc.web.MethodDescriptor( + '/irismod.token.Msg/MintToken', + grpc.web.MethodType.UNARY, + proto.irismod.token.MsgMintToken, + proto.irismod.token.MsgMintTokenResponse, + /** + * @param {!proto.irismod.token.MsgMintToken} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgMintTokenResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.MsgMintToken, + * !proto.irismod.token.MsgMintTokenResponse>} + */ +const methodInfo_Msg_MintToken = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.MsgMintTokenResponse, + /** + * @param {!proto.irismod.token.MsgMintToken} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgMintTokenResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.MsgMintToken} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.MsgMintTokenResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.MsgClient.prototype.mintToken = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Msg/MintToken', + request, + metadata || {}, + methodDescriptor_Msg_MintToken, + callback); +}; + + +/** + * @param {!proto.irismod.token.MsgMintToken} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.MsgPromiseClient.prototype.mintToken = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Msg/MintToken', + request, + metadata || {}, + methodDescriptor_Msg_MintToken); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.irismod.token.MsgTransferTokenOwner, + * !proto.irismod.token.MsgTransferTokenOwnerResponse>} + */ +const methodDescriptor_Msg_TransferTokenOwner = new grpc.web.MethodDescriptor( + '/irismod.token.Msg/TransferTokenOwner', + grpc.web.MethodType.UNARY, + proto.irismod.token.MsgTransferTokenOwner, + proto.irismod.token.MsgTransferTokenOwnerResponse, + /** + * @param {!proto.irismod.token.MsgTransferTokenOwner} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgTransferTokenOwnerResponse.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.irismod.token.MsgTransferTokenOwner, + * !proto.irismod.token.MsgTransferTokenOwnerResponse>} + */ +const methodInfo_Msg_TransferTokenOwner = new grpc.web.AbstractClientBase.MethodInfo( + proto.irismod.token.MsgTransferTokenOwnerResponse, + /** + * @param {!proto.irismod.token.MsgTransferTokenOwner} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.irismod.token.MsgTransferTokenOwnerResponse.deserializeBinary +); + + +/** + * @param {!proto.irismod.token.MsgTransferTokenOwner} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.irismod.token.MsgTransferTokenOwnerResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.irismod.token.MsgClient.prototype.transferTokenOwner = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/irismod.token.Msg/TransferTokenOwner', + request, + metadata || {}, + methodDescriptor_Msg_TransferTokenOwner, + callback); +}; + + +/** + * @param {!proto.irismod.token.MsgTransferTokenOwner} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.irismod.token.MsgPromiseClient.prototype.transferTokenOwner = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/irismod.token.Msg/TransferTokenOwner', + request, + metadata || {}, + methodDescriptor_Msg_TransferTokenOwner); +}; + + +module.exports = proto.irismod.token; + diff --git a/src/types/proto-types/irismod/token/tx_pb.js b/src/types/proto-types/irismod/token/tx_pb.js new file mode 100644 index 00000000..2de8a0ec --- /dev/null +++ b/src/types/proto-types/irismod/token/tx_pb.js @@ -0,0 +1,1597 @@ +// source: irismod/token/tx.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.irismod.token.MsgEditToken', null, global); +goog.exportSymbol('proto.irismod.token.MsgEditTokenResponse', null, global); +goog.exportSymbol('proto.irismod.token.MsgIssueToken', null, global); +goog.exportSymbol('proto.irismod.token.MsgIssueTokenResponse', null, global); +goog.exportSymbol('proto.irismod.token.MsgMintToken', null, global); +goog.exportSymbol('proto.irismod.token.MsgMintTokenResponse', null, global); +goog.exportSymbol('proto.irismod.token.MsgTransferTokenOwner', null, global); +goog.exportSymbol('proto.irismod.token.MsgTransferTokenOwnerResponse', 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.irismod.token.MsgIssueToken = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgIssueToken, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgIssueToken.displayName = 'proto.irismod.token.MsgIssueToken'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.MsgIssueTokenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgIssueTokenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgIssueTokenResponse.displayName = 'proto.irismod.token.MsgIssueTokenResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.MsgTransferTokenOwner = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgTransferTokenOwner, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgTransferTokenOwner.displayName = 'proto.irismod.token.MsgTransferTokenOwner'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.MsgTransferTokenOwnerResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgTransferTokenOwnerResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgTransferTokenOwnerResponse.displayName = 'proto.irismod.token.MsgTransferTokenOwnerResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.MsgEditToken = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgEditToken, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgEditToken.displayName = 'proto.irismod.token.MsgEditToken'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.MsgEditTokenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgEditTokenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgEditTokenResponse.displayName = 'proto.irismod.token.MsgEditTokenResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.MsgMintToken = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgMintToken, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgMintToken.displayName = 'proto.irismod.token.MsgMintToken'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.irismod.token.MsgMintTokenResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.irismod.token.MsgMintTokenResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.irismod.token.MsgMintTokenResponse.displayName = 'proto.irismod.token.MsgMintTokenResponse'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.irismod.token.MsgIssueToken.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgIssueToken.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.MsgIssueToken} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgIssueToken.toObject = function(includeInstance, msg) { + var f, obj = { + symbol: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + scale: jspb.Message.getFieldWithDefault(msg, 3, 0), + minUnit: jspb.Message.getFieldWithDefault(msg, 4, ""), + initialSupply: jspb.Message.getFieldWithDefault(msg, 5, 0), + maxSupply: jspb.Message.getFieldWithDefault(msg, 6, 0), + mintable: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), + owner: 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.irismod.token.MsgIssueToken} + */ +proto.irismod.token.MsgIssueToken.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgIssueToken; + return proto.irismod.token.MsgIssueToken.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgIssueToken} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgIssueToken} + */ +proto.irismod.token.MsgIssueToken.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 {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setScale(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMinUnit(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setInitialSupply(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxSupply(value); + break; + case 7: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setMintable(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.MsgIssueToken.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgIssueToken.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgIssueToken} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgIssueToken.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getScale(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } + f = message.getMinUnit(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getInitialSupply(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } + f = message.getMaxSupply(); + if (f !== 0) { + writer.writeUint64( + 6, + f + ); + } + f = message.getMintable(); + if (f) { + writer.writeBool( + 7, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } +}; + + +/** + * optional string symbol = 1; + * @return {string} + */ +proto.irismod.token.MsgIssueToken.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgIssueToken} returns this + */ +proto.irismod.token.MsgIssueToken.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.irismod.token.MsgIssueToken.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgIssueToken} returns this + */ +proto.irismod.token.MsgIssueToken.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint32 scale = 3; + * @return {number} + */ +proto.irismod.token.MsgIssueToken.prototype.getScale = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.MsgIssueToken} returns this + */ +proto.irismod.token.MsgIssueToken.prototype.setScale = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string min_unit = 4; + * @return {string} + */ +proto.irismod.token.MsgIssueToken.prototype.getMinUnit = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgIssueToken} returns this + */ +proto.irismod.token.MsgIssueToken.prototype.setMinUnit = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional uint64 initial_supply = 5; + * @return {number} + */ +proto.irismod.token.MsgIssueToken.prototype.getInitialSupply = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.MsgIssueToken} returns this + */ +proto.irismod.token.MsgIssueToken.prototype.setInitialSupply = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional uint64 max_supply = 6; + * @return {number} + */ +proto.irismod.token.MsgIssueToken.prototype.getMaxSupply = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.MsgIssueToken} returns this + */ +proto.irismod.token.MsgIssueToken.prototype.setMaxSupply = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional bool mintable = 7; + * @return {boolean} + */ +proto.irismod.token.MsgIssueToken.prototype.getMintable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.irismod.token.MsgIssueToken} returns this + */ +proto.irismod.token.MsgIssueToken.prototype.setMintable = function(value) { + return jspb.Message.setProto3BooleanField(this, 7, value); +}; + + +/** + * optional string owner = 8; + * @return {string} + */ +proto.irismod.token.MsgIssueToken.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgIssueToken} returns this + */ +proto.irismod.token.MsgIssueToken.prototype.setOwner = 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.irismod.token.MsgIssueTokenResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgIssueTokenResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.MsgIssueTokenResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgIssueTokenResponse.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.irismod.token.MsgIssueTokenResponse} + */ +proto.irismod.token.MsgIssueTokenResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgIssueTokenResponse; + return proto.irismod.token.MsgIssueTokenResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgIssueTokenResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgIssueTokenResponse} + */ +proto.irismod.token.MsgIssueTokenResponse.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.irismod.token.MsgIssueTokenResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgIssueTokenResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgIssueTokenResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgIssueTokenResponse.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.irismod.token.MsgTransferTokenOwner.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgTransferTokenOwner.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.MsgTransferTokenOwner} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgTransferTokenOwner.toObject = function(includeInstance, msg) { + var f, obj = { + srcOwner: jspb.Message.getFieldWithDefault(msg, 1, ""), + dstOwner: jspb.Message.getFieldWithDefault(msg, 2, ""), + symbol: 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.irismod.token.MsgTransferTokenOwner} + */ +proto.irismod.token.MsgTransferTokenOwner.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgTransferTokenOwner; + return proto.irismod.token.MsgTransferTokenOwner.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgTransferTokenOwner} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgTransferTokenOwner} + */ +proto.irismod.token.MsgTransferTokenOwner.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.setSrcOwner(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDstOwner(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSymbol(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.MsgTransferTokenOwner.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgTransferTokenOwner.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgTransferTokenOwner} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgTransferTokenOwner.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSrcOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getDstOwner(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string src_owner = 1; + * @return {string} + */ +proto.irismod.token.MsgTransferTokenOwner.prototype.getSrcOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgTransferTokenOwner} returns this + */ +proto.irismod.token.MsgTransferTokenOwner.prototype.setSrcOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string dst_owner = 2; + * @return {string} + */ +proto.irismod.token.MsgTransferTokenOwner.prototype.getDstOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgTransferTokenOwner} returns this + */ +proto.irismod.token.MsgTransferTokenOwner.prototype.setDstOwner = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string symbol = 3; + * @return {string} + */ +proto.irismod.token.MsgTransferTokenOwner.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgTransferTokenOwner} returns this + */ +proto.irismod.token.MsgTransferTokenOwner.prototype.setSymbol = 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.irismod.token.MsgTransferTokenOwnerResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgTransferTokenOwnerResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.MsgTransferTokenOwnerResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgTransferTokenOwnerResponse.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.irismod.token.MsgTransferTokenOwnerResponse} + */ +proto.irismod.token.MsgTransferTokenOwnerResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgTransferTokenOwnerResponse; + return proto.irismod.token.MsgTransferTokenOwnerResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgTransferTokenOwnerResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgTransferTokenOwnerResponse} + */ +proto.irismod.token.MsgTransferTokenOwnerResponse.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.irismod.token.MsgTransferTokenOwnerResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgTransferTokenOwnerResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgTransferTokenOwnerResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgTransferTokenOwnerResponse.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.irismod.token.MsgEditToken.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgEditToken.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.MsgEditToken} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgEditToken.toObject = function(includeInstance, msg) { + var f, obj = { + symbol: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + maxSupply: jspb.Message.getFieldWithDefault(msg, 3, 0), + mintable: jspb.Message.getFieldWithDefault(msg, 4, ""), + owner: 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.irismod.token.MsgEditToken} + */ +proto.irismod.token.MsgEditToken.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgEditToken; + return proto.irismod.token.MsgEditToken.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgEditToken} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgEditToken} + */ +proto.irismod.token.MsgEditToken.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 {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setMaxSupply(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMintable(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.MsgEditToken.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgEditToken.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgEditToken} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgEditToken.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMaxSupply(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getMintable(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string symbol = 1; + * @return {string} + */ +proto.irismod.token.MsgEditToken.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgEditToken} returns this + */ +proto.irismod.token.MsgEditToken.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.irismod.token.MsgEditToken.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgEditToken} returns this + */ +proto.irismod.token.MsgEditToken.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 max_supply = 3; + * @return {number} + */ +proto.irismod.token.MsgEditToken.prototype.getMaxSupply = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.MsgEditToken} returns this + */ +proto.irismod.token.MsgEditToken.prototype.setMaxSupply = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional string mintable = 4; + * @return {string} + */ +proto.irismod.token.MsgEditToken.prototype.getMintable = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgEditToken} returns this + */ +proto.irismod.token.MsgEditToken.prototype.setMintable = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string owner = 5; + * @return {string} + */ +proto.irismod.token.MsgEditToken.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgEditToken} returns this + */ +proto.irismod.token.MsgEditToken.prototype.setOwner = 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.irismod.token.MsgEditTokenResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgEditTokenResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.MsgEditTokenResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgEditTokenResponse.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.irismod.token.MsgEditTokenResponse} + */ +proto.irismod.token.MsgEditTokenResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgEditTokenResponse; + return proto.irismod.token.MsgEditTokenResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgEditTokenResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgEditTokenResponse} + */ +proto.irismod.token.MsgEditTokenResponse.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.irismod.token.MsgEditTokenResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgEditTokenResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgEditTokenResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgEditTokenResponse.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.irismod.token.MsgMintToken.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgMintToken.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.MsgMintToken} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgMintToken.toObject = function(includeInstance, msg) { + var f, obj = { + symbol: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: jspb.Message.getFieldWithDefault(msg, 2, 0), + to: jspb.Message.getFieldWithDefault(msg, 3, ""), + owner: 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.irismod.token.MsgMintToken} + */ +proto.irismod.token.MsgMintToken.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgMintToken; + return proto.irismod.token.MsgMintToken.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgMintToken} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgMintToken} + */ +proto.irismod.token.MsgMintToken.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.setAmount(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTo(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.irismod.token.MsgMintToken.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgMintToken.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgMintToken} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgMintToken.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSymbol(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmount(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getTo(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string symbol = 1; + * @return {string} + */ +proto.irismod.token.MsgMintToken.prototype.getSymbol = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgMintToken} returns this + */ +proto.irismod.token.MsgMintToken.prototype.setSymbol = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 amount = 2; + * @return {number} + */ +proto.irismod.token.MsgMintToken.prototype.getAmount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.irismod.token.MsgMintToken} returns this + */ +proto.irismod.token.MsgMintToken.prototype.setAmount = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string to = 3; + * @return {string} + */ +proto.irismod.token.MsgMintToken.prototype.getTo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgMintToken} returns this + */ +proto.irismod.token.MsgMintToken.prototype.setTo = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string owner = 4; + * @return {string} + */ +proto.irismod.token.MsgMintToken.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.irismod.token.MsgMintToken} returns this + */ +proto.irismod.token.MsgMintToken.prototype.setOwner = 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.irismod.token.MsgMintTokenResponse.prototype.toObject = function(opt_includeInstance) { + return proto.irismod.token.MsgMintTokenResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.irismod.token.MsgMintTokenResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgMintTokenResponse.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.irismod.token.MsgMintTokenResponse} + */ +proto.irismod.token.MsgMintTokenResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.irismod.token.MsgMintTokenResponse; + return proto.irismod.token.MsgMintTokenResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.irismod.token.MsgMintTokenResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.irismod.token.MsgMintTokenResponse} + */ +proto.irismod.token.MsgMintTokenResponse.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.irismod.token.MsgMintTokenResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.irismod.token.MsgMintTokenResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.irismod.token.MsgMintTokenResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.irismod.token.MsgMintTokenResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + +goog.object.extend(exports, proto.irismod.token); diff --git a/src/types/proto-types/tendermint/abci/types_grpc_web_pb.js b/src/types/proto-types/tendermint/abci/types_grpc_web_pb.js new file mode 100644 index 00000000..b808ab92 --- /dev/null +++ b/src/types/proto-types/tendermint/abci/types_grpc_web_pb.js @@ -0,0 +1,1287 @@ +/** + * @fileoverview gRPC-Web generated client stub for tendermint.abci + * @enhanceable + * @public + */ + +// GENERATED CODE -- DO NOT EDIT! + + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + + +var tendermint_crypto_proof_pb = require('../../tendermint/crypto/proof_pb.js') + +var tendermint_types_types_pb = require('../../tendermint/types/types_pb.js') + +var tendermint_crypto_keys_pb = require('../../tendermint/crypto/keys_pb.js') + +var tendermint_types_params_pb = require('../../tendermint/types/params_pb.js') + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js') + +var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') +const proto = {}; +proto.tendermint = {}; +proto.tendermint.abci = require('./types_pb.js'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.tendermint.abci.ABCIApplicationClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?Object} options + * @constructor + * @struct + * @final + */ +proto.tendermint.abci.ABCIApplicationPromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options['format'] = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestEcho, + * !proto.tendermint.abci.ResponseEcho>} + */ +const methodDescriptor_ABCIApplication_Echo = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/Echo', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestEcho, + proto.tendermint.abci.ResponseEcho, + /** + * @param {!proto.tendermint.abci.RequestEcho} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseEcho.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestEcho, + * !proto.tendermint.abci.ResponseEcho>} + */ +const methodInfo_ABCIApplication_Echo = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseEcho, + /** + * @param {!proto.tendermint.abci.RequestEcho} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseEcho.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestEcho} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseEcho)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.echo = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Echo', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Echo, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestEcho} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.echo = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Echo', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Echo); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestFlush, + * !proto.tendermint.abci.ResponseFlush>} + */ +const methodDescriptor_ABCIApplication_Flush = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/Flush', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestFlush, + proto.tendermint.abci.ResponseFlush, + /** + * @param {!proto.tendermint.abci.RequestFlush} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseFlush.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestFlush, + * !proto.tendermint.abci.ResponseFlush>} + */ +const methodInfo_ABCIApplication_Flush = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseFlush, + /** + * @param {!proto.tendermint.abci.RequestFlush} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseFlush.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestFlush} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseFlush)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.flush = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Flush', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Flush, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestFlush} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.flush = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Flush', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Flush); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestInfo, + * !proto.tendermint.abci.ResponseInfo>} + */ +const methodDescriptor_ABCIApplication_Info = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/Info', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestInfo, + proto.tendermint.abci.ResponseInfo, + /** + * @param {!proto.tendermint.abci.RequestInfo} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseInfo.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestInfo, + * !proto.tendermint.abci.ResponseInfo>} + */ +const methodInfo_ABCIApplication_Info = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseInfo, + /** + * @param {!proto.tendermint.abci.RequestInfo} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseInfo.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestInfo} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseInfo)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.info = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Info', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Info, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestInfo} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.info = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Info', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Info); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestSetOption, + * !proto.tendermint.abci.ResponseSetOption>} + */ +const methodDescriptor_ABCIApplication_SetOption = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/SetOption', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestSetOption, + proto.tendermint.abci.ResponseSetOption, + /** + * @param {!proto.tendermint.abci.RequestSetOption} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseSetOption.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestSetOption, + * !proto.tendermint.abci.ResponseSetOption>} + */ +const methodInfo_ABCIApplication_SetOption = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseSetOption, + /** + * @param {!proto.tendermint.abci.RequestSetOption} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseSetOption.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestSetOption} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseSetOption)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.setOption = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/SetOption', + request, + metadata || {}, + methodDescriptor_ABCIApplication_SetOption, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestSetOption} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.setOption = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/SetOption', + request, + metadata || {}, + methodDescriptor_ABCIApplication_SetOption); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestDeliverTx, + * !proto.tendermint.abci.ResponseDeliverTx>} + */ +const methodDescriptor_ABCIApplication_DeliverTx = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/DeliverTx', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestDeliverTx, + proto.tendermint.abci.ResponseDeliverTx, + /** + * @param {!proto.tendermint.abci.RequestDeliverTx} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseDeliverTx.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestDeliverTx, + * !proto.tendermint.abci.ResponseDeliverTx>} + */ +const methodInfo_ABCIApplication_DeliverTx = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseDeliverTx, + /** + * @param {!proto.tendermint.abci.RequestDeliverTx} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseDeliverTx.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestDeliverTx} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseDeliverTx)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.deliverTx = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/DeliverTx', + request, + metadata || {}, + methodDescriptor_ABCIApplication_DeliverTx, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestDeliverTx} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.deliverTx = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/DeliverTx', + request, + metadata || {}, + methodDescriptor_ABCIApplication_DeliverTx); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestCheckTx, + * !proto.tendermint.abci.ResponseCheckTx>} + */ +const methodDescriptor_ABCIApplication_CheckTx = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/CheckTx', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestCheckTx, + proto.tendermint.abci.ResponseCheckTx, + /** + * @param {!proto.tendermint.abci.RequestCheckTx} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseCheckTx.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestCheckTx, + * !proto.tendermint.abci.ResponseCheckTx>} + */ +const methodInfo_ABCIApplication_CheckTx = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseCheckTx, + /** + * @param {!proto.tendermint.abci.RequestCheckTx} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseCheckTx.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestCheckTx} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseCheckTx)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.checkTx = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/CheckTx', + request, + metadata || {}, + methodDescriptor_ABCIApplication_CheckTx, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestCheckTx} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.checkTx = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/CheckTx', + request, + metadata || {}, + methodDescriptor_ABCIApplication_CheckTx); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestQuery, + * !proto.tendermint.abci.ResponseQuery>} + */ +const methodDescriptor_ABCIApplication_Query = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/Query', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestQuery, + proto.tendermint.abci.ResponseQuery, + /** + * @param {!proto.tendermint.abci.RequestQuery} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseQuery.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestQuery, + * !proto.tendermint.abci.ResponseQuery>} + */ +const methodInfo_ABCIApplication_Query = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseQuery, + /** + * @param {!proto.tendermint.abci.RequestQuery} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseQuery.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestQuery} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseQuery)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.query = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Query', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Query, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestQuery} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.query = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Query', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Query); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestCommit, + * !proto.tendermint.abci.ResponseCommit>} + */ +const methodDescriptor_ABCIApplication_Commit = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/Commit', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestCommit, + proto.tendermint.abci.ResponseCommit, + /** + * @param {!proto.tendermint.abci.RequestCommit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseCommit.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestCommit, + * !proto.tendermint.abci.ResponseCommit>} + */ +const methodInfo_ABCIApplication_Commit = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseCommit, + /** + * @param {!proto.tendermint.abci.RequestCommit} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseCommit.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestCommit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseCommit)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.commit = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Commit', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Commit, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestCommit} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.commit = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/Commit', + request, + metadata || {}, + methodDescriptor_ABCIApplication_Commit); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestInitChain, + * !proto.tendermint.abci.ResponseInitChain>} + */ +const methodDescriptor_ABCIApplication_InitChain = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/InitChain', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestInitChain, + proto.tendermint.abci.ResponseInitChain, + /** + * @param {!proto.tendermint.abci.RequestInitChain} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseInitChain.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestInitChain, + * !proto.tendermint.abci.ResponseInitChain>} + */ +const methodInfo_ABCIApplication_InitChain = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseInitChain, + /** + * @param {!proto.tendermint.abci.RequestInitChain} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseInitChain.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestInitChain} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseInitChain)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.initChain = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/InitChain', + request, + metadata || {}, + methodDescriptor_ABCIApplication_InitChain, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestInitChain} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.initChain = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/InitChain', + request, + metadata || {}, + methodDescriptor_ABCIApplication_InitChain); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestBeginBlock, + * !proto.tendermint.abci.ResponseBeginBlock>} + */ +const methodDescriptor_ABCIApplication_BeginBlock = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/BeginBlock', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestBeginBlock, + proto.tendermint.abci.ResponseBeginBlock, + /** + * @param {!proto.tendermint.abci.RequestBeginBlock} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseBeginBlock.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestBeginBlock, + * !proto.tendermint.abci.ResponseBeginBlock>} + */ +const methodInfo_ABCIApplication_BeginBlock = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseBeginBlock, + /** + * @param {!proto.tendermint.abci.RequestBeginBlock} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseBeginBlock.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestBeginBlock} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseBeginBlock)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.beginBlock = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/BeginBlock', + request, + metadata || {}, + methodDescriptor_ABCIApplication_BeginBlock, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestBeginBlock} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.beginBlock = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/BeginBlock', + request, + metadata || {}, + methodDescriptor_ABCIApplication_BeginBlock); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestEndBlock, + * !proto.tendermint.abci.ResponseEndBlock>} + */ +const methodDescriptor_ABCIApplication_EndBlock = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/EndBlock', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestEndBlock, + proto.tendermint.abci.ResponseEndBlock, + /** + * @param {!proto.tendermint.abci.RequestEndBlock} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseEndBlock.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestEndBlock, + * !proto.tendermint.abci.ResponseEndBlock>} + */ +const methodInfo_ABCIApplication_EndBlock = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseEndBlock, + /** + * @param {!proto.tendermint.abci.RequestEndBlock} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseEndBlock.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestEndBlock} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseEndBlock)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.endBlock = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/EndBlock', + request, + metadata || {}, + methodDescriptor_ABCIApplication_EndBlock, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestEndBlock} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.endBlock = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/EndBlock', + request, + metadata || {}, + methodDescriptor_ABCIApplication_EndBlock); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestListSnapshots, + * !proto.tendermint.abci.ResponseListSnapshots>} + */ +const methodDescriptor_ABCIApplication_ListSnapshots = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/ListSnapshots', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestListSnapshots, + proto.tendermint.abci.ResponseListSnapshots, + /** + * @param {!proto.tendermint.abci.RequestListSnapshots} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseListSnapshots.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestListSnapshots, + * !proto.tendermint.abci.ResponseListSnapshots>} + */ +const methodInfo_ABCIApplication_ListSnapshots = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseListSnapshots, + /** + * @param {!proto.tendermint.abci.RequestListSnapshots} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseListSnapshots.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestListSnapshots} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseListSnapshots)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.listSnapshots = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/ListSnapshots', + request, + metadata || {}, + methodDescriptor_ABCIApplication_ListSnapshots, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestListSnapshots} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.listSnapshots = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/ListSnapshots', + request, + metadata || {}, + methodDescriptor_ABCIApplication_ListSnapshots); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestOfferSnapshot, + * !proto.tendermint.abci.ResponseOfferSnapshot>} + */ +const methodDescriptor_ABCIApplication_OfferSnapshot = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/OfferSnapshot', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestOfferSnapshot, + proto.tendermint.abci.ResponseOfferSnapshot, + /** + * @param {!proto.tendermint.abci.RequestOfferSnapshot} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestOfferSnapshot, + * !proto.tendermint.abci.ResponseOfferSnapshot>} + */ +const methodInfo_ABCIApplication_OfferSnapshot = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseOfferSnapshot, + /** + * @param {!proto.tendermint.abci.RequestOfferSnapshot} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestOfferSnapshot} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseOfferSnapshot)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.offerSnapshot = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/OfferSnapshot', + request, + metadata || {}, + methodDescriptor_ABCIApplication_OfferSnapshot, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestOfferSnapshot} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.offerSnapshot = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/OfferSnapshot', + request, + metadata || {}, + methodDescriptor_ABCIApplication_OfferSnapshot); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestLoadSnapshotChunk, + * !proto.tendermint.abci.ResponseLoadSnapshotChunk>} + */ +const methodDescriptor_ABCIApplication_LoadSnapshotChunk = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/LoadSnapshotChunk', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestLoadSnapshotChunk, + proto.tendermint.abci.ResponseLoadSnapshotChunk, + /** + * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestLoadSnapshotChunk, + * !proto.tendermint.abci.ResponseLoadSnapshotChunk>} + */ +const methodInfo_ABCIApplication_LoadSnapshotChunk = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseLoadSnapshotChunk, + /** + * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseLoadSnapshotChunk)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.loadSnapshotChunk = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/LoadSnapshotChunk', + request, + metadata || {}, + methodDescriptor_ABCIApplication_LoadSnapshotChunk, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestLoadSnapshotChunk} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.loadSnapshotChunk = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/LoadSnapshotChunk', + request, + metadata || {}, + methodDescriptor_ABCIApplication_LoadSnapshotChunk); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.tendermint.abci.RequestApplySnapshotChunk, + * !proto.tendermint.abci.ResponseApplySnapshotChunk>} + */ +const methodDescriptor_ABCIApplication_ApplySnapshotChunk = new grpc.web.MethodDescriptor( + '/tendermint.abci.ABCIApplication/ApplySnapshotChunk', + grpc.web.MethodType.UNARY, + proto.tendermint.abci.RequestApplySnapshotChunk, + proto.tendermint.abci.ResponseApplySnapshotChunk, + /** + * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseApplySnapshotChunk.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.tendermint.abci.RequestApplySnapshotChunk, + * !proto.tendermint.abci.ResponseApplySnapshotChunk>} + */ +const methodInfo_ABCIApplication_ApplySnapshotChunk = new grpc.web.AbstractClientBase.MethodInfo( + proto.tendermint.abci.ResponseApplySnapshotChunk, + /** + * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.tendermint.abci.ResponseApplySnapshotChunk.deserializeBinary +); + + +/** + * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.tendermint.abci.ResponseApplySnapshotChunk)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.tendermint.abci.ABCIApplicationClient.prototype.applySnapshotChunk = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/ApplySnapshotChunk', + request, + metadata || {}, + methodDescriptor_ABCIApplication_ApplySnapshotChunk, + callback); +}; + + +/** + * @param {!proto.tendermint.abci.RequestApplySnapshotChunk} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.tendermint.abci.ABCIApplicationPromiseClient.prototype.applySnapshotChunk = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/tendermint.abci.ABCIApplication/ApplySnapshotChunk', + request, + metadata || {}, + methodDescriptor_ABCIApplication_ApplySnapshotChunk); +}; + + +module.exports = proto.tendermint.abci; + diff --git a/src/types/proto-types/tendermint/abci/types_pb.js b/src/types/proto-types/tendermint/abci/types_pb.js new file mode 100644 index 00000000..4c767e02 --- /dev/null +++ b/src/types/proto-types/tendermint/abci/types_pb.js @@ -0,0 +1,11785 @@ +// source: tendermint/abci/types.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +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 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.tendermint.abci.BlockParams', null, global); +goog.exportSymbol('proto.tendermint.abci.CheckTxType', null, global); +goog.exportSymbol('proto.tendermint.abci.ConsensusParams', null, global); +goog.exportSymbol('proto.tendermint.abci.Event', null, global); +goog.exportSymbol('proto.tendermint.abci.EventAttribute', null, global); +goog.exportSymbol('proto.tendermint.abci.Evidence', null, global); +goog.exportSymbol('proto.tendermint.abci.EvidenceType', null, global); +goog.exportSymbol('proto.tendermint.abci.LastCommitInfo', 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.RequestFlush', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestInfo', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestInitChain', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestListSnapshots', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestLoadSnapshotChunk', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestOfferSnapshot', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestQuery', null, global); +goog.exportSymbol('proto.tendermint.abci.RequestSetOption', 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.ResponseFlush', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseInfo', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseInitChain', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseListSnapshots', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseLoadSnapshotChunk', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseOfferSnapshot', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseOfferSnapshot.Result', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseQuery', null, global); +goog.exportSymbol('proto.tendermint.abci.ResponseSetOption', 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); +goog.exportSymbol('proto.tendermint.abci.ValidatorUpdate', null, global); +goog.exportSymbol('proto.tendermint.abci.VoteInfo', 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.tendermint.abci.Request = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.abci.Request.oneofGroups_); +}; +goog.inherits(proto.tendermint.abci.Request, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Request.displayName = 'proto.tendermint.abci.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.tendermint.abci.RequestEcho = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestEcho, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestEcho.displayName = 'proto.tendermint.abci.RequestEcho'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestFlush = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestFlush, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestFlush.displayName = 'proto.tendermint.abci.RequestFlush'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestInfo.displayName = 'proto.tendermint.abci.RequestInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestSetOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestSetOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestSetOption.displayName = 'proto.tendermint.abci.RequestSetOption'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestInitChain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.RequestInitChain.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.RequestInitChain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestInitChain.displayName = 'proto.tendermint.abci.RequestInitChain'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestQuery = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestQuery, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestQuery.displayName = 'proto.tendermint.abci.RequestQuery'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestBeginBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.RequestBeginBlock.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.RequestBeginBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestBeginBlock.displayName = 'proto.tendermint.abci.RequestBeginBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestCheckTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestCheckTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestCheckTx.displayName = 'proto.tendermint.abci.RequestCheckTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestDeliverTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestDeliverTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestDeliverTx.displayName = 'proto.tendermint.abci.RequestDeliverTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestEndBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestEndBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestEndBlock.displayName = 'proto.tendermint.abci.RequestEndBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestCommit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestCommit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestCommit.displayName = 'proto.tendermint.abci.RequestCommit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestListSnapshots = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestListSnapshots, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestListSnapshots.displayName = 'proto.tendermint.abci.RequestListSnapshots'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestOfferSnapshot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestOfferSnapshot, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestOfferSnapshot.displayName = 'proto.tendermint.abci.RequestOfferSnapshot'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestLoadSnapshotChunk = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestLoadSnapshotChunk, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestLoadSnapshotChunk.displayName = 'proto.tendermint.abci.RequestLoadSnapshotChunk'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.RequestApplySnapshotChunk = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.RequestApplySnapshotChunk, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.RequestApplySnapshotChunk.displayName = 'proto.tendermint.abci.RequestApplySnapshotChunk'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Response = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.abci.Response.oneofGroups_); +}; +goog.inherits(proto.tendermint.abci.Response, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Response.displayName = 'proto.tendermint.abci.Response'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseException = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseException, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseException.displayName = 'proto.tendermint.abci.ResponseException'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseEcho = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseEcho, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseEcho.displayName = 'proto.tendermint.abci.ResponseEcho'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseFlush = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseFlush, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseFlush.displayName = 'proto.tendermint.abci.ResponseFlush'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseInfo.displayName = 'proto.tendermint.abci.ResponseInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseSetOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseSetOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseSetOption.displayName = 'proto.tendermint.abci.ResponseSetOption'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseInitChain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseInitChain.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseInitChain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseInitChain.displayName = 'proto.tendermint.abci.ResponseInitChain'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseQuery = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseQuery, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseQuery.displayName = 'proto.tendermint.abci.ResponseQuery'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseBeginBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseBeginBlock.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseBeginBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseBeginBlock.displayName = 'proto.tendermint.abci.ResponseBeginBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseCheckTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseCheckTx.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseCheckTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseCheckTx.displayName = 'proto.tendermint.abci.ResponseCheckTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseDeliverTx = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseDeliverTx.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseDeliverTx, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseDeliverTx.displayName = 'proto.tendermint.abci.ResponseDeliverTx'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseEndBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseEndBlock.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseEndBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseEndBlock.displayName = 'proto.tendermint.abci.ResponseEndBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseCommit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseCommit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseCommit.displayName = 'proto.tendermint.abci.ResponseCommit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseListSnapshots = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseListSnapshots.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseListSnapshots, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseListSnapshots.displayName = 'proto.tendermint.abci.ResponseListSnapshots'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseOfferSnapshot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseOfferSnapshot, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseOfferSnapshot.displayName = 'proto.tendermint.abci.ResponseOfferSnapshot'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseLoadSnapshotChunk = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ResponseLoadSnapshotChunk, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseLoadSnapshotChunk.displayName = 'proto.tendermint.abci.ResponseLoadSnapshotChunk'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ResponseApplySnapshotChunk = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.ResponseApplySnapshotChunk.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.ResponseApplySnapshotChunk, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ResponseApplySnapshotChunk.displayName = 'proto.tendermint.abci.ResponseApplySnapshotChunk'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ConsensusParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ConsensusParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ConsensusParams.displayName = 'proto.tendermint.abci.ConsensusParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.BlockParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.BlockParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.BlockParams.displayName = 'proto.tendermint.abci.BlockParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.LastCommitInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.LastCommitInfo.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.LastCommitInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.LastCommitInfo.displayName = 'proto.tendermint.abci.LastCommitInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Event = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.abci.Event.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.abci.Event, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Event.displayName = 'proto.tendermint.abci.Event'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.EventAttribute = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.EventAttribute, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + 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.TxResult = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.TxResult, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.TxResult.displayName = 'proto.tendermint.abci.TxResult'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Validator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.Validator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Validator.displayName = 'proto.tendermint.abci.Validator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorUpdate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.ValidatorUpdate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.ValidatorUpdate.displayName = 'proto.tendermint.abci.ValidatorUpdate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.VoteInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.VoteInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.VoteInfo.displayName = 'proto.tendermint.abci.VoteInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Evidence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.Evidence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Evidence.displayName = 'proto.tendermint.abci.Evidence'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Snapshot = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.abci.Snapshot, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.abci.Snapshot.displayName = 'proto.tendermint.abci.Snapshot'; +} + +/** + * 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.Request.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]]; + +/** + * @enum {number} + */ +proto.tendermint.abci.Request.ValueCase = { + VALUE_NOT_SET: 0, + ECHO: 1, + FLUSH: 2, + INFO: 3, + SET_OPTION: 4, + 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 +}; + +/** + * @return {proto.tendermint.abci.Request.ValueCase} + */ +proto.tendermint.abci.Request.prototype.getValueCase = function() { + return /** @type {proto.tendermint.abci.Request.ValueCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.abci.Request.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.Request.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.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.tendermint.abci.Request} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Request.toObject = function(includeInstance, msg) { + var f, obj = { + echo: (f = msg.getEcho()) && proto.tendermint.abci.RequestEcho.toObject(includeInstance, f), + flush: (f = msg.getFlush()) && proto.tendermint.abci.RequestFlush.toObject(includeInstance, f), + info: (f = msg.getInfo()) && proto.tendermint.abci.RequestInfo.toObject(includeInstance, f), + setOption: (f = msg.getSetOption()) && proto.tendermint.abci.RequestSetOption.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) + }; + + 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.Request} + */ +proto.tendermint.abci.Request.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.Request; + return proto.tendermint.abci.Request.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.Request} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Request} + */ +proto.tendermint.abci.Request.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.RequestEcho; + reader.readMessage(value,proto.tendermint.abci.RequestEcho.deserializeBinaryFromReader); + msg.setEcho(value); + break; + case 2: + var value = new proto.tendermint.abci.RequestFlush; + reader.readMessage(value,proto.tendermint.abci.RequestFlush.deserializeBinaryFromReader); + msg.setFlush(value); + break; + case 3: + var value = new proto.tendermint.abci.RequestInfo; + reader.readMessage(value,proto.tendermint.abci.RequestInfo.deserializeBinaryFromReader); + msg.setInfo(value); + break; + case 4: + var value = new proto.tendermint.abci.RequestSetOption; + reader.readMessage(value,proto.tendermint.abci.RequestSetOption.deserializeBinaryFromReader); + msg.setSetOption(value); + break; + case 5: + var value = new proto.tendermint.abci.RequestInitChain; + reader.readMessage(value,proto.tendermint.abci.RequestInitChain.deserializeBinaryFromReader); + msg.setInitChain(value); + break; + case 6: + var value = new proto.tendermint.abci.RequestQuery; + 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); + msg.setCommit(value); + break; + case 12: + var value = new proto.tendermint.abci.RequestListSnapshots; + reader.readMessage(value,proto.tendermint.abci.RequestListSnapshots.deserializeBinaryFromReader); + msg.setListSnapshots(value); + break; + case 13: + var value = new proto.tendermint.abci.RequestOfferSnapshot; + reader.readMessage(value,proto.tendermint.abci.RequestOfferSnapshot.deserializeBinaryFromReader); + msg.setOfferSnapshot(value); + break; + case 14: + var value = new proto.tendermint.abci.RequestLoadSnapshotChunk; + reader.readMessage(value,proto.tendermint.abci.RequestLoadSnapshotChunk.deserializeBinaryFromReader); + msg.setLoadSnapshotChunk(value); + break; + case 15: + var value = new proto.tendermint.abci.RequestApplySnapshotChunk; + reader.readMessage(value,proto.tendermint.abci.RequestApplySnapshotChunk.deserializeBinaryFromReader); + msg.setApplySnapshotChunk(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Request.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.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.tendermint.abci.Request} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Request.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEcho(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.RequestEcho.serializeBinaryToWriter + ); + } + f = message.getFlush(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.abci.RequestFlush.serializeBinaryToWriter + ); + } + f = message.getInfo(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.abci.RequestInfo.serializeBinaryToWriter + ); + } + f = message.getSetOption(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.abci.RequestSetOption.serializeBinaryToWriter + ); + } + f = message.getInitChain(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.tendermint.abci.RequestInitChain.serializeBinaryToWriter + ); + } + f = message.getQuery(); + if (f != null) { + writer.writeMessage( + 6, + f, + 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( + 8, + f, + 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( + 11, + f, + proto.tendermint.abci.RequestCommit.serializeBinaryToWriter + ); + } + f = message.getListSnapshots(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.tendermint.abci.RequestListSnapshots.serializeBinaryToWriter + ); + } + f = message.getOfferSnapshot(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.tendermint.abci.RequestOfferSnapshot.serializeBinaryToWriter + ); + } + f = message.getLoadSnapshotChunk(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.tendermint.abci.RequestLoadSnapshotChunk.serializeBinaryToWriter + ); + } + f = message.getApplySnapshotChunk(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.tendermint.abci.RequestApplySnapshotChunk.serializeBinaryToWriter + ); + } +}; + + +/** + * optional RequestEcho echo = 1; + * @return {?proto.tendermint.abci.RequestEcho} + */ +proto.tendermint.abci.Request.prototype.getEcho = function() { + return /** @type{?proto.tendermint.abci.RequestEcho} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestEcho, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestEcho|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setEcho = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, 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.clearEcho = function() { + return this.setEcho(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasEcho = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional RequestFlush flush = 2; + * @return {?proto.tendermint.abci.RequestFlush} + */ +proto.tendermint.abci.Request.prototype.getFlush = function() { + return /** @type{?proto.tendermint.abci.RequestFlush} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestFlush, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestFlush|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setFlush = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, 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.clearFlush = function() { + return this.setFlush(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasFlush = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional RequestInfo info = 3; + * @return {?proto.tendermint.abci.RequestInfo} + */ +proto.tendermint.abci.Request.prototype.getInfo = function() { + return /** @type{?proto.tendermint.abci.RequestInfo} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestInfo, 3)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestInfo|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setInfo = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, 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.clearInfo = function() { + return this.setInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasInfo = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional RequestSetOption set_option = 4; + * @return {?proto.tendermint.abci.RequestSetOption} + */ +proto.tendermint.abci.Request.prototype.getSetOption = function() { + return /** @type{?proto.tendermint.abci.RequestSetOption} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestSetOption, 4)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestSetOption|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setSetOption = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, 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.clearSetOption = function() { + return this.setSetOption(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasSetOption = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional RequestInitChain init_chain = 5; + * @return {?proto.tendermint.abci.RequestInitChain} + */ +proto.tendermint.abci.Request.prototype.getInitChain = function() { + return /** @type{?proto.tendermint.abci.RequestInitChain} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestInitChain, 5)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestInitChain|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setInitChain = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, 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.clearInitChain = function() { + return this.setInitChain(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasInitChain = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional RequestQuery query = 6; + * @return {?proto.tendermint.abci.RequestQuery} + */ +proto.tendermint.abci.Request.prototype.getQuery = function() { + return /** @type{?proto.tendermint.abci.RequestQuery} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestQuery, 6)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestQuery|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setQuery = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, 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.clearQuery = function() { + return this.setQuery(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasQuery = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * 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} + */ +proto.tendermint.abci.Request.prototype.getCheckTx = function() { + return /** @type{?proto.tendermint.abci.RequestCheckTx} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestCheckTx, 8)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestCheckTx|undefined} value + * @return {!proto.tendermint.abci.Request} returns this +*/ +proto.tendermint.abci.Request.prototype.setCheckTx = function(value) { + return jspb.Message.setOneofWrapperField(this, 8, 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.clearCheckTx = function() { + return this.setCheckTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasCheckTx = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional RequestDeliverTx deliver_tx = 9; + * @return {?proto.tendermint.abci.RequestDeliverTx} + */ +proto.tendermint.abci.Request.prototype.getDeliverTx = function() { + return /** @type{?proto.tendermint.abci.RequestDeliverTx} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestDeliverTx, 9)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestDeliverTx|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); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasDeliverTx = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * optional RequestEndBlock end_block = 10; + * @return {?proto.tendermint.abci.RequestEndBlock} + */ +proto.tendermint.abci.Request.prototype.getEndBlock = function() { + return /** @type{?proto.tendermint.abci.RequestEndBlock} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.RequestEndBlock, 10)); +}; + + +/** + * @param {?proto.tendermint.abci.RequestEndBlock|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); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasEndBlock = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional RequestCommit commit = 11; + * @return {?proto.tendermint.abci.RequestCommit} + */ +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.RequestCommit|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); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasCommit = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional RequestListSnapshots list_snapshots = 12; + * @return {?proto.tendermint.abci.RequestListSnapshots} + */ +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.RequestListSnapshots|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); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasListSnapshots = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional RequestOfferSnapshot offer_snapshot = 13; + * @return {?proto.tendermint.abci.RequestOfferSnapshot} + */ +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.RequestOfferSnapshot|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); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasOfferSnapshot = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional RequestLoadSnapshotChunk load_snapshot_chunk = 14; + * @return {?proto.tendermint.abci.RequestLoadSnapshotChunk} + */ +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.RequestLoadSnapshotChunk|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); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasLoadSnapshotChunk = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional RequestApplySnapshotChunk apply_snapshot_chunk = 15; + * @return {?proto.tendermint.abci.RequestApplySnapshotChunk} + */ +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.RequestApplySnapshotChunk|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); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Request.prototype.hasApplySnapshotChunk = function() { + return jspb.Message.getField(this, 15) != 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.tendermint.abci.RequestEcho.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestEcho.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestEcho} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestEcho.toObject = function(includeInstance, msg) { + var f, obj = { + message: 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.tendermint.abci.RequestEcho} + */ +proto.tendermint.abci.RequestEcho.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestEcho; + return proto.tendermint.abci.RequestEcho.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestEcho} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestEcho} + */ +proto.tendermint.abci.RequestEcho.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.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestEcho.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestEcho.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.RequestEcho} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestEcho.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string message = 1; + * @return {string} + */ +proto.tendermint.abci.RequestEcho.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestEcho} returns this + */ +proto.tendermint.abci.RequestEcho.prototype.setMessage = 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.tendermint.abci.RequestFlush.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestFlush.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestFlush} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestFlush.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.RequestFlush} + */ +proto.tendermint.abci.RequestFlush.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestFlush; + return proto.tendermint.abci.RequestFlush.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestFlush} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestFlush} + */ +proto.tendermint.abci.RequestFlush.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.tendermint.abci.RequestFlush.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestFlush.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.RequestFlush} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestFlush.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.RequestInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestInfo.toObject = function(includeInstance, msg) { + var f, obj = { + version: jspb.Message.getFieldWithDefault(msg, 1, ""), + blockVersion: jspb.Message.getFieldWithDefault(msg, 2, 0), + p2pVersion: 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.tendermint.abci.RequestInfo} + */ +proto.tendermint.abci.RequestInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestInfo; + return proto.tendermint.abci.RequestInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestInfo} + */ +proto.tendermint.abci.RequestInfo.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 {number} */ (reader.readUint64()); + msg.setBlockVersion(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setP2pVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestInfo.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.RequestInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getBlockVersion(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getP2pVersion(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional string version = 1; + * @return {string} + */ +proto.tendermint.abci.RequestInfo.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestInfo} returns this + */ +proto.tendermint.abci.RequestInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional uint64 block_version = 2; + * @return {number} + */ +proto.tendermint.abci.RequestInfo.prototype.getBlockVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestInfo} returns this + */ +proto.tendermint.abci.RequestInfo.prototype.setBlockVersion = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 p2p_version = 3; + * @return {number} + */ +proto.tendermint.abci.RequestInfo.prototype.getP2pVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestInfo} returns this + */ +proto.tendermint.abci.RequestInfo.prototype.setP2pVersion = 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.tendermint.abci.RequestSetOption.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestSetOption.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestSetOption} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestSetOption.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + value: 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.tendermint.abci.RequestSetOption} + */ +proto.tendermint.abci.RequestSetOption.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestSetOption; + return proto.tendermint.abci.RequestSetOption.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestSetOption} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestSetOption} + */ +proto.tendermint.abci.RequestSetOption.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestSetOption.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestSetOption.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.RequestSetOption} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestSetOption.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 + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.tendermint.abci.RequestSetOption.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestSetOption} returns this + */ +proto.tendermint.abci.RequestSetOption.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string value = 2; + * @return {string} + */ +proto.tendermint.abci.RequestSetOption.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestSetOption} returns this + */ +proto.tendermint.abci.RequestSetOption.prototype.setValue = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.RequestInitChain.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.tendermint.abci.RequestInitChain.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestInitChain.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestInitChain} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestInitChain.toObject = function(includeInstance, msg) { + var f, obj = { + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + chainId: jspb.Message.getFieldWithDefault(msg, 2, ""), + consensusParams: (f = msg.getConsensusParams()) && proto.tendermint.abci.ConsensusParams.toObject(includeInstance, f), + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + proto.tendermint.abci.ValidatorUpdate.toObject, includeInstance), + appStateBytes: msg.getAppStateBytes_asB64(), + initialHeight: 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.tendermint.abci.RequestInitChain} + */ +proto.tendermint.abci.RequestInitChain.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestInitChain; + return proto.tendermint.abci.RequestInitChain.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestInitChain} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestInitChain} + */ +proto.tendermint.abci.RequestInitChain.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + case 3: + var value = new proto.tendermint.abci.ConsensusParams; + reader.readMessage(value,proto.tendermint.abci.ConsensusParams.deserializeBinaryFromReader); + msg.setConsensusParams(value); + break; + case 4: + var value = new proto.tendermint.abci.ValidatorUpdate; + reader.readMessage(value,proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader); + msg.addValidators(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAppStateBytes(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setInitialHeight(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestInitChain.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestInitChain.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.RequestInitChain} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestInitChain.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getConsensusParams(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.abci.ConsensusParams.serializeBinaryToWriter + ); + } + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.tendermint.abci.ValidatorUpdate.serializeBinaryToWriter + ); + } + f = message.getAppStateBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } + f = message.getInitialHeight(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } +}; + + +/** + * optional google.protobuf.Timestamp time = 1; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.abci.RequestInitChain.prototype.getTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +}; + + +/** + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this +*/ +proto.tendermint.abci.RequestInitChain.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestInitChain.prototype.hasTime = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string chain_id = 2; + * @return {string} + */ +proto.tendermint.abci.RequestInitChain.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional ConsensusParams consensus_params = 3; + * @return {?proto.tendermint.abci.ConsensusParams} + */ +proto.tendermint.abci.RequestInitChain.prototype.getConsensusParams = function() { + return /** @type{?proto.tendermint.abci.ConsensusParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ConsensusParams, 3)); +}; + + +/** + * @param {?proto.tendermint.abci.ConsensusParams|undefined} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this +*/ +proto.tendermint.abci.RequestInitChain.prototype.setConsensusParams = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.clearConsensusParams = function() { + return this.setConsensusParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestInitChain.prototype.hasConsensusParams = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated ValidatorUpdate validators = 4; + * @return {!Array} + */ +proto.tendermint.abci.RequestInitChain.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.ValidatorUpdate, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this +*/ +proto.tendermint.abci.RequestInitChain.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.tendermint.abci.ValidatorUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ValidatorUpdate} + */ +proto.tendermint.abci.RequestInitChain.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.tendermint.abci.ValidatorUpdate, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional bytes app_state_bytes = 5; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestInitChain.prototype.getAppStateBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes app_state_bytes = 5; + * This is a type-conversion wrapper around `getAppStateBytes()` + * @return {string} + */ +proto.tendermint.abci.RequestInitChain.prototype.getAppStateBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppStateBytes())); +}; + + +/** + * optional bytes app_state_bytes = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAppStateBytes()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestInitChain.prototype.getAppStateBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppStateBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.setAppStateBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * optional int64 initial_height = 6; + * @return {number} + */ +proto.tendermint.abci.RequestInitChain.prototype.getInitialHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestInitChain} returns this + */ +proto.tendermint.abci.RequestInitChain.prototype.setInitialHeight = 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.tendermint.abci.RequestQuery.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestQuery.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestQuery} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestQuery.toObject = function(includeInstance, msg) { + var f, obj = { + data: msg.getData_asB64(), + path: jspb.Message.getFieldWithDefault(msg, 2, ""), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + prove: 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.tendermint.abci.RequestQuery} + */ +proto.tendermint.abci.RequestQuery.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestQuery; + return proto.tendermint.abci.RequestQuery.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.RequestQuery} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestQuery} + */ +proto.tendermint.abci.RequestQuery.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 {string} */ (reader.readString()); + msg.setPath(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestQuery.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestQuery.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.RequestQuery} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestQuery.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPath(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 4, + f + ); + } +}; + + +/** + * optional bytes data = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestQuery.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.tendermint.abci.RequestQuery.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.tendermint.abci.RequestQuery.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestQuery} returns this + */ +proto.tendermint.abci.RequestQuery.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string path = 2; + * @return {string} + */ +proto.tendermint.abci.RequestQuery.prototype.getPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.RequestQuery} returns this + */ +proto.tendermint.abci.RequestQuery.prototype.setPath = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 height = 3; + * @return {number} + */ +proto.tendermint.abci.RequestQuery.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestQuery} returns this + */ +proto.tendermint.abci.RequestQuery.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bool prove = 4; + * @return {boolean} + */ +proto.tendermint.abci.RequestQuery.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.tendermint.abci.RequestQuery} returns this + */ +proto.tendermint.abci.RequestQuery.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.RequestBeginBlock.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.tendermint.abci.RequestBeginBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestBeginBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestBeginBlock} 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) { + 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.LastCommitInfo.toObject(includeInstance, f), + byzantineValidatorsList: jspb.Message.toObjectList(msg.getByzantineValidatorsList(), + proto.tendermint.abci.Evidence.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.tendermint.abci.RequestBeginBlock} + */ +proto.tendermint.abci.RequestBeginBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestBeginBlock; + return proto.tendermint.abci.RequestBeginBlock.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestBeginBlock} + */ +proto.tendermint.abci.RequestBeginBlock.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.setHash(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.LastCommitInfo; + reader.readMessage(value,proto.tendermint.abci.LastCommitInfo.deserializeBinaryFromReader); + msg.setLastCommitInfo(value); + break; + case 4: + var value = new proto.tendermint.abci.Evidence; + reader.readMessage(value,proto.tendermint.abci.Evidence.deserializeBinaryFromReader); + msg.addByzantineValidators(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestBeginBlock.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.RequestBeginBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestBeginBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_types_pb.Header.serializeBinaryToWriter + ); + } + f = message.getLastCommitInfo(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.abci.LastCommitInfo.serializeBinaryToWriter + ); + } + f = message.getByzantineValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.tendermint.abci.Evidence.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestBeginBlock.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.RequestBeginBlock.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.RequestBeginBlock.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestBeginBlock} returns this + */ +proto.tendermint.abci.RequestBeginBlock.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional tendermint.types.Header header = 2; + * @return {?proto.tendermint.types.Header} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.getHeader = function() { + return /** @type{?proto.tendermint.types.Header} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Header, 2)); +}; + + +/** + * @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); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.hasHeader = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional LastCommitInfo last_commit_info = 3; + * @return {?proto.tendermint.abci.LastCommitInfo} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.getLastCommitInfo = function() { + return /** @type{?proto.tendermint.abci.LastCommitInfo} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.LastCommitInfo, 3)); +}; + + +/** + * @param {?proto.tendermint.abci.LastCommitInfo|undefined} value + * @return {!proto.tendermint.abci.RequestBeginBlock} returns this +*/ +proto.tendermint.abci.RequestBeginBlock.prototype.setLastCommitInfo = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * 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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.hasLastCommitInfo = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated Evidence byzantine_validators = 4; + * @return {!Array} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.getByzantineValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Evidence, 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); +}; + + +/** + * @param {!proto.tendermint.abci.Evidence=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Evidence} + */ +proto.tendermint.abci.RequestBeginBlock.prototype.addByzantineValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.tendermint.abci.Evidence, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.RequestBeginBlock} returns this + */ +proto.tendermint.abci.RequestBeginBlock.prototype.clearByzantineValidatorsList = function() { + return this.setByzantineValidatorsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.RequestCheckTx.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestCheckTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestCheckTx} 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) { + var f, obj = { + tx: msg.getTx_asB64(), + type: 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.tendermint.abci.RequestCheckTx} + */ +proto.tendermint.abci.RequestCheckTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.RequestCheckTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestCheckTx} + */ +proto.tendermint.abci.RequestCheckTx.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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestCheckTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestCheckTx.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.RequestCheckTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestCheckTx.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); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.RequestDeliverTx.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestDeliverTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestDeliverTx} 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) { + var f, obj = { + tx: msg.getTx_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.RequestDeliverTx} + */ +proto.tendermint.abci.RequestDeliverTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestDeliverTx; + return proto.tendermint.abci.RequestDeliverTx.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestDeliverTx} + */ +proto.tendermint.abci.RequestDeliverTx.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestDeliverTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestDeliverTx.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.RequestDeliverTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestDeliverTx.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes tx = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestDeliverTx.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.RequestDeliverTx.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.RequestDeliverTx.prototype.getTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTx())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestDeliverTx} returns this + */ +proto.tendermint.abci.RequestDeliverTx.prototype.setTx = 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.tendermint.abci.RequestEndBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestEndBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestEndBlock} 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) { + var f, obj = { + height: 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.abci.RequestEndBlock} + */ +proto.tendermint.abci.RequestEndBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.RequestEndBlock; + return proto.tendermint.abci.RequestEndBlock.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestEndBlock} + */ +proto.tendermint.abci.RequestEndBlock.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestEndBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestEndBlock.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.RequestEndBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestEndBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.abci.RequestEndBlock.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestEndBlock} returns this + */ +proto.tendermint.abci.RequestEndBlock.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} + */ +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); +}; + + +/** + * 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.RequestCommit.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.tendermint.abci.RequestCommit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestCommit.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.RequestCommit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestCommit.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.RequestListSnapshots.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestListSnapshots.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestListSnapshots} 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) { + 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.RequestListSnapshots} + */ +proto.tendermint.abci.RequestListSnapshots.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.RequestListSnapshots} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestListSnapshots} + */ +proto.tendermint.abci.RequestListSnapshots.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.tendermint.abci.RequestListSnapshots.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestListSnapshots.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.RequestListSnapshots} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestListSnapshots.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( + 1, + f, + proto.tendermint.abci.Snapshot.serializeBinaryToWriter + ); + } + f = message.getAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + 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 + */ +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.RequestOfferSnapshot.prototype.getAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestOfferSnapshot} returns this + */ +proto.tendermint.abci.RequestOfferSnapshot.prototype.setAppHash = 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.tendermint.abci.RequestLoadSnapshotChunk.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestLoadSnapshotChunk.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.RequestLoadSnapshotChunk} 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) { + var f, obj = { + height: jspb.Message.getFieldWithDefault(msg, 1, 0), + format: jspb.Message.getFieldWithDefault(msg, 2, 0), + chunk: 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.tendermint.abci.RequestLoadSnapshotChunk} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.RequestLoadSnapshotChunk} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.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.setChunk(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() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestLoadSnapshotChunk.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.RequestLoadSnapshotChunk} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.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.getChunk(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } +}; + + +/** + * optional uint64 height = 1; + * @return {number} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} returns this + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 format = 2; + * @return {number} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.getFormat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} returns this + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.setFormat = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 chunk = 3; + * @return {number} + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.getChunk = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestLoadSnapshotChunk} returns this + */ +proto.tendermint.abci.RequestLoadSnapshotChunk.prototype.setChunk = 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.tendermint.abci.RequestApplySnapshotChunk.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.RequestApplySnapshotChunk.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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 + */ +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) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} + */ +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); +}; + + +/** + * 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} + */ +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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.RequestApplySnapshotChunk.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.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 + ); + } +}; + + +/** + * optional uint32 index = 1; + * @return {number} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} returns this + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes chunk = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getChunk = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes chunk = 2; + * This is a type-conversion wrapper around `getChunk()` + * @return {string} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getChunk_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChunk())); +}; + + +/** + * 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 `getChunk()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.RequestApplySnapshotChunk.prototype.getChunk_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChunk())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.RequestApplySnapshotChunk} returns this + */ +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); +}; + + + +/** + * 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,5,6,7,8,9,10,11,12,13,14,15,16]]; + +/** + * @enum {number} + */ +proto.tendermint.abci.Response.ValueCase = { + VALUE_NOT_SET: 0, + EXCEPTION: 1, + ECHO: 2, + FLUSH: 3, + INFO: 4, + SET_OPTION: 5, + 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 +}; + +/** + * @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), + setOption: (f = msg.getSetOption()) && proto.tendermint.abci.ResponseSetOption.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) + }; + + 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 5: + var value = new proto.tendermint.abci.ResponseSetOption; + reader.readMessage(value,proto.tendermint.abci.ResponseSetOption.deserializeBinaryFromReader); + msg.setSetOption(value); + break; + case 6: + var value = new proto.tendermint.abci.ResponseInitChain; + reader.readMessage(value,proto.tendermint.abci.ResponseInitChain.deserializeBinaryFromReader); + msg.setInitChain(value); + break; + case 7: + var value = new proto.tendermint.abci.ResponseQuery; + 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); + msg.setCommit(value); + break; + case 13: + var value = new proto.tendermint.abci.ResponseListSnapshots; + reader.readMessage(value,proto.tendermint.abci.ResponseListSnapshots.deserializeBinaryFromReader); + msg.setListSnapshots(value); + break; + case 14: + var value = new proto.tendermint.abci.ResponseOfferSnapshot; + reader.readMessage(value,proto.tendermint.abci.ResponseOfferSnapshot.deserializeBinaryFromReader); + msg.setOfferSnapshot(value); + break; + case 15: + var value = new proto.tendermint.abci.ResponseLoadSnapshotChunk; + reader.readMessage(value,proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinaryFromReader); + msg.setLoadSnapshotChunk(value); + break; + case 16: + var value = new proto.tendermint.abci.ResponseApplySnapshotChunk; + reader.readMessage(value,proto.tendermint.abci.ResponseApplySnapshotChunk.deserializeBinaryFromReader); + msg.setApplySnapshotChunk(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Response.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.Response.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.Response} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Response.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getException(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.ResponseException.serializeBinaryToWriter + ); + } + f = message.getEcho(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.abci.ResponseEcho.serializeBinaryToWriter + ); + } + f = message.getFlush(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.abci.ResponseFlush.serializeBinaryToWriter + ); + } + f = message.getInfo(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.abci.ResponseInfo.serializeBinaryToWriter + ); + } + f = message.getSetOption(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.tendermint.abci.ResponseSetOption.serializeBinaryToWriter + ); + } + f = message.getInitChain(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.tendermint.abci.ResponseInitChain.serializeBinaryToWriter + ); + } + f = message.getQuery(); + if (f != null) { + writer.writeMessage( + 7, + f, + 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( + 9, + f, + 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( + 12, + f, + proto.tendermint.abci.ResponseCommit.serializeBinaryToWriter + ); + } + f = message.getListSnapshots(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.tendermint.abci.ResponseListSnapshots.serializeBinaryToWriter + ); + } + f = message.getOfferSnapshot(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.tendermint.abci.ResponseOfferSnapshot.serializeBinaryToWriter + ); + } + f = message.getLoadSnapshotChunk(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.tendermint.abci.ResponseLoadSnapshotChunk.serializeBinaryToWriter + ); + } + f = message.getApplySnapshotChunk(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.tendermint.abci.ResponseApplySnapshotChunk.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ResponseException exception = 1; + * @return {?proto.tendermint.abci.ResponseException} + */ +proto.tendermint.abci.Response.prototype.getException = function() { + return /** @type{?proto.tendermint.abci.ResponseException} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseException, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseException|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setException = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, 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.clearException = function() { + return this.setException(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasException = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ResponseEcho echo = 2; + * @return {?proto.tendermint.abci.ResponseEcho} + */ +proto.tendermint.abci.Response.prototype.getEcho = function() { + return /** @type{?proto.tendermint.abci.ResponseEcho} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseEcho, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseEcho|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setEcho = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, 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.clearEcho = function() { + return this.setEcho(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasEcho = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ResponseFlush flush = 3; + * @return {?proto.tendermint.abci.ResponseFlush} + */ +proto.tendermint.abci.Response.prototype.getFlush = function() { + return /** @type{?proto.tendermint.abci.ResponseFlush} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseFlush, 3)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseFlush|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setFlush = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, 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.clearFlush = function() { + return this.setFlush(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasFlush = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ResponseInfo info = 4; + * @return {?proto.tendermint.abci.ResponseInfo} + */ +proto.tendermint.abci.Response.prototype.getInfo = function() { + return /** @type{?proto.tendermint.abci.ResponseInfo} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseInfo, 4)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseInfo|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setInfo = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, 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.clearInfo = function() { + return this.setInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasInfo = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional ResponseSetOption set_option = 5; + * @return {?proto.tendermint.abci.ResponseSetOption} + */ +proto.tendermint.abci.Response.prototype.getSetOption = function() { + return /** @type{?proto.tendermint.abci.ResponseSetOption} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseSetOption, 5)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseSetOption|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setSetOption = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, 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.clearSetOption = function() { + return this.setSetOption(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasSetOption = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional ResponseInitChain init_chain = 6; + * @return {?proto.tendermint.abci.ResponseInitChain} + */ +proto.tendermint.abci.Response.prototype.getInitChain = function() { + return /** @type{?proto.tendermint.abci.ResponseInitChain} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseInitChain, 6)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseInitChain|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setInitChain = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, 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.clearInitChain = function() { + return this.setInitChain(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasInitChain = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional ResponseQuery query = 7; + * @return {?proto.tendermint.abci.ResponseQuery} + */ +proto.tendermint.abci.Response.prototype.getQuery = function() { + return /** @type{?proto.tendermint.abci.ResponseQuery} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseQuery, 7)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseQuery|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setQuery = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, 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.clearQuery = function() { + return this.setQuery(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasQuery = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * 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} + */ +proto.tendermint.abci.Response.prototype.getCheckTx = function() { + return /** @type{?proto.tendermint.abci.ResponseCheckTx} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseCheckTx, 9)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseCheckTx|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setCheckTx = function(value) { + return jspb.Message.setOneofWrapperField(this, 9, 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.clearCheckTx = function() { + return this.setCheckTx(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasCheckTx = function() { + return jspb.Message.getField(this, 9) != null; +}; + + +/** + * 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} + */ +proto.tendermint.abci.Response.prototype.getCommit = function() { + return /** @type{?proto.tendermint.abci.ResponseCommit} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseCommit, 12)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseCommit|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setCommit = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, 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.clearCommit = function() { + return this.setCommit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasCommit = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional ResponseListSnapshots list_snapshots = 13; + * @return {?proto.tendermint.abci.ResponseListSnapshots} + */ +proto.tendermint.abci.Response.prototype.getListSnapshots = function() { + return /** @type{?proto.tendermint.abci.ResponseListSnapshots} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseListSnapshots, 13)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseListSnapshots|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setListSnapshots = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, 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.clearListSnapshots = function() { + return this.setListSnapshots(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasListSnapshots = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional ResponseOfferSnapshot offer_snapshot = 14; + * @return {?proto.tendermint.abci.ResponseOfferSnapshot} + */ +proto.tendermint.abci.Response.prototype.getOfferSnapshot = function() { + return /** @type{?proto.tendermint.abci.ResponseOfferSnapshot} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseOfferSnapshot, 14)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseOfferSnapshot|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setOfferSnapshot = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, 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.clearOfferSnapshot = function() { + return this.setOfferSnapshot(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasOfferSnapshot = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional ResponseLoadSnapshotChunk load_snapshot_chunk = 15; + * @return {?proto.tendermint.abci.ResponseLoadSnapshotChunk} + */ +proto.tendermint.abci.Response.prototype.getLoadSnapshotChunk = function() { + return /** @type{?proto.tendermint.abci.ResponseLoadSnapshotChunk} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseLoadSnapshotChunk, 15)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseLoadSnapshotChunk|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setLoadSnapshotChunk = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, 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.clearLoadSnapshotChunk = function() { + return this.setLoadSnapshotChunk(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasLoadSnapshotChunk = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional ResponseApplySnapshotChunk apply_snapshot_chunk = 16; + * @return {?proto.tendermint.abci.ResponseApplySnapshotChunk} + */ +proto.tendermint.abci.Response.prototype.getApplySnapshotChunk = function() { + return /** @type{?proto.tendermint.abci.ResponseApplySnapshotChunk} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseApplySnapshotChunk, 16)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseApplySnapshotChunk|undefined} value + * @return {!proto.tendermint.abci.Response} returns this +*/ +proto.tendermint.abci.Response.prototype.setApplySnapshotChunk = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, 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.clearApplySnapshotChunk = function() { + return this.setApplySnapshotChunk(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Response.prototype.hasApplySnapshotChunk = function() { + return jspb.Message.getField(this, 16) != 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.tendermint.abci.ResponseException.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseException.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseException} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseException.toObject = function(includeInstance, msg) { + var f, obj = { + error: 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.tendermint.abci.ResponseException} + */ +proto.tendermint.abci.ResponseException.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseException; + return proto.tendermint.abci.ResponseException.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseException} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseException} + */ +proto.tendermint.abci.ResponseException.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.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseException.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseException.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.ResponseException} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseException.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getError(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string error = 1; + * @return {string} + */ +proto.tendermint.abci.ResponseException.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseException} returns this + */ +proto.tendermint.abci.ResponseException.prototype.setError = 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.tendermint.abci.ResponseEcho.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseEcho.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseEcho} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseEcho.toObject = function(includeInstance, msg) { + var f, obj = { + message: 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.tendermint.abci.ResponseEcho} + */ +proto.tendermint.abci.ResponseEcho.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseEcho; + return proto.tendermint.abci.ResponseEcho.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseEcho} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseEcho} + */ +proto.tendermint.abci.ResponseEcho.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.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseEcho.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseEcho.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.ResponseEcho} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseEcho.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string message = 1; + * @return {string} + */ +proto.tendermint.abci.ResponseEcho.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseEcho} returns this + */ +proto.tendermint.abci.ResponseEcho.prototype.setMessage = 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.tendermint.abci.ResponseFlush.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseFlush.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseFlush} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseFlush.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.ResponseFlush} + */ +proto.tendermint.abci.ResponseFlush.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseFlush; + return proto.tendermint.abci.ResponseFlush.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseFlush} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseFlush} + */ +proto.tendermint.abci.ResponseFlush.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.tendermint.abci.ResponseFlush.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseFlush.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.ResponseFlush} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseFlush.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.ResponseInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseInfo.toObject = function(includeInstance, msg) { + var f, obj = { + data: jspb.Message.getFieldWithDefault(msg, 1, ""), + version: jspb.Message.getFieldWithDefault(msg, 2, ""), + appVersion: jspb.Message.getFieldWithDefault(msg, 3, 0), + lastBlockHeight: jspb.Message.getFieldWithDefault(msg, 4, 0), + lastBlockAppHash: msg.getLastBlockAppHash_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.ResponseInfo} + */ +proto.tendermint.abci.ResponseInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseInfo; + return proto.tendermint.abci.ResponseInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseInfo} + */ +proto.tendermint.abci.ResponseInfo.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.setData(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setAppVersion(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setLastBlockHeight(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastBlockAppHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseInfo.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.ResponseInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getData(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAppVersion(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } + f = message.getLastBlockHeight(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getLastBlockAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional string data = 1; + * @return {string} + */ +proto.tendermint.abci.ResponseInfo.prototype.getData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseInfo} returns this + */ +proto.tendermint.abci.ResponseInfo.prototype.setData = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string version = 2; + * @return {string} + */ +proto.tendermint.abci.ResponseInfo.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseInfo} returns this + */ +proto.tendermint.abci.ResponseInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint64 app_version = 3; + * @return {number} + */ +proto.tendermint.abci.ResponseInfo.prototype.getAppVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseInfo} returns this + */ +proto.tendermint.abci.ResponseInfo.prototype.setAppVersion = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 last_block_height = 4; + * @return {number} + */ +proto.tendermint.abci.ResponseInfo.prototype.getLastBlockHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseInfo} returns this + */ +proto.tendermint.abci.ResponseInfo.prototype.setLastBlockHeight = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bytes last_block_app_hash = 5; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseInfo.prototype.getLastBlockAppHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes last_block_app_hash = 5; + * This is a type-conversion wrapper around `getLastBlockAppHash()` + * @return {string} + */ +proto.tendermint.abci.ResponseInfo.prototype.getLastBlockAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastBlockAppHash())); +}; + + +/** + * optional bytes last_block_app_hash = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastBlockAppHash()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseInfo.prototype.getLastBlockAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastBlockAppHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseInfo} returns this + */ +proto.tendermint.abci.ResponseInfo.prototype.setLastBlockAppHash = 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.tendermint.abci.ResponseSetOption.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseSetOption.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseSetOption} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseSetOption.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + log: jspb.Message.getFieldWithDefault(msg, 3, ""), + info: 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.tendermint.abci.ResponseSetOption} + */ +proto.tendermint.abci.ResponseSetOption.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseSetOption; + return proto.tendermint.abci.ResponseSetOption.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseSetOption} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseSetOption} + */ +proto.tendermint.abci.ResponseSetOption.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 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLog(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseSetOption.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseSetOption.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.ResponseSetOption} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseSetOption.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getLog(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional uint32 code = 1; + * @return {number} + */ +proto.tendermint.abci.ResponseSetOption.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseSetOption} returns this + */ +proto.tendermint.abci.ResponseSetOption.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string log = 3; + * @return {string} + */ +proto.tendermint.abci.ResponseSetOption.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseSetOption} returns this + */ +proto.tendermint.abci.ResponseSetOption.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.tendermint.abci.ResponseSetOption.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseSetOption} returns this + */ +proto.tendermint.abci.ResponseSetOption.prototype.setInfo = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseInitChain.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.tendermint.abci.ResponseInitChain.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseInitChain.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseInitChain} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseInitChain.toObject = function(includeInstance, msg) { + var f, obj = { + consensusParams: (f = msg.getConsensusParams()) && proto.tendermint.abci.ConsensusParams.toObject(includeInstance, f), + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + proto.tendermint.abci.ValidatorUpdate.toObject, includeInstance), + 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.ResponseInitChain} + */ +proto.tendermint.abci.ResponseInitChain.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseInitChain; + return proto.tendermint.abci.ResponseInitChain.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseInitChain} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseInitChain} + */ +proto.tendermint.abci.ResponseInitChain.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.ConsensusParams; + reader.readMessage(value,proto.tendermint.abci.ConsensusParams.deserializeBinaryFromReader); + msg.setConsensusParams(value); + break; + case 2: + var value = new proto.tendermint.abci.ValidatorUpdate; + reader.readMessage(value,proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader); + msg.addValidators(value); + break; + case 3: + 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.ResponseInitChain.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseInitChain.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.ResponseInitChain} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseInitChain.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConsensusParams(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.ConsensusParams.serializeBinaryToWriter + ); + } + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.tendermint.abci.ValidatorUpdate.serializeBinaryToWriter + ); + } + f = message.getAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional ConsensusParams consensus_params = 1; + * @return {?proto.tendermint.abci.ConsensusParams} + */ +proto.tendermint.abci.ResponseInitChain.prototype.getConsensusParams = function() { + return /** @type{?proto.tendermint.abci.ConsensusParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ConsensusParams, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.ConsensusParams|undefined} value + * @return {!proto.tendermint.abci.ResponseInitChain} returns this +*/ +proto.tendermint.abci.ResponseInitChain.prototype.setConsensusParams = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ResponseInitChain} returns this + */ +proto.tendermint.abci.ResponseInitChain.prototype.clearConsensusParams = function() { + return this.setConsensusParams(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ResponseInitChain.prototype.hasConsensusParams = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated ValidatorUpdate validators = 2; + * @return {!Array} + */ +proto.tendermint.abci.ResponseInitChain.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.ValidatorUpdate, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseInitChain} returns this +*/ +proto.tendermint.abci.ResponseInitChain.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.tendermint.abci.ValidatorUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ValidatorUpdate} + */ +proto.tendermint.abci.ResponseInitChain.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tendermint.abci.ValidatorUpdate, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseInitChain} returns this + */ +proto.tendermint.abci.ResponseInitChain.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional bytes app_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseInitChain.prototype.getAppHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes app_hash = 3; + * This is a type-conversion wrapper around `getAppHash()` + * @return {string} + */ +proto.tendermint.abci.ResponseInitChain.prototype.getAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppHash())); +}; + + +/** + * optional bytes app_hash = 3; + * 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.ResponseInitChain.prototype.getAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseInitChain} returns this + */ +proto.tendermint.abci.ResponseInitChain.prototype.setAppHash = 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.tendermint.abci.ResponseQuery.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseQuery.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseQuery} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseQuery.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + log: jspb.Message.getFieldWithDefault(msg, 3, ""), + info: jspb.Message.getFieldWithDefault(msg, 4, ""), + index: jspb.Message.getFieldWithDefault(msg, 5, 0), + key: msg.getKey_asB64(), + value: msg.getValue_asB64(), + proofOps: (f = msg.getProofOps()) && tendermint_crypto_proof_pb.ProofOps.toObject(includeInstance, f), + height: jspb.Message.getFieldWithDefault(msg, 9, 0), + codespace: 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.tendermint.abci.ResponseQuery} + */ +proto.tendermint.abci.ResponseQuery.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseQuery; + return proto.tendermint.abci.ResponseQuery.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ResponseQuery} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseQuery} + */ +proto.tendermint.abci.ResponseQuery.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 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.setIndex(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + case 8: + var value = new tendermint_crypto_proof_pb.ProofOps; + reader.readMessage(value,tendermint_crypto_proof_pb.ProofOps.deserializeBinaryFromReader); + msg.setProofOps(value); + break; + case 9: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setCodespace(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseQuery.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseQuery.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.ResponseQuery} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseQuery.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeUint32( + 1, + 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.getIndex(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getValue_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getProofOps(); + if (f != null) { + writer.writeMessage( + 8, + f, + tendermint_crypto_proof_pb.ProofOps.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 9, + f + ); + } + f = message.getCodespace(); + if (f.length > 0) { + writer.writeString( + 10, + f + ); + } +}; + + +/** + * optional uint32 code = 1; + * @return {number} + */ +proto.tendermint.abci.ResponseQuery.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string log = 3; + * @return {string} + */ +proto.tendermint.abci.ResponseQuery.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.tendermint.abci.ResponseQuery.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setInfo = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 index = 5; + * @return {number} + */ +proto.tendermint.abci.ResponseQuery.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional bytes key = 6; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseQuery.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes key = 6; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.tendermint.abci.ResponseQuery.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 6; + * 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.tendermint.abci.ResponseQuery.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional bytes value = 7; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseQuery.prototype.getValue = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes value = 7; + * This is a type-conversion wrapper around `getValue()` + * @return {string} + */ +proto.tendermint.abci.ResponseQuery.prototype.getValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValue())); +}; + + +/** + * optional bytes value = 7; + * 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.tendermint.abci.ResponseQuery.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional tendermint.crypto.ProofOps proof_ops = 8; + * @return {?proto.tendermint.crypto.ProofOps} + */ +proto.tendermint.abci.ResponseQuery.prototype.getProofOps = function() { + return /** @type{?proto.tendermint.crypto.ProofOps} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_proof_pb.ProofOps, 8)); +}; + + +/** + * @param {?proto.tendermint.crypto.ProofOps|undefined} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this +*/ +proto.tendermint.abci.ResponseQuery.prototype.setProofOps = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.clearProofOps = function() { + return this.setProofOps(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ResponseQuery.prototype.hasProofOps = function() { + return jspb.Message.getField(this, 8) != null; +}; + + +/** + * optional int64 height = 9; + * @return {number} + */ +proto.tendermint.abci.ResponseQuery.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 9, value); +}; + + +/** + * optional string codespace = 10; + * @return {string} + */ +proto.tendermint.abci.ResponseQuery.prototype.getCodespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseQuery} returns this + */ +proto.tendermint.abci.ResponseQuery.prototype.setCodespace = function(value) { + return jspb.Message.setProto3StringField(this, 10, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseBeginBlock.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.tendermint.abci.ResponseBeginBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseBeginBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseBeginBlock} 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) { + var f, obj = { + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.tendermint.abci.Event.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.tendermint.abci.ResponseBeginBlock} + */ +proto.tendermint.abci.ResponseBeginBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseBeginBlock; + return proto.tendermint.abci.ResponseBeginBlock.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseBeginBlock} + */ +proto.tendermint.abci.ResponseBeginBlock.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.Event; + reader.readMessage(value,proto.tendermint.abci.Event.deserializeBinaryFromReader); + msg.addEvents(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseBeginBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseBeginBlock.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 + */ +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 + ); + } +}; + + +/** + * repeated Event events = 1; + * @return {!Array} + */ +proto.tendermint.abci.ResponseBeginBlock.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Event, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseBeginBlock} returns this +*/ +proto.tendermint.abci.ResponseBeginBlock.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.abci.Event=} opt_value + * @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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseBeginBlock} returns this + */ +proto.tendermint.abci.ResponseBeginBlock.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseCheckTx.repeatedFields_ = [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.tendermint.abci.ResponseCheckTx.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseCheckTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseCheckTx} 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) { + 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, "") + }; + + 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.ResponseCheckTx} + */ +proto.tendermint.abci.ResponseCheckTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.ResponseCheckTx} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseCheckTx} + */ +proto.tendermint.abci.ResponseCheckTx.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + 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.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.ResponseCheckTx.prototype.setGasUsed = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * repeated Event events = 7; + * @return {!Array} + */ +proto.tendermint.abci.ResponseCheckTx.prototype.getEventsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.Event, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this +*/ +proto.tendermint.abci.ResponseCheckTx.prototype.setEventsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.tendermint.abci.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Event} + */ +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.ResponseCheckTx} returns this + */ +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, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseCheckTx} returns this + */ +proto.tendermint.abci.ResponseCheckTx.prototype.setCodespace = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseDeliverTx.repeatedFields_ = [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.tendermint.abci.ResponseDeliverTx.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseDeliverTx.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseDeliverTx} 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) { + 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, "") + }; + + 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.ResponseDeliverTx} + */ +proto.tendermint.abci.ResponseDeliverTx.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseDeliverTx; + return proto.tendermint.abci.ResponseDeliverTx.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseDeliverTx} + */ +proto.tendermint.abci.ResponseDeliverTx.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseDeliverTx.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.ResponseDeliverTx} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseDeliverTx.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.ResponseDeliverTx.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.ResponseDeliverTx.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.ResponseDeliverTx.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.ResponseDeliverTx.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional string log = 3; + * @return {string} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string info = 4; + * @return {string} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setInfo = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int64 gas_wanted = 5; + * @return {number} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getGasWanted = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setGasWanted = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 gas_used = 6; + * @return {number} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getGasUsed = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setGasUsed = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * repeated Event events = 7; + * @return {!Array} + */ +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); +}; + + +/** + * @param {!proto.tendermint.abci.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Event} + */ +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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + +/** + * optional string codespace = 8; + * @return {string} + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.getCodespace = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.ResponseDeliverTx} returns this + */ +proto.tendermint.abci.ResponseDeliverTx.prototype.setCodespace = function(value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseEndBlock.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.ResponseEndBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseEndBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseEndBlock} 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) { + var f, obj = { + validatorUpdatesList: jspb.Message.toObjectList(msg.getValidatorUpdatesList(), + proto.tendermint.abci.ValidatorUpdate.toObject, includeInstance), + consensusParamUpdates: (f = msg.getConsensusParamUpdates()) && proto.tendermint.abci.ConsensusParams.toObject(includeInstance, f), + eventsList: jspb.Message.toObjectList(msg.getEventsList(), + proto.tendermint.abci.Event.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.tendermint.abci.ResponseEndBlock} + */ +proto.tendermint.abci.ResponseEndBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ResponseEndBlock; + return proto.tendermint.abci.ResponseEndBlock.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseEndBlock} + */ +proto.tendermint.abci.ResponseEndBlock.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.ValidatorUpdate; + reader.readMessage(value,proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader); + msg.addValidatorUpdates(value); + break; + case 2: + var value = new proto.tendermint.abci.ConsensusParams; + reader.readMessage(value,proto.tendermint.abci.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); + 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, + proto.tendermint.abci.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); +}; + + +/** + * @param {!proto.tendermint.abci.ValidatorUpdate=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ValidatorUpdate} + */ +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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseEndBlock} returns this + */ +proto.tendermint.abci.ResponseEndBlock.prototype.clearValidatorUpdatesList = function() { + return this.setValidatorUpdatesList([]); +}; + + +/** + * optional ConsensusParams consensus_param_updates = 2; + * @return {?proto.tendermint.abci.ConsensusParams} + */ +proto.tendermint.abci.ResponseEndBlock.prototype.getConsensusParamUpdates = function() { + return /** @type{?proto.tendermint.abci.ConsensusParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ConsensusParams, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ResponseEndBlock} returns this + */ +proto.tendermint.abci.ResponseEndBlock.prototype.clearConsensusParamUpdates = function() { + return this.setConsensusParamUpdates(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ResponseEndBlock.prototype.hasConsensusParamUpdates = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * repeated Event events = 3; + * @return {!Array} + */ +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); +}; + + +/** + * @param {!proto.tendermint.abci.Event=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Event} + */ +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); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseEndBlock} returns this + */ +proto.tendermint.abci.ResponseEndBlock.prototype.clearEventsList = function() { + return this.setEventsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.ResponseCommit.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseCommit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseCommit} 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) { + var f, obj = { + data: msg.getData_asB64(), + retainHeight: 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.tendermint.abci.ResponseCommit} + */ +proto.tendermint.abci.ResponseCommit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.ResponseCommit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseCommit} + */ +proto.tendermint.abci.ResponseCommit.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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseCommit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseCommit.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.ResponseCommit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseCommit.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 + ); + } +}; + + +/** + * 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 + */ +proto.tendermint.abci.ResponseCommit.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional int64 retain_height = 3; + * @return {number} + */ +proto.tendermint.abci.ResponseCommit.prototype.getRetainHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ResponseCommit} returns this + */ +proto.tendermint.abci.ResponseCommit.prototype.setRetainHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.ResponseListSnapshots.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.tendermint.abci.ResponseListSnapshots.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseListSnapshots.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.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; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.tendermint.abci.ResponseListSnapshots} + */ +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); +}; + + +/** + * 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.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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseListSnapshots.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseListSnapshots.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.ResponseListSnapshots} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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 Snapshot snapshots = 1; + * @return {!Array} + */ +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.ResponseListSnapshots} returns this +*/ +proto.tendermint.abci.ResponseListSnapshots.prototype.setSnapshotsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.abci.Snapshot=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.Snapshot} + */ +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.ResponseListSnapshots} returns this + */ +proto.tendermint.abci.ResponseListSnapshots.prototype.clearSnapshotsList = function() { + return this.setSnapshotsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.ResponseOfferSnapshot.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseOfferSnapshot.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseOfferSnapshot.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.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.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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseOfferSnapshot.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseOfferSnapshot.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.ResponseOfferSnapshot} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseOfferSnapshot.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getResult(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.tendermint.abci.ResponseOfferSnapshot.Result = { + UNKNOWN: 0, + ACCEPT: 1, + ABORT: 2, + REJECT: 3, + REJECT_FORMAT: 4, + REJECT_SENDER: 5 +}; + +/** + * optional Result result = 1; + * @return {!proto.tendermint.abci.ResponseOfferSnapshot.Result} + */ +proto.tendermint.abci.ResponseOfferSnapshot.prototype.getResult = function() { + return /** @type {!proto.tendermint.abci.ResponseOfferSnapshot.Result} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.tendermint.abci.ResponseOfferSnapshot.Result} value + * @return {!proto.tendermint.abci.ResponseOfferSnapshot} returns this + */ +proto.tendermint.abci.ResponseOfferSnapshot.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.tendermint.abci.ResponseLoadSnapshotChunk.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ResponseLoadSnapshotChunk.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ResponseLoadSnapshotChunk} 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) { + var f, obj = { + chunk: msg.getChunk_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.ResponseLoadSnapshotChunk} + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.ResponseLoadSnapshotChunk} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ResponseLoadSnapshotChunk} + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.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.setChunk(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseLoadSnapshotChunk.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.ResponseLoadSnapshotChunk} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getChunk_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * 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} + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.getChunk_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChunk())); +}; + + +/** + * 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 {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.ResponseLoadSnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseLoadSnapshotChunk.prototype.setChunk = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + + +/** + * 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} + */ +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); +}; + + +/** + * 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 value = /** @type {!Array} */ (reader.readPackedUint32()); + msg.setRefetchChunksList(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addRejectSenders(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ResponseApplySnapshotChunk.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.ResponseApplySnapshotChunk} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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 + ); + } +}; + + +/** + * @enum {number} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.Result = { + UNKNOWN: 0, + ACCEPT: 1, + ABORT: 2, + RETRY: 3, + RETRY_SNAPSHOT: 4, + REJECT_SNAPSHOT: 5 +}; + +/** + * optional Result result = 1; + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.getResult = function() { + return /** @type {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.tendermint.abci.ResponseApplySnapshotChunk.Result} value + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.setResult = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * repeated uint32 refetch_chunks = 2; + * @return {!Array} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.getRefetchChunksList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @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 {number} value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.addRefetchChunks = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.clearRefetchChunksList = function() { + return this.setRefetchChunksList([]); +}; + + +/** + * repeated string reject_senders = 3; + * @return {!Array} + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.getRejectSendersList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.setRejectSendersList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.addRejectSenders = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.abci.ResponseApplySnapshotChunk} returns this + */ +proto.tendermint.abci.ResponseApplySnapshotChunk.prototype.clearRejectSendersList = function() { + return this.setRejectSendersList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.ConsensusParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ConsensusParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ConsensusParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ConsensusParams.toObject = function(includeInstance, msg) { + var f, obj = { + block: (f = msg.getBlock()) && proto.tendermint.abci.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), + version: (f = msg.getVersion()) && tendermint_types_params_pb.VersionParams.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.ConsensusParams} + */ +proto.tendermint.abci.ConsensusParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ConsensusParams; + return proto.tendermint.abci.ConsensusParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ConsensusParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ConsensusParams} + */ +proto.tendermint.abci.ConsensusParams.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.BlockParams; + reader.readMessage(value,proto.tendermint.abci.BlockParams.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 2: + var value = new tendermint_types_params_pb.EvidenceParams; + reader.readMessage(value,tendermint_types_params_pb.EvidenceParams.deserializeBinaryFromReader); + msg.setEvidence(value); + break; + case 3: + var value = new tendermint_types_params_pb.ValidatorParams; + reader.readMessage(value,tendermint_types_params_pb.ValidatorParams.deserializeBinaryFromReader); + msg.setValidator(value); + break; + case 4: + var value = new tendermint_types_params_pb.VersionParams; + reader.readMessage(value,tendermint_types_params_pb.VersionParams.deserializeBinaryFromReader); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ConsensusParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ConsensusParams.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.ConsensusParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ConsensusParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.BlockParams.serializeBinaryToWriter + ); + } + f = message.getEvidence(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_params_pb.EvidenceParams.serializeBinaryToWriter + ); + } + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 3, + f, + tendermint_types_params_pb.ValidatorParams.serializeBinaryToWriter + ); + } + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 4, + f, + tendermint_types_params_pb.VersionParams.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BlockParams block = 1; + * @return {?proto.tendermint.abci.BlockParams} + */ +proto.tendermint.abci.ConsensusParams.prototype.getBlock = function() { + return /** @type{?proto.tendermint.abci.BlockParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.BlockParams, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.BlockParams|undefined} value + * @return {!proto.tendermint.abci.ConsensusParams} returns this +*/ +proto.tendermint.abci.ConsensusParams.prototype.setBlock = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ConsensusParams} returns this + */ +proto.tendermint.abci.ConsensusParams.prototype.clearBlock = function() { + return this.setBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ConsensusParams.prototype.hasBlock = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional tendermint.types.EvidenceParams evidence = 2; + * @return {?proto.tendermint.types.EvidenceParams} + */ +proto.tendermint.abci.ConsensusParams.prototype.getEvidence = function() { + return /** @type{?proto.tendermint.types.EvidenceParams} */ ( + jspb.Message.getWrapperField(this, tendermint_types_params_pb.EvidenceParams, 2)); +}; + + +/** + * @param {?proto.tendermint.types.EvidenceParams|undefined} value + * @return {!proto.tendermint.abci.ConsensusParams} returns this +*/ +proto.tendermint.abci.ConsensusParams.prototype.setEvidence = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ConsensusParams} returns this + */ +proto.tendermint.abci.ConsensusParams.prototype.clearEvidence = function() { + return this.setEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ConsensusParams.prototype.hasEvidence = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional tendermint.types.ValidatorParams validator = 3; + * @return {?proto.tendermint.types.ValidatorParams} + */ +proto.tendermint.abci.ConsensusParams.prototype.getValidator = function() { + return /** @type{?proto.tendermint.types.ValidatorParams} */ ( + jspb.Message.getWrapperField(this, tendermint_types_params_pb.ValidatorParams, 3)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorParams|undefined} value + * @return {!proto.tendermint.abci.ConsensusParams} returns this +*/ +proto.tendermint.abci.ConsensusParams.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ConsensusParams} returns this + */ +proto.tendermint.abci.ConsensusParams.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ConsensusParams.prototype.hasValidator = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional tendermint.types.VersionParams version = 4; + * @return {?proto.tendermint.types.VersionParams} + */ +proto.tendermint.abci.ConsensusParams.prototype.getVersion = function() { + return /** @type{?proto.tendermint.types.VersionParams} */ ( + jspb.Message.getWrapperField(this, tendermint_types_params_pb.VersionParams, 4)); +}; + + +/** + * @param {?proto.tendermint.types.VersionParams|undefined} value + * @return {!proto.tendermint.abci.ConsensusParams} returns this +*/ +proto.tendermint.abci.ConsensusParams.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ConsensusParams} returns this + */ +proto.tendermint.abci.ConsensusParams.prototype.clearVersion = function() { + return this.setVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ConsensusParams.prototype.hasVersion = 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.tendermint.abci.BlockParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.BlockParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.BlockParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.BlockParams.toObject = function(includeInstance, msg) { + var f, obj = { + maxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxGas: 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.tendermint.abci.BlockParams} + */ +proto.tendermint.abci.BlockParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.BlockParams; + return proto.tendermint.abci.BlockParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.BlockParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.BlockParams} + */ +proto.tendermint.abci.BlockParams.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.setMaxBytes(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxGas(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.BlockParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.BlockParams.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.BlockParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.BlockParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxBytes(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMaxGas(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 max_bytes = 1; + * @return {number} + */ +proto.tendermint.abci.BlockParams.prototype.getMaxBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.BlockParams} returns this + */ +proto.tendermint.abci.BlockParams.prototype.setMaxBytes = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 max_gas = 2; + * @return {number} + */ +proto.tendermint.abci.BlockParams.prototype.getMaxGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.BlockParams} returns this + */ +proto.tendermint.abci.BlockParams.prototype.setMaxGas = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.LastCommitInfo.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.tendermint.abci.LastCommitInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.LastCommitInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.LastCommitInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.LastCommitInfo.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) + }; + + 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.LastCommitInfo} + */ +proto.tendermint.abci.LastCommitInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.LastCommitInfo; + return proto.tendermint.abci.LastCommitInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.LastCommitInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.LastCommitInfo} + */ +proto.tendermint.abci.LastCommitInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + 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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.LastCommitInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.LastCommitInfo.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.LastCommitInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.LastCommitInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + 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 + ); + } +}; + + +/** + * optional int32 round = 1; + * @return {number} + */ +proto.tendermint.abci.LastCommitInfo.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.LastCommitInfo} returns this + */ +proto.tendermint.abci.LastCommitInfo.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated VoteInfo votes = 2; + * @return {!Array} + */ +proto.tendermint.abci.LastCommitInfo.prototype.getVotesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.abci.VoteInfo, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.abci.LastCommitInfo} returns this +*/ +proto.tendermint.abci.LastCommitInfo.prototype.setVotesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.tendermint.abci.VoteInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.VoteInfo} + */ +proto.tendermint.abci.LastCommitInfo.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.LastCommitInfo} returns this + */ +proto.tendermint.abci.LastCommitInfo.prototype.clearVotesList = function() { + return this.setVotesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.abci.Event.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.tendermint.abci.Event.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.Event.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Event} 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) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + attributesList: jspb.Message.toObjectList(msg.getAttributesList(), + proto.tendermint.abci.EventAttribute.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.tendermint.abci.Event} + */ +proto.tendermint.abci.Event.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.Event} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Event} + */ +proto.tendermint.abci.Event.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.setType(value); + break; + case 2: + var value = new proto.tendermint.abci.EventAttribute; + reader.readMessage(value,proto.tendermint.abci.EventAttribute.deserializeBinaryFromReader); + msg.addAttributes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Event.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.Event.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.Event} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Event.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAttributesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.tendermint.abci.EventAttribute.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.tendermint.abci.Event.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.abci.Event} returns this + */ +proto.tendermint.abci.Event.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * repeated EventAttribute attributes = 2; + * @return {!Array} + */ +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.Event} returns this +*/ +proto.tendermint.abci.Event.prototype.setAttributesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.tendermint.abci.EventAttribute=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.abci.EventAttribute} + */ +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.Event} returns this + */ +proto.tendermint.abci.Event.prototype.clearAttributesList = function() { + return this.setAttributesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.EventAttribute.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.EventAttribute.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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 + */ +proto.tendermint.abci.EventAttribute.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_asB64(), + value: msg.getValue_asB64(), + index: 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.tendermint.abci.EventAttribute} + */ +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); +}; + + +/** + * 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} + */ +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 {!Uint8Array} */ (reader.readBytes()); + msg.setKey(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValue(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setIndex(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.EventAttribute.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.EventAttribute.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.EventAttribute} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.EventAttribute.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.getIndex(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.EventAttribute.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.tendermint.abci.EventAttribute.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.tendermint.abci.EventAttribute.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.EventAttribute} returns this + */ +proto.tendermint.abci.EventAttribute.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes value = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.EventAttribute.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.tendermint.abci.EventAttribute.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.tendermint.abci.EventAttribute.prototype.getValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.EventAttribute} returns this + */ +proto.tendermint.abci.EventAttribute.prototype.setValue = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bool index = 3; + * @return {boolean} + */ +proto.tendermint.abci.EventAttribute.prototype.getIndex = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.tendermint.abci.EventAttribute} returns this + */ +proto.tendermint.abci.EventAttribute.prototype.setIndex = function(value) { + return jspb.Message.setProto3BooleanField(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.tendermint.abci.TxResult.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.TxResult.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.TxResult} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.TxResult.toObject = function(includeInstance, msg) { + var f, obj = { + 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) + }; + + 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.TxResult} + */ +proto.tendermint.abci.TxResult.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.TxResult; + return proto.tendermint.abci.TxResult.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.TxResult} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.TxResult} + */ +proto.tendermint.abci.TxResult.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 = /** @type {number} */ (reader.readUint32()); + msg.setIndex(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setTx(value); + break; + case 4: + var value = new proto.tendermint.abci.ResponseDeliverTx; + reader.readMessage(value,proto.tendermint.abci.ResponseDeliverTx.deserializeBinaryFromReader); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.TxResult.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.TxResult.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.TxResult} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.TxResult.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeUint32( + 2, + f + ); + } + f = message.getTx_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.abci.ResponseDeliverTx.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.abci.TxResult.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.TxResult} returns this + */ +proto.tendermint.abci.TxResult.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 index = 2; + * @return {number} + */ +proto.tendermint.abci.TxResult.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.TxResult} returns this + */ +proto.tendermint.abci.TxResult.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes tx = 3; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.TxResult.prototype.getTx = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes tx = 3; + * This is a type-conversion wrapper around `getTx()` + * @return {string} + */ +proto.tendermint.abci.TxResult.prototype.getTx_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getTx())); +}; + + +/** + * optional bytes tx = 3; + * 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.TxResult.prototype.getTx_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getTx())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.TxResult} returns this + */ +proto.tendermint.abci.TxResult.prototype.setTx = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * optional ResponseDeliverTx result = 4; + * @return {?proto.tendermint.abci.ResponseDeliverTx} + */ +proto.tendermint.abci.TxResult.prototype.getResult = function() { + return /** @type{?proto.tendermint.abci.ResponseDeliverTx} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.ResponseDeliverTx, 4)); +}; + + +/** + * @param {?proto.tendermint.abci.ResponseDeliverTx|undefined} value + * @return {!proto.tendermint.abci.TxResult} returns this +*/ +proto.tendermint.abci.TxResult.prototype.setResult = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.TxResult} returns this + */ +proto.tendermint.abci.TxResult.prototype.clearResult = function() { + return this.setResult(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.TxResult.prototype.hasResult = 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.tendermint.abci.Validator.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.Validator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Validator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Validator.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + power: 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.tendermint.abci.Validator} + */ +proto.tendermint.abci.Validator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.Validator; + return proto.tendermint.abci.Validator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.Validator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Validator} + */ +proto.tendermint.abci.Validator.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.setAddress(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Validator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.Validator.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.Validator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Validator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional bytes address = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.Validator.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.tendermint.abci.Validator.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.Validator.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.Validator} returns this + */ +proto.tendermint.abci.Validator.prototype.setAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional int64 power = 3; + * @return {number} + */ +proto.tendermint.abci.Validator.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Validator} returns this + */ +proto.tendermint.abci.Validator.prototype.setPower = 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.tendermint.abci.ValidatorUpdate.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.ValidatorUpdate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorUpdate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ValidatorUpdate.toObject = function(includeInstance, msg) { + var f, obj = { + pubKey: (f = msg.getPubKey()) && tendermint_crypto_keys_pb.PublicKey.toObject(includeInstance, f), + 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.tendermint.abci.ValidatorUpdate} + */ +proto.tendermint.abci.ValidatorUpdate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.ValidatorUpdate; + return proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.ValidatorUpdate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.ValidatorUpdate} + */ +proto.tendermint.abci.ValidatorUpdate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_crypto_keys_pb.PublicKey; + reader.readMessage(value,tendermint_crypto_keys_pb.PublicKey.deserializeBinaryFromReader); + msg.setPubKey(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.ValidatorUpdate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.ValidatorUpdate.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.ValidatorUpdate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.ValidatorUpdate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_crypto_keys_pb.PublicKey.serializeBinaryToWriter + ); + } + f = message.getPower(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional tendermint.crypto.PublicKey pub_key = 1; + * @return {?proto.tendermint.crypto.PublicKey} + */ +proto.tendermint.abci.ValidatorUpdate.prototype.getPubKey = function() { + return /** @type{?proto.tendermint.crypto.PublicKey} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_keys_pb.PublicKey, 1)); +}; + + +/** + * @param {?proto.tendermint.crypto.PublicKey|undefined} value + * @return {!proto.tendermint.abci.ValidatorUpdate} returns this +*/ +proto.tendermint.abci.ValidatorUpdate.prototype.setPubKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.ValidatorUpdate} returns this + */ +proto.tendermint.abci.ValidatorUpdate.prototype.clearPubKey = function() { + return this.setPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.ValidatorUpdate.prototype.hasPubKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 power = 2; + * @return {number} + */ +proto.tendermint.abci.ValidatorUpdate.prototype.getPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.ValidatorUpdate} returns this + */ +proto.tendermint.abci.ValidatorUpdate.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.tendermint.abci.VoteInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.VoteInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.VoteInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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) + }; + + 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.VoteInfo} + */ +proto.tendermint.abci.VoteInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.VoteInfo; + return proto.tendermint.abci.VoteInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.VoteInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.VoteInfo} + */ +proto.tendermint.abci.VoteInfo.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.Validator; + reader.readMessage(value,proto.tendermint.abci.Validator.deserializeBinaryFromReader); + msg.setValidator(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSignedLastBlock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.VoteInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.VoteInfo.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.VoteInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.VoteInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.abci.Validator.serializeBinaryToWriter + ); + } + f = message.getSignedLastBlock(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional Validator validator = 1; + * @return {?proto.tendermint.abci.Validator} + */ +proto.tendermint.abci.VoteInfo.prototype.getValidator = function() { + return /** @type{?proto.tendermint.abci.Validator} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.Validator, 1)); +}; + + +/** + * @param {?proto.tendermint.abci.Validator|undefined} value + * @return {!proto.tendermint.abci.VoteInfo} returns this +*/ +proto.tendermint.abci.VoteInfo.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.VoteInfo} returns this + */ +proto.tendermint.abci.VoteInfo.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.VoteInfo.prototype.hasValidator = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool signed_last_block = 2; + * @return {boolean} + */ +proto.tendermint.abci.VoteInfo.prototype.getSignedLastBlock = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.tendermint.abci.VoteInfo} returns this + */ +proto.tendermint.abci.VoteInfo.prototype.setSignedLastBlock = 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.tendermint.abci.Evidence.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.Evidence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Evidence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Evidence.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + validator: (f = msg.getValidator()) && proto.tendermint.abci.Validator.toObject(includeInstance, f), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + totalVotingPower: 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.tendermint.abci.Evidence} + */ +proto.tendermint.abci.Evidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.Evidence; + return proto.tendermint.abci.Evidence.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.Evidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Evidence} + */ +proto.tendermint.abci.Evidence.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.EvidenceType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = new proto.tendermint.abci.Validator; + reader.readMessage(value,proto.tendermint.abci.Validator.deserializeBinaryFromReader); + msg.setValidator(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalVotingPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Evidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.Evidence.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.Evidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.Evidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.abci.Validator.serializeBinaryToWriter + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getTotalVotingPower(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional EvidenceType type = 1; + * @return {!proto.tendermint.abci.EvidenceType} + */ +proto.tendermint.abci.Evidence.prototype.getType = function() { + return /** @type {!proto.tendermint.abci.EvidenceType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.tendermint.abci.EvidenceType} value + * @return {!proto.tendermint.abci.Evidence} returns this + */ +proto.tendermint.abci.Evidence.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional Validator validator = 2; + * @return {?proto.tendermint.abci.Validator} + */ +proto.tendermint.abci.Evidence.prototype.getValidator = function() { + return /** @type{?proto.tendermint.abci.Validator} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.abci.Validator, 2)); +}; + + +/** + * @param {?proto.tendermint.abci.Validator|undefined} value + * @return {!proto.tendermint.abci.Evidence} returns this +*/ +proto.tendermint.abci.Evidence.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Evidence} returns this + */ +proto.tendermint.abci.Evidence.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Evidence.prototype.hasValidator = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 height = 3; + * @return {number} + */ +proto.tendermint.abci.Evidence.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Evidence} returns this + */ +proto.tendermint.abci.Evidence.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.abci.Evidence.prototype.getTime = 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.tendermint.abci.Evidence} returns this +*/ +proto.tendermint.abci.Evidence.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.abci.Evidence} returns this + */ +proto.tendermint.abci.Evidence.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.abci.Evidence.prototype.hasTime = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional int64 total_voting_power = 5; + * @return {number} + */ +proto.tendermint.abci.Evidence.prototype.getTotalVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Evidence} returns this + */ +proto.tendermint.abci.Evidence.prototype.setTotalVotingPower = 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.tendermint.abci.Snapshot.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.abci.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.tendermint.abci.Snapshot} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.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: msg.getMetadata_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.Snapshot} + */ +proto.tendermint.abci.Snapshot.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.abci.Snapshot; + return proto.tendermint.abci.Snapshot.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.abci.Snapshot} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.abci.Snapshot} + */ +proto.tendermint.abci.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 = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setMetadata(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.abci.Snapshot.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.abci.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.tendermint.abci.Snapshot} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.abci.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_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional uint64 height = 1; + * @return {number} + */ +proto.tendermint.abci.Snapshot.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Snapshot} returns this + */ +proto.tendermint.abci.Snapshot.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint32 format = 2; + * @return {number} + */ +proto.tendermint.abci.Snapshot.prototype.getFormat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Snapshot} returns this + */ +proto.tendermint.abci.Snapshot.prototype.setFormat = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint32 chunks = 3; + * @return {number} + */ +proto.tendermint.abci.Snapshot.prototype.getChunks = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.abci.Snapshot} returns this + */ +proto.tendermint.abci.Snapshot.prototype.setChunks = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional bytes hash = 4; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.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.tendermint.abci.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.tendermint.abci.Snapshot.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.Snapshot} returns this + */ +proto.tendermint.abci.Snapshot.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 4, value); +}; + + +/** + * optional bytes metadata = 5; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.abci.Snapshot.prototype.getMetadata = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes metadata = 5; + * This is a type-conversion wrapper around `getMetadata()` + * @return {string} + */ +proto.tendermint.abci.Snapshot.prototype.getMetadata_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getMetadata())); +}; + + +/** + * optional bytes metadata = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getMetadata()` + * @return {!Uint8Array} + */ +proto.tendermint.abci.Snapshot.prototype.getMetadata_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getMetadata())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.abci.Snapshot} returns this + */ +proto.tendermint.abci.Snapshot.prototype.setMetadata = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +/** + * @enum {number} + */ +proto.tendermint.abci.CheckTxType = { + NEW: 0, + RECHECK: 1 +}; + +/** + * @enum {number} + */ +proto.tendermint.abci.EvidenceType = { + UNKNOWN: 0, + DUPLICATE_VOTE: 1, + LIGHT_CLIENT_ATTACK: 2 +}; + +goog.object.extend(exports, proto.tendermint.abci); diff --git a/src/types/proto-types/tendermint/crypto/keys_pb.js b/src/types/proto-types/tendermint/crypto/keys_pb.js new file mode 100644 index 00000000..193c5d80 --- /dev/null +++ b/src/types/proto-types/tendermint/crypto/keys_pb.js @@ -0,0 +1,310 @@ +// source: tendermint/crypto/keys.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.tendermint.crypto.PublicKey', null, global); +goog.exportSymbol('proto.tendermint.crypto.PublicKey.SumCase', 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.tendermint.crypto.PublicKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.crypto.PublicKey.oneofGroups_); +}; +goog.inherits(proto.tendermint.crypto.PublicKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.PublicKey.displayName = 'proto.tendermint.crypto.PublicKey'; +} + +/** + * 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.crypto.PublicKey.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.tendermint.crypto.PublicKey.SumCase = { + SUM_NOT_SET: 0, + ED25519: 1, + SECP256K1: 2 +}; + +/** + * @return {proto.tendermint.crypto.PublicKey.SumCase} + */ +proto.tendermint.crypto.PublicKey.prototype.getSumCase = function() { + return /** @type {proto.tendermint.crypto.PublicKey.SumCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.crypto.PublicKey.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.crypto.PublicKey.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.PublicKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.PublicKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.PublicKey.toObject = function(includeInstance, msg) { + var f, obj = { + ed25519: msg.getEd25519_asB64(), + secp256k1: msg.getSecp256k1_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.crypto.PublicKey} + */ +proto.tendermint.crypto.PublicKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.PublicKey; + return proto.tendermint.crypto.PublicKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.PublicKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.PublicKey} + */ +proto.tendermint.crypto.PublicKey.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.setEd25519(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSecp256k1(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.crypto.PublicKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.PublicKey.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.crypto.PublicKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.PublicKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBytes( + 1, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes ed25519 = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.PublicKey.prototype.getEd25519 = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes ed25519 = 1; + * This is a type-conversion wrapper around `getEd25519()` + * @return {string} + */ +proto.tendermint.crypto.PublicKey.prototype.getEd25519_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEd25519())); +}; + + +/** + * optional bytes ed25519 = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEd25519()` + * @return {!Uint8Array} + */ +proto.tendermint.crypto.PublicKey.prototype.getEd25519_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEd25519())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.PublicKey} returns this + */ +proto.tendermint.crypto.PublicKey.prototype.setEd25519 = function(value) { + return jspb.Message.setOneofField(this, 1, proto.tendermint.crypto.PublicKey.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.tendermint.crypto.PublicKey} returns this + */ +proto.tendermint.crypto.PublicKey.prototype.clearEd25519 = function() { + return jspb.Message.setOneofField(this, 1, proto.tendermint.crypto.PublicKey.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.crypto.PublicKey.prototype.hasEd25519 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bytes secp256k1 = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.PublicKey.prototype.getSecp256k1 = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes secp256k1 = 2; + * This is a type-conversion wrapper around `getSecp256k1()` + * @return {string} + */ +proto.tendermint.crypto.PublicKey.prototype.getSecp256k1_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSecp256k1())); +}; + + +/** + * optional bytes secp256k1 = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSecp256k1()` + * @return {!Uint8Array} + */ +proto.tendermint.crypto.PublicKey.prototype.getSecp256k1_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSecp256k1())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.PublicKey} returns this + */ +proto.tendermint.crypto.PublicKey.prototype.setSecp256k1 = function(value) { + return jspb.Message.setOneofField(this, 2, proto.tendermint.crypto.PublicKey.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.tendermint.crypto.PublicKey} returns this + */ +proto.tendermint.crypto.PublicKey.prototype.clearSecp256k1 = function() { + return jspb.Message.setOneofField(this, 2, proto.tendermint.crypto.PublicKey.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.crypto.PublicKey.prototype.hasSecp256k1 = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.tendermint.crypto); diff --git a/src/types/proto-types/tendermint/crypto/proof_pb.js b/src/types/proto-types/tendermint/crypto/proof_pb.js new file mode 100644 index 00000000..b6372980 --- /dev/null +++ b/src/types/proto-types/tendermint/crypto/proof_pb.js @@ -0,0 +1,1214 @@ +// source: tendermint/crypto/proof.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.tendermint.crypto.DominoOp', null, global); +goog.exportSymbol('proto.tendermint.crypto.Proof', null, global); +goog.exportSymbol('proto.tendermint.crypto.ProofOp', null, global); +goog.exportSymbol('proto.tendermint.crypto.ProofOps', null, global); +goog.exportSymbol('proto.tendermint.crypto.ValueOp', 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.tendermint.crypto.Proof = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.crypto.Proof.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.crypto.Proof, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.Proof.displayName = 'proto.tendermint.crypto.Proof'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crypto.ValueOp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.crypto.ValueOp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.ValueOp.displayName = 'proto.tendermint.crypto.ValueOp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crypto.DominoOp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.crypto.DominoOp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.DominoOp.displayName = 'proto.tendermint.crypto.DominoOp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crypto.ProofOp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.crypto.ProofOp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.ProofOp.displayName = 'proto.tendermint.crypto.ProofOp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.crypto.ProofOps = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.crypto.ProofOps.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.crypto.ProofOps, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.crypto.ProofOps.displayName = 'proto.tendermint.crypto.ProofOps'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.crypto.Proof.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.tendermint.crypto.Proof.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.Proof.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.Proof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.Proof.toObject = function(includeInstance, msg) { + var f, obj = { + total: jspb.Message.getFieldWithDefault(msg, 1, 0), + index: jspb.Message.getFieldWithDefault(msg, 2, 0), + leafHash: msg.getLeafHash_asB64(), + auntsList: msg.getAuntsList_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.crypto.Proof} + */ +proto.tendermint.crypto.Proof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.Proof; + return proto.tendermint.crypto.Proof.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.Proof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.Proof} + */ +proto.tendermint.crypto.Proof.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.setTotal(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setIndex(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLeafHash(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.addAunts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.crypto.Proof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.Proof.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.crypto.Proof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.Proof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotal(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getIndex(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getLeafHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getAuntsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 4, + f + ); + } +}; + + +/** + * optional int64 total = 1; + * @return {number} + */ +proto.tendermint.crypto.Proof.prototype.getTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.setTotal = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 index = 2; + * @return {number} + */ +proto.tendermint.crypto.Proof.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional bytes leaf_hash = 3; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.Proof.prototype.getLeafHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes leaf_hash = 3; + * This is a type-conversion wrapper around `getLeafHash()` + * @return {string} + */ +proto.tendermint.crypto.Proof.prototype.getLeafHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLeafHash())); +}; + + +/** + * optional bytes leaf_hash = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLeafHash()` + * @return {!Uint8Array} + */ +proto.tendermint.crypto.Proof.prototype.getLeafHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLeafHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.setLeafHash = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + +/** + * repeated bytes aunts = 4; + * @return {!(Array|Array)} + */ +proto.tendermint.crypto.Proof.prototype.getAuntsList = function() { + return /** @type {!(Array|Array)} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * repeated bytes aunts = 4; + * This is a type-conversion wrapper around `getAuntsList()` + * @return {!Array} + */ +proto.tendermint.crypto.Proof.prototype.getAuntsList_asB64 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsB64( + this.getAuntsList())); +}; + + +/** + * repeated bytes aunts = 4; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAuntsList()` + * @return {!Array} + */ +proto.tendermint.crypto.Proof.prototype.getAuntsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getAuntsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.setAuntsList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.addAunts = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.crypto.Proof} returns this + */ +proto.tendermint.crypto.Proof.prototype.clearAuntsList = function() { + return this.setAuntsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.crypto.ValueOp.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.ValueOp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.ValueOp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ValueOp.toObject = function(includeInstance, msg) { + var f, obj = { + key: msg.getKey_asB64(), + proof: (f = msg.getProof()) && proto.tendermint.crypto.Proof.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.crypto.ValueOp} + */ +proto.tendermint.crypto.ValueOp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.ValueOp; + return proto.tendermint.crypto.ValueOp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.ValueOp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.ValueOp} + */ +proto.tendermint.crypto.ValueOp.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.tendermint.crypto.Proof; + reader.readMessage(value,proto.tendermint.crypto.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.crypto.ValueOp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.ValueOp.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.crypto.ValueOp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ValueOp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.crypto.Proof.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes key = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.ValueOp.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.tendermint.crypto.ValueOp.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.tendermint.crypto.ValueOp.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.ValueOp} returns this + */ +proto.tendermint.crypto.ValueOp.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional Proof proof = 2; + * @return {?proto.tendermint.crypto.Proof} + */ +proto.tendermint.crypto.ValueOp.prototype.getProof = function() { + return /** @type{?proto.tendermint.crypto.Proof} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.crypto.Proof, 2)); +}; + + +/** + * @param {?proto.tendermint.crypto.Proof|undefined} value + * @return {!proto.tendermint.crypto.ValueOp} returns this +*/ +proto.tendermint.crypto.ValueOp.prototype.setProof = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.crypto.ValueOp} returns this + */ +proto.tendermint.crypto.ValueOp.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.crypto.ValueOp.prototype.hasProof = 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.tendermint.crypto.DominoOp.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.DominoOp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.DominoOp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.DominoOp.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + input: jspb.Message.getFieldWithDefault(msg, 2, ""), + output: 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.tendermint.crypto.DominoOp} + */ +proto.tendermint.crypto.DominoOp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.DominoOp; + return proto.tendermint.crypto.DominoOp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.DominoOp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.DominoOp} + */ +proto.tendermint.crypto.DominoOp.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.setInput(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setOutput(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.crypto.DominoOp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.DominoOp.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.crypto.DominoOp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.DominoOp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getInput(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getOutput(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string key = 1; + * @return {string} + */ +proto.tendermint.crypto.DominoOp.prototype.getKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.crypto.DominoOp} returns this + */ +proto.tendermint.crypto.DominoOp.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string input = 2; + * @return {string} + */ +proto.tendermint.crypto.DominoOp.prototype.getInput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.crypto.DominoOp} returns this + */ +proto.tendermint.crypto.DominoOp.prototype.setInput = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string output = 3; + * @return {string} + */ +proto.tendermint.crypto.DominoOp.prototype.getOutput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.crypto.DominoOp} returns this + */ +proto.tendermint.crypto.DominoOp.prototype.setOutput = 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.tendermint.crypto.ProofOp.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.ProofOp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.ProofOp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ProofOp.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, ""), + key: msg.getKey_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.tendermint.crypto.ProofOp} + */ +proto.tendermint.crypto.ProofOp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.ProofOp; + return proto.tendermint.crypto.ProofOp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.ProofOp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.ProofOp} + */ +proto.tendermint.crypto.ProofOp.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.setType(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setKey(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.tendermint.crypto.ProofOp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.ProofOp.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.crypto.ProofOp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ProofOp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getKey_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } +}; + + +/** + * optional string type = 1; + * @return {string} + */ +proto.tendermint.crypto.ProofOp.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.crypto.ProofOp} returns this + */ +proto.tendermint.crypto.ProofOp.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes key = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.ProofOp.prototype.getKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes key = 2; + * This is a type-conversion wrapper around `getKey()` + * @return {string} + */ +proto.tendermint.crypto.ProofOp.prototype.getKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getKey())); +}; + + +/** + * optional bytes key = 2; + * 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.tendermint.crypto.ProofOp.prototype.getKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getKey())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.ProofOp} returns this + */ +proto.tendermint.crypto.ProofOp.prototype.setKey = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.crypto.ProofOp.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.tendermint.crypto.ProofOp.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.tendermint.crypto.ProofOp.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.crypto.ProofOp} returns this + */ +proto.tendermint.crypto.ProofOp.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.crypto.ProofOps.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.tendermint.crypto.ProofOps.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.crypto.ProofOps.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.crypto.ProofOps} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ProofOps.toObject = function(includeInstance, msg) { + var f, obj = { + opsList: jspb.Message.toObjectList(msg.getOpsList(), + proto.tendermint.crypto.ProofOp.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.tendermint.crypto.ProofOps} + */ +proto.tendermint.crypto.ProofOps.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.crypto.ProofOps; + return proto.tendermint.crypto.ProofOps.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.crypto.ProofOps} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.crypto.ProofOps} + */ +proto.tendermint.crypto.ProofOps.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.crypto.ProofOp; + reader.readMessage(value,proto.tendermint.crypto.ProofOp.deserializeBinaryFromReader); + msg.addOps(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.crypto.ProofOps.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.crypto.ProofOps.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.crypto.ProofOps} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.crypto.ProofOps.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOpsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.tendermint.crypto.ProofOp.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ProofOp ops = 1; + * @return {!Array} + */ +proto.tendermint.crypto.ProofOps.prototype.getOpsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.crypto.ProofOp, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.crypto.ProofOps} returns this +*/ +proto.tendermint.crypto.ProofOps.prototype.setOpsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.crypto.ProofOp=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.crypto.ProofOp} + */ +proto.tendermint.crypto.ProofOps.prototype.addOps = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.crypto.ProofOp, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.crypto.ProofOps} returns this + */ +proto.tendermint.crypto.ProofOps.prototype.clearOpsList = function() { + return this.setOpsList([]); +}; + + +goog.object.extend(exports, proto.tendermint.crypto); diff --git a/src/types/proto-types/tendermint/libs/bits/types_pb.js b/src/types/proto-types/tendermint/libs/bits/types_pb.js new file mode 100644 index 00000000..97b73715 --- /dev/null +++ b/src/types/proto-types/tendermint/libs/bits/types_pb.js @@ -0,0 +1,223 @@ +// source: tendermint/libs/bits/types.proto +/** + * @fileoverview + * @enhanceable + * @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! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.tendermint.libs.bits.BitArray', 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.tendermint.libs.bits.BitArray = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.libs.bits.BitArray.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.libs.bits.BitArray, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.libs.bits.BitArray.displayName = 'proto.tendermint.libs.bits.BitArray'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.libs.bits.BitArray.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.tendermint.libs.bits.BitArray.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.libs.bits.BitArray.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.libs.bits.BitArray} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.libs.bits.BitArray.toObject = function(includeInstance, msg) { + var f, obj = { + bits: jspb.Message.getFieldWithDefault(msg, 1, 0), + elemsList: (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.tendermint.libs.bits.BitArray} + */ +proto.tendermint.libs.bits.BitArray.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.libs.bits.BitArray; + return proto.tendermint.libs.bits.BitArray.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.libs.bits.BitArray} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.libs.bits.BitArray} + */ +proto.tendermint.libs.bits.BitArray.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.setBits(value); + break; + case 2: + var value = /** @type {!Array} */ (reader.readPackedUint64()); + msg.setElemsList(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.libs.bits.BitArray.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.libs.bits.BitArray.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.libs.bits.BitArray} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.libs.bits.BitArray.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBits(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getElemsList(); + if (f.length > 0) { + writer.writePackedUint64( + 2, + f + ); + } +}; + + +/** + * optional int64 bits = 1; + * @return {number} + */ +proto.tendermint.libs.bits.BitArray.prototype.getBits = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.libs.bits.BitArray} returns this + */ +proto.tendermint.libs.bits.BitArray.prototype.setBits = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated uint64 elems = 2; + * @return {!Array} + */ +proto.tendermint.libs.bits.BitArray.prototype.getElemsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.libs.bits.BitArray} returns this + */ +proto.tendermint.libs.bits.BitArray.prototype.setElemsList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.tendermint.libs.bits.BitArray} returns this + */ +proto.tendermint.libs.bits.BitArray.prototype.addElems = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.libs.bits.BitArray} returns this + */ +proto.tendermint.libs.bits.BitArray.prototype.clearElemsList = function() { + return this.setElemsList([]); +}; + + +goog.object.extend(exports, proto.tendermint.libs.bits); diff --git a/src/types/proto-types/tendermint/p2p/types_pb.js b/src/types/proto-types/tendermint/p2p/types_pb.js new file mode 100644 index 00000000..6bf3b414 --- /dev/null +++ b/src/types/proto-types/tendermint/p2p/types_pb.js @@ -0,0 +1,1051 @@ +// source: tendermint/p2p/types.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.tendermint.p2p.DefaultNodeInfo', null, global); +goog.exportSymbol('proto.tendermint.p2p.DefaultNodeInfoOther', null, global); +goog.exportSymbol('proto.tendermint.p2p.NetAddress', null, global); +goog.exportSymbol('proto.tendermint.p2p.ProtocolVersion', 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.tendermint.p2p.NetAddress = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.NetAddress, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.NetAddress.displayName = 'proto.tendermint.p2p.NetAddress'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.p2p.ProtocolVersion = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.ProtocolVersion, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.ProtocolVersion.displayName = 'proto.tendermint.p2p.ProtocolVersion'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.p2p.DefaultNodeInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.DefaultNodeInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.DefaultNodeInfo.displayName = 'proto.tendermint.p2p.DefaultNodeInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.p2p.DefaultNodeInfoOther = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.p2p.DefaultNodeInfoOther, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.p2p.DefaultNodeInfoOther.displayName = 'proto.tendermint.p2p.DefaultNodeInfoOther'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.p2p.NetAddress.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.NetAddress.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.p2p.NetAddress} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.NetAddress.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + ip: jspb.Message.getFieldWithDefault(msg, 2, ""), + port: 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.tendermint.p2p.NetAddress} + */ +proto.tendermint.p2p.NetAddress.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.NetAddress; + return proto.tendermint.p2p.NetAddress.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.NetAddress} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.NetAddress} + */ +proto.tendermint.p2p.NetAddress.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setIp(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPort(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.NetAddress.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.NetAddress.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.p2p.NetAddress} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.NetAddress.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIp(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPort(); + if (f !== 0) { + writer.writeUint32( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.tendermint.p2p.NetAddress.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.NetAddress} returns this + */ +proto.tendermint.p2p.NetAddress.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string ip = 2; + * @return {string} + */ +proto.tendermint.p2p.NetAddress.prototype.getIp = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.NetAddress} returns this + */ +proto.tendermint.p2p.NetAddress.prototype.setIp = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional uint32 port = 3; + * @return {number} + */ +proto.tendermint.p2p.NetAddress.prototype.getPort = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.p2p.NetAddress} returns this + */ +proto.tendermint.p2p.NetAddress.prototype.setPort = 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.tendermint.p2p.ProtocolVersion.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.ProtocolVersion.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.p2p.ProtocolVersion} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.ProtocolVersion.toObject = function(includeInstance, msg) { + var f, obj = { + p2p: jspb.Message.getFieldWithDefault(msg, 1, 0), + block: jspb.Message.getFieldWithDefault(msg, 2, 0), + app: 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.tendermint.p2p.ProtocolVersion} + */ +proto.tendermint.p2p.ProtocolVersion.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.ProtocolVersion; + return proto.tendermint.p2p.ProtocolVersion.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.ProtocolVersion} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.ProtocolVersion} + */ +proto.tendermint.p2p.ProtocolVersion.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.setP2p(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlock(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setApp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.ProtocolVersion.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.ProtocolVersion.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.p2p.ProtocolVersion} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.ProtocolVersion.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getP2p(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getBlock(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getApp(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } +}; + + +/** + * optional uint64 p2p = 1; + * @return {number} + */ +proto.tendermint.p2p.ProtocolVersion.prototype.getP2p = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.p2p.ProtocolVersion} returns this + */ +proto.tendermint.p2p.ProtocolVersion.prototype.setP2p = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 block = 2; + * @return {number} + */ +proto.tendermint.p2p.ProtocolVersion.prototype.getBlock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.p2p.ProtocolVersion} returns this + */ +proto.tendermint.p2p.ProtocolVersion.prototype.setBlock = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional uint64 app = 3; + * @return {number} + */ +proto.tendermint.p2p.ProtocolVersion.prototype.getApp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.p2p.ProtocolVersion} returns this + */ +proto.tendermint.p2p.ProtocolVersion.prototype.setApp = 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.tendermint.p2p.DefaultNodeInfo.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.DefaultNodeInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.p2p.DefaultNodeInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.DefaultNodeInfo.toObject = function(includeInstance, msg) { + var f, obj = { + protocolVersion: (f = msg.getProtocolVersion()) && proto.tendermint.p2p.ProtocolVersion.toObject(includeInstance, f), + defaultNodeId: jspb.Message.getFieldWithDefault(msg, 2, ""), + listenAddr: jspb.Message.getFieldWithDefault(msg, 3, ""), + network: jspb.Message.getFieldWithDefault(msg, 4, ""), + version: jspb.Message.getFieldWithDefault(msg, 5, ""), + channels: msg.getChannels_asB64(), + moniker: jspb.Message.getFieldWithDefault(msg, 7, ""), + other: (f = msg.getOther()) && proto.tendermint.p2p.DefaultNodeInfoOther.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.p2p.DefaultNodeInfo} + */ +proto.tendermint.p2p.DefaultNodeInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.DefaultNodeInfo; + return proto.tendermint.p2p.DefaultNodeInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.DefaultNodeInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.DefaultNodeInfo} + */ +proto.tendermint.p2p.DefaultNodeInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.p2p.ProtocolVersion; + reader.readMessage(value,proto.tendermint.p2p.ProtocolVersion.deserializeBinaryFromReader); + msg.setProtocolVersion(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDefaultNodeId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setListenAddr(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setNetwork(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setChannels(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setMoniker(value); + break; + case 8: + var value = new proto.tendermint.p2p.DefaultNodeInfoOther; + reader.readMessage(value,proto.tendermint.p2p.DefaultNodeInfoOther.deserializeBinaryFromReader); + msg.setOther(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.DefaultNodeInfo.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.p2p.DefaultNodeInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.DefaultNodeInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProtocolVersion(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.p2p.ProtocolVersion.serializeBinaryToWriter + ); + } + f = message.getDefaultNodeId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getListenAddr(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getNetwork(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getChannels_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getMoniker(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getOther(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.tendermint.p2p.DefaultNodeInfoOther.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ProtocolVersion protocol_version = 1; + * @return {?proto.tendermint.p2p.ProtocolVersion} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getProtocolVersion = function() { + return /** @type{?proto.tendermint.p2p.ProtocolVersion} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.p2p.ProtocolVersion, 1)); +}; + + +/** + * @param {?proto.tendermint.p2p.ProtocolVersion|undefined} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this +*/ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setProtocolVersion = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.clearProtocolVersion = function() { + return this.setProtocolVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.hasProtocolVersion = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string default_node_id = 2; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getDefaultNodeId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setDefaultNodeId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string listen_addr = 3; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getListenAddr = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setListenAddr = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string network = 4; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getNetwork = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setNetwork = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string version = 5; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional bytes channels = 6; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getChannels = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes channels = 6; + * This is a type-conversion wrapper around `getChannels()` + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getChannels_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getChannels())); +}; + + +/** + * optional bytes channels = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getChannels()` + * @return {!Uint8Array} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getChannels_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getChannels())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setChannels = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional string moniker = 7; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getMoniker = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setMoniker = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional DefaultNodeInfoOther other = 8; + * @return {?proto.tendermint.p2p.DefaultNodeInfoOther} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.getOther = function() { + return /** @type{?proto.tendermint.p2p.DefaultNodeInfoOther} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.p2p.DefaultNodeInfoOther, 8)); +}; + + +/** + * @param {?proto.tendermint.p2p.DefaultNodeInfoOther|undefined} value + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this +*/ +proto.tendermint.p2p.DefaultNodeInfo.prototype.setOther = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.p2p.DefaultNodeInfo} returns this + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.clearOther = function() { + return this.setOther(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.p2p.DefaultNodeInfo.prototype.hasOther = function() { + return jspb.Message.getField(this, 8) != 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.tendermint.p2p.DefaultNodeInfoOther.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.p2p.DefaultNodeInfoOther.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.p2p.DefaultNodeInfoOther} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.DefaultNodeInfoOther.toObject = function(includeInstance, msg) { + var f, obj = { + txIndex: jspb.Message.getFieldWithDefault(msg, 1, ""), + rpcAddress: 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.tendermint.p2p.DefaultNodeInfoOther} + */ +proto.tendermint.p2p.DefaultNodeInfoOther.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.p2p.DefaultNodeInfoOther; + return proto.tendermint.p2p.DefaultNodeInfoOther.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.p2p.DefaultNodeInfoOther} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.p2p.DefaultNodeInfoOther} + */ +proto.tendermint.p2p.DefaultNodeInfoOther.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.setTxIndex(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setRpcAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.p2p.DefaultNodeInfoOther.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.p2p.DefaultNodeInfoOther.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.p2p.DefaultNodeInfoOther} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.p2p.DefaultNodeInfoOther.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxIndex(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getRpcAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string tx_index = 1; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfoOther.prototype.getTxIndex = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfoOther} returns this + */ +proto.tendermint.p2p.DefaultNodeInfoOther.prototype.setTxIndex = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string rpc_address = 2; + * @return {string} + */ +proto.tendermint.p2p.DefaultNodeInfoOther.prototype.getRpcAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.p2p.DefaultNodeInfoOther} returns this + */ +proto.tendermint.p2p.DefaultNodeInfoOther.prototype.setRpcAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +goog.object.extend(exports, proto.tendermint.p2p); diff --git a/src/types/proto-types/tendermint/types/block_pb.js b/src/types/proto-types/tendermint/types/block_pb.js new file mode 100644 index 00000000..049328cc --- /dev/null +++ b/src/types/proto-types/tendermint/types/block_pb.js @@ -0,0 +1,347 @@ +// source: tendermint/types/block.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 tendermint_types_types_pb = require('../../tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_types_pb); +var tendermint_types_evidence_pb = require('../../tendermint/types/evidence_pb.js'); +goog.object.extend(proto, tendermint_types_evidence_pb); +goog.exportSymbol('proto.tendermint.types.Block', 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.tendermint.types.Block = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Block, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Block.displayName = 'proto.tendermint.types.Block'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.Block.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Block.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Block} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Block.toObject = function(includeInstance, msg) { + var f, obj = { + header: (f = msg.getHeader()) && tendermint_types_types_pb.Header.toObject(includeInstance, f), + data: (f = msg.getData()) && tendermint_types_types_pb.Data.toObject(includeInstance, f), + evidence: (f = msg.getEvidence()) && tendermint_types_evidence_pb.EvidenceList.toObject(includeInstance, f), + lastCommit: (f = msg.getLastCommit()) && tendermint_types_types_pb.Commit.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.types.Block} + */ +proto.tendermint.types.Block.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Block; + return proto.tendermint.types.Block.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Block} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Block} + */ +proto.tendermint.types.Block.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.Header; + reader.readMessage(value,tendermint_types_types_pb.Header.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 2: + var value = new tendermint_types_types_pb.Data; + reader.readMessage(value,tendermint_types_types_pb.Data.deserializeBinaryFromReader); + msg.setData(value); + break; + case 3: + var value = new tendermint_types_evidence_pb.EvidenceList; + reader.readMessage(value,tendermint_types_evidence_pb.EvidenceList.deserializeBinaryFromReader); + msg.setEvidence(value); + break; + case 4: + var value = new tendermint_types_types_pb.Commit; + reader.readMessage(value,tendermint_types_types_pb.Commit.deserializeBinaryFromReader); + msg.setLastCommit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Block.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Block.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.Block} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Block.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.Header.serializeBinaryToWriter + ); + } + f = message.getData(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_types_pb.Data.serializeBinaryToWriter + ); + } + f = message.getEvidence(); + if (f != null) { + writer.writeMessage( + 3, + f, + tendermint_types_evidence_pb.EvidenceList.serializeBinaryToWriter + ); + } + f = message.getLastCommit(); + if (f != null) { + writer.writeMessage( + 4, + f, + tendermint_types_types_pb.Commit.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Header header = 1; + * @return {?proto.tendermint.types.Header} + */ +proto.tendermint.types.Block.prototype.getHeader = function() { + return /** @type{?proto.tendermint.types.Header} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Header, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Header|undefined} value + * @return {!proto.tendermint.types.Block} returns this +*/ +proto.tendermint.types.Block.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Block} returns this + */ +proto.tendermint.types.Block.prototype.clearHeader = function() { + return this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Block.prototype.hasHeader = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Data data = 2; + * @return {?proto.tendermint.types.Data} + */ +proto.tendermint.types.Block.prototype.getData = function() { + return /** @type{?proto.tendermint.types.Data} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Data, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Data|undefined} value + * @return {!proto.tendermint.types.Block} returns this +*/ +proto.tendermint.types.Block.prototype.setData = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Block} returns this + */ +proto.tendermint.types.Block.prototype.clearData = function() { + return this.setData(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Block.prototype.hasData = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional EvidenceList evidence = 3; + * @return {?proto.tendermint.types.EvidenceList} + */ +proto.tendermint.types.Block.prototype.getEvidence = function() { + return /** @type{?proto.tendermint.types.EvidenceList} */ ( + jspb.Message.getWrapperField(this, tendermint_types_evidence_pb.EvidenceList, 3)); +}; + + +/** + * @param {?proto.tendermint.types.EvidenceList|undefined} value + * @return {!proto.tendermint.types.Block} returns this +*/ +proto.tendermint.types.Block.prototype.setEvidence = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Block} returns this + */ +proto.tendermint.types.Block.prototype.clearEvidence = function() { + return this.setEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Block.prototype.hasEvidence = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional Commit last_commit = 4; + * @return {?proto.tendermint.types.Commit} + */ +proto.tendermint.types.Block.prototype.getLastCommit = function() { + return /** @type{?proto.tendermint.types.Commit} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Commit, 4)); +}; + + +/** + * @param {?proto.tendermint.types.Commit|undefined} value + * @return {!proto.tendermint.types.Block} returns this +*/ +proto.tendermint.types.Block.prototype.setLastCommit = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Block} returns this + */ +proto.tendermint.types.Block.prototype.clearLastCommit = function() { + return this.setLastCommit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Block.prototype.hasLastCommit = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +goog.object.extend(exports, proto.tendermint.types); diff --git a/src/types/proto-types/tendermint/types/evidence_pb.js b/src/types/proto-types/tendermint/types/evidence_pb.js new file mode 100644 index 00000000..df2fadb9 --- /dev/null +++ b/src/types/proto-types/tendermint/types/evidence_pb.js @@ -0,0 +1,1135 @@ +// source: tendermint/types/evidence.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var tendermint_types_types_pb = require('../../tendermint/types/types_pb.js'); +goog.object.extend(proto, tendermint_types_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.DuplicateVoteEvidence', null, global); +goog.exportSymbol('proto.tendermint.types.Evidence', null, global); +goog.exportSymbol('proto.tendermint.types.Evidence.SumCase', null, global); +goog.exportSymbol('proto.tendermint.types.EvidenceList', null, global); +goog.exportSymbol('proto.tendermint.types.LightClientAttackEvidence', 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.tendermint.types.Evidence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.types.Evidence.oneofGroups_); +}; +goog.inherits(proto.tendermint.types.Evidence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Evidence.displayName = 'proto.tendermint.types.Evidence'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.DuplicateVoteEvidence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.DuplicateVoteEvidence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.DuplicateVoteEvidence.displayName = 'proto.tendermint.types.DuplicateVoteEvidence'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.LightClientAttackEvidence = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.LightClientAttackEvidence.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.LightClientAttackEvidence, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.LightClientAttackEvidence.displayName = 'proto.tendermint.types.LightClientAttackEvidence'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.EvidenceList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.EvidenceList.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.EvidenceList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.EvidenceList.displayName = 'proto.tendermint.types.EvidenceList'; +} + +/** + * 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.types.Evidence.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.tendermint.types.Evidence.SumCase = { + SUM_NOT_SET: 0, + DUPLICATE_VOTE_EVIDENCE: 1, + LIGHT_CLIENT_ATTACK_EVIDENCE: 2 +}; + +/** + * @return {proto.tendermint.types.Evidence.SumCase} + */ +proto.tendermint.types.Evidence.prototype.getSumCase = function() { + return /** @type {proto.tendermint.types.Evidence.SumCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.types.Evidence.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.types.Evidence.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Evidence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Evidence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Evidence.toObject = function(includeInstance, msg) { + var f, obj = { + duplicateVoteEvidence: (f = msg.getDuplicateVoteEvidence()) && proto.tendermint.types.DuplicateVoteEvidence.toObject(includeInstance, f), + lightClientAttackEvidence: (f = msg.getLightClientAttackEvidence()) && proto.tendermint.types.LightClientAttackEvidence.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.types.Evidence} + */ +proto.tendermint.types.Evidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Evidence; + return proto.tendermint.types.Evidence.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Evidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Evidence} + */ +proto.tendermint.types.Evidence.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.DuplicateVoteEvidence; + reader.readMessage(value,proto.tendermint.types.DuplicateVoteEvidence.deserializeBinaryFromReader); + msg.setDuplicateVoteEvidence(value); + break; + case 2: + var value = new proto.tendermint.types.LightClientAttackEvidence; + reader.readMessage(value,proto.tendermint.types.LightClientAttackEvidence.deserializeBinaryFromReader); + msg.setLightClientAttackEvidence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Evidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Evidence.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.Evidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Evidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDuplicateVoteEvidence(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.types.DuplicateVoteEvidence.serializeBinaryToWriter + ); + } + f = message.getLightClientAttackEvidence(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.types.LightClientAttackEvidence.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DuplicateVoteEvidence duplicate_vote_evidence = 1; + * @return {?proto.tendermint.types.DuplicateVoteEvidence} + */ +proto.tendermint.types.Evidence.prototype.getDuplicateVoteEvidence = function() { + return /** @type{?proto.tendermint.types.DuplicateVoteEvidence} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.DuplicateVoteEvidence, 1)); +}; + + +/** + * @param {?proto.tendermint.types.DuplicateVoteEvidence|undefined} value + * @return {!proto.tendermint.types.Evidence} returns this +*/ +proto.tendermint.types.Evidence.prototype.setDuplicateVoteEvidence = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.tendermint.types.Evidence.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Evidence} returns this + */ +proto.tendermint.types.Evidence.prototype.clearDuplicateVoteEvidence = function() { + return this.setDuplicateVoteEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Evidence.prototype.hasDuplicateVoteEvidence = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional LightClientAttackEvidence light_client_attack_evidence = 2; + * @return {?proto.tendermint.types.LightClientAttackEvidence} + */ +proto.tendermint.types.Evidence.prototype.getLightClientAttackEvidence = function() { + return /** @type{?proto.tendermint.types.LightClientAttackEvidence} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.LightClientAttackEvidence, 2)); +}; + + +/** + * @param {?proto.tendermint.types.LightClientAttackEvidence|undefined} value + * @return {!proto.tendermint.types.Evidence} returns this +*/ +proto.tendermint.types.Evidence.prototype.setLightClientAttackEvidence = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.tendermint.types.Evidence.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Evidence} returns this + */ +proto.tendermint.types.Evidence.prototype.clearLightClientAttackEvidence = function() { + return this.setLightClientAttackEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Evidence.prototype.hasLightClientAttackEvidence = 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.tendermint.types.DuplicateVoteEvidence.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.DuplicateVoteEvidence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.DuplicateVoteEvidence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.DuplicateVoteEvidence.toObject = function(includeInstance, msg) { + var f, obj = { + voteA: (f = msg.getVoteA()) && tendermint_types_types_pb.Vote.toObject(includeInstance, f), + voteB: (f = msg.getVoteB()) && tendermint_types_types_pb.Vote.toObject(includeInstance, f), + totalVotingPower: jspb.Message.getFieldWithDefault(msg, 3, 0), + validatorPower: jspb.Message.getFieldWithDefault(msg, 4, 0), + timestamp: (f = msg.getTimestamp()) && 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.tendermint.types.DuplicateVoteEvidence} + */ +proto.tendermint.types.DuplicateVoteEvidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.DuplicateVoteEvidence; + return proto.tendermint.types.DuplicateVoteEvidence.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.DuplicateVoteEvidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.DuplicateVoteEvidence} + */ +proto.tendermint.types.DuplicateVoteEvidence.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.Vote; + reader.readMessage(value,tendermint_types_types_pb.Vote.deserializeBinaryFromReader); + msg.setVoteA(value); + break; + case 2: + var value = new tendermint_types_types_pb.Vote; + reader.readMessage(value,tendermint_types_types_pb.Vote.deserializeBinaryFromReader); + msg.setVoteB(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalVotingPower(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setValidatorPower(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.DuplicateVoteEvidence.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.DuplicateVoteEvidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.DuplicateVoteEvidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVoteA(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.Vote.serializeBinaryToWriter + ); + } + f = message.getVoteB(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_types_pb.Vote.serializeBinaryToWriter + ); + } + f = message.getTotalVotingPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getValidatorPower(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Vote vote_a = 1; + * @return {?proto.tendermint.types.Vote} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.getVoteA = function() { + return /** @type{?proto.tendermint.types.Vote} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Vote, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Vote|undefined} value + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this +*/ +proto.tendermint.types.DuplicateVoteEvidence.prototype.setVoteA = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.clearVoteA = function() { + return this.setVoteA(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.hasVoteA = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Vote vote_b = 2; + * @return {?proto.tendermint.types.Vote} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.getVoteB = function() { + return /** @type{?proto.tendermint.types.Vote} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.Vote, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Vote|undefined} value + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this +*/ +proto.tendermint.types.DuplicateVoteEvidence.prototype.setVoteB = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.clearVoteB = function() { + return this.setVoteB(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.hasVoteB = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 total_voting_power = 3; + * @return {number} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.getTotalVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.setTotalVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 validator_power = 4; + * @return {number} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.getValidatorPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.setValidatorPower = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.getTimestamp = 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.tendermint.types.DuplicateVoteEvidence} returns this +*/ +proto.tendermint.types.DuplicateVoteEvidence.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.DuplicateVoteEvidence} returns this + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.DuplicateVoteEvidence.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.LightClientAttackEvidence.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.tendermint.types.LightClientAttackEvidence.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.LightClientAttackEvidence.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.LightClientAttackEvidence} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.LightClientAttackEvidence.toObject = function(includeInstance, msg) { + var f, obj = { + conflictingBlock: (f = msg.getConflictingBlock()) && tendermint_types_types_pb.LightBlock.toObject(includeInstance, f), + commonHeight: jspb.Message.getFieldWithDefault(msg, 2, 0), + byzantineValidatorsList: jspb.Message.toObjectList(msg.getByzantineValidatorsList(), + tendermint_types_validator_pb.Validator.toObject, includeInstance), + totalVotingPower: jspb.Message.getFieldWithDefault(msg, 4, 0), + timestamp: (f = msg.getTimestamp()) && 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.tendermint.types.LightClientAttackEvidence} + */ +proto.tendermint.types.LightClientAttackEvidence.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.LightClientAttackEvidence; + return proto.tendermint.types.LightClientAttackEvidence.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.LightClientAttackEvidence} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.LightClientAttackEvidence} + */ +proto.tendermint.types.LightClientAttackEvidence.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_types_types_pb.LightBlock; + reader.readMessage(value,tendermint_types_types_pb.LightBlock.deserializeBinaryFromReader); + msg.setConflictingBlock(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCommonHeight(value); + break; + case 3: + var value = new tendermint_types_validator_pb.Validator; + reader.readMessage(value,tendermint_types_validator_pb.Validator.deserializeBinaryFromReader); + msg.addByzantineValidators(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalVotingPower(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.LightClientAttackEvidence.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.LightClientAttackEvidence} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.LightClientAttackEvidence.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConflictingBlock(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_types_types_pb.LightBlock.serializeBinaryToWriter + ); + } + f = message.getCommonHeight(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getByzantineValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + tendermint_types_validator_pb.Validator.serializeBinaryToWriter + ); + } + f = message.getTotalVotingPower(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional LightBlock conflicting_block = 1; + * @return {?proto.tendermint.types.LightBlock} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.getConflictingBlock = function() { + return /** @type{?proto.tendermint.types.LightBlock} */ ( + jspb.Message.getWrapperField(this, tendermint_types_types_pb.LightBlock, 1)); +}; + + +/** + * @param {?proto.tendermint.types.LightBlock|undefined} value + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this +*/ +proto.tendermint.types.LightClientAttackEvidence.prototype.setConflictingBlock = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.clearConflictingBlock = function() { + return this.setConflictingBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.hasConflictingBlock = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 common_height = 2; + * @return {number} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.getCommonHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.setCommonHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated Validator byzantine_validators = 3; + * @return {!Array} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.getByzantineValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, tendermint_types_validator_pb.Validator, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this +*/ +proto.tendermint.types.LightClientAttackEvidence.prototype.setByzantineValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.tendermint.types.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.types.Validator} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.addByzantineValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.tendermint.types.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.clearByzantineValidatorsList = function() { + return this.setByzantineValidatorsList([]); +}; + + +/** + * optional int64 total_voting_power = 4; + * @return {number} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.getTotalVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.setTotalVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.getTimestamp = 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.tendermint.types.LightClientAttackEvidence} returns this +*/ +proto.tendermint.types.LightClientAttackEvidence.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.LightClientAttackEvidence} returns this + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.LightClientAttackEvidence.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.EvidenceList.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.tendermint.types.EvidenceList.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.EvidenceList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.EvidenceList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.EvidenceList.toObject = function(includeInstance, msg) { + var f, obj = { + evidenceList: jspb.Message.toObjectList(msg.getEvidenceList(), + proto.tendermint.types.Evidence.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.tendermint.types.EvidenceList} + */ +proto.tendermint.types.EvidenceList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.EvidenceList; + return proto.tendermint.types.EvidenceList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.EvidenceList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.EvidenceList} + */ +proto.tendermint.types.EvidenceList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.Evidence; + reader.readMessage(value,proto.tendermint.types.Evidence.deserializeBinaryFromReader); + msg.addEvidence(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.EvidenceList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.EvidenceList.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.EvidenceList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.EvidenceList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEvidenceList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.tendermint.types.Evidence.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Evidence evidence = 1; + * @return {!Array} + */ +proto.tendermint.types.EvidenceList.prototype.getEvidenceList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.types.Evidence, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.types.EvidenceList} returns this +*/ +proto.tendermint.types.EvidenceList.prototype.setEvidenceList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.types.Evidence=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.types.Evidence} + */ +proto.tendermint.types.EvidenceList.prototype.addEvidence = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.types.Evidence, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.types.EvidenceList} returns this + */ +proto.tendermint.types.EvidenceList.prototype.clearEvidenceList = function() { + return this.setEvidenceList([]); +}; + + +goog.object.extend(exports, proto.tendermint.types); diff --git a/src/types/proto-types/tendermint/types/params_pb.js b/src/types/proto-types/tendermint/types/params_pb.js new file mode 100644 index 00000000..1828b8d2 --- /dev/null +++ b/src/types/proto-types/tendermint/types/params_pb.js @@ -0,0 +1,1302 @@ +// source: tendermint/types/params.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 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.BlockParams', null, global); +goog.exportSymbol('proto.tendermint.types.ConsensusParams', null, global); +goog.exportSymbol('proto.tendermint.types.EvidenceParams', null, global); +goog.exportSymbol('proto.tendermint.types.HashedParams', null, global); +goog.exportSymbol('proto.tendermint.types.ValidatorParams', null, global); +goog.exportSymbol('proto.tendermint.types.VersionParams', 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.tendermint.types.ConsensusParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.ConsensusParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.ConsensusParams.displayName = 'proto.tendermint.types.ConsensusParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.BlockParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.BlockParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.BlockParams.displayName = 'proto.tendermint.types.BlockParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.EvidenceParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.EvidenceParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.EvidenceParams.displayName = 'proto.tendermint.types.EvidenceParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.ValidatorParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.ValidatorParams.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.ValidatorParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.ValidatorParams.displayName = 'proto.tendermint.types.ValidatorParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.VersionParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.VersionParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.VersionParams.displayName = 'proto.tendermint.types.VersionParams'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.HashedParams = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.HashedParams, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.HashedParams.displayName = 'proto.tendermint.types.HashedParams'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.ConsensusParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.ConsensusParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ConsensusParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ConsensusParams.toObject = function(includeInstance, msg) { + var f, obj = { + 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) + }; + + 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.ConsensusParams} + */ +proto.tendermint.types.ConsensusParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.ConsensusParams; + return proto.tendermint.types.ConsensusParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.ConsensusParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.ConsensusParams} + */ +proto.tendermint.types.ConsensusParams.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.BlockParams; + reader.readMessage(value,proto.tendermint.types.BlockParams.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 2: + var value = new proto.tendermint.types.EvidenceParams; + reader.readMessage(value,proto.tendermint.types.EvidenceParams.deserializeBinaryFromReader); + msg.setEvidence(value); + break; + case 3: + var value = new proto.tendermint.types.ValidatorParams; + reader.readMessage(value,proto.tendermint.types.ValidatorParams.deserializeBinaryFromReader); + msg.setValidator(value); + break; + case 4: + var value = new proto.tendermint.types.VersionParams; + reader.readMessage(value,proto.tendermint.types.VersionParams.deserializeBinaryFromReader); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.ConsensusParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.ConsensusParams.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.ConsensusParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ConsensusParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.types.BlockParams.serializeBinaryToWriter + ); + } + f = message.getEvidence(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.types.EvidenceParams.serializeBinaryToWriter + ); + } + f = message.getValidator(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.types.ValidatorParams.serializeBinaryToWriter + ); + } + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.types.VersionParams.serializeBinaryToWriter + ); + } +}; + + +/** + * optional BlockParams block = 1; + * @return {?proto.tendermint.types.BlockParams} + */ +proto.tendermint.types.ConsensusParams.prototype.getBlock = function() { + return /** @type{?proto.tendermint.types.BlockParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.BlockParams, 1)); +}; + + +/** + * @param {?proto.tendermint.types.BlockParams|undefined} value + * @return {!proto.tendermint.types.ConsensusParams} returns this +*/ +proto.tendermint.types.ConsensusParams.prototype.setBlock = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ConsensusParams} returns this + */ +proto.tendermint.types.ConsensusParams.prototype.clearBlock = function() { + return this.setBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ConsensusParams.prototype.hasBlock = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional EvidenceParams evidence = 2; + * @return {?proto.tendermint.types.EvidenceParams} + */ +proto.tendermint.types.ConsensusParams.prototype.getEvidence = function() { + return /** @type{?proto.tendermint.types.EvidenceParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.EvidenceParams, 2)); +}; + + +/** + * @param {?proto.tendermint.types.EvidenceParams|undefined} value + * @return {!proto.tendermint.types.ConsensusParams} returns this +*/ +proto.tendermint.types.ConsensusParams.prototype.setEvidence = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ConsensusParams} returns this + */ +proto.tendermint.types.ConsensusParams.prototype.clearEvidence = function() { + return this.setEvidence(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ConsensusParams.prototype.hasEvidence = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ValidatorParams validator = 3; + * @return {?proto.tendermint.types.ValidatorParams} + */ +proto.tendermint.types.ConsensusParams.prototype.getValidator = function() { + return /** @type{?proto.tendermint.types.ValidatorParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.ValidatorParams, 3)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorParams|undefined} value + * @return {!proto.tendermint.types.ConsensusParams} returns this +*/ +proto.tendermint.types.ConsensusParams.prototype.setValidator = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ConsensusParams} returns this + */ +proto.tendermint.types.ConsensusParams.prototype.clearValidator = function() { + return this.setValidator(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ConsensusParams.prototype.hasValidator = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional VersionParams version = 4; + * @return {?proto.tendermint.types.VersionParams} + */ +proto.tendermint.types.ConsensusParams.prototype.getVersion = function() { + return /** @type{?proto.tendermint.types.VersionParams} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.VersionParams, 4)); +}; + + +/** + * @param {?proto.tendermint.types.VersionParams|undefined} value + * @return {!proto.tendermint.types.ConsensusParams} returns this +*/ +proto.tendermint.types.ConsensusParams.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ConsensusParams} returns this + */ +proto.tendermint.types.ConsensusParams.prototype.clearVersion = function() { + return this.setVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ConsensusParams.prototype.hasVersion = 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.tendermint.types.BlockParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.BlockParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.BlockParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockParams.toObject = function(includeInstance, msg) { + var f, obj = { + maxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxGas: jspb.Message.getFieldWithDefault(msg, 2, 0), + timeIotaMs: 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.tendermint.types.BlockParams} + */ +proto.tendermint.types.BlockParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.BlockParams; + return proto.tendermint.types.BlockParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.BlockParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.BlockParams} + */ +proto.tendermint.types.BlockParams.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.setMaxBytes(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxGas(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTimeIotaMs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.BlockParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.BlockParams.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.BlockParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxBytes(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMaxGas(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getTimeIotaMs(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional int64 max_bytes = 1; + * @return {number} + */ +proto.tendermint.types.BlockParams.prototype.getMaxBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.BlockParams} returns this + */ +proto.tendermint.types.BlockParams.prototype.setMaxBytes = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 max_gas = 2; + * @return {number} + */ +proto.tendermint.types.BlockParams.prototype.getMaxGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.BlockParams} returns this + */ +proto.tendermint.types.BlockParams.prototype.setMaxGas = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 time_iota_ms = 3; + * @return {number} + */ +proto.tendermint.types.BlockParams.prototype.getTimeIotaMs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.BlockParams} returns this + */ +proto.tendermint.types.BlockParams.prototype.setTimeIotaMs = 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.tendermint.types.EvidenceParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.EvidenceParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.EvidenceParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.EvidenceParams.toObject = function(includeInstance, msg) { + var f, obj = { + maxAgeNumBlocks: jspb.Message.getFieldWithDefault(msg, 1, 0), + maxAgeDuration: (f = msg.getMaxAgeDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), + maxBytes: 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.tendermint.types.EvidenceParams} + */ +proto.tendermint.types.EvidenceParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.EvidenceParams; + return proto.tendermint.types.EvidenceParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.EvidenceParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.EvidenceParams} + */ +proto.tendermint.types.EvidenceParams.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.setMaxAgeNumBlocks(value); + break; + case 2: + var value = new google_protobuf_duration_pb.Duration; + reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); + msg.setMaxAgeDuration(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxBytes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.EvidenceParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.EvidenceParams.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.EvidenceParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.EvidenceParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMaxAgeNumBlocks(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getMaxAgeDuration(); + if (f != null) { + writer.writeMessage( + 2, + f, + google_protobuf_duration_pb.Duration.serializeBinaryToWriter + ); + } + f = message.getMaxBytes(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional int64 max_age_num_blocks = 1; + * @return {number} + */ +proto.tendermint.types.EvidenceParams.prototype.getMaxAgeNumBlocks = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.EvidenceParams} returns this + */ +proto.tendermint.types.EvidenceParams.prototype.setMaxAgeNumBlocks = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional google.protobuf.Duration max_age_duration = 2; + * @return {?proto.google.protobuf.Duration} + */ +proto.tendermint.types.EvidenceParams.prototype.getMaxAgeDuration = 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.tendermint.types.EvidenceParams} returns this +*/ +proto.tendermint.types.EvidenceParams.prototype.setMaxAgeDuration = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.EvidenceParams} returns this + */ +proto.tendermint.types.EvidenceParams.prototype.clearMaxAgeDuration = function() { + return this.setMaxAgeDuration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.EvidenceParams.prototype.hasMaxAgeDuration = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 max_bytes = 3; + * @return {number} + */ +proto.tendermint.types.EvidenceParams.prototype.getMaxBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.EvidenceParams} returns this + */ +proto.tendermint.types.EvidenceParams.prototype.setMaxBytes = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.ValidatorParams.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.tendermint.types.ValidatorParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.ValidatorParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ValidatorParams.toObject = function(includeInstance, msg) { + var f, obj = { + pubKeyTypesList: (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.tendermint.types.ValidatorParams} + */ +proto.tendermint.types.ValidatorParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.ValidatorParams; + return proto.tendermint.types.ValidatorParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.ValidatorParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.ValidatorParams} + */ +proto.tendermint.types.ValidatorParams.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.addPubKeyTypes(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.ValidatorParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.ValidatorParams.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.ValidatorParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ValidatorParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKeyTypesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string pub_key_types = 1; + * @return {!Array} + */ +proto.tendermint.types.ValidatorParams.prototype.getPubKeyTypesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.types.ValidatorParams} returns this + */ +proto.tendermint.types.ValidatorParams.prototype.setPubKeyTypesList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.tendermint.types.ValidatorParams} returns this + */ +proto.tendermint.types.ValidatorParams.prototype.addPubKeyTypes = 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.types.ValidatorParams} returns this + */ +proto.tendermint.types.ValidatorParams.prototype.clearPubKeyTypesList = function() { + return this.setPubKeyTypesList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.VersionParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.VersionParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.VersionParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.VersionParams.toObject = function(includeInstance, msg) { + var f, obj = { + appVersion: 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.VersionParams} + */ +proto.tendermint.types.VersionParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.VersionParams; + return proto.tendermint.types.VersionParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.VersionParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.VersionParams} + */ +proto.tendermint.types.VersionParams.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.setAppVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.VersionParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.VersionParams.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.VersionParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.VersionParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAppVersion(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } +}; + + +/** + * optional uint64 app_version = 1; + * @return {number} + */ +proto.tendermint.types.VersionParams.prototype.getAppVersion = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.VersionParams} returns this + */ +proto.tendermint.types.VersionParams.prototype.setAppVersion = 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.types.HashedParams.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.HashedParams.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.HashedParams} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.HashedParams.toObject = function(includeInstance, msg) { + var f, obj = { + blockMaxBytes: jspb.Message.getFieldWithDefault(msg, 1, 0), + blockMaxGas: 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.tendermint.types.HashedParams} + */ +proto.tendermint.types.HashedParams.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.HashedParams; + return proto.tendermint.types.HashedParams.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.HashedParams} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.HashedParams} + */ +proto.tendermint.types.HashedParams.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.setBlockMaxBytes(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBlockMaxGas(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.HashedParams.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.HashedParams.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.HashedParams} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.HashedParams.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockMaxBytes(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getBlockMaxGas(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 block_max_bytes = 1; + * @return {number} + */ +proto.tendermint.types.HashedParams.prototype.getBlockMaxBytes = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.HashedParams} returns this + */ +proto.tendermint.types.HashedParams.prototype.setBlockMaxBytes = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 block_max_gas = 2; + * @return {number} + */ +proto.tendermint.types.HashedParams.prototype.getBlockMaxGas = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.HashedParams} returns this + */ +proto.tendermint.types.HashedParams.prototype.setBlockMaxGas = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.tendermint.types); diff --git a/src/types/proto-types/tendermint/types/types_pb.js b/src/types/proto-types/tendermint/types/types_pb.js new file mode 100644 index 00000000..24dbc0b4 --- /dev/null +++ b/src/types/proto-types/tendermint/types/types_pb.js @@ -0,0 +1,4227 @@ +// source: tendermint/types/types.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +goog.object.extend(proto, google_protobuf_timestamp_pb); +var tendermint_crypto_proof_pb = require('../../tendermint/crypto/proof_pb.js'); +goog.object.extend(proto, tendermint_crypto_proof_pb); +var tendermint_version_types_pb = require('../../tendermint/version/types_pb.js'); +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.Header', null, global); +goog.exportSymbol('proto.tendermint.types.LightBlock', null, global); +goog.exportSymbol('proto.tendermint.types.Part', null, global); +goog.exportSymbol('proto.tendermint.types.PartSetHeader', null, global); +goog.exportSymbol('proto.tendermint.types.Proposal', null, global); +goog.exportSymbol('proto.tendermint.types.SignedHeader', null, global); +goog.exportSymbol('proto.tendermint.types.SignedMsgType', null, global); +goog.exportSymbol('proto.tendermint.types.TxProof', null, global); +goog.exportSymbol('proto.tendermint.types.Vote', 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.tendermint.types.PartSetHeader = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.PartSetHeader, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.PartSetHeader.displayName = 'proto.tendermint.types.PartSetHeader'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Part = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Part, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Part.displayName = 'proto.tendermint.types.Part'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.BlockID = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.BlockID, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.BlockID.displayName = 'proto.tendermint.types.BlockID'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Header = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Header, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Header.displayName = 'proto.tendermint.types.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.tendermint.types.Data = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.Data.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.Data, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Data.displayName = 'proto.tendermint.types.Data'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Vote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Vote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Vote.displayName = 'proto.tendermint.types.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.tendermint.types.Commit = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.Commit.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.Commit, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Commit.displayName = 'proto.tendermint.types.Commit'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.CommitSig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.CommitSig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + 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.Proposal = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Proposal, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Proposal.displayName = 'proto.tendermint.types.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.tendermint.types.SignedHeader = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.SignedHeader, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.SignedHeader.displayName = 'proto.tendermint.types.SignedHeader'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.LightBlock = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.LightBlock, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.LightBlock.displayName = 'proto.tendermint.types.LightBlock'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.BlockMeta = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.BlockMeta, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.BlockMeta.displayName = 'proto.tendermint.types.BlockMeta'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.TxProof = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.TxProof, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.TxProof.displayName = 'proto.tendermint.types.TxProof'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.PartSetHeader.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.PartSetHeader.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.PartSetHeader} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.PartSetHeader.toObject = function(includeInstance, msg) { + var f, obj = { + total: jspb.Message.getFieldWithDefault(msg, 1, 0), + hash: msg.getHash_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.PartSetHeader} + */ +proto.tendermint.types.PartSetHeader.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.PartSetHeader; + return proto.tendermint.types.PartSetHeader.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.PartSetHeader} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.PartSetHeader} + */ +proto.tendermint.types.PartSetHeader.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.setTotal(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.PartSetHeader.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.PartSetHeader.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.PartSetHeader} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.PartSetHeader.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTotal(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional uint32 total = 1; + * @return {number} + */ +proto.tendermint.types.PartSetHeader.prototype.getTotal = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.PartSetHeader} returns this + */ +proto.tendermint.types.PartSetHeader.prototype.setTotal = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes hash = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.PartSetHeader.prototype.getHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes hash = 2; + * This is a type-conversion wrapper around `getHash()` + * @return {string} + */ +proto.tendermint.types.PartSetHeader.prototype.getHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getHash())); +}; + + +/** + * optional bytes hash = 2; + * 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.types.PartSetHeader.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.PartSetHeader} returns this + */ +proto.tendermint.types.PartSetHeader.prototype.setHash = 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.tendermint.types.Part.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Part.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Part} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Part.toObject = function(includeInstance, msg) { + var f, obj = { + index: jspb.Message.getFieldWithDefault(msg, 1, 0), + bytes: msg.getBytes_asB64(), + proof: (f = msg.getProof()) && tendermint_crypto_proof_pb.Proof.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.types.Part} + */ +proto.tendermint.types.Part.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Part; + return proto.tendermint.types.Part.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Part} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Part} + */ +proto.tendermint.types.Part.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.setBytes(value); + break; + case 3: + var value = new tendermint_crypto_proof_pb.Proof; + reader.readMessage(value,tendermint_crypto_proof_pb.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Part.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Part.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.Part} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Part.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIndex(); + if (f !== 0) { + writer.writeUint32( + 1, + f + ); + } + f = message.getBytes_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 3, + f, + tendermint_crypto_proof_pb.Proof.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint32 index = 1; + * @return {number} + */ +proto.tendermint.types.Part.prototype.getIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Part} returns this + */ +proto.tendermint.types.Part.prototype.setIndex = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional bytes bytes = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Part.prototype.getBytes = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes bytes = 2; + * This is a type-conversion wrapper around `getBytes()` + * @return {string} + */ +proto.tendermint.types.Part.prototype.getBytes_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBytes())); +}; + + +/** + * optional bytes bytes = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBytes()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Part.prototype.getBytes_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBytes())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Part} returns this + */ +proto.tendermint.types.Part.prototype.setBytes = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional tendermint.crypto.Proof proof = 3; + * @return {?proto.tendermint.crypto.Proof} + */ +proto.tendermint.types.Part.prototype.getProof = function() { + return /** @type{?proto.tendermint.crypto.Proof} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_proof_pb.Proof, 3)); +}; + + +/** + * @param {?proto.tendermint.crypto.Proof|undefined} value + * @return {!proto.tendermint.types.Part} returns this +*/ +proto.tendermint.types.Part.prototype.setProof = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Part} returns this + */ +proto.tendermint.types.Part.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Part.prototype.hasProof = 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.tendermint.types.BlockID.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.BlockID.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.BlockID} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockID.toObject = function(includeInstance, msg) { + var f, obj = { + hash: msg.getHash_asB64(), + partSetHeader: (f = msg.getPartSetHeader()) && proto.tendermint.types.PartSetHeader.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.types.BlockID} + */ +proto.tendermint.types.BlockID.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.BlockID; + return proto.tendermint.types.BlockID.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.BlockID} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.BlockID} + */ +proto.tendermint.types.BlockID.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.setHash(value); + break; + case 2: + var value = new proto.tendermint.types.PartSetHeader; + reader.readMessage(value,proto.tendermint.types.PartSetHeader.deserializeBinaryFromReader); + msg.setPartSetHeader(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.BlockID.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.BlockID.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.BlockID} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockID.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPartSetHeader(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.types.PartSetHeader.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.BlockID.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.types.BlockID.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.types.BlockID.prototype.getHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.BlockID} returns this + */ +proto.tendermint.types.BlockID.prototype.setHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional PartSetHeader part_set_header = 2; + * @return {?proto.tendermint.types.PartSetHeader} + */ +proto.tendermint.types.BlockID.prototype.getPartSetHeader = function() { + return /** @type{?proto.tendermint.types.PartSetHeader} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.PartSetHeader, 2)); +}; + + +/** + * @param {?proto.tendermint.types.PartSetHeader|undefined} value + * @return {!proto.tendermint.types.BlockID} returns this +*/ +proto.tendermint.types.BlockID.prototype.setPartSetHeader = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.BlockID} returns this + */ +proto.tendermint.types.BlockID.prototype.clearPartSetHeader = function() { + return this.setPartSetHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.BlockID.prototype.hasPartSetHeader = 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.tendermint.types.Header.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.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.tendermint.types.Header} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Header.toObject = function(includeInstance, msg) { + var f, obj = { + version: (f = msg.getVersion()) && tendermint_version_types_pb.Consensus.toObject(includeInstance, f), + chainId: jspb.Message.getFieldWithDefault(msg, 2, ""), + height: jspb.Message.getFieldWithDefault(msg, 3, 0), + time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), + lastBlockId: (f = msg.getLastBlockId()) && proto.tendermint.types.BlockID.toObject(includeInstance, f), + lastCommitHash: msg.getLastCommitHash_asB64(), + dataHash: msg.getDataHash_asB64(), + validatorsHash: msg.getValidatorsHash_asB64(), + nextValidatorsHash: msg.getNextValidatorsHash_asB64(), + consensusHash: msg.getConsensusHash_asB64(), + appHash: msg.getAppHash_asB64(), + lastResultsHash: msg.getLastResultsHash_asB64(), + evidenceHash: msg.getEvidenceHash_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.types.Header} + */ +proto.tendermint.types.Header.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Header; + return proto.tendermint.types.Header.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Header} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Header} + */ +proto.tendermint.types.Header.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_version_types_pb.Consensus; + reader.readMessage(value,tendermint_version_types_pb.Consensus.deserializeBinaryFromReader); + msg.setVersion(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChainId(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setHeight(value); + break; + case 4: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTime(value); + break; + case 5: + var value = new proto.tendermint.types.BlockID; + reader.readMessage(value,proto.tendermint.types.BlockID.deserializeBinaryFromReader); + msg.setLastBlockId(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastCommitHash(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDataHash(value); + break; + case 8: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValidatorsHash(value); + break; + case 9: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setNextValidatorsHash(value); + break; + case 10: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setConsensusHash(value); + break; + case 11: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAppHash(value); + break; + case 12: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setLastResultsHash(value); + break; + case 13: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setEvidenceHash(value); + break; + case 14: + 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.types.Header.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.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.tendermint.types.Header} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Header.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getVersion(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_version_types_pb.Consensus.serializeBinaryToWriter + ); + } + f = message.getChainId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getTime(); + if (f != null) { + writer.writeMessage( + 4, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getLastBlockId(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.tendermint.types.BlockID.serializeBinaryToWriter + ); + } + f = message.getLastCommitHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getDataHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 7, + f + ); + } + f = message.getValidatorsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } + f = message.getNextValidatorsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 9, + f + ); + } + f = message.getConsensusHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 10, + f + ); + } + f = message.getAppHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 11, + f + ); + } + f = message.getLastResultsHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 12, + f + ); + } + f = message.getEvidenceHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 13, + f + ); + } + f = message.getProposerAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 14, + f + ); + } +}; + + +/** + * optional tendermint.version.Consensus version = 1; + * @return {?proto.tendermint.version.Consensus} + */ +proto.tendermint.types.Header.prototype.getVersion = function() { + return /** @type{?proto.tendermint.version.Consensus} */ ( + jspb.Message.getWrapperField(this, tendermint_version_types_pb.Consensus, 1)); +}; + + +/** + * @param {?proto.tendermint.version.Consensus|undefined} value + * @return {!proto.tendermint.types.Header} returns this +*/ +proto.tendermint.types.Header.prototype.setVersion = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.clearVersion = function() { + return this.setVersion(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Header.prototype.hasVersion = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string chain_id = 2; + * @return {string} + */ +proto.tendermint.types.Header.prototype.getChainId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setChainId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 height = 3; + * @return {number} + */ +proto.tendermint.types.Header.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional google.protobuf.Timestamp time = 4; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.Header.prototype.getTime = 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.tendermint.types.Header} returns this +*/ +proto.tendermint.types.Header.prototype.setTime = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.clearTime = function() { + return this.setTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Header.prototype.hasTime = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional BlockID last_block_id = 5; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.types.Header.prototype.getLastBlockId = 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.Header} returns this +*/ +proto.tendermint.types.Header.prototype.setLastBlockId = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.clearLastBlockId = function() { + return this.setLastBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Header.prototype.hasLastBlockId = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes last_commit_hash = 6; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getLastCommitHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes last_commit_hash = 6; + * This is a type-conversion wrapper around `getLastCommitHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getLastCommitHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastCommitHash())); +}; + + +/** + * optional bytes last_commit_hash = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getLastCommitHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getLastCommitHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastCommitHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setLastCommitHash = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional bytes data_hash = 7; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getDataHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * optional bytes data_hash = 7; + * This is a type-conversion wrapper around `getDataHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getDataHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDataHash())); +}; + + +/** + * optional bytes data_hash = 7; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDataHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getDataHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getDataHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setDataHash = function(value) { + return jspb.Message.setProto3BytesField(this, 7, value); +}; + + +/** + * optional bytes validators_hash = 8; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getValidatorsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes validators_hash = 8; + * This is a type-conversion wrapper around `getValidatorsHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getValidatorsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValidatorsHash())); +}; + + +/** + * optional bytes validators_hash = 8; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getValidatorsHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getValidatorsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValidatorsHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setValidatorsHash = function(value) { + return jspb.Message.setProto3BytesField(this, 8, value); +}; + + +/** + * optional bytes next_validators_hash = 9; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getNextValidatorsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** + * optional bytes next_validators_hash = 9; + * This is a type-conversion wrapper around `getNextValidatorsHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getNextValidatorsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getNextValidatorsHash())); +}; + + +/** + * optional bytes next_validators_hash = 9; + * 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.types.Header.prototype.getNextValidatorsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getNextValidatorsHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setNextValidatorsHash = function(value) { + return jspb.Message.setProto3BytesField(this, 9, value); +}; + + +/** + * optional bytes consensus_hash = 10; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getConsensusHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + + +/** + * optional bytes consensus_hash = 10; + * This is a type-conversion wrapper around `getConsensusHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getConsensusHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getConsensusHash())); +}; + + +/** + * optional bytes consensus_hash = 10; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getConsensusHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getConsensusHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getConsensusHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setConsensusHash = function(value) { + return jspb.Message.setProto3BytesField(this, 10, value); +}; + + +/** + * optional bytes app_hash = 11; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getAppHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +}; + + +/** + * optional bytes app_hash = 11; + * This is a type-conversion wrapper around `getAppHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getAppHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAppHash())); +}; + + +/** + * optional bytes app_hash = 11; + * 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.types.Header.prototype.getAppHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAppHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setAppHash = function(value) { + return jspb.Message.setProto3BytesField(this, 11, value); +}; + + +/** + * optional bytes last_results_hash = 12; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getLastResultsHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** + * optional bytes last_results_hash = 12; + * This is a type-conversion wrapper around `getLastResultsHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getLastResultsHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getLastResultsHash())); +}; + + +/** + * optional bytes last_results_hash = 12; + * 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.tendermint.types.Header.prototype.getLastResultsHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getLastResultsHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setLastResultsHash = function(value) { + return jspb.Message.setProto3BytesField(this, 12, value); +}; + + +/** + * optional bytes evidence_hash = 13; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getEvidenceHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** + * optional bytes evidence_hash = 13; + * This is a type-conversion wrapper around `getEvidenceHash()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getEvidenceHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getEvidenceHash())); +}; + + +/** + * optional bytes evidence_hash = 13; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getEvidenceHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Header.prototype.getEvidenceHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getEvidenceHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setEvidenceHash = function(value) { + return jspb.Message.setProto3BytesField(this, 13, value); +}; + + +/** + * optional bytes proposer_address = 14; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Header.prototype.getProposerAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 14, "")); +}; + + +/** + * optional bytes proposer_address = 14; + * This is a type-conversion wrapper around `getProposerAddress()` + * @return {string} + */ +proto.tendermint.types.Header.prototype.getProposerAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getProposerAddress())); +}; + + +/** + * optional bytes proposer_address = 14; + * 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.types.Header.prototype.getProposerAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getProposerAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Header} returns this + */ +proto.tendermint.types.Header.prototype.setProposerAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 14, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.Data.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.tendermint.types.Data.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Data.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Data} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Data.toObject = function(includeInstance, msg) { + var f, obj = { + txsList: msg.getTxsList_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.Data} + */ +proto.tendermint.types.Data.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Data; + return proto.tendermint.types.Data.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Data} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Data} + */ +proto.tendermint.types.Data.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Data.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Data.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.Data} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Data.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTxsList_asU8(); + if (f.length > 0) { + writer.writeRepeatedBytes( + 1, + f + ); + } +}; + + +/** + * repeated bytes txs = 1; + * @return {!(Array|Array)} + */ +proto.tendermint.types.Data.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.types.Data.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.types.Data.prototype.getTxsList_asU8 = function() { + return /** @type {!Array} */ (jspb.Message.bytesListAsU8( + this.getTxsList())); +}; + + +/** + * @param {!(Array|Array)} value + * @return {!proto.tendermint.types.Data} returns this + */ +proto.tendermint.types.Data.prototype.setTxsList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @param {number=} opt_index + * @return {!proto.tendermint.types.Data} returns this + */ +proto.tendermint.types.Data.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.types.Data} returns this + */ +proto.tendermint.types.Data.prototype.clearTxsList = function() { + return this.setTxsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.Vote.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.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.tendermint.types.Vote} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Vote.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), + blockId: (f = msg.getBlockId()) && proto.tendermint.types.BlockID.toObject(includeInstance, f), + 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() + }; + + 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.Vote} + */ +proto.tendermint.types.Vote.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Vote; + return proto.tendermint.types.Vote.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Vote} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Vote} + */ +proto.tendermint.types.Vote.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 = new proto.tendermint.types.BlockID; + reader.readMessage(value,proto.tendermint.types.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setTimestamp(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setValidatorAddress(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt32()); + msg.setValidatorIndex(value); + break; + case 8: + 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.Vote.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.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.tendermint.types.Vote} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Vote.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.getBlockId(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.tendermint.types.BlockID.serializeBinaryToWriter + ); + } + f = message.getTimestamp(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + f = message.getValidatorAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 6, + f + ); + } + f = message.getValidatorIndex(); + if (f !== 0) { + writer.writeInt32( + 7, + f + ); + } + f = message.getSignature_asU8(); + if (f.length > 0) { + writer.writeBytes( + 8, + f + ); + } +}; + + +/** + * optional SignedMsgType type = 1; + * @return {!proto.tendermint.types.SignedMsgType} + */ +proto.tendermint.types.Vote.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.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional int64 height = 2; + * @return {number} + */ +proto.tendermint.types.Vote.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 round = 3; + * @return {number} + */ +proto.tendermint.types.Vote.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional BlockID block_id = 4; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.types.Vote.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.BlockID, 4)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.tendermint.types.Vote} returns this +*/ +proto.tendermint.types.Vote.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Vote.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 5; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.Vote.prototype.getTimestamp = 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.tendermint.types.Vote} returns this +*/ +proto.tendermint.types.Vote.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Vote.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes validator_address = 6; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Vote.prototype.getValidatorAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes validator_address = 6; + * This is a type-conversion wrapper around `getValidatorAddress()` + * @return {string} + */ +proto.tendermint.types.Vote.prototype.getValidatorAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getValidatorAddress())); +}; + + +/** + * optional bytes validator_address = 6; + * 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.Vote.prototype.getValidatorAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValidatorAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setValidatorAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 6, value); +}; + + +/** + * optional int32 validator_index = 7; + * @return {number} + */ +proto.tendermint.types.Vote.prototype.getValidatorIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setValidatorIndex = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional bytes signature = 8; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Vote.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** + * optional bytes signature = 8; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} + */ +proto.tendermint.types.Vote.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); +}; + + +/** + * optional bytes signature = 8; + * 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.Vote.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Vote} returns this + */ +proto.tendermint.types.Vote.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 8, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.Commit.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.tendermint.types.Commit.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Commit.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Commit} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Commit.toObject = function(includeInstance, msg) { + var f, obj = { + 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), + signaturesList: jspb.Message.toObjectList(msg.getSignaturesList(), + proto.tendermint.types.CommitSig.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.tendermint.types.Commit} + */ +proto.tendermint.types.Commit.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Commit; + return proto.tendermint.types.Commit.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Commit} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Commit} + */ +proto.tendermint.types.Commit.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 = /** @type {number} */ (reader.readInt32()); + msg.setRound(value); + break; + case 3: + var value = new proto.tendermint.types.BlockID; + reader.readMessage(value,proto.tendermint.types.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 4: + var value = new proto.tendermint.types.CommitSig; + reader.readMessage(value,proto.tendermint.types.CommitSig.deserializeBinaryFromReader); + msg.addSignatures(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Commit.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Commit.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.Commit} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Commit.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeight(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getRound(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.types.BlockID.serializeBinaryToWriter + ); + } + f = message.getSignaturesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.tendermint.types.CommitSig.serializeBinaryToWriter + ); + } +}; + + +/** + * optional int64 height = 1; + * @return {number} + */ +proto.tendermint.types.Commit.prototype.getHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Commit} returns this + */ +proto.tendermint.types.Commit.prototype.setHeight = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int32 round = 2; + * @return {number} + */ +proto.tendermint.types.Commit.prototype.getRound = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Commit} returns this + */ +proto.tendermint.types.Commit.prototype.setRound = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional BlockID block_id = 3; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.types.Commit.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.BlockID, 3)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.tendermint.types.Commit} returns this +*/ +proto.tendermint.types.Commit.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Commit} returns this + */ +proto.tendermint.types.Commit.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Commit.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated CommitSig signatures = 4; + * @return {!Array} + */ +proto.tendermint.types.Commit.prototype.getSignaturesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.types.CommitSig, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.types.Commit} returns this +*/ +proto.tendermint.types.Commit.prototype.setSignaturesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.tendermint.types.CommitSig=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.types.CommitSig} + */ +proto.tendermint.types.Commit.prototype.addSignatures = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.tendermint.types.CommitSig, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.types.Commit} returns this + */ +proto.tendermint.types.Commit.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.tendermint.types.CommitSig.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.CommitSig.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.CommitSig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.CommitSig.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() + }; + + 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.CommitSig} + */ +proto.tendermint.types.CommitSig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.CommitSig; + return proto.tendermint.types.CommitSig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.CommitSig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.CommitSig} + */ +proto.tendermint.types.CommitSig.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; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.CommitSig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.CommitSig.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.CommitSig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.CommitSig.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 + ); + } +}; + + +/** + * optional BlockIDFlag block_id_flag = 1; + * @return {!proto.tendermint.types.BlockIDFlag} + */ +proto.tendermint.types.CommitSig.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.CommitSig} returns this + */ +proto.tendermint.types.CommitSig.prototype.setBlockIdFlag = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional bytes validator_address = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.CommitSig.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.CommitSig.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.CommitSig.prototype.getValidatorAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getValidatorAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.CommitSig} returns this + */ +proto.tendermint.types.CommitSig.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.CommitSig.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.CommitSig} returns this +*/ +proto.tendermint.types.CommitSig.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.CommitSig} returns this + */ +proto.tendermint.types.CommitSig.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.CommitSig.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bytes signature = 4; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.CommitSig.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.CommitSig.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.CommitSig.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.CommitSig} returns this + */ +proto.tendermint.types.CommitSig.prototype.setSignature = 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.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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Proposal.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional google.protobuf.Timestamp timestamp = 6; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.tendermint.types.Proposal.prototype.getTimestamp = 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.types.Proposal} returns this +*/ +proto.tendermint.types.Proposal.prototype.setTimestamp = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.clearTimestamp = function() { + return this.setTimestamp(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Proposal.prototype.hasTimestamp = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional bytes signature = 7; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Proposal.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.tendermint.types.Proposal.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.tendermint.types.Proposal.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Proposal} returns this + */ +proto.tendermint.types.Proposal.prototype.setSignature = 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.tendermint.types.SignedHeader.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.SignedHeader.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.SignedHeader} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.SignedHeader.toObject = function(includeInstance, msg) { + var f, obj = { + header: (f = msg.getHeader()) && proto.tendermint.types.Header.toObject(includeInstance, f), + commit: (f = msg.getCommit()) && proto.tendermint.types.Commit.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.types.SignedHeader} + */ +proto.tendermint.types.SignedHeader.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.SignedHeader; + return proto.tendermint.types.SignedHeader.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.SignedHeader} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.SignedHeader} + */ +proto.tendermint.types.SignedHeader.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.Header; + reader.readMessage(value,proto.tendermint.types.Header.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 2: + var value = new proto.tendermint.types.Commit; + reader.readMessage(value,proto.tendermint.types.Commit.deserializeBinaryFromReader); + msg.setCommit(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.SignedHeader.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.SignedHeader.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.SignedHeader} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.SignedHeader.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.types.Header.serializeBinaryToWriter + ); + } + f = message.getCommit(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.types.Commit.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Header header = 1; + * @return {?proto.tendermint.types.Header} + */ +proto.tendermint.types.SignedHeader.prototype.getHeader = function() { + return /** @type{?proto.tendermint.types.Header} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.Header, 1)); +}; + + +/** + * @param {?proto.tendermint.types.Header|undefined} value + * @return {!proto.tendermint.types.SignedHeader} returns this +*/ +proto.tendermint.types.SignedHeader.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.SignedHeader} returns this + */ +proto.tendermint.types.SignedHeader.prototype.clearHeader = function() { + return this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.SignedHeader.prototype.hasHeader = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Commit commit = 2; + * @return {?proto.tendermint.types.Commit} + */ +proto.tendermint.types.SignedHeader.prototype.getCommit = function() { + return /** @type{?proto.tendermint.types.Commit} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.Commit, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Commit|undefined} value + * @return {!proto.tendermint.types.SignedHeader} returns this +*/ +proto.tendermint.types.SignedHeader.prototype.setCommit = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.SignedHeader} returns this + */ +proto.tendermint.types.SignedHeader.prototype.clearCommit = function() { + return this.setCommit(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.SignedHeader.prototype.hasCommit = 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.tendermint.types.LightBlock.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.LightBlock.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.LightBlock} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.LightBlock.toObject = function(includeInstance, msg) { + var f, obj = { + signedHeader: (f = msg.getSignedHeader()) && proto.tendermint.types.SignedHeader.toObject(includeInstance, f), + validatorSet: (f = msg.getValidatorSet()) && tendermint_types_validator_pb.ValidatorSet.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.types.LightBlock} + */ +proto.tendermint.types.LightBlock.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.LightBlock; + return proto.tendermint.types.LightBlock.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.LightBlock} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.LightBlock} + */ +proto.tendermint.types.LightBlock.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.SignedHeader; + reader.readMessage(value,proto.tendermint.types.SignedHeader.deserializeBinaryFromReader); + msg.setSignedHeader(value); + break; + case 2: + var value = new tendermint_types_validator_pb.ValidatorSet; + reader.readMessage(value,tendermint_types_validator_pb.ValidatorSet.deserializeBinaryFromReader); + msg.setValidatorSet(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.LightBlock.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.LightBlock.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.LightBlock} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.LightBlock.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSignedHeader(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.types.SignedHeader.serializeBinaryToWriter + ); + } + f = message.getValidatorSet(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_types_validator_pb.ValidatorSet.serializeBinaryToWriter + ); + } +}; + + +/** + * optional SignedHeader signed_header = 1; + * @return {?proto.tendermint.types.SignedHeader} + */ +proto.tendermint.types.LightBlock.prototype.getSignedHeader = function() { + return /** @type{?proto.tendermint.types.SignedHeader} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.SignedHeader, 1)); +}; + + +/** + * @param {?proto.tendermint.types.SignedHeader|undefined} value + * @return {!proto.tendermint.types.LightBlock} returns this +*/ +proto.tendermint.types.LightBlock.prototype.setSignedHeader = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.LightBlock} returns this + */ +proto.tendermint.types.LightBlock.prototype.clearSignedHeader = function() { + return this.setSignedHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.LightBlock.prototype.hasSignedHeader = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ValidatorSet validator_set = 2; + * @return {?proto.tendermint.types.ValidatorSet} + */ +proto.tendermint.types.LightBlock.prototype.getValidatorSet = function() { + return /** @type{?proto.tendermint.types.ValidatorSet} */ ( + jspb.Message.getWrapperField(this, tendermint_types_validator_pb.ValidatorSet, 2)); +}; + + +/** + * @param {?proto.tendermint.types.ValidatorSet|undefined} value + * @return {!proto.tendermint.types.LightBlock} returns this +*/ +proto.tendermint.types.LightBlock.prototype.setValidatorSet = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.LightBlock} returns this + */ +proto.tendermint.types.LightBlock.prototype.clearValidatorSet = function() { + return this.setValidatorSet(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.LightBlock.prototype.hasValidatorSet = 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.tendermint.types.BlockMeta.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.BlockMeta.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.BlockMeta} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockMeta.toObject = function(includeInstance, msg) { + var f, obj = { + blockId: (f = msg.getBlockId()) && proto.tendermint.types.BlockID.toObject(includeInstance, f), + blockSize: jspb.Message.getFieldWithDefault(msg, 2, 0), + header: (f = msg.getHeader()) && proto.tendermint.types.Header.toObject(includeInstance, f), + numTxs: 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.tendermint.types.BlockMeta} + */ +proto.tendermint.types.BlockMeta.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.BlockMeta; + return proto.tendermint.types.BlockMeta.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.BlockMeta} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.BlockMeta} + */ +proto.tendermint.types.BlockMeta.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.BlockID; + reader.readMessage(value,proto.tendermint.types.BlockID.deserializeBinaryFromReader); + msg.setBlockId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBlockSize(value); + break; + case 3: + var value = new proto.tendermint.types.Header; + reader.readMessage(value,proto.tendermint.types.Header.deserializeBinaryFromReader); + msg.setHeader(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setNumTxs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.BlockMeta.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.BlockMeta.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.BlockMeta} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.BlockMeta.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockId(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.tendermint.types.BlockID.serializeBinaryToWriter + ); + } + f = message.getBlockSize(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getHeader(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.tendermint.types.Header.serializeBinaryToWriter + ); + } + f = message.getNumTxs(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional BlockID block_id = 1; + * @return {?proto.tendermint.types.BlockID} + */ +proto.tendermint.types.BlockMeta.prototype.getBlockId = function() { + return /** @type{?proto.tendermint.types.BlockID} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.BlockID, 1)); +}; + + +/** + * @param {?proto.tendermint.types.BlockID|undefined} value + * @return {!proto.tendermint.types.BlockMeta} returns this +*/ +proto.tendermint.types.BlockMeta.prototype.setBlockId = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.BlockMeta} returns this + */ +proto.tendermint.types.BlockMeta.prototype.clearBlockId = function() { + return this.setBlockId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.BlockMeta.prototype.hasBlockId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 block_size = 2; + * @return {number} + */ +proto.tendermint.types.BlockMeta.prototype.getBlockSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.BlockMeta} returns this + */ +proto.tendermint.types.BlockMeta.prototype.setBlockSize = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional Header header = 3; + * @return {?proto.tendermint.types.Header} + */ +proto.tendermint.types.BlockMeta.prototype.getHeader = function() { + return /** @type{?proto.tendermint.types.Header} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.Header, 3)); +}; + + +/** + * @param {?proto.tendermint.types.Header|undefined} value + * @return {!proto.tendermint.types.BlockMeta} returns this +*/ +proto.tendermint.types.BlockMeta.prototype.setHeader = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.BlockMeta} returns this + */ +proto.tendermint.types.BlockMeta.prototype.clearHeader = function() { + return this.setHeader(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.BlockMeta.prototype.hasHeader = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional int64 num_txs = 4; + * @return {number} + */ +proto.tendermint.types.BlockMeta.prototype.getNumTxs = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.BlockMeta} returns this + */ +proto.tendermint.types.BlockMeta.prototype.setNumTxs = 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.tendermint.types.TxProof.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.TxProof.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.TxProof} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.TxProof.toObject = function(includeInstance, msg) { + var f, obj = { + rootHash: msg.getRootHash_asB64(), + data: msg.getData_asB64(), + proof: (f = msg.getProof()) && tendermint_crypto_proof_pb.Proof.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.types.TxProof} + */ +proto.tendermint.types.TxProof.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.TxProof; + return proto.tendermint.types.TxProof.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.TxProof} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.TxProof} + */ +proto.tendermint.types.TxProof.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.setRootHash(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + case 3: + var value = new tendermint_crypto_proof_pb.Proof; + reader.readMessage(value,tendermint_crypto_proof_pb.Proof.deserializeBinaryFromReader); + msg.setProof(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.TxProof.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.TxProof.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.TxProof} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.TxProof.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getRootHash_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getProof(); + if (f != null) { + writer.writeMessage( + 3, + f, + tendermint_crypto_proof_pb.Proof.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes root_hash = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.TxProof.prototype.getRootHash = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes root_hash = 1; + * This is a type-conversion wrapper around `getRootHash()` + * @return {string} + */ +proto.tendermint.types.TxProof.prototype.getRootHash_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getRootHash())); +}; + + +/** + * optional bytes root_hash = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getRootHash()` + * @return {!Uint8Array} + */ +proto.tendermint.types.TxProof.prototype.getRootHash_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getRootHash())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.TxProof} returns this + */ +proto.tendermint.types.TxProof.prototype.setRootHash = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes data = 2; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.TxProof.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.types.TxProof.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.types.TxProof.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.TxProof} returns this + */ +proto.tendermint.types.TxProof.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional tendermint.crypto.Proof proof = 3; + * @return {?proto.tendermint.crypto.Proof} + */ +proto.tendermint.types.TxProof.prototype.getProof = function() { + return /** @type{?proto.tendermint.crypto.Proof} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_proof_pb.Proof, 3)); +}; + + +/** + * @param {?proto.tendermint.crypto.Proof|undefined} value + * @return {!proto.tendermint.types.TxProof} returns this +*/ +proto.tendermint.types.TxProof.prototype.setProof = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.TxProof} returns this + */ +proto.tendermint.types.TxProof.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.TxProof.prototype.hasProof = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * @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} + */ +proto.tendermint.types.SignedMsgType = { + SIGNED_MSG_TYPE_UNKNOWN: 0, + SIGNED_MSG_TYPE_PREVOTE: 1, + SIGNED_MSG_TYPE_PRECOMMIT: 2, + SIGNED_MSG_TYPE_PROPOSAL: 32 +}; + +goog.object.extend(exports, proto.tendermint.types); diff --git a/src/types/proto-types/tendermint/types/validator_pb.js b/src/types/proto-types/tendermint/types/validator_pb.js new file mode 100644 index 00000000..1ea065d3 --- /dev/null +++ b/src/types/proto-types/tendermint/types/validator_pb.js @@ -0,0 +1,772 @@ +// source: tendermint/types/validator.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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 tendermint_crypto_keys_pb = require('../../tendermint/crypto/keys_pb.js'); +goog.object.extend(proto, tendermint_crypto_keys_pb); +goog.exportSymbol('proto.tendermint.types.SimpleValidator', null, global); +goog.exportSymbol('proto.tendermint.types.Validator', null, global); +goog.exportSymbol('proto.tendermint.types.ValidatorSet', 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.tendermint.types.ValidatorSet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.tendermint.types.ValidatorSet.repeatedFields_, null); +}; +goog.inherits(proto.tendermint.types.ValidatorSet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.ValidatorSet.displayName = 'proto.tendermint.types.ValidatorSet'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.Validator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.Validator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.Validator.displayName = 'proto.tendermint.types.Validator'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.SimpleValidator = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.types.SimpleValidator, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.types.SimpleValidator.displayName = 'proto.tendermint.types.SimpleValidator'; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.tendermint.types.ValidatorSet.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.tendermint.types.ValidatorSet.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.ValidatorSet.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.ValidatorSet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ValidatorSet.toObject = function(includeInstance, msg) { + var f, obj = { + validatorsList: jspb.Message.toObjectList(msg.getValidatorsList(), + proto.tendermint.types.Validator.toObject, includeInstance), + proposer: (f = msg.getProposer()) && proto.tendermint.types.Validator.toObject(includeInstance, f), + totalVotingPower: 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.tendermint.types.ValidatorSet} + */ +proto.tendermint.types.ValidatorSet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.ValidatorSet; + return proto.tendermint.types.ValidatorSet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.ValidatorSet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.ValidatorSet} + */ +proto.tendermint.types.ValidatorSet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.tendermint.types.Validator; + reader.readMessage(value,proto.tendermint.types.Validator.deserializeBinaryFromReader); + msg.addValidators(value); + break; + case 2: + var value = new proto.tendermint.types.Validator; + reader.readMessage(value,proto.tendermint.types.Validator.deserializeBinaryFromReader); + msg.setProposer(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalVotingPower(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.ValidatorSet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.ValidatorSet.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.ValidatorSet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.ValidatorSet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValidatorsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.tendermint.types.Validator.serializeBinaryToWriter + ); + } + f = message.getProposer(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.tendermint.types.Validator.serializeBinaryToWriter + ); + } + f = message.getTotalVotingPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * repeated Validator validators = 1; + * @return {!Array} + */ +proto.tendermint.types.ValidatorSet.prototype.getValidatorsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.tendermint.types.Validator, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.tendermint.types.ValidatorSet} returns this +*/ +proto.tendermint.types.ValidatorSet.prototype.setValidatorsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.tendermint.types.Validator=} opt_value + * @param {number=} opt_index + * @return {!proto.tendermint.types.Validator} + */ +proto.tendermint.types.ValidatorSet.prototype.addValidators = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tendermint.types.Validator, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.tendermint.types.ValidatorSet} returns this + */ +proto.tendermint.types.ValidatorSet.prototype.clearValidatorsList = function() { + return this.setValidatorsList([]); +}; + + +/** + * optional Validator proposer = 2; + * @return {?proto.tendermint.types.Validator} + */ +proto.tendermint.types.ValidatorSet.prototype.getProposer = function() { + return /** @type{?proto.tendermint.types.Validator} */ ( + jspb.Message.getWrapperField(this, proto.tendermint.types.Validator, 2)); +}; + + +/** + * @param {?proto.tendermint.types.Validator|undefined} value + * @return {!proto.tendermint.types.ValidatorSet} returns this +*/ +proto.tendermint.types.ValidatorSet.prototype.setProposer = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.ValidatorSet} returns this + */ +proto.tendermint.types.ValidatorSet.prototype.clearProposer = function() { + return this.setProposer(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.ValidatorSet.prototype.hasProposer = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 total_voting_power = 3; + * @return {number} + */ +proto.tendermint.types.ValidatorSet.prototype.getTotalVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.ValidatorSet} returns this + */ +proto.tendermint.types.ValidatorSet.prototype.setTotalVotingPower = 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.tendermint.types.Validator.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.Validator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.Validator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Validator.toObject = function(includeInstance, msg) { + var f, obj = { + address: msg.getAddress_asB64(), + pubKey: (f = msg.getPubKey()) && tendermint_crypto_keys_pb.PublicKey.toObject(includeInstance, f), + votingPower: jspb.Message.getFieldWithDefault(msg, 3, 0), + proposerPriority: 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.tendermint.types.Validator} + */ +proto.tendermint.types.Validator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.Validator; + return proto.tendermint.types.Validator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.Validator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.Validator} + */ +proto.tendermint.types.Validator.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.setAddress(value); + break; + case 2: + var value = new tendermint_crypto_keys_pb.PublicKey; + reader.readMessage(value,tendermint_crypto_keys_pb.PublicKey.deserializeBinaryFromReader); + msg.setPubKey(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setVotingPower(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setProposerPriority(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.types.Validator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.Validator.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.Validator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.Validator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getPubKey(); + if (f != null) { + writer.writeMessage( + 2, + f, + tendermint_crypto_keys_pb.PublicKey.serializeBinaryToWriter + ); + } + f = message.getVotingPower(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getProposerPriority(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional bytes address = 1; + * @return {!(string|Uint8Array)} + */ +proto.tendermint.types.Validator.prototype.getAddress = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} + */ +proto.tendermint.types.Validator.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + + +/** + * optional bytes address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} + */ +proto.tendermint.types.Validator.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.tendermint.types.Validator} returns this + */ +proto.tendermint.types.Validator.prototype.setAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional tendermint.crypto.PublicKey pub_key = 2; + * @return {?proto.tendermint.crypto.PublicKey} + */ +proto.tendermint.types.Validator.prototype.getPubKey = function() { + return /** @type{?proto.tendermint.crypto.PublicKey} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_keys_pb.PublicKey, 2)); +}; + + +/** + * @param {?proto.tendermint.crypto.PublicKey|undefined} value + * @return {!proto.tendermint.types.Validator} returns this +*/ +proto.tendermint.types.Validator.prototype.setPubKey = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.Validator} returns this + */ +proto.tendermint.types.Validator.prototype.clearPubKey = function() { + return this.setPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.Validator.prototype.hasPubKey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional int64 voting_power = 3; + * @return {number} + */ +proto.tendermint.types.Validator.prototype.getVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Validator} returns this + */ +proto.tendermint.types.Validator.prototype.setVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 proposer_priority = 4; + * @return {number} + */ +proto.tendermint.types.Validator.prototype.getProposerPriority = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.Validator} returns this + */ +proto.tendermint.types.Validator.prototype.setProposerPriority = 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.tendermint.types.SimpleValidator.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.types.SimpleValidator.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.SimpleValidator} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.SimpleValidator.toObject = function(includeInstance, msg) { + var f, obj = { + pubKey: (f = msg.getPubKey()) && tendermint_crypto_keys_pb.PublicKey.toObject(includeInstance, f), + 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.tendermint.types.SimpleValidator} + */ +proto.tendermint.types.SimpleValidator.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.types.SimpleValidator; + return proto.tendermint.types.SimpleValidator.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.types.SimpleValidator} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.types.SimpleValidator} + */ +proto.tendermint.types.SimpleValidator.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new tendermint_crypto_keys_pb.PublicKey; + reader.readMessage(value,tendermint_crypto_keys_pb.PublicKey.deserializeBinaryFromReader); + msg.setPubKey(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.tendermint.types.SimpleValidator.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.types.SimpleValidator.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.SimpleValidator} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.types.SimpleValidator.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPubKey(); + if (f != null) { + writer.writeMessage( + 1, + f, + tendermint_crypto_keys_pb.PublicKey.serializeBinaryToWriter + ); + } + f = message.getVotingPower(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional tendermint.crypto.PublicKey pub_key = 1; + * @return {?proto.tendermint.crypto.PublicKey} + */ +proto.tendermint.types.SimpleValidator.prototype.getPubKey = function() { + return /** @type{?proto.tendermint.crypto.PublicKey} */ ( + jspb.Message.getWrapperField(this, tendermint_crypto_keys_pb.PublicKey, 1)); +}; + + +/** + * @param {?proto.tendermint.crypto.PublicKey|undefined} value + * @return {!proto.tendermint.types.SimpleValidator} returns this +*/ +proto.tendermint.types.SimpleValidator.prototype.setPubKey = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.tendermint.types.SimpleValidator} returns this + */ +proto.tendermint.types.SimpleValidator.prototype.clearPubKey = function() { + return this.setPubKey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.tendermint.types.SimpleValidator.prototype.hasPubKey = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 voting_power = 2; + * @return {number} + */ +proto.tendermint.types.SimpleValidator.prototype.getVotingPower = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.types.SimpleValidator} returns this + */ +proto.tendermint.types.SimpleValidator.prototype.setVotingPower = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.tendermint.types); diff --git a/src/types/proto-types/tendermint/version/types_pb.js b/src/types/proto-types/tendermint/version/types_pb.js new file mode 100644 index 00000000..9fad1a49 --- /dev/null +++ b/src/types/proto-types/tendermint/version/types_pb.js @@ -0,0 +1,381 @@ +// source: tendermint/version/types.proto +/** + * @fileoverview + * @enhanceable + * @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! + +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); +goog.exportSymbol('proto.tendermint.version.App', null, global); +goog.exportSymbol('proto.tendermint.version.Consensus', 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.tendermint.version.App = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.version.App, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.version.App.displayName = 'proto.tendermint.version.App'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed 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.version.Consensus = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.tendermint.version.Consensus, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.tendermint.version.Consensus.displayName = 'proto.tendermint.version.Consensus'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @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.version.App.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.version.App.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.version.App} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.version.App.toObject = function(includeInstance, msg) { + var f, obj = { + protocol: jspb.Message.getFieldWithDefault(msg, 1, 0), + software: 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.tendermint.version.App} + */ +proto.tendermint.version.App.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.version.App; + return proto.tendermint.version.App.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.version.App} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.version.App} + */ +proto.tendermint.version.App.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.setProtocol(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSoftware(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.version.App.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.version.App.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.version.App} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.version.App.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProtocol(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getSoftware(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional uint64 protocol = 1; + * @return {number} + */ +proto.tendermint.version.App.prototype.getProtocol = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.version.App} returns this + */ +proto.tendermint.version.App.prototype.setProtocol = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string software = 2; + * @return {string} + */ +proto.tendermint.version.App.prototype.getSoftware = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.tendermint.version.App} returns this + */ +proto.tendermint.version.App.prototype.setSoftware = 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.tendermint.version.Consensus.prototype.toObject = function(opt_includeInstance) { + return proto.tendermint.version.Consensus.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} 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.version.Consensus} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.version.Consensus.toObject = function(includeInstance, msg) { + var f, obj = { + block: jspb.Message.getFieldWithDefault(msg, 1, 0), + app: 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.tendermint.version.Consensus} + */ +proto.tendermint.version.Consensus.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.tendermint.version.Consensus; + return proto.tendermint.version.Consensus.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.tendermint.version.Consensus} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.tendermint.version.Consensus} + */ +proto.tendermint.version.Consensus.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.setBlock(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setApp(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.tendermint.version.Consensus.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.tendermint.version.Consensus.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.version.Consensus} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.tendermint.version.Consensus.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlock(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getApp(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } +}; + + +/** + * optional uint64 block = 1; + * @return {number} + */ +proto.tendermint.version.Consensus.prototype.getBlock = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.version.Consensus} returns this + */ +proto.tendermint.version.Consensus.prototype.setBlock = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 app = 2; + * @return {number} + */ +proto.tendermint.version.Consensus.prototype.getApp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.tendermint.version.Consensus} returns this + */ +proto.tendermint.version.Consensus.prototype.setApp = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +goog.object.extend(exports, proto.tendermint.version); diff --git a/src/types/proto.ts b/src/types/proto.ts new file mode 100644 index 00000000..f147da9e --- /dev/null +++ b/src/types/proto.ts @@ -0,0 +1,58 @@ +/***************TX*****************/ +//cosmos tx +export const bank_tx_pb = require( './proto-types/cosmos/bank/v1beta1/tx_pb'); +export const crisis_tx_pb = require( './proto-types/cosmos/crisis/v1beta1/tx_pb'); +export const distribution_tx_pb = require( './proto-types/cosmos/distribution/v1beta1/tx_pb'); +export const evidence_tx_pb = require( './proto-types/cosmos/evidence/v1beta1/tx_pb'); +export const gov_tx_pb = require( './proto-types/cosmos/gov/v1beta1/tx_pb'); +export const slashing_tx_pb = require( './proto-types/cosmos/slashing/v1beta1/tx_pb'); +export const staking_tx_pb = require( './proto-types/cosmos/staking/v1beta1/tx_pb'); +export const tx_tx_pb = require( './proto-types/cosmos/tx/v1beta1/tx_pb'); +export const vesting_tx_pb = require( './proto-types/cosmos/vesting/v1beta1/tx_pb'); +//irismod tx +export const coinswap_tx_pb= require( './proto-types/irismod/coinswap/tx_pb'); +export const htlc_tx_pb= require( './proto-types/irismod/htlc/tx_pb'); +export const nft_tx_pb= require( './proto-types/irismod/nft/tx_pb'); +export const oracle_tx_pb= require( './proto-types/irismod/oracle/tx_pb'); +export const random_tx_pb= require( './proto-types/irismod/random/tx_pb'); +export const record_tx_pb= require( './proto-types/irismod/record/tx_pb'); +export const service_tx_pb= require( './proto-types/irismod/service/tx_pb'); +export const token_tx_pb= require( './proto-types/irismod/token/tx_pb'); + +/***************QUERY***************/ +export const base_query_pagination_pb = require( './proto-types/cosmos/base/query/v1beta1/pagination_pb'); +//cosmos query +export const auth_query_pb = require( './proto-types/cosmos/auth/v1beta1/query_pb'); +export const bank_query_pb = require( './proto-types/cosmos/bank/v1beta1/query_pb'); +export const distribution_query_pb = require( './proto-types/cosmos/distribution/v1beta1/query_pb'); +export const evidence_query_pb = require( './proto-types/cosmos/evidence/v1beta1/query_pb'); +export const gov_query_pb = require( './proto-types/cosmos/gov/v1beta1/query_pb'); +export const mint_query_pb = require( './proto-types/cosmos/mint/v1beta1/query_pb'); +export const params_query_pb = require( './proto-types/cosmos/params/v1beta1/query_pb'); +export const slashing_query_pb = require( './proto-types/cosmos/slashing/v1beta1/query_pb'); +export const staking_query_pb = require( './proto-types/cosmos/staking/v1beta1/query_pb'); +export const upgrade_query_pb = require( './proto-types/cosmos/upgrade/v1beta1/query_pb'); +//irismod query +export const coinswap_query_pb = require( './proto-types/irismod/coinswap/query_pb'); +export const htlc_query_pb = require( './proto-types/irismod/htlc/query_pb'); +export const nft_query_pb = require( './proto-types/irismod/nft/query_pb'); +export const oracle_query_pb = require( './proto-types/irismod/oracle/query_pb'); +export const random_query_pb = require( './proto-types/irismod/random/query_pb'); +export const record_query_pb = require( './proto-types/irismod/record/query_pb'); +export const service_query_pb = require( './proto-types/irismod/service/query_pb'); +export const token_query_pb = require( './proto-types/irismod/token/query_pb'); + +/***************MODULES***************/ +//cosmos module +export const auth_auth_pb = require( './proto-types/cosmos/auth/v1beta1/auth_pb'); +export const crypto_secp256k1_keys_pb = require( './proto-types/cosmos/crypto/secp256k1/keys_pb'); +export const crypto_ed25519_keys_pb = require( './proto-types/cosmos/crypto/ed25519/keys_pb'); +export const crypto_sm2_keys_pb = require( './proto-types/cosmos/crypto/sm2/keys_pb'); +export const base_coin_pb = require('./proto-types/cosmos/base/v1beta1/coin_pb'); +export const signing_signing_pb = require('./proto-types/cosmos/tx/signing/v1beta1/signing_pb'); + +//irimod module +export const token_token_pb = require( './proto-types/irismod/token/token_pb'); + +//any +export const any_pb = require( './proto-types/google/protobuf/any_pb'); diff --git a/src/types/protoTx.ts b/src/types/protoTx.ts new file mode 100644 index 00000000..7962edf4 --- /dev/null +++ b/src/types/protoTx.ts @@ -0,0 +1,169 @@ +'use strict'; +import { TxModelCreator } from '../helper'; +import * as types from '../types'; +import { SdkError, CODES } from '../errors'; +import { Protobuf } from '../modules/protobuf'; + +const Sha256 = require('sha256'); + +export class ProtoTx { + txData:any; + body:any; + authInfo:any; + signatures:string[] = []; + constructor(properties?:{ + msgs:types.Msg[], + memo:string, + stdFee:types.StdFee, + chain_id:string, + account_number?:string, + sequence?:string, + publicKey?:string|types.Pubkey + }, protoTxModel?:any) { + if (!properties && !protoTxModel) { + throw new SdkError("there must be one properties or protoTxModel",CODES.Internal); + } + if (properties) { + let {msgs, memo, stdFee, account_number, chain_id, sequence, publicKey} = properties; + this.txData = properties; + this.body = TxModelCreator.createBodyModel(msgs, memo, 0); + this.authInfo = TxModelCreator.createAuthInfoModel(stdFee, sequence, publicKey); + }else if(protoTxModel){ + if (protoTxModel.hasBody() && protoTxModel.hasAuthInfo()) { + this.txData = {}; + this.body = protoTxModel.getBody(); + this.authInfo = protoTxModel.getAuthInfo(); + this.signatures = protoTxModel.getSignaturesList(); + } + } + } + + static newStdTxFromProtoTxModel(protoTxModel:any):types.ProtoTx{ + if (!protoTxModel.hasBody() || !protoTxModel.hasAuthInfo()){ + throw new SdkError("Proto Tx Model is invalid",CODES.TxParseError); + } + return new ProtoTx( undefined ,protoTxModel); + } + + /** + * add signature + * @param {[string]} signature base64 + */ + addSignature(signature:string){ + if (!signature || !signature.length) { + throw new SdkError("signature is empty",CODES.NoSignatures); + } + this.signatures.push(signature); + } + + /** + * add public key + * @param {[string]} bech32/hex or object. if string, default Secp256k1 + * @param {optional [number]} sequence + */ + setPubKey(pubkey:string|types.Pubkey, sequence?:string){ + sequence = sequence || this.txData.sequence; + if (!sequence) { + throw new SdkError("sequence is empty",CODES.InvalidSequence); + } + let signerInfo = TxModelCreator.createSignerInfoModel(sequence, pubkey); + this.authInfo.addSignerInfos(signerInfo); + } + + /** + * Get SignDoc for signature + * @returns SignDoc protobuf.Tx.SignDoc + */ + getSignDoc(account_number?:string, chain_id?:string):any{ + if (!this.hasPubKey()) { + throw new SdkError("please set pubKey",CODES.InvalidPubkey); + } + if (!account_number && !this.txData.account_number) { + throw new SdkError("account_number is empty",CODES.IncorrectAccountSequence); + } + if (!chain_id && !this.txData.chain_id) { + throw new SdkError("chain_id is empty",CODES.InvalidChainId); + } + let signDoc = new types.tx_tx_pb.SignDoc(); + signDoc.setBodyBytes(this.body.serializeBinary()); + signDoc.setAuthInfoBytes(this.authInfo.serializeBinary()); + signDoc.setAccountNumber(String(account_number || this.txData.account_number)); + signDoc.setChainId(chain_id || this.txData.chain_id); + return signDoc; + } + + /** + * TxRaw is a variant of Tx that pins the signer's exact binary representation + of body and auth_info. This is used for signing, broadcasting and + verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and + the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used + as the transaction ID. + * @returns TxRaw protobuf.Tx.TxRaw + */ + getTxRaw():any{ + if (!this.hasPubKey()) { + throw new SdkError("please set pubKey",CODES.InvalidPubkey); + } + if (!this.signatures || !this.signatures.length) { + throw new SdkError("please sign tx",CODES.NoSignatures); + } + let txRaw = new types.tx_tx_pb.TxRaw(); + txRaw.setBodyBytes(this.body.serializeBinary()); + txRaw.setAuthInfoBytes(this.authInfo.serializeBinary()); + this.signatures.forEach((signature)=>{ + txRaw.addSignatures(signature); + }) + return txRaw; + } + + /** + * has PubKey + * @returns true/false + */ + hasPubKey():boolean{ + return this.authInfo.getSignerInfosList().length > 0; + } + + /** + * Used for RPC send transactions + * You can commit the data directly to RPC + * @returns base64 string + */ + getData():Uint8Array { + let tx = new types.tx_tx_pb.Tx(); + tx.setBody(this.body); + tx.setAuthInfo(this.authInfo); + this.signatures.forEach((signature)=>{ + tx.addSignatures(signature); + }) + return tx.serializeBinary(); + } + + /** + * get Tx Hash + * @returns tx hash + */ + getTxHash():string{ + let txRaw = this.getTxRaw(); + let txHash:string = (Sha256(txRaw.serializeBinary()) || '').toUpperCase(); + return txHash; + } + + getProtoModel():any{ + let tx = new types.tx_tx_pb.Tx(); + tx.setBody(this.body); + tx.setAuthInfo(this.authInfo); + this.signatures.forEach((signature)=>{ + tx.addSignatures(signature); + }); + return tx; + } + + /** + * get tx content + * @returns tx info + */ + getDisplayContent():object{ + return new Protobuf({} as any).deserializeTx(Buffer.from(this.getData()).toString('base64')); + } +} \ No newline at end of file diff --git a/src/types/query-builder.ts b/src/types/query-builder.ts index ac7c956b..96ef93e5 100644 --- a/src/types/query-builder.ts +++ b/src/types/query-builder.ts @@ -1,4 +1,4 @@ -import { SdkError } from '../errors'; +import { SdkError, CODES } from '../errors'; import * as is from 'is_js'; export class Condition { @@ -38,7 +38,7 @@ export class Condition { toString(): string { if (is.empty(this.key) || is.empty(this.value) || is.empty(this.op)) { - throw new SdkError('invalid condition'); + throw new SdkError('invalid condition',CODES.Internal); } return this.key + this.op + "'" + this.value + "'"; } diff --git a/src/types/random.ts b/src/types/random.ts index 434386b2..77f1c19f 100644 --- a/src/types/random.ts +++ b/src/types/random.ts @@ -1,4 +1,5 @@ import { Coin, Msg } from './types'; +import { SdkError, CODES } from '../errors'; export interface RandomInfo { request_tx_hash: string; @@ -19,15 +20,14 @@ export interface RandomRequest { * Msg struct for requesting a random number * @hidden */ -export class MsgRequestRand implements Msg { - type: string; +export class MsgRequestRand extends Msg { value: { consumer: string; 'block-interval': number; }; constructor(consumer: string, blockInterval: number) { - this.type = 'irishub/slashing/MsgUnjail'; + super('irishub/slashing/MsgUnjail'); this.value = { consumer, 'block-interval': blockInterval, diff --git a/src/types/service.ts b/src/types/service.ts index 39687d4a..a6258ac6 100644 --- a/src/types/service.ts +++ b/src/types/service.ts @@ -1,4 +1,5 @@ import { Coin, Msg } from './types'; +import { SdkError, CODES } from '../errors'; export interface ServiceDefinition { name: string; @@ -69,8 +70,7 @@ export interface ServiceFee { * Msg struct for creating a new service definition * @hidden */ -export class MsgDefineService implements Msg { - type: string; +export class MsgDefineService extends Msg { value: { name: string; description?: string; @@ -88,7 +88,7 @@ export class MsgDefineService implements Msg { tags?: string[]; author_description?: string; }) { - this.type = 'irishub/service/MsgDefineService'; + super('irishub/service/MsgDefineService'); this.value = definition; } @@ -101,8 +101,7 @@ export class MsgDefineService implements Msg { * Msg struct for binding a service definition * @hidden */ -export class MsgBindService implements Msg { - type: string; +export class MsgBindService extends Msg { value: { service_name: string; provider: string; @@ -116,7 +115,7 @@ export class MsgBindService implements Msg { deposit: Coin[]; pricing: string; }) { - this.type = 'irishub/service/MsgBindService'; + super('irishub/service/MsgBindService'); this.value = binding; } @@ -129,8 +128,7 @@ export class MsgBindService implements Msg { * Msg struct for updating a service binding * @hidden */ -export class MsgUpdateServiceBinding implements Msg { - type: string; +export class MsgUpdateServiceBinding extends Msg { value: { service_name: string; provider: string; @@ -144,7 +142,7 @@ export class MsgUpdateServiceBinding implements Msg { deposit: Coin[]; pricing: string; }) { - this.type = 'irishub/service/MsgUpdateServiceBinding'; + super('irishub/service/MsgUpdateServiceBinding'); this.value = binding; } @@ -157,15 +155,14 @@ export class MsgUpdateServiceBinding implements Msg { * Msg struct for disabling a service binding * @hidden */ -export class MsgDisableServiceBinding implements Msg { - type: string; +export class MsgDisableServiceBinding extends Msg { value: { service_name: string; provider: string; }; constructor(serviceName: string, provider: string) { - this.type = 'irishub/service/MsgDisableService'; + super('irishub/service/MsgDisableService'); this.value = { service_name: serviceName, provider, @@ -181,15 +178,14 @@ export class MsgDisableServiceBinding implements Msg { * Msg struct for enabling a service binding * @hidden */ -export class MsgEnableServiceBinding implements Msg { - type: string; +export class MsgEnableServiceBinding extends Msg { value: { service_name: string; provider: string; }; constructor(serviceName: string, provider: string) { - this.type = 'irishub/service/MsgEnableService'; + super('irishub/service/MsgEnableService'); this.value = { service_name: serviceName, provider, @@ -205,8 +201,7 @@ export class MsgEnableServiceBinding implements Msg { * Msg struct for invoking a service * @hidden */ -export class MsgRequestService implements Msg { - type: string; +export class MsgRequestService extends Msg { value: { service_name: string; providers: string[]; @@ -232,7 +227,7 @@ export class MsgRequestService implements Msg { repeated_frequency: number; repeated_total: number; }) { - this.type = 'irishub/service/MsgRequestService'; + super('irishub/service/MsgRequestService'); this.value = request; } @@ -244,15 +239,14 @@ export class MsgRequestService implements Msg { /** * @hidden */ -export class MsgSetServiceWithdrawAddress implements Msg { - type: string; +export class MsgSetServiceWithdrawAddress extends Msg { value: { provider: string; withdraw_address: string; }; constructor(provider: string, withdrawAddress: string) { - this.type = 'irishub/service/MsgSetWithdrawAddress'; + super('irishub/service/MsgSetWithdrawAddress'); this.value = { provider, withdraw_address: withdrawAddress, @@ -268,15 +262,14 @@ export class MsgSetServiceWithdrawAddress implements Msg { * Msg struct for refunding deposit from a service binding * @hidden */ -export class MsgRefundServiceDeposit implements Msg { - type: string; +export class MsgRefundServiceDeposit extends Msg { value: { service_name: string; provider: string; }; constructor(serviceName: string, provider: string) { - this.type = 'irishub/service/MsgRefundServiceDeposit'; + super('irishub/service/MsgRefundServiceDeposit'); this.value = { service_name: serviceName, provider, @@ -292,15 +285,14 @@ export class MsgRefundServiceDeposit implements Msg { * Msg struct for resuming a request context * @hidden */ -export class MsgStartRequestContext implements Msg { - type: string; +export class MsgStartRequestContext extends Msg { value: { request_context_id: string; consumer: string; }; constructor(requestContextID: string, consumer: string) { - this.type = 'irishub/service/MsgStartRequestContext'; + super('irishub/service/MsgStartRequestContext'); this.value = { request_context_id: requestContextID, consumer, @@ -316,15 +308,14 @@ export class MsgStartRequestContext implements Msg { * Msg struct for pausing a request context * @hidden */ -export class MsgPauseRequestContext implements Msg { - type: string; +export class MsgPauseRequestContext extends Msg { value: { request_context_id: string; consumer: string; }; constructor(requestContextID: string, consumer: string) { - this.type = 'irishub/service/MsgPauseRequestContext'; + super('irishub/service/MsgPauseRequestContext'); this.value = { request_context_id: requestContextID, consumer, @@ -340,15 +331,14 @@ export class MsgPauseRequestContext implements Msg { * Msg struct for killing a request context * @hidden */ -export class MsgKillRequestContext implements Msg { - type: string; +export class MsgKillRequestContext extends Msg { value: { request_context_id: string; consumer: string; }; constructor(requestContextID: string, consumer: string) { - this.type = 'irishub/service/MsgKillRequestContext'; + super('irishub/service/MsgKillRequestContext'); this.value = { request_context_id: requestContextID, consumer, @@ -364,8 +354,7 @@ export class MsgKillRequestContext implements Msg { * Msg struct for invoking a service * @hidden */ -export class MsgUpdateRequestContext implements Msg { - type: string; +export class MsgUpdateRequestContext extends Msg { value: { request_context_id: string; providers: string[]; @@ -385,7 +374,7 @@ export class MsgUpdateRequestContext implements Msg { repeated_total: number; consumer: string; }) { - this.type = 'irishub/service/MsgUpdateRequestContext'; + super('irishub/service/MsgUpdateRequestContext'); this.value = request; } @@ -398,14 +387,13 @@ export class MsgUpdateRequestContext implements Msg { * Msg struct for withdrawing the fees earned by the provider * @hidden */ -export class MsgWithdrawEarnedFees implements Msg { - type: string; +export class MsgWithdrawEarnedFees extends Msg { value: { provider: string; }; constructor(provider: string) { - this.type = 'irishub/service/MsgWithdrawEarnedFees'; + super('irishub/service/MsgWithdrawEarnedFees'); this.value = { provider, }; @@ -420,8 +408,7 @@ export class MsgWithdrawEarnedFees implements Msg { * Msg struct for withdrawing the service tax * @hidden */ -export class MsgWithdrawTax implements Msg { - type: string; +export class MsgWithdrawTax extends Msg { value: { trustee: string; dest_address: string; @@ -429,7 +416,7 @@ export class MsgWithdrawTax implements Msg { }; constructor(trustee: string, destAddress: string, amount: Coin[]) { - this.type = 'irishub/service/MsgWithdrawTax'; + super('irishub/service/MsgWithdrawTax'); this.value = { trustee, dest_address: destAddress, diff --git a/src/types/slashing.ts b/src/types/slashing.ts index 6548eb0d..ce81ca66 100644 --- a/src/types/slashing.ts +++ b/src/types/slashing.ts @@ -43,14 +43,13 @@ export interface SlashingParams { * Msg struct for unjailing jailed validator * @hidden */ -export class MsgUnjail implements Msg { - type: string; +export class MsgUnjail extends Msg { value: { address: string; }; constructor(address: string) { - this.type = 'irishub/slashing/MsgUnjail'; + super('irishub/slashing/MsgUnjail'); this.value = { address, }; @@ -64,9 +63,9 @@ export class MsgUnjail implements Msg { /** Defines the signing info for a validator */ export interface ValidatorSigningInfo { address: string; - start_height: string; - index_offset: string; - jailed_until: string; + startHeight: string; + indexOffset: string; + jailedUntil: string; tombstoned: boolean; - missed_blocks_counter: string; + missedBlocksCounter: string; } diff --git a/src/types/staking.ts b/src/types/staking.ts index 862e06b0..4c30a3dc 100644 --- a/src/types/staking.ts +++ b/src/types/staking.ts @@ -1,4 +1,9 @@ -import { Coin, Msg, Pubkey } from './types'; +import {Coin, Msg, Pubkey} from './types'; +import {TxModelCreator} from "../helper"; +import {TxType} from "./types"; +import * as pbs from './proto'; +import * as is from "is_js"; +import { SdkError, CODES } from "../errors"; /** Validator details */ export interface Validator { @@ -83,97 +88,164 @@ export interface Redelegation { shares_dst: string; } +/** + * param struct for delegate tx + */ +export interface DelegateTxParam { + delegator_address: string; + validator_address: string; + amount: Coin; +} + +/** + * param struct for undelegate tx + */ +export interface UndelegateTxParam { + delegator_address: string; + validator_address: string; + amount: Coin; +} + +/** + * param struct for redelegate tx + */ +export interface RedelegateTxParam { + delegator_address: string; + validator_src_address: string; + validator_dst_address: string; + amount: Coin; +} + + /** * Msg struct for delegating to a validator * @hidden */ -export class MsgDelegate implements Msg { - type: string; - value: { - delegator_addr: string; - validator_addr: string; - delegation: Coin; - }; +export class MsgDelegate extends Msg { + value: DelegateTxParam; - constructor(delegatorAddr: string, validatorAddr: string, delegation: Coin) { - this.type = 'irishub/stake/MsgDelegate'; - this.value = { - delegator_addr: delegatorAddr, - validator_addr: validatorAddr, - delegation: delegation, - }; + constructor(msg: DelegateTxParam) { + super(TxType.MsgDelegate); + this.value = msg; } - getSignBytes(): object { - return this; + static getModelClass(): any{ + return pbs.staking_tx_pb.MsgDelegate; + } + + getModel(): any { + const msg = new ((this.constructor as any).getModelClass())(); + msg.setDelegatorAddress(this.value.delegator_address) + .setValidatorAddress(this.value.validator_address) + .setAmount(TxModelCreator.createCoinModel(this.value.amount.denom, this.value.amount.amount)); + return msg; + } + + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean { + if (is.undefined(this.value.delegator_address)) { + throw new SdkError(`delegator address can not be empty`); + } + if (is.undefined(this.value.validator_address)) { + throw new SdkError(`validator address can not be empty`); + } + return true; } } + + /** * Msg struct for undelegating from a validator * @hidden */ -export class MsgUndelegate implements Msg { - type: string; - value: { - delegator_addr: string; - validator_addr: string; - shares_amount: string; - }; +export class MsgUndelegate extends Msg { + value: UndelegateTxParam; - constructor( - delegatorAddr: string, - validatorAddr: string, - sharesAmount: string - ) { - this.type = 'irishub/stake/BeginUnbonding'; - this.value = { - delegator_addr: delegatorAddr, - validator_addr: validatorAddr, - shares_amount: sharesAmount, - }; + constructor(msg: UndelegateTxParam) { + super(TxType.MsgUndelegate); + this.value = msg; } - getSignBytes(): object { - return this.value; + static getModelClass(): any{ + return pbs.staking_tx_pb.MsgUndelegate; + } + + getModel(): any { + const msg = new ((this.constructor as any).getModelClass())(); + msg.setDelegatorAddress(this.value.delegator_address) + .setValidatorAddress(this.value.validator_address) + .setAmount(TxModelCreator.createCoinModel(this.value.amount.denom, this.value.amount.amount)); + return msg; + } + + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean { + if (is.undefined(this.value.delegator_address)) { + throw new SdkError(`delegator address can not be empty`); + } + if (is.undefined(this.value.validator_address)) { + throw new SdkError(`validator address can not be empty`); + } + return true; } } + + /** * Msg struct for redelegating illiquid tokens from one validator to another * @hidden */ -export class MsgRedelegate implements Msg { - type: string; - value: { - delegator_addr: string; - validator_src_addr: string; - validator_dst_addr: string; - shares_amount: string; - }; +export class MsgRedelegate extends Msg { + value: RedelegateTxParam; - constructor( - delegatorAddr: string, - validatorSrcAddr: string, - validatorDstAddr: string, - sharesAmount: string - ) { - this.type = 'irishub/stake/BeginRedelegate'; - this.value = { - delegator_addr: delegatorAddr, - validator_src_addr: validatorSrcAddr, - validator_dst_addr: validatorDstAddr, - shares_amount: sharesAmount, - }; + constructor(msg: RedelegateTxParam) { + super(TxType.MsgBeginRedelegate); + this.value = msg; } - getSignBytes(): object { - return { - delegator_addr: this.value.delegator_addr, - validator_src_addr: this.value.validator_src_addr, - validator_dst_addr: this.value.validator_dst_addr, - shares: this.value.shares_amount, - }; + static getModelClass(): any{ + return pbs.staking_tx_pb.MsgBeginRedelegate; + } + + getModel(): any { + const msg = new ((this.constructor as any).getModelClass())(); + msg.setDelegatorAddress(this.value.delegator_address) + .setValidatorSrcAddress(this.value.validator_src_address) + .setValidatorDstAddress(this.value.validator_dst_address) + .setAmount(TxModelCreator.createCoinModel(this.value.amount.denom, this.value.amount.amount)); + return msg; + } + + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean { + if (is.undefined(this.value.delegator_address)) { + throw new SdkError(`delegator address can not be empty`); + } + if (is.undefined(this.value.validator_src_address)) { + throw new SdkError(`source validator address can not be empty`); + } + if (is.undefined(this.value.validator_dst_address)) { + throw new SdkError(`destination validator address can not be empty`); + } + + return true; } } @@ -181,8 +253,7 @@ export class MsgRedelegate implements Msg { * Msg struct for updating validator informations * @hidden */ -export class MsgEditValidator implements Msg { - type: string; +export class MsgEditValidator extends Msg { value: { Description: ValidatorDescription; address: string; @@ -194,7 +265,7 @@ export class MsgEditValidator implements Msg { address: string, commissionRate: number ) { - this.type = 'irishub/stake/MsgEditValidator'; + super('irishub/stake/MsgEditValidator'); this.value = { Description: description, address, diff --git a/src/types/token.ts b/src/types/token.ts new file mode 100644 index 00000000..52a25e08 --- /dev/null +++ b/src/types/token.ts @@ -0,0 +1,280 @@ +import {Coin, Msg, TxType} from './types'; +import * as is from "is_js"; +import * as pbs from "./proto"; +import { SdkError, CODES } from "../errors"; +import {doNotModify} from "./constants"; + +export interface Token { + symbol: string; + name: string; + scale: number; + min_unit: string; + initial_supply: number; + max_supply: number; + mintable: boolean; + owner: string; +} + +export interface TokenFees { + exist: boolean; + issue_fee: Coin; + mint_fee: Coin; +} + +/** + * param struct for issue token tx + */ +export interface IssueTokenTxParam { + symbol: string; + name: string; + min_unit: string; + owner: string; + scale?: number; + initial_supply?: number; + max_supply?: number; + mintable?: boolean; +} + +/** + * param struct for mint token tx + */ +export interface MintTokenTxParam { + symbol: string; + amount: number; + owner: string; + to?: string; +} + +/** + * param struct for edit token tx + */ +export interface EditTokenTxParam { + symbol: string; + owner: string; + name?: string; + max_supply?: number; + mintable?: string; +} + +/** + * param struct for transfer token owner tx + */ +export interface TransferTokenOwnerTxParam { + symbol: string; + src_owner: string; + dst_owner: string; +} + +/** + * Msg struct for issue token + * @hidden + */ +export class MsgIssueToken extends Msg { + value: IssueTokenTxParam; + + constructor(msg: IssueTokenTxParam) { + super(TxType.MsgIssueToken); + this.value = msg; + } + + static getModelClass(): any { + return pbs.token_tx_pb.MsgIssueToken; + } + + getModel(): any { + const msg = new ((this.constructor as any).getModelClass())() + .setSymbol(this.value.symbol) + .setName(this.value.name) + .setMinUnit(this.value.min_unit) + .setOwner(this.value.owner); + if(is.not.undefined(this.value.scale)){ + msg.setScale(this.value.scale); + } + if(is.not.undefined(this.value.initial_supply)){ + msg.setInitialSupply(this.value.initial_supply); + } + if(is.not.undefined(this.value.max_supply)){ + msg.setMaxSupply(this.value.max_supply); + } + if(is.not.undefined(this.value.mintable)){ + msg.setMintable(this.value.mintable); + } + + + + return msg; + } + + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean { + if (is.undefined(this.value.symbol)) { + throw new SdkError(`token symbol can not be empty`); + } + if (is.undefined(this.value.name)) { + throw new SdkError(`name can not be empty`); + } + if (is.undefined(this.value.min_unit)) { + throw new SdkError(`min unit can not be empty`); + } + if (is.undefined(this.value.owner)) { + throw new SdkError(`owner can not be empty`); + } + + return true; + } +} + +/** + * Msg struct for edit token + * @hidden + */ +export class MsgEditToken extends Msg { + value: EditTokenTxParam; + + constructor(msg: EditTokenTxParam) { + super(TxType.MsgEditToken); + this.value = msg; + } + + static getModelClass(): any { + return pbs.token_tx_pb.MsgEditToken; + } + + getModel(): any { + const msg = new ((this.constructor as any).getModelClass())() + .setSymbol(this.value.symbol) + .setOwner(this.value.owner); + if (is.not.undefined(this.value.name)) { + msg.setName(this.value.name) + } + if (is.not.undefined(this.value.max_supply)) { + msg.setMaxSupply(this.value.max_supply) + } + if (is.not.undefined(this.value.mintable)) { + msg.setMintable(this.value.mintable) + } else { + msg.setMintable(doNotModify) + } + return msg; + } + + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean { + if (is.undefined(this.value.symbol)) { + throw new SdkError(`token symbol can not be empty`); + } + if (is.undefined(this.value.owner)) { + throw new SdkError(`owner can not be empty`); + } + + return true; + } +} + +/** + * Msg struct for mint token + * @hidden + */ +export class MsgMintToken extends Msg { + value: MintTokenTxParam; + + constructor(msg: MintTokenTxParam) { + super(TxType.MsgMintToken); + this.value = msg; + } + + static getModelClass(): any { + return pbs.token_tx_pb.MsgMintToken; + } + + getModel(): any { + const msg = new ((this.constructor as any).getModelClass())() + .setSymbol(this.value.symbol) + .setAmount(this.value.amount) + .setOwner(this.value.owner); + if (is.not.undefined(this.value.to)) { + msg.setTo(this.value.to) + } + return msg; + } + + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean { + if (is.undefined(this.value.symbol)) { + throw new SdkError(`token symbol can not be empty`); + } + if (is.undefined(this.value.amount)) { + throw new SdkError(`amount of token minted can not be empty`); + } + + if (is.undefined(this.value.owner)) { + throw new SdkError(`owner can not be empty`); + } + + return true; + } +} + +/** + * Msg struct for transfer token owner + * @hidden + */ +export class MsgTransferTokenOwner extends Msg { + value: TransferTokenOwnerTxParam; + + constructor(msg: TransferTokenOwnerTxParam) { + super(TxType.MsgTransferTokenOwner); + this.value = msg; + } + + static getModelClass(): any { + return pbs.token_tx_pb.MsgTransferTokenOwner; + } + + getModel(): any { + const msg = new ((this.constructor as any).getModelClass())() + .setSymbol(this.value.symbol) + .setSrcOwner(this.value.src_owner) + .setDstOwner(this.value.dst_owner); + return msg; + } + + /** + * validate necessary params + * + * @return whether is is validated + * @throws `SdkError` if validate failed. + */ + validate(): boolean { + if (is.undefined(this.value.symbol)) { + throw new SdkError(`token symbol can not be empty`); + } + if (is.undefined(this.value.src_owner)) { + throw new SdkError(`source owner can not be empty`); + } + + if (is.undefined(this.value.dst_owner)) { + throw new SdkError(`destination owner can not be empty`); + } + + return true; + } +} + + + diff --git a/src/types/types.ts b/src/types/types.ts index 61365a26..4767a351 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -1,12 +1,75 @@ +import { TxHelper, TxModelCreator } from '../helper'; +import { SdkError, CODES } from '../errors'; /** * Base Msg * @hidden */ -export interface Msg { +export class Msg { type: string; value: any; - getSignBytes?(): object; - marshal?(): Msg; + + constructor(type:string){ + this.type = type; + } + + static getModelClass():any{ + throw new SdkError("not implement",CODES.Internal); + } + + getModel():any{ + throw new SdkError("not implement",CODES.Internal); + } + + pack(): any{ + let msg: any = this.getModel(); + return TxModelCreator.createAnyModel(this.type, msg.serializeBinary()); + } + + /** + * unpack protobuf tx message + * @type {[type]} + * returns protobuf message instance + */ + unpack(msgValue:string):any{ + if (!msgValue) { + throw new SdkError("msgValue can not be empty",CODES.Internal); + } + let msg = (this.constructor as any).getModelClass().deserializeBinary(Buffer.from(msgValue,'base64')); + if (msg) { + return msg; + }else{ + throw new SdkError("unpack message fail",CODES.FailedUnpackingProtobufMessagFromAny); + } + } +} + +export enum TxType { + //bank + MsgSend ="cosmos.bank.v1beta1.MsgSend", + MsgMultiSend ="cosmos.bank.v1beta1.MsgMultiSend", + //staking + MsgDelegate ="cosmos.staking.v1beta1.MsgDelegate", + MsgUndelegate ="cosmos.staking.v1beta1.MsgUndelegate", + MsgBeginRedelegate ="cosmos.staking.v1beta1.MsgBeginRedelegate", + //distribution + MsgWithdrawDelegatorReward ="cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", + MsgSetWithdrawAddress ="cosmos.distribution.v1beta1.MsgSetWithdrawAddress", + MsgWithdrawValidatorCommission = "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", + MsgFundCommunityPool = "cosmos.distribution.v1beta1.MsgFundCommunityPool", + //coinswap + MsgAddLiquidity ="irismod.coinswap.MsgAddLiquidity", + MsgRemoveLiquidity ="irismod.coinswap.MsgRemoveLiquidity", + MsgSwapOrder ="irismod.coinswap.MsgSwapOrder", + //nft + MsgIssueDenom ="irismod.nft.MsgIssueDenom", + MsgTransferNFT ="irismod.nft.MsgTransferNFT", + MsgEditNFT ="irismod.nft.MsgEditNFT", + MsgMintNFT ="irismod.nft.MsgMintNFT", + MsgBurnNFT ="irismod.nft.MsgBurnNFT", + MsgIssueToken = 'irismod.token.MsgIssueToken', + MsgEditToken = 'irismod.token.MsgEditToken', + MsgMintToken = 'irismod.token.MsgMintToken', + MsgTransferTokenOwner = 'irismod.token.MsgTransferTokenOwner', } /** @@ -55,10 +118,20 @@ export interface JsonRpcError { * @hidden */ export interface Pubkey { - type: string; + type: PubkeyType; value: string; } +/** + * Base Pubkey Type + * @hidden + */ +export enum PubkeyType { + secp256k1 = 'secp256k1', + ed25519 = 'ed25519',//not implement + sm2 = 'sm2' +} + /** Tag struct */ export interface Tag { key: string; diff --git a/src/utils/crypto.ts b/src/utils/crypto.ts index 1dbf39b1..86ac1aea 100644 --- a/src/utils/crypto.ts +++ b/src/utils/crypto.ts @@ -5,12 +5,15 @@ import * as uuid from 'uuid'; import * as is from 'is_js'; import * as bip32 from 'bip32'; import * as bip39 from 'bip39'; -import { ec as EC } from 'elliptic'; +import { ec as EC, eddsa as EdDSA } from 'elliptic'; import * as ecc from 'tiny-secp256k1'; import { Utils } from './utils'; import * as types from '../types'; -import { SdkError } from '../errors'; -import { marshalTx } from '@irisnet/amino-js'; +import { SdkError, CODES } from '../errors'; + +const Sha256 = require('sha256'); +const Secp256k1 = require('secp256k1'); +const SM2 = require('sm-crypto').sm2; /** * Crypto Utils @@ -21,13 +24,10 @@ export class Crypto { static PRIVKEY_LEN = 32; static MNEMONIC_LEN = 256; static DECODED_ADDRESS_LEN = 20; - static CURVE = 'secp256k1'; //hdpath static HDPATH = "44'/118'/0'/0/"; - static ec = new EC(Crypto.CURVE); - /** * Decodes an address in bech32 format. * @param address The bech32 address to decode @@ -67,13 +67,13 @@ export class Crypto { /** * Encodes an address from input data bytes. - * @param pubkey The public key to encode + * @param pubkeyHash The public key to encode * @param hrp The address prefix * @param type The output type (default: hex) * @returns Bech32 address */ - static encodeAddress(pubkey: string, hrp = 'iaa', type = 'hex') { - const words = bech32.toWords(Buffer.from(pubkey, type)); + static encodeAddress(pubkeyHash: string, hrp = 'iaa', type = 'hex') { + const words = bech32.toWords(Buffer.from(pubkeyHash, type)); return bech32.encode(hrp, words); } @@ -117,58 +117,95 @@ export class Crypto { } /** - * Gets the pubkey hexstring - * @param publicKey Encoded public key - * @returns Public key hexstring - */ - static getPublicKey(publicKey: string): string { - const keyPair = Crypto.ec.keyFromPublic(publicKey, 'hex'); - return keyPair.getPublic(); - } - - /** - * Calculates the public key from a given private key. + * Calculates the full public key from a given private key. * @param privateKeyHex The private key hexstring - * @returns Public key hexstring + * @param type Pubkey Type + * @returns Public key {type:type, value:hexstring} */ - static getPublicKeyFromPrivateKey(privateKeyHex: string): string { + static getFullPublicKeyFromPrivateKey( + privateKeyHex: string, + type:types.PubkeyType = types.PubkeyType.secp256k1 + ): types.Pubkey { if (!privateKeyHex || privateKeyHex.length !== Crypto.PRIVKEY_LEN * 2) { - throw new SdkError('invalid privateKey'); + throw new SdkError('invalid privateKey',CODES.KeyNotFound); + } + let pubKey:string = ''; + switch(type){ + case types.PubkeyType.ed25519: + throw new SdkError("not implement",CODES.Panic); + case types.PubkeyType.sm2: + pubKey = SM2.getPublicKeyFromPrivateKey(privateKeyHex); + break; + case types.PubkeyType.secp256k1: + default: + const secp256k1pubkey = new EC('secp256k1').keyFromPrivate(privateKeyHex, 'hex').getPublic(); + pubKey = secp256k1pubkey.encode('hex'); + break; } - const curve = new EC(Crypto.CURVE); - const keypair = curve.keyFromPrivate(privateKeyHex, 'hex'); - const unencodedPubKey = keypair.getPublic().encode('hex'); - return unencodedPubKey; + return { type:type, value:pubKey }; } /** - * Calculates the Secp256k1 public key from a given private key. + * Calculates the public key from a given private key. * @param privateKeyHex The private key hexstring - * @returns Tendermint public key + * @param type Pubkey Type + * @returns Public key {type:type, value:hexstring} */ - static getPublicKeySecp256k1FromPrivateKey( - privateKeyHex: string - ): types.Pubkey { - const publicKeyHex = Crypto.getPublicKeyFromPrivateKey(privateKeyHex); - const pubKey = Crypto.ec.keyFromPublic(publicKeyHex, 'hex'); - const pubPoint = pubKey.getPublic(); - const compressed = pubPoint.encodeCompressed(); - return { - type: 'tendermint/PubKeySecp256k1', - value: Buffer.from(compressed).toString('base64'), - }; + static getPublicKeyFromPrivateKey( + privateKeyHex: string, + type:types.PubkeyType = types.PubkeyType.secp256k1 + ): types.Pubkey { + if (!privateKeyHex || privateKeyHex.length !== Crypto.PRIVKEY_LEN * 2) { + throw new SdkError('invalid privateKey',CODES.KeyNotFound); + } + let pubKey:string = ''; + switch(type){ + case types.PubkeyType.ed25519: + throw new SdkError("not implement",CODES.Panic); + case types.PubkeyType.sm2: + pubKey = SM2.getPublicKeyFromPrivateKey(privateKeyHex, 'compress'); + break; + case types.PubkeyType.secp256k1: + default: + const secp256k1pubkey = new EC('secp256k1').keyFromPrivate(privateKeyHex, 'hex').getPublic(); + pubKey = Buffer.from(secp256k1pubkey.encodeCompressed()).toString('hex'); + break; + } + return { type:type, value:pubKey } } /** - * PubKey performs the point-scalar multiplication from the privKey on the - * generator point to get the pubkey. - * @param privateKey - * @returns Public key hexstring + * [marshalPubKey description] + * @param {[type]} pubKey:{type: types.PubkeyType, value:base64String} Tendermint public key + * @param {[type]} lengthPrefixed:boolean length prefixed + * @return {[type]} pubKey hexString public key with amino prefix */ - static generatePubKey(privateKey: Buffer): string { - const curve = new EC(Crypto.CURVE); - const keypair = curve.keyFromPrivate(privateKey); - return keypair.getPublic(); + static aminoMarshalPubKey( + pubKey:types.Pubkey, + lengthPrefixed?:boolean):string{ + const { type, value } = pubKey; + let pubKeyType = ''; + switch (type){ + case types.PubkeyType.secp256k1: + pubKeyType = 'tendermint/PubKeySecp256k1'; + break; + case types.PubkeyType.ed25519: + pubKeyType = 'tendermint/PubKeyEd25519'; + break; + case types.PubkeyType.sm2: + pubKeyType = 'tendermint/PubKeySm2'; + break; + default: + pubKeyType = type; + break; + } + let pk:any = Utils.getAminoPrefix(pubKeyType); + pk = pk.concat(Buffer.from(value,'base64').length); + pk = pk.concat(Array.from(Buffer.from(value,'base64'))); + if (lengthPrefixed) { + pk = [pk.length,...pk]; + } + return Buffer.from(pk).toString('hex'); } /** @@ -178,70 +215,98 @@ export class Crypto { * * @returns The address */ - static getAddressFromPublicKey(publicKeyHex: string, prefix: string): string { - const pubKey = Crypto.ec.keyFromPublic(publicKeyHex, 'hex'); - const pubPoint = pubKey.getPublic(); - const compressed = pubPoint.encodeCompressed(); - const hexed = Utils.ab2hexstring(compressed); - const hash = Utils.sha256ripemd160(hexed); // https://git.io/fAn8N - const address = Crypto.encodeAddress(hash, prefix); - return address; + static getAddressFromPublicKey(publicKey: string|types.Pubkey, prefix: string): string { + if (typeof publicKey == 'string') { + publicKey = {type:types.PubkeyType.secp256k1, value:publicKey}; + } + let hash:string = ''; + switch(publicKey.type){ + case types.PubkeyType.ed25519: + throw new SdkError("not implement",CODES.Panic); + case types.PubkeyType.sm2: + hash = Utils.sha256(publicKey.value).substr(0,40); + break; + case types.PubkeyType.secp256k1: + default: + hash = Utils.sha256ripemd160(publicKey.value); + break; + } + return Crypto.encodeAddress(hash, prefix);; } /** * Gets an address from a private key. * @param privateKeyHex The private key hexstring * @param prefix Bech32 prefix + * @param type Pubkey Type * @returns The address */ static getAddressFromPrivateKey( privateKeyHex: string, - prefix: string + prefix: string, + type:types.PubkeyType = types.PubkeyType.secp256k1 ): string { return Crypto.getAddressFromPublicKey( - Crypto.getPublicKeyFromPrivateKey(privateKeyHex), - prefix + Crypto.getPublicKeyFromPrivateKey(privateKeyHex, type), + prefix, ); } /** - * Generates a signature (64 byte ) for a transaction based on given private key. + * Verifies a signature (64 byte ) given the sign bytes and public key. + * @param sigHex The signature hexstring. * @param signBytesHex Unsigned transaction sign bytes hexstring. - * @param privateKey The private key. + * @param publicKeyHex The public key. * @returns Signature. Does not include tx. */ - static generateSignature( - signBytesHex: string, - privateKey: string | Buffer - ): Buffer { - const msgHash = Utils.sha256(signBytesHex); - const msgHashHex = Buffer.from(msgHash, 'hex'); - const signature = ecc.sign( - msgHashHex, - Buffer.from(privateKey.toString(), 'hex') - ); // enc ignored if buffer - return signature; - } + // static verifySignature( + // sigHex: string, + // signBytesHex: string, + // publicKeyHex: string + // ): string { + // const publicKey = Buffer.from(publicKeyHex, 'hex'); + // if (!ecc.isPoint(publicKey)) { + // throw new SdkError('Invalid public key provided'); + // } + // const msgHash = Utils.sha256(signBytesHex); + // const msgHashHex = Buffer.from(msgHash, 'hex'); + // return ecc.verify(msgHashHex, publicKey, Buffer.from(sigHex, 'hex')); + // } /** - * Verifies a signature (64 byte ) given the sign bytes and public key. - * @param sigHex The signature hexstring. - * @param signBytesHex Unsigned transaction sign bytes hexstring. - * @param publicKeyHex The public key. + * Generates a signature (base64 string) for a signDocSerialize based on given private key. + * @param signDocSerialize from protobuf and tx. + * @param privateKey The private key. + * @param type Pubkey Type. * @returns Signature. Does not include tx. */ - static verifySignature( - sigHex: string, - signBytesHex: string, - publicKeyHex: string - ): string { - const publicKey = Buffer.from(publicKeyHex, 'hex'); - if (!ecc.isPoint(publicKey)) { - throw new SdkError('Invalid public key provided'); - } - const msgHash = Utils.sha256(signBytesHex); - const msgHashHex = Buffer.from(msgHash, 'hex'); - return ecc.verify(msgHashHex, publicKey, Buffer.from(sigHex, 'hex')); + static generateSignature( + signDocSerialize:Uint8Array, + private_key:string, + type:types.PubkeyType = types.PubkeyType.secp256k1 + ):string { + let signature:string = ''; + switch(type){ + case types.PubkeyType.ed25519: + throw new SdkError("not implement",CODES.Panic); + case types.PubkeyType.sm2: + const sm2Sig = SM2.doSignature( + Buffer.from(signDocSerialize), + private_key, + {hash:true} + ); + signature = Buffer.from(sm2Sig, 'hex').toString('base64'); + break; + case types.PubkeyType.secp256k1: + default: + const msghash:Buffer = Buffer.from(Sha256(signDocSerialize,{ asBytes: true })); + let prikeyArr:Buffer = Buffer.from(private_key,'hex'); + let Secp256k1Sig = Secp256k1.sign(msghash, prikeyArr); + signature = Secp256k1Sig.signature.toString('base64'); + break; + } + if (!signature) { throw Error(' generate Signature error ') } + return signature; } /** @@ -279,7 +344,7 @@ export class Crypto { ); const cipher = cryp.createCipheriv(cipherAlg, derivedKey.slice(0, 16), iv); if (!cipher) { - throw new SdkError('Unsupported cipher'); + throw new SdkError('Unsupported cipher',CODES.Internal); } const ciphertext = Buffer.concat([ @@ -319,7 +384,7 @@ export class Crypto { password: string ): string { if (!is.string(password)) { - throw new SdkError('No password given.'); + throw new SdkError('No password given.',CODES.InvalidPassword); } const json = is.object(keystore) @@ -328,7 +393,7 @@ export class Crypto { const kdfparams = json.crypto.kdfparams; if (kdfparams.prf !== 'hmac-sha256') { - throw new SdkError('Unsupported parameters to PBKDF2'); + throw new SdkError('Unsupported parameters to PBKDF2',CODES.Internal); } const derivedKey = cryp.pbkdf2Sync( @@ -349,7 +414,8 @@ export class Crypto { const macLegacy = Utils.sha256(bufferValue.toString('hex')); if (macLegacy !== json.crypto.mac) { throw new SdkError( - 'Keystore mac check failed (sha3 & sha256) wrong password?' + 'Keystore mac check failed (sha3 & sha256) wrong password?', + CODES.Internal ); } } @@ -393,12 +459,12 @@ export class Crypto { */ static getPrivateKeyFromMnemonic( mnemonic: string, - derive = true, index = 0, + derive = true, password = '' ): string { if (!bip39.validateMnemonic(mnemonic)) { - throw new SdkError('wrong mnemonic format'); + throw new SdkError('wrong mnemonic format',CODES.InvalidMnemonic); } const seed = bip39.mnemonicToSeedSync(mnemonic, password); if (derive) { @@ -408,7 +474,7 @@ export class Crypto { typeof child === 'undefined' || typeof child.privateKey === 'undefined' ) { - throw new SdkError('error getting private key from mnemonic'); + throw new SdkError('error getting private key from mnemonic',CODES.DerivePrivateKeyError); } return child.privateKey.toString('hex'); } @@ -417,11 +483,24 @@ export class Crypto { /** * Generate Tx hash from stdTx - * @param tx - * @throws if the tx is invlid of unsupported tx type + * @param protobuf tx :base64 string + * @throws tx hash */ - static generateTxHash(tx: types.Tx): string { - return Utils.sha256(Utils.ab2hexstring(marshalTx(tx))).toUpperCase(); + static generateTxHash(tx: string): string { + if (!tx || typeof tx != 'string') { + throw new SdkError('invalid tx',CODES.TxParseError); + } + const tx_pb = types.tx_tx_pb.Tx.deserializeBinary(tx); + if (!tx_pb) { + throw new SdkError('deserialize tx err',CODES.TxParseError); + } + const txRaw = new types.tx_tx_pb.TxRaw(); + txRaw.setBodyBytes(tx_pb.getBody().serializeBinary()); + txRaw.setAuthInfoBytes(tx_pb.getAuthInfo().serializeBinary()); + tx_pb.getSignaturesList().forEach((signature:Uint8Array)=>{ + txRaw.addSignatures(signature); + }) + return (Sha256(txRaw.serializeBinary()) || '').toUpperCase(); } /** diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 47c43fbd..c25d9638 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -3,7 +3,7 @@ import * as SHA3 from 'crypto-js/sha3'; import * as SHA256 from 'crypto-js/sha256'; import * as RIPEMD160 from 'crypto-js/ripemd160'; import * as is from 'is_js'; -import { SdkError } from '../errors'; +import { SdkError, CODES } from '../errors'; import * as types from '../types'; /** @@ -18,7 +18,7 @@ export class Utils { */ static str2ab(str: string): Uint8Array { if (typeof str !== 'string') { - throw new SdkError('str2ab expects a string'); + throw new SdkError('str2ab expects a string',CODES.Internal); } const result = new Uint8Array(str.length); for (let i = 0, strLen = str.length; i < strLen; i++) { @@ -34,7 +34,7 @@ export class Utils { */ static str2ba(str: string): number[] { if (typeof str !== 'string') { - throw new SdkError('str2ba expects a string'); + throw new SdkError('str2ba expects a string',CODES.Internal); } const result = []; for (let i = 0, strLen = str.length; i < strLen; i++) { @@ -50,7 +50,7 @@ export class Utils { */ static ab2hexstring(arr: Uint8Array): string { if (typeof arr !== 'object') { - throw new SdkError('ab2hexstring expects an array'); + throw new SdkError('ab2hexstring expects an array',CODES.Internal); } let result = ''; for (let i = 0; i < arr.length; i++) { @@ -86,7 +86,7 @@ export class Utils { */ static int2hex(num: number) { if (typeof num !== 'number') { - throw new SdkError('int2hex expects a number'); + throw new SdkError('int2hex expects a number',CODES.Internal); } const h = num.toString(16); return h.length % 2 ? '0' + h : h; @@ -143,7 +143,7 @@ export class Utils { */ static reverseArray(arr: Uint8Array): Uint8Array { if (typeof arr !== 'object' || !arr.length) { - throw new SdkError('reverseArray expects an array'); + throw new SdkError('reverseArray expects an array',CODES.Internal); } const result = new Uint8Array(arr.length); for (let i = 0; i < arr.length; i++) { @@ -193,7 +193,7 @@ export class Utils { */ static ensureHex(str: string) { if (!Utils.isHex(str)) { - throw new SdkError(`Expected a hexstring but got ${str}`); + throw new SdkError(`Expected a hexstring but got ${str}`,CODES.Internal); } } @@ -204,14 +204,14 @@ export class Utils { */ static sha256ripemd160(hex: string): string { if (typeof hex !== 'string') { - throw new SdkError('sha256ripemd160 expects a string'); + throw new SdkError('sha256ripemd160 expects a string',CODES.Internal); } if (hex.length % 2 !== 0) { - throw new SdkError(`invalid hex string length: ${hex}`); + throw new SdkError(`invalid hex string length: ${hex}`,CODES.Internal); } - const hexEncoded = hexEncoding.parse(hex); - const programSha256 = SHA256(hexEncoded); - return RIPEMD160(programSha256).toString(); + const hexEncoded = typeof hexEncoding === 'function' ? hexEncoding.parse(hex) : hexEncoding.default.parse(hex); + const programSha256 = typeof SHA256 === 'function' ? SHA256(hexEncoded) : SHA256.default(hexEncoded); + return typeof RIPEMD160 === 'function' ? RIPEMD160(programSha256).toString() : RIPEMD160.default(programSha256).toString(); } /** @@ -221,13 +221,13 @@ export class Utils { */ static sha256(hex: string): string { if (typeof hex !== 'string') { - throw new SdkError('sha256 expects a hex string'); + throw new SdkError('sha256 expects a hex string',CODES.Internal); } if (hex.length % 2 !== 0) { - throw new SdkError(`invalid hex string length: ${hex}`); + throw new SdkError(`invalid hex string length: ${hex}`,CODES.Internal); } - const hexEncoded = hexEncoding.parse(hex); - return SHA256(hexEncoded).toString(); + const hexEncoded = typeof hexEncoding === 'function' ? hexEncoding.parse(hex) : hexEncoding.default.parse(hex); + return typeof SHA256 === 'function' ? SHA256(hexEncoded).toString() : SHA256.default(hexEncoded).toString(); } /** @@ -237,13 +237,13 @@ export class Utils { */ static sha3(hex: string): string { if (typeof hex !== 'string') { - throw new SdkError('sha3 expects a hex string'); + throw new SdkError('sha3 expects a hex string',CODES.Internal); } if (hex.length % 2 !== 0) { - throw new SdkError(`invalid hex string length: ${hex}`); + throw new SdkError(`invalid hex string length: ${hex}`,CODES.Internal); } - const hexEncoded = hexEncoding.parse(hex); - return SHA3(hexEncoded).toString(); + const hexEncoded = typeof hexEncoding === 'function' ? hexEncoding.parse(hex) : hexEncoding.default.parse(hex); + return typeof SHA3 === 'function' ? SHA3(hexEncoded).toString() : SHA3.default(hexEncoded).toString(); } static sortObject(obj: any): any { @@ -262,6 +262,10 @@ export class Utils { return Buffer.from(b64, 'base64').toString(); } + static bytesToBase64(bytes:Uint8Array):string{ + return Buffer.from(bytes).toString('base64'); + } + /** * Decode base64 encoded tags * @param tags @@ -281,4 +285,22 @@ export class Utils { }); return decodedTags; } + + /** + * get amino prefix from public key encode type. + * @param public key encode type + * @returns UintArray + */ + static getAminoPrefix(prefix:string):Uint8Array{ + let b:any = Array.from(Buffer.from((typeof SHA256 === 'function' ? SHA256 : SHA256.default)(prefix).toString(),'hex')); + while (b[0] === 0) { + b = b.slice(1) + } + b = b.slice(3); + while (b[0] === 0) { + b = b.slice(1) + } + b = b.slice(0, 4); + return b; + } } diff --git a/test/asset.test.ts b/test/asset.test.ts deleted file mode 100644 index 36716caa..00000000 --- a/test/asset.test.ts +++ /dev/null @@ -1,46 +0,0 @@ -import * as types from '../src/types'; -import { BaseTest } from './basetest'; - -const timeout = 10000; - -describe('Asset Tests', () => { - test( - 'query token', - async () => { - try { - console.log(await BaseTest.getDevClient().asset.queryToken('iris')); - } catch (error) { - console.log(JSON.stringify(error)); - } - }, - timeout - ); - test( - 'query tokens', - async () => { - await BaseTest.getClient() - .asset.queryTokens() - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }, - timeout - ); - test( - 'query fees', - async () => { - await BaseTest.getClient() - .asset.queryFees('testcoin') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - }, - timeout - ); -}); diff --git a/test/auth.test.ts b/test/auth.test.ts new file mode 100644 index 00000000..774ea748 --- /dev/null +++ b/test/auth.test.ts @@ -0,0 +1,38 @@ +import { BaseTest } from './basetest'; + +const timeout = 10000; + +describe('Nft Tests', () => { + + describe('query', () => { + test( + 'query Account', + async () => { + await BaseTest.getClient() + .auth.queryAccount('iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp') + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + + test( + 'query Params', + async () => { + await BaseTest.getClient() + .auth.queryParams() + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + }); +}); diff --git a/test/bank.test.ts b/test/bank.test.ts index 19da4926..2790d418 100644 --- a/test/bank.test.ts +++ b/test/bank.test.ts @@ -1,171 +1,139 @@ import * as types from '../src/types'; import { BaseTest } from './basetest'; -import {Client} from "../src/client"; -import {SdkError} from "../src/errors"; const timeout = 10000; -let txExpect = function(res: any) { - console.log(JSON.stringify(res)); - expect(res).not.toBeNull(); - expect(res.hash).not.toBeNull(); - expect(res.tags).not.toBeNull(); -} describe('Bank Tests', () => { describe('Send', () => { - test('send coins ok', + test( + 'send coins', async () => { - const target: string = 'faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7'; - const amount: types.Coin[] = [{ - denom: 'iris-atto', - amount: '1000000000000000000', - }]; - let client: Client = BaseTest.getClient(); - await client.bank.send(target, amount, BaseTest.baseTx - ).then(res => { - txExpect(res); - expect(res.tags == undefined? '': res.tags.filter(kv=>kv.key=='sender')[0].value).toEqual(client.keys.show(BaseTest.baseTx.from)); - expect(res.tags == undefined? '': res.tags.filter(kv=>kv.key=='recipient')[0].value).toEqual(target); - }).catch(error => { + const amount: types.Coin[] = [ + { + denom: 'ubif', + amount: '313', + }, + ]; + + await BaseTest.getClient() + .bank.send( + 'iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp', + amount, + BaseTest.baseTx + ) + .then(res => { + console.log(res); + }) + .catch(error => { console.log(error); - expect(error).toBeNull(); }); - }, timeout); - test('send coins failed as fund not enough', - async () => { - const target: string = 'faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7'; - const amount: types.Coin[] = [{ - denom: 'iris-atto', - amount: '100000000000000000000000000000000000', - }]; - let client: Client = BaseTest.getClient(); - await client.bank.send(target, amount, BaseTest.baseTx - ).catch(error => { - console.log(error); - expect(error).not.toBeNull(); - expect(error.code).toEqual(10); // the message of code: 10 is "subtracting [100000000000000000000000000000000000iris-atto] from [1729814657319195035637027iris-atto,99999999999000000000000000000kbambo-min,995kflower-min,13700000000000000000000000000kfly-min,999899000mondex.sun-min] yields negative coin(s)" - }); - }, timeout); - test('send coins failed as unknown token', - async () => { - const target: string = 'faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7'; - const amount: types.Coin[] = [{ - denom: 'iris-attoooooooooooooooooo', - amount: '1000000000000000000', - }]; - let client: Client = BaseTest.getClient(); - await client.bank.send(target, amount, BaseTest.baseTx - ).catch(error => { - console.log(error); - expect(error).not.toBeNull(); - expect(error.code).toEqual(6); - }); - }, timeout); - test('send coins failed as target address wrong', - async () => { - const target: string = 'faa1nl2dxgelxu9ektxypyul8cdjp0x3k'; - const amount: types.Coin[] = [{ - denom: 'iris-atto', - amount: '1000000000000000000', - }]; - await BaseTest.getClient().bank.send(target, amount, BaseTest.baseTx).catch(error => { - console.log(error); - expect(() => {throw error}).toThrowError(new SdkError('Invalid bech32 address')); - }) - }, timeout); + }, + timeout + ); }); - describe('Burn', () => { - test('burn coins ok', + describe('multiSend', () => { + test( + 'send coins', async () => { - const amount: types.Coin[] = [{ - denom: 'iris-atto', - amount: '100000000000000000', - }]; - await BaseTest.getClient().bank.burn(amount, BaseTest.baseTx) + const amount: types.Coin[] = [ + { + denom: 'ubif', + amount: '1', + }, + ]; + + await BaseTest.getClient() + .bank.multiSend( + 'iaa1gytgufwqkz9tmhjgljfxd3qcwpdzymj6022q3w', + amount, + BaseTest.baseTx + ) .then(res => { - txExpect(res); - expect(res.tags == undefined? '': res.tags.filter(kv=>kv.key=='burnAmount')[0].value).toEqual(`${amount[0].amount}${amount[0].denom}`); - }).catch(error => { + console.log(JSON.stringify(res)); + }) + .catch(error => { console.log(error); - expect(error).toBeNull(); }); - }, timeout); - test('burn coins failed as unknown token', - async () => { - const amount: types.Coin[] = [{ - denom: 'iris-at', - amount: '100000000000000000', - }]; - await BaseTest.getClient().bank.burn(amount, BaseTest.baseTx).catch(error => { - console.log(error); - expect(() => {throw error}).toThrowError(new SdkError('Bad Request', 6)); - }); - }, timeout); - test('burn coins failed as fund not enough', - async () => { - const amount: types.Coin[] = [{ - denom: 'iris-atto', - amount: '100000000000000000000000000000000000', - }]; - await BaseTest.getClient().bank.burn(amount, BaseTest.baseTx).catch(error => { - console.log(error); - expect(() => {throw error}).toThrowError(SdkError); - }); - }, timeout); -}); + }, + timeout + ); + }); - describe('Set Memo Regexp', () => { - test('set memo regexp ok', + describe('Queries', () => { + test( + 'query Balance', async () => { - let reg = 'test*'; - await BaseTest.getClient().bank.setMemoRegexp(reg, BaseTest.baseTx) + await BaseTest.getClient() + .bank.queryBalance('iaa1eqvkfthtrr93g4p9qspp54w6dtjtrn27ar7rpw','ubif') .then(res => { - txExpect(res); - expect(res.tags == undefined? '': res.tags.filter(kv=>kv.key=='memoRegexp')[0].value).toEqual(reg); - }).catch(error => { + console.log(JSON.stringify(res)); + }) + .catch(error => { console.log(error); - expect(error).toBeNull(); }); - }, timeout); - test('set memo regexp failed as memo too length', - async () => { - let reg = 'test11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111*'; - await BaseTest.getClient().bank.setMemoRegexp(reg, BaseTest.baseTx).catch(error => { - console.log(error); - expect(() => {throw error}).toThrowError(SdkError); - }); - }, timeout); - }); + }, + timeout + ); + + test( + 'query All Balances', + async () => { + await BaseTest.getClient() + .bank.queryAllBalances('iaa1eqvkfthtrr93g4p9qspp54w6dtjtrn27ar7rpw') + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); - describe('Query Token Stats', () => { - test('query single token stats', + test( + 'query Total Supply', + async () => { + await BaseTest.getClient() + .bank.queryTotalSupply() + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + + test( + 'query Supply Of', async () => { await BaseTest.getClient() - .bank.queryTokenStats('iris') + .bank.querySupplyOf('btc') .then(res => { console.log(JSON.stringify(res)); - expect(res).not.toBeNull(); - expect(res).toHaveLength(1); - }).catch(error => { + }) + .catch(error => { console.log(error); - expect(error).toBeNull(); }); - }, timeout); + }, + timeout + ); - test('query all token stats', + test( + 'query All Balances', async () => { await BaseTest.getClient() - .bank.queryTokenStats() + .bank.queryParams() .then(res => { console.log(JSON.stringify(res)); - expect(res).not.toBeNull(); - expect(res.total_supply.length).toBeGreaterThan(0); - expect(res.bonded_tokens).toBeNull(); - }).catch(error => { + }) + .catch(error => { console.log(error); - expect(error).toBeNull(); }); - }, timeout); + }, + timeout + ); }); }); diff --git a/test/basetest.ts b/test/basetest.ts index dc95f0b2..ed698ec4 100644 --- a/test/basetest.ts +++ b/test/basetest.ts @@ -1,5 +1,4 @@ import * as iris from '../src'; -import * as types from '../src/types'; import { Client } from '../src/client'; export class Consts { @@ -10,11 +9,11 @@ export class Consts { /** Test KeyDAO */ export class TestKeyDAO implements iris.KeyDAO { - keyMap: { [key: string]: types.Key } = {}; - write(name: string, key: types.Key) { + keyMap: { [key: string]: iris.types.Wallet } = {}; + write(name: string, key: iris.types.Wallet) { this.keyMap[name] = key; } - read(name: string): types.Key { + read(name: string): iris.types.Wallet { return this.keyMap[name]; } delete(name: string) { @@ -23,52 +22,49 @@ export class TestKeyDAO implements iris.KeyDAO { } export class BaseTest { - static baseTx: types.BaseTx = { + static baseTx: iris.types.BaseTx = { from: Consts.keyName, password: Consts.keyPassword, - mode: types.BroadcastMode.Commit, - fee: { amount: '1', denom: 'iris' } + mode: iris.types.BroadcastMode.Commit, + // pubkeyType:types.PubkeyType.sm2 }; + static getClient(): Client { + let config = { + node: 'http://192.168.150.31:56657', + network: iris.types.Network.Mainnet, + chainId: 'bifrost-2', + gas: '20000000', + fee: { denom: 'ubif', amount: '200' }, + }; + let privateKey = '1E120611404C4B1B98FC899A8026A6A9823C35985DA3C5ED3FF57C170C822F60' + + // let config = { + // node: 'http://34.80.22.255:26657', + // network: iris.types.Network.Mainnet, + // chainId: 'bifrost-1', + // gas: '200000', + // fee: { denom: 'ubif', amount: '5000' }, + // }; + // let privateKey = '80A69946ADD77EF0C17F43E72E759164F6F0A2A7E9D5D3E0966A3BCA8DE3D177' + const client = iris - .newClient({ - node: 'http://localhost:26657', - network: iris.Network.Testnet, - chainId: 'test', - gas: '100000', - }) + .newClient(config) .withKeyDAO(new TestKeyDAO()) .withRpcConfig({ timeout: Consts.timeout }); client.keys.recover( Consts.keyName, Consts.keyPassword, - 'balcony reopen dumb battle smile crisp snake truth expose bird thank peasant best opera faint scorpion debate skill ethics fossil dinner village news logic' + 'next review tape teach walnut cash crater evidence ketchup sister lyrics defy pioneer wisdom property arch film damage near link avoid panda vacant suggest' ); - return client; - } - static getDevClient(): Client{ - const client = iris.newClient({ - node: 'http://irisnet-rpc.dev.rainbow.one', - network: iris.Network.Testnet, - chainId: 'rainbow-dev', - gas: '100000' - }).withKeyDAO(new TestKeyDAO()) - .withRpcConfig({timeout: Consts.timeout}); - client.keys.recover(this.baseTx.from, this.baseTx.password, - 'razor educate ostrich pave permit comic collect square believe decade scan day frozen language make winter lyrics spice dawn deliver jaguar arrest decline success'); - return client; - } - static getQaClient(): Client{ - const client = iris.newClient({ - node: 'http://irisnet-rpc.qa.rainbow.one', - network: iris.Network.Testnet, - chainId: 'rainbow-qa', - gas: '100000' - }).withKeyDAO(new TestKeyDAO()) - .withRpcConfig({timeout: Consts.timeout}); - client.keys.recover(this.baseTx.from, this.baseTx.password, - 'arrow ignore inquiry lottery high ship crash leopard liar example never oval final fancy resist nuclear trip novel poem fine odor soccer bus lumber'); + + // client.keys.importPrivateKey( + // Consts.keyName, + // Consts.keyPassword, + // privateKey, + // types.PubkeyType.sm2 + // ); return client; } } diff --git a/test/coinswap.test.ts b/test/coinswap.test.ts new file mode 100644 index 00000000..14f6d9f5 --- /dev/null +++ b/test/coinswap.test.ts @@ -0,0 +1,89 @@ +import { BaseTest } from './basetest'; +describe('Coinswap Tests', () => { + describe('Query Liquidity', () => { + test('query liquidity', async () => { + await BaseTest.getClient() + .coinswap.queryLiquidity('uni:transfer/ztezqumzyz/ubtc') + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }); + }); + describe('Calculate', () => { + test('calculateDeposit', async () => { + await BaseTest.getClient() + .coinswap.calculateDeposit(1, 'transfer/irishubchan/uatom') + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }); + test('calculateWithdraw', async () => { + await BaseTest.getClient() + .coinswap.calculateWithdraw({ + denom: 'uni:transfer/irishubchan/uatom', + amount: '1', + }) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }); + test('calculateWithExactInput', async () => { + await BaseTest.getClient() + .coinswap.calculateWithExactInput( + { denom: 'transfer/irishubchan/uatom', amount: '10' }, + 'transfer/ztezqumzyz/ubtc' + ) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }); + test('calculateWithExactOutput', async () => { + await BaseTest.getClient() + .coinswap.calculateWithExactOutput( + { denom: 'transfer/iriscosmoschan/uatom', amount: '100' }, + 'uiris' + ) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }); + }); + describe('Add Liquidity', () => { + test('add liquidity', async () => { + const btc = await BaseTest.getClient() + .coinswap.calculateWithExactInput({denom: 'uiris', amount: '10000'}, 'transfer/ztezqumzyz/ubtc'); + console.log(btc) + await BaseTest.getClient() + .coinswap.deposit( + { + exact_standard_amt: 10000, + max_token: { denom: 'transfer/ztezqumzyz/ubtc', amount: String(btc) }, + min_liquidity: 10000, + deadline: 10000000, + }, + BaseTest.baseTx + ) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }); + }); +}); diff --git a/test/crypto.test.ts b/test/crypto.test.ts index 77255a76..a4e91786 100644 --- a/test/crypto.test.ts +++ b/test/crypto.test.ts @@ -1,4 +1,5 @@ import { Crypto } from '../src/utils'; +import * as types from '../src/types'; test('Crypto', async () => { // Generates mnemonic @@ -28,3 +29,12 @@ test('Crypto', async () => { console.log(Buffer.from('bXbzqbOidvLADyfR/cLVm2o6L9vcpPh+PF6O8m2sOQ4=', 'hex')); // TODO }); + +test('Marshal PubKey', async ()=>{ + let pk = Crypto.aminoMarshalPubKey({ + type:types.PubkeyType.ed25519, + value:'F205xccFhKHMnNEHFwtHLzDVjPaGGBuSnO0wR8OmEvo=' + }); + let pk_bech32 = Crypto.encodeAddress(pk,'icp'); + console.log('pk_bech32:',pk_bech32); +}); diff --git a/test/distribution.test.ts b/test/distribution.test.ts index 047ac884..efd72361 100644 --- a/test/distribution.test.ts +++ b/test/distribution.test.ts @@ -1,112 +1,222 @@ -import { BaseTest } from './basetest'; +import {BaseTest} from './basetest'; import * as types from '../src/types'; describe('Distribution Tests', () => { - describe('Query Rewards', () => { - test( - 'query rewards', - async () => { - await BaseTest.getClient().distribution - .queryRewards('faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - } - ); - }); + let timeOut = 9999; + describe('Query', () => { + test( + 'query Params', + async () => { + await BaseTest.getClient().distribution + .queryParams() + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + } + ); - describe('Query Withdraw Address', () => { - test( - 'query withdraw-addr', - async () => { - await BaseTest.getClient().distribution - .queryWithdrawAddr('iaa1gvq24a5vn7twjupf3l2t7pnd9l4fm7uwwm4ujp') - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - } - ); - }); + test( + 'query Validator Outstanding Rewards', + async () => { + await BaseTest.getClient().distribution + .queryValidatorOutstandingRewards('iva1lny43v3y496wj6v05m4xpv8nv9c4ra9q57l4y4') + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + } + ); + test( + 'query Validator Commission', + async () => { + await BaseTest.getClient().distribution + .queryValidatorCommission('iva1lny43v3y496wj6v05m4xpv8nv9c4ra9q57l4y4') + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + } + ); - describe('Set Withdraw Address', () => { - test( - 'set withdraw address', - async () => { - const amount: types.Coin[] = [ - { - denom: 'iris-atto', - amount: '1000000000000000000', - }, - ]; + test( + 'query Validator Slashes', + async () => { + await BaseTest.getClient().distribution + .queryValidatorSlashes( + 'iva1lny43v3y496wj6v05m4xpv8nv9c4ra9q57l4y4', - await BaseTest.getClient().distribution - .setWithdrawAddr('faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7', BaseTest.baseTx) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - } - ); - }); + ) + .then(res => { + console.log(res); + }) + .catch(error => { + console.log(error); + }); + } + ); - describe('Withdraw Rewards', () => { - test( - 'withdraw delegation rewards from a specified validator', - async () => { + test( + 'query Delegation Rewards', + async () => { + await BaseTest.getClient().distribution + .queryDelegationRewards( + 'iva1lny43v3y496wj6v05m4xpv8nv9c4ra9q57l4y4', + 'iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp' + ) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + } + ); - await BaseTest.getClient() - .distribution.withdrawRewards( - BaseTest.baseTx, - 'fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e' - ) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - } - ); + test( + 'query Delegation Total Rewards', + async () => { + await BaseTest.getClient().distribution + .queryDelegationTotalRewards( + 'iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp' + ) + .then(res => { + console.log(res); + }) + .catch(error => { + console.log(error); + }); + } + ); - test( - 'withdraw all delegation rewards', - async () => { - await BaseTest.getClient() - .distribution.withdrawRewards(BaseTest.baseTx) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - } - ); + test( + 'query Delegator Validators', + async () => { + await BaseTest.getClient().distribution + .queryDelegatorValidators( + 'iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp' + ) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + } + ); - test( - 'withdraw all rewards (delegation and validator commission)', - async () => { - await BaseTest.getClient() - .distribution.withdrawRewards( - BaseTest.baseTx, - 'fva1gwr3espfjtz9su9x40p635dgfvm4ph9v048een', - true - ) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); - } - ); - }); + test( + 'query Delegator Withdraw Address', + async () => { + await BaseTest.getClient().distribution + .queryDelegatorWithdrawAddress( + 'iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp' + ) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + } + ); + + test( + 'query Community Pool', + async () => { + await BaseTest.getClient().distribution + .queryCommunityPool() + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + } + ); + + }); + + describe('withdraw Validator Commission', () => { + test( + 'withdraw Validator Commission', + async () => { + await BaseTest.getClient().distribution + .withdrawValidatorCommission('iva1lny43v3y496wj6v05m4xpv8nv9c4ra9q57l4y4', BaseTest.baseTx) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + } + ); + }); + + describe('fund Community Pool', () => { + test( + 'fund Community Pool', + async () => { + const amount: types.Coin[] = [ + { + denom: 'stake', + amount: '1', + }, + ]; + await BaseTest.getClient().distribution + .fundCommunityPool(amount, BaseTest.baseTx) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + } + ); + }); + + describe('Set Withdraw Address', () => { + test( + 'set withdraw address', + async () => { + await BaseTest.getClient().distribution + .setWithdrawAddr('iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp', BaseTest.baseTx) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeOut + ); + }); + + describe('Withdraw Rewards', () => { + test( + 'withdraw delegation rewards from a specified validator', + async () => { + + await BaseTest.getClient() + .distribution.withdrawRewards( + 'iva1lny43v3y496wj6v05m4xpv8nv9c4ra9q57l4y4', + BaseTest.baseTx, + ) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeOut + ); + }); }); diff --git a/test/htlc.test.ts b/test/htlc.test.ts deleted file mode 100644 index 433e9bb0..00000000 --- a/test/htlc.test.ts +++ /dev/null @@ -1,101 +0,0 @@ -import {BaseTest} from "./basetest"; -import * as types from '../src/types'; - -describe('test', () => { - var originalTimeout; - beforeEach(function() { - originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; - jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000000; - }); - test('example', async () => { - const target = 'faa1gwr3espfjtz9su9x40p635dgfvm4ph9v6ydky5' - let secret = undefined - let sleep = function(ms: number) { - return new Promise(resolve => setTimeout(resolve, ms)) - } - let qaClient = BaseTest.getQaClient(); - let devClient = BaseTest.getDevClient(); - await devClient.bank.queryAccount(target).then(res => console.log({"address": res.address, "coins": res.coins})).catch(e => console.error(e)) - let devHtlc: types.CreateHTLCResult = await devClient.htlc.create( - BaseTest.testTx, - target, - "qa", - [{ - denom: 'iris-atto', - amount: '3000000000000000000', - }], - '', '1000', ''); - console.info(devHtlc.secret) - console.info(devHtlc.hashLock) - await qaClient.bank.queryAccount(target).then(res => console.log({"address": res.address, "coins": res.coins})).catch(e => console.error(e)) - let qaHtlc: types.CreateHTLCResult = await qaClient.htlc.create( - BaseTest.testTx, - target, - "dev", - [{ - denom: 'iris-atto', - amount: '7000000000000000000', - }], - '', '100', devHtlc.hashLock + ''); - setTimeout(()=>{ - qaClient.htlc.claim(BaseTest.testTx, devHtlc.hashLock + '', devHtlc.secret + '').then(res => console.info(res)) - }, 10000) - while(!secret) { - try { - var queryHTLCResult = await qaClient.htlc.queryHTLC(devHtlc.hashLock+''); - console.log(queryHTLCResult) - secret = queryHTLCResult.secret - } catch (e) { - console.log('not found secret in qa htlc') - } - await sleep(3000) - } - devClient.htlc.claim(BaseTest.testTx, devHtlc.hashLock + '', secret).then(res => console.info(res)) - await sleep(5000) - await devClient.bank.queryAccount(target).then(res => console.log({"address": res.address, "coins": res.coins})).catch(e => console.error(e)) - await qaClient.bank.queryAccount(target).then(res => console.log({"address": res.address, "coins": res.coins})).catch(e => console.error(e)) - }) -}) - -describe('htlc', () => { - test('query htlc', async () => { - await BaseTest.getDevClient().htlc.queryHTLC('8ae0378a625cc8eda88ae35be2e3aae506298182d39fea3c0ce8f6e30cffdab4') - .then(res => { - console.log(JSON.stringify(res)); - }).catch(error => { - console.log(error); - }); - }); - test('create htlc', async () => { - BaseTest.getQaClient().htlc.create( - BaseTest.testTx, - "faa14utpczlzcefq7rtf6h5cp6zxj7lxp5z2yvlmgl", - "", - [{ - denom: 'iris-atto', - amount: '3000000000000000000', - }], - '', '1000', '6e8765153ae2964d66a213a2c0c152153a480695d9c393eb34e79c8458897f01', '' - ).then(res => { - console.log(JSON.stringify(res)); - }).catch(error => { - console.log(error); - }); - }); - test('claim htlc', async () => { - await BaseTest.getDevClient().htlc.claim(BaseTest.testTx, "8ae0378a625cc8eda88ae35be2e3aae506298182d39fea3c0ce8f6e30cffdab4", "17cfe0385ad68e820bcaa78f7b3883485153c715a63f349703cc6cf4736b0531") - .then(res => { - console.log(JSON.stringify(res)); - }).catch(error => { - console.log(error); - }); - }); - test('refund htlc', async () => { - await BaseTest.getDevClient().htlc.refund(BaseTest.testTx, "4131689eaf58210992841a9aabe37980225def96ae8f85849b18a95ce7746769") - .then(res => { - console.log(JSON.stringify(res)); - }).catch(error => { - console.log(error); - }); - }); -}); \ No newline at end of file diff --git a/test/keys.test.ts b/test/keys.test.ts index 55c26dd4..cef8b4ae 100644 --- a/test/keys.test.ts +++ b/test/keys.test.ts @@ -6,16 +6,16 @@ test('Keys', () => { // Create a new key const addedKey = client.keys.add('name1', password); - expect(addedKey.address.substring(0, 3)).toBe('faa'); + expect(addedKey.address.substring(0, 3)).toBe('iaa'); expect(addedKey.mnemonic.split(' ').length).toBe(24); - // Recover a key + /*// Recover a key const recoveredKeyAddr = client.keys.recover( 'name2', password, addedKey.mnemonic ); - expect(recoveredKeyAddr).toBe(addedKey.address); + expect(recoveredKeyAddr).toBe(addedKey.address);*/ // Export keystore of a key const keystore = client.keys.export('name1', password, password); @@ -36,3 +36,18 @@ test('Keys', () => { client.keys.show('name1'); }).toThrow("Key with name 'name1' not found"); }); + +test('recover', () => { + const client = BaseTest.getClient(); + const nmemonic = 'fatigue panther innocent dress person fluid animal raven material embark target spread kiss smile cycle begin rocket pull couple story mass analyst guilt network' + const key = client.keys.recover('', 'test',nmemonic); + console.log(key) +}); + +test('add', () => { + const client = BaseTest.getClient(); + const key = client.keys.add('', 'test'); + console.log(key) +}); + + diff --git a/test/my.test.ts b/test/my.test.ts index 49eab124..2d545dee 100644 --- a/test/my.test.ts +++ b/test/my.test.ts @@ -1,179 +1,4 @@ // import * as iris from '../src'; import { Utils, Crypto, AddressUtils, StoreKeys } from '../src/utils'; - -// export interface SdkError {} -// export interface Block {} -// export interface BlockHeader {} -// export interface TxResult {} -// export interface ValidatorUpdates {} - -// export class EventListener { -// private url: string; -// private ws: WebSocket; -// private em: EventEmitter; - -// constructor(url: string) { -// this.url = url; -// } - -// connect(): void { -// this.ws = new WebSocket(this.url); -// this.em = new EventEmitter(); -// this.ws.on('data', data => { -// // 根据请求ID将监听到的数据路由给指定的订阅者 -// this.em.emit(data.id, data.error, data.result); -// }); -// this.ws.on('error', err => { -// this.em.emit('error', err); -// }); -// // on xxx -// } - -// disconnect(): void { -// this.ws.destroy(); -// } - -// subscribeNewBlock(callback: (block: Block) => any): Subscription { -// callback('Block'); -// } - -// subscribeNewBlockHeader( -// callback: (blockHeader: BlockHeader) => any -// ): Subscription { -// callback('BlockHeader'); -// } - -// subscribeValidatorSetUpdates( -// callback: (validatorUpdates: ValidatorUpdates) => any -// ): Subscription { -// callback('validatorUpdates'); -// } - -// // Tx 订阅不应再细分具体类型,因为订阅参数中可能不包含 `action` -// subscribeTx( -// query: EventQueryBuilder, -// callback: (tx: TxResult) => any -// ): Subscription { -// // 发送订阅请求 -// // 监听 -// // Decode -// // 回调 -// callback('TxResult'); -// } - -// onError(callback: (error: SdkError) => any): void {} -// } - -// export class Subscription { -// private query: EventQueryBuilder; -// unsubscribe() {} -// } - -// export class EventQueryBuilder { -// condition: Map; -// addCondition(event: Event, value: string): EventQueryBuilder {} -// build(): string {} -// } - -// export enum Event { -// Action = 0, -// Sender, -// Recipient, -// xxx, -// } - -// export class EventAction { -// Send = 'send'; -// Burn = 'burn'; -// SetMemoRegexp = 'set-memo-regexp'; -// xxx; -// } - -// describe('Tests', () => { -// test('Test', () => { -// const listener = new EventLisener(); -// listener.subscribeNewBlock(function(error: string, block: Block) { -// console.log(block); -// }); -// }); -// }); - -// Test events -import { EventListener } from '../src/nets/event-listener'; -import { marshalTx, unmarshalTx, unmarshalPubKey } from '@irisnet/amino-js'; -import { base64ToBytes, bytesToBase64, bytesToJSON } from '@tendermint/belt'; -import * as iris from '../src'; -import * as Amino from '@irisnet/amino-js'; import { BaseTest } from './basetest'; - -test('test client', async () => { - // Init Client - // const client = iris.newClient({ - // node: 'http://localhost:26657', - // network: iris.Network.Testnet, - // chainId: 'test', - // }); - - // client.eventListener.connect(); - // client.eventListener.subscribeNewBlock((err, data) => { - // console.log(JSON.stringify(data)); - // }); - // await timeout(100000); - // // eventListener.disconnect(); - // await timeout(5000000); - - // const bytes = Crypto.decodeAndConvert( - // 'fcp1zcjduepq0yn2e94aq07uvlzu65jtknyp9an68w5jlngrmxyhhvwdgykm3z5q0uwxg2' - // ); - // console.log(bytes); - // const bech = Uint8Array.from(bytes); - - // const pk = unmarshalPubKey(bech, false); - - BaseTest.getClient().slashing.querySigningInfo( - 'fca1f46x0s36d5ajjqjurt3znhqfdulyf7zlazpj8n' - ).then(res => console.log(res)).catch(err => console.log(err)); - await timeout(5000); -}, 10000000); - -function timeout(ms: number) { - return new Promise(resolve => { - setTimeout(resolve, ms); - }); -} - -// const WebSocket = require('ws'); -// test('Crypto', async () => { -// const eventListener: any = {}; -// const subscriptions = {}; - -// const ws = new WebSocket('wss://echo.websocket.org/', { -// origin: 'https://websocket.org', -// }); - -// ws.on('open', function open() { -// console.log('connected'); -// // Initialize subscriptions on connected -// eventListener.subscribeAll(subscriptions); -// setTimeout(() => { -// // ws.send("call health"); -// }, 5000); -// }); - -// ws.on('close', function close() { -// console.log('disconnected'); -// }); - -// ws.on('message', function incoming(data: any) { - -// }); - -// await timeout(1000000); -// }, 1000000); - -// function timeout(ms: number) { -// return new Promise(resolve => { -// setTimeout(resolve, ms); -// }); -// } diff --git a/test/nft.test.ts b/test/nft.test.ts new file mode 100644 index 00000000..bfa77135 --- /dev/null +++ b/test/nft.test.ts @@ -0,0 +1,225 @@ +import { BaseTest } from './basetest'; +import * as is from "is_js"; + +const timeout = 999999; + +function randomStr(length:number):string{ + let random = ''; + let lexicon = 'abcdefghijklmnopqrstuvwxyz' + for (let i=0; i { + describe('nft tx', () => { + test( + 'nft tx', + async () => { + let denom_id = randomStr(4); + let denom_name = randomStr(4); + let denom_schema = randomStr(10); + + await BaseTest.getClient() + .nft.issueDenom( + denom_id, + denom_name, + denom_schema, + BaseTest.baseTx + ) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + + let nft_id = randomStr(7); + let nft_name = randomStr(7); + let nft_data = randomStr(7); + let nft_uri = `http://${randomStr(7)}`; + await BaseTest.getClient() + .nft.mintNft( + nft_id, + denom_id, + nft_name, + nft_uri, + nft_data, + '', + BaseTest.baseTx + ) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + + let nft_name_e = randomStr(7);; + let nft_data_e = randomStr(7);; + let nft_uri_e = `http://${randomStr(7)}`; + await BaseTest.getClient() + .nft.editNft( + nft_id, + denom_id, + { + name:nft_name_e, + data:nft_data_e, + uri:nft_uri_e + }, + BaseTest.baseTx + ) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + + await BaseTest.getClient() + .nft.transferNft( + nft_id, + denom_id, + 'iaa1gytgufwqkz9tmhjgljfxd3qcwpdzymj6022q3w', + {}, + BaseTest.baseTx + ) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + + nft_id = randomStr(7); + nft_name = randomStr(7); + nft_data = randomStr(7); + nft_uri = `http://${randomStr(7)}`; + await BaseTest.getClient() + .nft.mintNft( + nft_id, + denom_id, + nft_name, + nft_uri, + nft_data, + '', + BaseTest.baseTx + ) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + + await BaseTest.getClient() + .nft.burnNft( + nft_id, + denom_id, + BaseTest.baseTx + ) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + }); + + describe('query nft', () => { + test( + 'query Supply', + async () => { + await BaseTest.getClient() + .nft.querySupply('bczd','iaa1gytgufwqkz9tmhjgljfxd3qcwpdzymj6022q3w') + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + + test( + 'query Owner', + async () => { + await BaseTest.getClient() + .nft.queryOwner('iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp','rzfj') + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + + test( + 'query Collection', + async () => { + await BaseTest.getClient() + .nft.queryCollection('rzfj') + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + + test( + 'query Denom', + async () => { + await BaseTest.getClient() + .nft.queryDenom('rzfj') + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + + test( + 'query Denoms', + async () => { + await BaseTest.getClient() + .nft.queryDenoms() + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + + test( + 'query NFT', + async () => { + await BaseTest.getClient() + .nft.queryNFT('rzfj','bbzrsib') + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + }); +}); diff --git a/test/protobuf.test.ts b/test/protobuf.test.ts new file mode 100644 index 00000000..7565c73e --- /dev/null +++ b/test/protobuf.test.ts @@ -0,0 +1,65 @@ +import { BaseTest } from './basetest'; + + +describe('protobuf Tests', () => { + test( + 'deserialize Tx', + async () => { + let tx_proto = 'CpwBCpkBCiEvY29zbW9zLmJhbmsudjFiZXRhMS5Nc2dNdWx0aVNlbmQSdAo4CippYWExNHg4YTd5ODhweTl4a3ZreHpsZDNqeGhncGpwbTAzd2hydXp3enASCgoFc3Rha2USATESOAoqaWFhMWd5dGd1Zndxa3o5dG1oamdsamZ4ZDNxY3dwZHp5bWo2MDIycTN3EgoKBXN0YWtlEgExEmQKUApGCh8vY29zbW9zLmNyeXB0by5zZWNwMjU2azEuUHViS2V5EiMKIQIjolBAYHY8vGL2QlFqFYoLKbai75xRK5/hf4/ZcrqbQRIECgIIARgFEhAKCgoFc3Rha2USATIQwJoMGkAI44tlZd+mIMCup6NsiXAhlcp+WSJ9rquD3/0hOIKP1BTi1cS8UHf0EUDc/v2a5fIn/dlfYUzeLGDv7mcV8U2T'; + let tx = BaseTest.getClient().protobuf.deserializeTx(tx_proto); + console.log('tx:',tx); + } + ); + + test( + 'unpack Msg', + async () => { + let msg_proto = { + typeUrl: '/cosmos.bank.v1beta1.MsgMultiSend', + value: 'CjgKKmlhYTE0eDhhN3k4OHB5OXhrdmt4emxkM2p4aGdwanBtMDN3aHJ1end6cBIKCgVzdGFrZRIBMRI4CippYWExZ3l0Z3Vmd3Frejl0bWhqZ2xqZnhkM3Fjd3BkenltajYwMjJxM3cSCgoFc3Rha2USATE=' + }; + let msg = BaseTest.getClient().protobuf.unpackMsg(msg_proto); + console.log('msg:',msg); + } + ); + + test( + 'deserialize Sign Doc', + async () => { + let signDoc_proto = ' CocBCoQBChwvY29zbW9zLmJhbmsudjFiZXRhMS5Nc2dTZW5kEmQKKmlhYTE0eDhhN3k4OHB5OXhrdmt4emxkM2p4aGdwanBtMDN3aHJ1end6cBIqaWFhMWd5dGd1Zndxa3o5dG1oamdsamZ4ZDNxY3dwZHp5bWo2MDIycTN3GgoKBXN0YWtlEgExEmQKUApGCh8vY29zbW9zLmNyeXB0by5zZWNwMjU2azEuUHViS2V5EiMKIQIjolBAYHY8vGL2QlFqFYoLKbai75xRK5/hf4/ZcrqbQRIECgIIARgMEhAKCgoFc3Rha2USATIQwJoMGgR0ZXN0IAg='; + let signDoc = BaseTest.getClient().protobuf.deserializeSignDoc(signDoc_proto); + console.log('signDoc:',signDoc); + } + ); + + test( + 'deserialize Tx Raw', + async () => { + let txRaw_proto = 'CocBCoQBChwvY29zbW9zLmJhbmsudjFiZXRhMS5Nc2dTZW5kEmQKKmlhYTE0eDhhN3k4OHB5OXhrdmt4emxkM2p4aGdwanBtMDN3aHJ1end6cBIqaWFhMWd5dGd1Zndxa3o5dG1oamdsamZ4ZDNxY3dwZHp5bWo2MDIycTN3GgoKBXN0YWtlEgExEmQKUApGCh8vY29zbW9zLmNyeXB0by5zZWNwMjU2azEuUHViS2V5EiMKIQIjolBAYHY8vGL2QlFqFYoLKbai75xRK5/hf4/ZcrqbQRIECgIIARgMEhAKCgoFc3Rha2USATIQwJoMGkC3fIfYTv48lJUY7198d4xcM11vHHVfBeZTokqJ728hYRp7IJMXKrYJGHsgKcd5mudWgDrHTJy3sordNELcwaoK'; + let txRaw = BaseTest.getClient().protobuf.deserializeTxRaw(txRaw_proto); + console.log('txRaw:',txRaw); + } + ); + + test( + 'deserialize Signing Info', + async () => { + let signingInfo_proto = 'CippY2Exd3JkNWMybjd4Y205N3l5enJrc3pjcWdhMjNzY3RseGc5NHk2dWoYxJ4FIgA'; + let signingInfo = BaseTest.getClient().protobuf.deserializeSigningInfo(signingInfo_proto); + console.log('signingInfo:',signingInfo); + } + ); + + test( + 'deserialize Signing Info', + async () => { + let pubKey_proto = { + "typeUrl":"/cosmos.crypto.ed25519.PubKey", + "value":"CiAXbTnFxwWEocyc0QcXC0cvMNWM9oYYG5Kc7TBHw6YS+g==" + }; + let pubKey = BaseTest.getClient().protobuf.deserializePubkey(pubKey_proto); + console.log('pubKey:',pubKey); + } + ); + +}); diff --git a/test/staking.test.ts b/test/staking.test.ts index a1f2fbac..7b0539f9 100644 --- a/test/staking.test.ts +++ b/test/staking.test.ts @@ -1,159 +1,199 @@ import { BaseTest } from './basetest'; -import * as types from '../src/types'; describe('Staking Tests', () => { describe('Query', () => { test('query delegation', async () => { await BaseTest.getClient() .staking.queryDelegation( - 'faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7', - 'fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e' + 'iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp', + 'iva1lny43v3y496wj6v05m4xpv8nv9c4ra9q57l4y4' ) .then(res => { - console.log(JSON.stringify(res)); + console.log(res); }) .catch(error => { console.log(error); }); }); - test('query delegations of a delegator', async () => { + + test('query unbonding delegation', async () => { await BaseTest.getClient() - .staking.queryDelegations('faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7') + .staking.queryUnbondingDelegation( + 'iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp', + 'iva1lny43v3y496wj6v05m4xpv8nv9c4ra9q57l4y4' + ) .then(res => { - console.log(JSON.stringify(res)); + console.log(res); }) .catch(error => { console.log(error); }); }); - test('query unbonding delegation', async () => { + + test('query delegations of a delegator', async () => { await BaseTest.getClient() - .staking.queryUnbondingDelegation( - 'faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7', - 'fva1gwr3espfjtz9su9x40p635dgfvm4ph9v048een' - ) + .staking.queryDelegations({ + delegator_addr:'iaa1eqvkfthtrr93g4p9qspp54w6dtjtrn27ar7rpw' + }) .then(res => { - console.log(JSON.stringify(res)); + console.log(res); }) .catch(error => { console.log(error); }); }); + test('query unbonding delegations of a delegator', async () => { await BaseTest.getClient() - .staking.queryUnbondingDelegations( - 'faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7' + .staking.queryDelegatorUnbondingDelegations( + { + delegator_addr:'iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp', + } ) .then(res => { - console.log(JSON.stringify(res)); + console.log(res); }) .catch(error => { console.log(error); }); }); - test('query redelegation', async () => { + + test('query redelegation', async () => {//TODO(lsc) there is only one node in current blockchain net, redelegate tx can not work properly await BaseTest.getClient() .staking.queryRedelegation( - 'faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7', - 'fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e', - 'fva1gwr3espfjtz9su9x40p635dgfvm4ph9v048een' + { + delegator_addr:'iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp', + /*src_validator_addr:'iva1svannhv2zaxefq83m7treg078udfk37lpjufkw', + dst_validator_addr:'iva1g5uv7khupczd6w03a7t066mwjdx9zkma82rnk0',*/ + } ) .then(res => { - console.log(JSON.stringify(res)); + console.log(res); }) .catch(error => { console.log(error); }); }); - test('query redelegations of a delegator', async () => { + + test('query all validators info for given delegator', async () => { await BaseTest.getClient() - .staking.queryRedelegations( - 'faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7' + .staking.queryDelegatorValidators( + { + delegator_addr:'iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp', + } ) .then(res => { - console.log(JSON.stringify(res)); + console.log(res); }) .catch(error => { console.log(error); }); }); - test('query delegations to a validator', async () => { + + test('queries validator info for given delegator validator', async () => { await BaseTest.getClient() - .staking.queryDelegationsTo( - 'fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e' + .staking.queryDelegatorValidator( + { + delegator_addr:'iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp', + validator_addr:'iva1lny43v3y496wj6v05m4xpv8nv9c4ra9q57l4y4', + } ) .then(res => { - console.log(JSON.stringify(res)); + console.log(res); }) .catch(error => { console.log(error); }); }); - test('query unbonding delegations from a validator', async () => { + test('queries the historical info for given height', async () => {//TODO(lsc) what can this api do? await BaseTest.getClient() - .staking.queryUnbondingDelegationsFrom( - 'fva1gwr3espfjtz9su9x40p635dgfvm4ph9v048een' + .staking.queryHistoricalInfo( + { + height:1000, + } ) .then(res => { - console.log(JSON.stringify(res)); + console.log(res); }) .catch(error => { console.log(error); }); }); - test('query redelegations from a validator', async () => { + test('query pool', async () => { await BaseTest.getClient() - .staking.queryRedelegationsFrom( - 'fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e' - ) + .staking.queryPool() .then(res => { - console.log(JSON.stringify(res)); + console.log(res); }) .catch(error => { console.log(error); }); }); - test('query a validator', async () => { + test('query params', async () => { await BaseTest.getClient() - .staking.queryValidator('fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e') + .staking.queryParams() .then(res => { - console.log(JSON.stringify(res)); + console.log(res); }) .catch(error => { console.log(error); }); }); - test('query all validators', async () => { + test('query delegations to a validator', async () => { await BaseTest.getClient() - .staking.queryValidators(1) + .staking.queryValidatorDelegations( + { + validator_addr:'iva1lny43v3y496wj6v05m4xpv8nv9c4ra9q57l4y4' + } + ) .then(res => { - console.log(JSON.stringify(res)); + console.log(res); }) .catch(error => { console.log(error); }); }); - test('query pool', async () => { + test('query undelegating delegations from a validator', async () => { await BaseTest.getClient() - .staking.queryPool() + .staking.queryValidatorUnbondingDelegations( + { + validator_addr:'iva1lny43v3y496wj6v05m4xpv8nv9c4ra9q57l4y4' + } + ) .then(res => { - console.log(JSON.stringify(res)); + console.log(res); }) .catch(error => { console.log(error); }); }); - test('query params', async () => { + test('query a validator', async () => { await BaseTest.getClient() - .staking.queryParams() + .staking.queryValidator('iva1lny43v3y496wj6v05m4xpv8nv9c4ra9q57l4y4') + .then(res => { + console.log(res); + }) + .catch(error => { + console.log(error); + }); + }); + + test('query all validators', async () => { + await BaseTest.getClient() + .staking.queryValidators({ + page:1, + size:100, + count_total:true, + //status:'Bonded', + }) .then(res => { - console.log(JSON.stringify(res)); + console.log(res); }) .catch(error => { console.log(error); @@ -165,12 +205,12 @@ describe('Staking Tests', () => { test('delegate', async () => { await BaseTest.getClient() .staking.delegate( - 'fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e', - { denom: 'iris-atto', amount: '5000000000000000000' }, + 'iva1geqzj2jjeqgurpu8u9x4asq5m6rw5lm7nn22c2', + { denom: 'ubif', amount: '5' }, BaseTest.baseTx ) .then(res => { - console.log(JSON.stringify(res)); + console.log(res); }) .catch(error => { console.log(error); @@ -181,12 +221,12 @@ describe('Staking Tests', () => { test('unbond', async () => { await BaseTest.getClient() .staking.undelegate( - 'fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e', - '100000000000000000', + 'iva1g5uv7khupczd6w03a7t066mwjdx9zkma82rnk0', + { denom: 'ubif', amount: '1' }, BaseTest.baseTx ) .then(res => { - console.log(JSON.stringify(res)); + console.log(res); }) .catch(error => { console.log(error); @@ -197,13 +237,13 @@ describe('Staking Tests', () => { test('redelegate', async () => { await BaseTest.getClient() .staking.redelegate( - 'fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e', - 'fva1nl2dxgelxu9ektxypyul8cdjp0x3ksfqdevc4e', - '10000000000000000', + 'iva1geqzj2jjeqgurpu8u9x4asq5m6rw5lm7nn22c2', + 'iva1736ypcrmwvurylfprfgmjwr625c6ycdv8uyjlp', + { denom: 'ubif', amount: '1' }, BaseTest.baseTx ) .then(res => { - console.log(JSON.stringify(res)); + console.log(res); }) .catch(error => { console.log(error); diff --git a/test/tendermint.test.ts b/test/tendermint.test.ts index 77d000d7..81db1c6f 100644 --- a/test/tendermint.test.ts +++ b/test/tendermint.test.ts @@ -18,11 +18,12 @@ describe('Tendermint Tests', () => { }, timeout ); + test( 'query block by height', async () => { await BaseTest.getClient() - .tendermint.queryBlock(2) + .tendermint.queryBlock(196) .then(res => { console.log(JSON.stringify(res)); }) @@ -32,6 +33,7 @@ describe('Tendermint Tests', () => { }, timeout ); + test( 'query latest block result', async () => { @@ -46,11 +48,12 @@ describe('Tendermint Tests', () => { }, timeout ); + test( 'query block result by height', async () => { await BaseTest.getClient() - .tendermint.queryBlockResult(10996) + .tendermint.queryBlockResult(196) .then(res => { console.log(JSON.stringify(res)); }) @@ -60,12 +63,13 @@ describe('Tendermint Tests', () => { }, timeout ); + test( 'query tx by hash', async () => { await BaseTest.getClient() .tendermint.queryTx( - '0D0B65520771CE6F74267230B30C14F64EE732751EDA79547FCA881841BA5E51' + '46A832D1509A1BF5B0F3559E1CF931A6006144D2A487E0A36D3120E6205B1FF7' ) .then(res => { console.log(JSON.stringify(res)); @@ -76,6 +80,7 @@ describe('Tendermint Tests', () => { }, timeout ); + test( 'query latest validators', async () => { @@ -90,6 +95,7 @@ describe('Tendermint Tests', () => { }, timeout ); + test( 'query validators by height', async () => { @@ -104,6 +110,7 @@ describe('Tendermint Tests', () => { }, timeout ); + test( 'search txs', async () => { @@ -121,4 +128,19 @@ describe('Tendermint Tests', () => { }, timeout ); + + test( + 'query Net Info', + async () => { + await BaseTest.getClient() + .tendermint.queryNetInfo() + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); }); diff --git a/test/token.test.ts b/test/token.test.ts new file mode 100644 index 00000000..d46e2206 --- /dev/null +++ b/test/token.test.ts @@ -0,0 +1,135 @@ +import {BaseTest} from './basetest'; + +const timeout = 10000; + +describe('Token Tests', () => { + test( + 'query tokens', + async () => { + await BaseTest.getClient().token.queryTokens('iaa1eqvkfthtrr93g4p9qspp54w6dtjtrn27ar7rpw').then((res) => { + console.log(res); + }).catch(error => { + console.log(error); + }); + }, + timeout + ); + test( + 'query token', + async () => { + await BaseTest.getClient() + .token.queryToken('coin') + .then(res => { + console.log(res); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + test( + 'query fees', + async () => { + await BaseTest.getClient() + .token.queryFees('coin') + .then(res => { + console.log(res); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + test( + 'query parameters', + async () => { + await BaseTest.getClient() + .token.queryParameters() + .then(res => { + console.log(res); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + test( + 'issue token', + async () => { + await BaseTest.getClient() + .token.issueToken({ + symbol: 'BTC', + name: 'test', + scale: 6, + min_unit: 'btc', + initial_supply: 1000000, + max_supply: 10000000, + mintable: true, + }, BaseTest.baseTx) + .then(res => { + console.log(res); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + test( + 'edit token', + async () => { + await BaseTest.getClient() + .token.editToken({ + symbol: 'coinzz', + name: 'abc', + mintable: 'true', + max_supply: 10000000, + }, BaseTest.baseTx) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + test( + 'mint token', + async () => { + await BaseTest.getClient() + .token.mintToken({ + symbol: 'coinzz', + amount: 99, + to: 'iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp', + }, BaseTest.baseTx) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + test( + 'transfer token owner', + async () => { + await BaseTest.getClient() + .token.transferTokenOwner({ + symbol: 'coin', + dst_owner: 'iaa1eqvkfthtrr93g4p9qspp54w6dtjtrn27ar7rpw' + }, BaseTest.baseTx) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); +}); diff --git a/test/tx.test.ts b/test/tx.test.ts index 7f36f7ee..98ff5ee8 100644 --- a/test/tx.test.ts +++ b/test/tx.test.ts @@ -1,87 +1,115 @@ import { BaseTest } from './basetest'; import * as types from '../src/types'; +let timeout = 9999; + describe('Tx Tests', () => { - const unsignedTx: types.Tx = { - type: 'irishub/bank/StdTx', - value: { - msg: [ - { - type: 'irishub/bank/Send', - value: { - inputs: [ - { - address: 'faa1gwr3espfjtz9su9x40p635dgfvm4ph9v6ydky5', - coins: [{ denom: 'iris-atto', amount: '1000000000000000000' }], - }, - ], - outputs: [ - { - address: 'faa1nl2dxgelxu9ektxypyul8cdjp0x3ksfqcgxhg7', - coins: [{ denom: 'iris-atto', amount: '1000000000000000000' }], - }, - ], - }, - }, - ], - fee: { - amount: [{ denom: 'iris-atto', amount: '600000000000000000' }], - gas: '100000', - }, - signatures: [], - memo: '', + const amount: types.Coin[] = [ + { + denom: 'stake', + amount: '1', + }, + ]; + + const msgs: any[] = [ + { + type:types.TxType.MsgSend, + value:{ + from_address:'iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp', + to_address:'iaa1eqvkfthtrr93g4p9qspp54w6dtjtrn27ar7rpw', + amount + } + } + ]; + + const moreMessages: any[] = [ + { + type:types.TxType.MsgSend, + value:{ + from_address:'iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp', + to_address:'iaa1eqvkfthtrr93g4p9qspp54w6dtjtrn27ar7rpw', + amount + } }, - }; + { + type:types.TxType.MsgSend, + value:{ + from_address:'iaa14x8a7y88py9xkvkxzld3jxhgpjpm03whruzwzp', + to_address:'iaa1eqvkfthtrr93g4p9qspp54w6dtjtrn27ar7rpw', + amount + } + } + ]; - let signedTx: types.Tx; + describe('watch/cold wallet', () => { + test('watch/cold wallet tx', async () => { + let baseTx = {...BaseTest.baseTx}; + baseTx.account_number = '8'; + baseTx.sequence = '356'; + // watch wallet + let unsignedStdTx = BaseTest.getClient().tx.buildTx(msgs, baseTx); + let unsignedTxModel = unsignedStdTx.getProtoModel(); + let unsignedTxStr = Buffer.from(unsignedTxModel.serializeBinary()).toString('base64'); + // cold wallet + let recover_unsigned_tx_model = BaseTest.getClient().protobuf.deserializeTx(unsignedTxStr, true); + let recover_unsigned_std_tx = BaseTest.getClient().tx.newStdTxFromProtoTxModel(recover_unsigned_tx_model); + let recover_signed_std_tx = await BaseTest.getClient().tx.sign(recover_unsigned_std_tx, baseTx); + let recover_signed_std_tx_str = Buffer.from(recover_signed_std_tx.getProtoModel().serializeBinary()).toString('base64'); + // watch wallet + let signed_std_tx = BaseTest.getClient().tx.newStdTxFromProtoTxModel(BaseTest.getClient().protobuf.deserializeTx(recover_signed_std_tx_str, true)); + await BaseTest.getClient().tx.broadcast(signed_std_tx, baseTx.mode).then(res=>{ + console.log(res); + }).catch(error => { + console.log(error); + }); + }); + }); + + let signedTx:any; describe('Signing', () => { test('sign tx online', async () => { - await BaseTest.getClient() - .tx.sign(unsignedTx, BaseTest.baseTx.from, BaseTest.baseTx.password) - .then(res => { - console.log(JSON.stringify(res)); - signedTx = res; - }) - .catch(error => { - console.log(error); - }); + let unsignedTx = BaseTest.getClient().tx.buildTx(msgs, BaseTest.baseTx); + signedTx = await BaseTest.getClient().tx.sign(unsignedTx, BaseTest.baseTx); + console.log(signedTx); }); test('sign tx offline', async () => { - unsignedTx.value.signatures = [ - { - account_number: signedTx.value.signatures[0].account_number, - sequence: signedTx.value.signatures[0].sequence, - }, - ]; - console.log(JSON.stringify(unsignedTx)); - await BaseTest.getClient() - .tx.sign( - unsignedTx, - BaseTest.baseTx.from, - BaseTest.baseTx.password, - true - ) - .then(res => { - console.log(JSON.stringify(res)); - }) - .catch(error => { - console.log(error); - }); + let baseTx = {...BaseTest.baseTx}; + baseTx.account_number = '8'; + baseTx.sequence = '356'; + let unsignedTx = BaseTest.getClient().tx.buildTx(msgs, BaseTest.baseTx); + + let offlineSignedTx = await BaseTest.getClient().tx.sign(unsignedTx,baseTx); + console.log(offlineSignedTx); }); }); describe('Broadcast', () => { test('broadcast tx', async () => { - await BaseTest.getClient() - .tx.broadcast(signedTx, types.BroadcastMode.Commit) + await BaseTest.getClient() + .tx.broadcast(signedTx, types.BroadcastMode.Commit) + .then(res => { + console.log(JSON.stringify(res)); + }) + .catch(error => { + console.log(error); + }); + }, + timeout + ); + + test('more messages', async () => { + await BaseTest.getClient() + .tx.buildAndSend(moreMessages,BaseTest.baseTx) .then(res => { - console.log(JSON.stringify(res)); + console.log(JSON.stringify(res)); }) .catch(error => { console.log(error); - }); - }); + });; + }, + timeout + ); }); }); diff --git a/tsconfig.json b/tsconfig.json index 3cc238b4..201b1ff3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,21 +1,31 @@ { - "extends": "./node_modules/gts/tsconfig-google.json", - "allowJs": true, - "compilerOptions": { - "target": "es6", - "module": "commonjs", - "outDir": "dist", - "sourceMap": true, - "types": ["jest", "node"], - "resolveJsonModule": true, - }, - "typedocOptions": { - "mode": "file", - "inputFiles": ["./src"], - "out": "docs" - }, - "include": [ - "src/**/*.ts", - "test/**/*.ts", "test/jest.config.js" - ] + "extends": "./node_modules/gts/tsconfig-google.json", + "allowJs": true, + "compilerOptions": { + "target": "es6", + "module": "ESNext", + "outDir": "dist/src", + "lib": ["dom", "esnext"], + "strict": true, + "importHelpers": true, + "declaration": true, + "sourceMap": true, + "esModuleInterop": true, + "moduleResolution": "node", + "types": [ + "jest", + "node" + ], + "resolveJsonModule": true + }, + "typedocOptions": { + "mode": "file", + "inputFiles": [ + "./src" + ], + "out": "docs" + }, + "include": [ + "src/**/*.ts" + ] } diff --git a/yarn.lock b/yarn.lock index 7d0b8c1a..5e78d18a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,52 +9,43 @@ dependencies: "@babel/highlight" "^7.8.3" -"@babel/compat-data@^7.8.4": - version "7.8.5" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.8.5.tgz#d28ce872778c23551cbb9432fc68d28495b613b9" - integrity sha512-jWYUqQX/ObOhG1UiEkbH5SANsE/8oKXiQWjj7p7xgj9Zmnt//aUvyz4dBkK0HNsS8/cbyC5NmmH87VekW+mXFg== +"@babel/compat-data@^7.8.6", "@babel/compat-data@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.9.0.tgz#04815556fc90b0c174abd2c0c1bb966faa036a6c" + integrity sha512-zeFQrr+284Ekvd9e7KAX954LkapWiOmQtsfHirhxqfdlX6MEC32iRE+pqUGlYIBchdevaCwvzxWGSy/YBNI85g== dependencies: - browserslist "^4.8.5" + browserslist "^4.9.1" invariant "^2.2.4" semver "^5.5.0" "@babel/core@^7.1.0", "@babel/core@^7.7.5": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.4.tgz#d496799e5c12195b3602d0fddd77294e3e38e80e" - integrity sha512-0LiLrB2PwrVI+a2/IEskBopDYSd8BCb3rOvH7D5tzoWd696TBEduBvuLVm4Nx6rltrLZqvI3MCalB2K2aVzQjA== + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e" + integrity sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.4" - "@babel/helpers" "^7.8.4" - "@babel/parser" "^7.8.4" - "@babel/template" "^7.8.3" - "@babel/traverse" "^7.8.4" - "@babel/types" "^7.8.3" + "@babel/generator" "^7.9.0" + "@babel/helper-module-transforms" "^7.9.0" + "@babel/helpers" "^7.9.0" + "@babel/parser" "^7.9.0" + "@babel/template" "^7.8.6" + "@babel/traverse" "^7.9.0" + "@babel/types" "^7.9.0" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" - json5 "^2.1.0" + json5 "^2.1.2" lodash "^4.17.13" resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.4.tgz#35bbc74486956fe4251829f9f6c48330e8d0985e" - integrity sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA== - dependencies: - "@babel/types" "^7.8.3" - jsesc "^2.5.1" - lodash "^4.17.13" - source-map "^0.5.0" - -"@babel/generator@^7.8.6": - version "7.8.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.7.tgz#870b3cf7984f5297998152af625c4f3e341400f7" - integrity sha512-DQwjiKJqH4C3qGiyQCAExJHoZssn49JTMJgZ8SANGgVFdkupcUhLOdkAeoC6kmHZCPfoDG5M0b6cFlSN5wW7Ew== +"@babel/generator@^7.9.0": + version "7.9.4" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.4.tgz#12441e90c3b3c4159cdecf312075bf1a8ce2dbce" + integrity sha512-rjP8ahaDy/ouhrvCoU1E5mqaitWrxwuNGU+dy1EpaoK48jZay4MdkskKGIMHLZNewg8sAsqpGSREJwP0zH3YQA== dependencies: - "@babel/types" "^7.8.7" + "@babel/types" "^7.9.0" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" @@ -74,33 +65,37 @@ "@babel/helper-explode-assignable-expression" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helper-call-delegate@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.8.3.tgz#de82619898aa605d409c42be6ffb8d7204579692" - integrity sha512-6Q05px0Eb+N4/GTyKPPvnkig7Lylw+QzihMpws9iiZQv7ZImf84ZsZpQH7QoWN4n4tm81SnSzPgHw2qtO0Zf3A== - dependencies: - "@babel/helper-hoist-variables" "^7.8.3" - "@babel/traverse" "^7.8.3" - "@babel/types" "^7.8.3" - -"@babel/helper-compilation-targets@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.4.tgz#03d7ecd454b7ebe19a254f76617e61770aed2c88" - integrity sha512-3k3BsKMvPp5bjxgMdrFyq0UaEO48HciVrOVF0+lon8pp95cyJ2ujAh0TrBHNMnJGT2rr0iKOJPFFbSqjDyf/Pg== +"@babel/helper-compilation-targets@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz#dac1eea159c0e4bd46e309b5a1b04a66b53c1dde" + integrity sha512-4mWm8DCK2LugIS+p1yArqvG1Pf162upsIsjE7cNBjez+NjliQpVhj20obE520nao0o14DaTnFJv+Fw5a0JpoUw== dependencies: - "@babel/compat-data" "^7.8.4" - browserslist "^4.8.5" + "@babel/compat-data" "^7.8.6" + browserslist "^4.9.1" invariant "^2.2.4" levenary "^1.1.1" semver "^5.5.0" -"@babel/helper-create-regexp-features-plugin@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.3.tgz#c774268c95ec07ee92476a3862b75cc2839beb79" - integrity sha512-Gcsm1OHCUr9o9TcJln57xhWHtdXbA2pgQ58S0Lxlks0WMGNXuki4+GLfX0p+L2ZkINUGZvfkz8rzoqJQSthI+Q== +"@babel/helper-create-class-features-plugin@^7.8.3": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.9.5.tgz#79753d44017806b481017f24b02fd4113c7106ea" + integrity sha512-IipaxGaQmW4TfWoXdqjY0TzoXQ1HRS0kPpEgvjosb3u7Uedcq297xFqDQiCcQtRRwzIMif+N1MLVI8C5a4/PAA== + dependencies: + "@babel/helper-function-name" "^7.9.5" + "@babel/helper-member-expression-to-functions" "^7.8.3" + "@babel/helper-optimise-call-expression" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.6" + "@babel/helper-split-export-declaration" "^7.8.3" + +"@babel/helper-create-regexp-features-plugin@^7.8.3", "@babel/helper-create-regexp-features-plugin@^7.8.8": + version "7.8.8" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz#5d84180b588f560b7864efaeea89243e58312087" + integrity sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg== dependencies: + "@babel/helper-annotate-as-pure" "^7.8.3" "@babel/helper-regex" "^7.8.3" - regexpu-core "^4.6.0" + regexpu-core "^4.7.0" "@babel/helper-define-map@^7.8.3": version "7.8.3" @@ -128,6 +123,15 @@ "@babel/template" "^7.8.3" "@babel/types" "^7.8.3" +"@babel/helper-function-name@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz#2b53820d35275120e1874a82e5aabe1376920a5c" + integrity sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw== + dependencies: + "@babel/helper-get-function-arity" "^7.8.3" + "@babel/template" "^7.8.3" + "@babel/types" "^7.9.5" + "@babel/helper-get-function-arity@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" @@ -156,16 +160,17 @@ dependencies: "@babel/types" "^7.8.3" -"@babel/helper-module-transforms@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.8.3.tgz#d305e35d02bee720fbc2c3c3623aa0c316c01590" - integrity sha512-C7NG6B7vfBa/pwCOshpMbOYUmrYQDfCpVL/JCRu0ek8B5p8kue1+BCXpg2vOYs7w5ACB9GTOBYQ5U6NwrMg+3Q== +"@babel/helper-module-transforms@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz#43b34dfe15961918707d247327431388e9fe96e5" + integrity sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA== dependencies: "@babel/helper-module-imports" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.6" "@babel/helper-simple-access" "^7.8.3" "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/template" "^7.8.3" - "@babel/types" "^7.8.3" + "@babel/template" "^7.8.6" + "@babel/types" "^7.9.0" lodash "^4.17.13" "@babel/helper-optimise-call-expression@^7.8.3": @@ -198,15 +203,15 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helper-replace-supers@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.3.tgz#91192d25f6abbcd41da8a989d4492574fb1530bc" - integrity sha512-xOUssL6ho41U81etpLoT2RTdvdus4VfHamCuAm4AHxGr+0it5fnwoVdwUJ7GFEqCsQYzJUhcbsN9wB9apcYKFA== +"@babel/helper-replace-supers@^7.8.3", "@babel/helper-replace-supers@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8" + integrity sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA== dependencies: "@babel/helper-member-expression-to-functions" "^7.8.3" "@babel/helper-optimise-call-expression" "^7.8.3" - "@babel/traverse" "^7.8.3" - "@babel/types" "^7.8.3" + "@babel/traverse" "^7.8.6" + "@babel/types" "^7.8.6" "@babel/helper-simple-access@^7.8.3": version "7.8.3" @@ -223,6 +228,16 @@ dependencies: "@babel/types" "^7.8.3" +"@babel/helper-validator-identifier@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz#ad53562a7fc29b3b9a91bbf7d10397fd146346ed" + integrity sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw== + +"@babel/helper-validator-identifier@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz#90977a8e6fbf6b431a7dc31752eee233bf052d80" + integrity sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g== + "@babel/helper-wrap-function@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz#9dbdb2bb55ef14aaa01fe8c99b629bd5352d8610" @@ -233,33 +248,28 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" -"@babel/helpers@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.4.tgz#754eb3ee727c165e0a240d6c207de7c455f36f73" - integrity sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w== +"@babel/helpers@^7.9.0": + version "7.9.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.2.tgz#b42a81a811f1e7313b88cba8adc66b3d9ae6c09f" + integrity sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA== dependencies: "@babel/template" "^7.8.3" - "@babel/traverse" "^7.8.4" - "@babel/types" "^7.8.3" + "@babel/traverse" "^7.9.0" + "@babel/types" "^7.9.0" "@babel/highlight@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797" - integrity sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg== + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.9.0.tgz#4e9b45ccb82b79607271b2979ad82c7b68163079" + integrity sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ== dependencies: + "@babel/helper-validator-identifier" "^7.9.0" chalk "^2.0.0" - esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.8.3", "@babel/parser@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.4.tgz#d1dbe64691d60358a974295fa53da074dd2ce8e8" - integrity sha512-0fKu/QqildpXmPVaRBoXOlyBb3MC+J0A66x97qEfLOMkn3u6nfY5esWogQwi/K0BjASYy4DbnsEWnpNL6qT5Mw== - -"@babel/parser@^7.7.5", "@babel/parser@^7.8.6": - version "7.8.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.7.tgz#7b8facf95d25fef9534aad51c4ffecde1a61e26a" - integrity sha512-9JWls8WilDXFGxs0phaXAZgpxTZhSk/yOYH2hTHC0X1yC7Z78IJfvR1vJ+rmJKq3I35td2XzXzN6ZLYlna+r/A== +"@babel/parser@^7.1.0", "@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": + version "7.9.4" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8" + integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA== "@babel/plugin-proposal-async-generator-functions@^7.8.3": version "7.8.3" @@ -270,6 +280,14 @@ "@babel/helper-remap-async-to-generator" "^7.8.3" "@babel/plugin-syntax-async-generators" "^7.8.0" +"@babel/plugin-proposal-class-properties@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.8.3.tgz#5e06654af5cd04b608915aada9b2a6788004464e" + integrity sha512-EqFhbo7IosdgPgZggHaNObkmO1kNUe3slaKu54d5OWvy+p9QIKOzK1GAEpAIsZtWVtPXUHSMcT4smvDrCfY4AA== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-proposal-dynamic-import@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz#38c4fe555744826e97e2ae930b0fb4cc07e66054" @@ -294,10 +312,18 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" -"@babel/plugin-proposal-object-rest-spread@^7.8.3": +"@babel/plugin-proposal-numeric-separator@^7.8.3": version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.8.3.tgz#eb5ae366118ddca67bed583b53d7554cad9951bb" - integrity sha512-8qvuPwU/xxUCt78HocNlv0mXXo0wdh9VT1R04WU8HGOfaOob26pF+9P5/lYjN/q7DHOX1bvX60hnhOvuQUJdbA== + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz#5d6769409699ec9b3b68684cd8116cedff93bad8" + integrity sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-numeric-separator" "^7.8.3" + +"@babel/plugin-proposal-object-rest-spread@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.0.tgz#a28993699fc13df165995362693962ba6b061d6f" + integrity sha512-UgqBv6bjq4fDb8uku9f+wcm1J7YxJ5nT7WO/jBr0cl0PLKb7t1O6RNR1kZbjgx2LQtsDI9hwoQVmn0yhXeQyow== dependencies: "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-object-rest-spread" "^7.8.0" @@ -310,20 +336,20 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" -"@babel/plugin-proposal-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.8.3.tgz#ae10b3214cb25f7adb1f3bc87ba42ca10b7e2543" - integrity sha512-QIoIR9abkVn+seDE3OjA08jWcs3eZ9+wJCKSRgo3WdEU2csFYgdScb+8qHB3+WXsGJD55u+5hWCISI7ejXS+kg== +"@babel/plugin-proposal-optional-chaining@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz#31db16b154c39d6b8a645292472b98394c292a58" + integrity sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w== dependencies: "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.0" -"@babel/plugin-proposal-unicode-property-regex@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.3.tgz#b646c3adea5f98800c9ab45105ac34d06cd4a47f" - integrity sha512-1/1/rEZv2XGweRwwSkLpY+s60za9OZ1hJs4YDqFHCw0kYWYwL5IFljVY1MYBL+weT1l9pokDO2uhSTLVxzoHkQ== +"@babel/plugin-proposal-unicode-property-regex@^7.4.4", "@babel/plugin-proposal-unicode-property-regex@^7.8.3": + version "7.8.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz#ee3a95e90cdc04fe8cd92ec3279fa017d68a0d1d" + integrity sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.8.3" + "@babel/helper-create-regexp-features-plugin" "^7.8.8" "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-async-generators@^7.8.0": @@ -361,6 +387,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" +"@babel/plugin-syntax-numeric-separator@^7.8.0", "@babel/plugin-syntax-numeric-separator@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz#0e3fb63e09bea1b11e96467271c8308007e7c41f" + integrity sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-object-rest-spread@^7.0.0", "@babel/plugin-syntax-object-rest-spread@^7.8.0": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz#60e225edcbd98a640332a2e72dd3e66f1af55871" @@ -389,6 +422,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" +"@babel/plugin-syntax-typescript@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.8.3.tgz#c1f659dda97711a569cef75275f7e15dcaa6cabc" + integrity sha512-GO1MQ/SGGGoiEXY0e0bSpHimJvxqB7lktLLIq2pv8xG7WZ8IMEle74jIe1FhprHBWjwjZtXHkycDLZXIWM5Wfg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-transform-arrow-functions@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz#82776c2ed0cd9e1a49956daeb896024c9473b8b6" @@ -420,17 +460,17 @@ "@babel/helper-plugin-utils" "^7.8.3" lodash "^4.17.13" -"@babel/plugin-transform-classes@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.3.tgz#46fd7a9d2bb9ea89ce88720477979fe0d71b21b8" - integrity sha512-SjT0cwFJ+7Rbr1vQsvphAHwUHvSUPmMjMU/0P59G8U2HLFqSa082JO7zkbDNWs9kH/IUqpHI6xWNesGf8haF1w== +"@babel/plugin-transform-classes@^7.9.0": + version "7.9.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.2.tgz#8603fc3cc449e31fdbdbc257f67717536a11af8d" + integrity sha512-TC2p3bPzsfvSsqBZo0kJnuelnoK9O3welkUpqSqBQuBF6R5MN2rysopri8kNvtlGIb2jmUO7i15IooAZJjZuMQ== dependencies: "@babel/helper-annotate-as-pure" "^7.8.3" "@babel/helper-define-map" "^7.8.3" "@babel/helper-function-name" "^7.8.3" "@babel/helper-optimise-call-expression" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" - "@babel/helper-replace-supers" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.6" "@babel/helper-split-export-declaration" "^7.8.3" globals "^11.1.0" @@ -442,13 +482,13 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-transform-destructuring@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.3.tgz#20ddfbd9e4676906b1056ee60af88590cc7aaa0b" - integrity sha512-H4X646nCkiEcHZUZaRkhE2XVsoz0J/1x3VVujnn96pSoGCtKPA99ZZA+va+gK+92Zycd6OBKCD8tDb/731bhgQ== + version "7.8.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.8.tgz#fadb2bc8e90ccaf5658de6f8d4d22ff6272a2f4b" + integrity sha512-eRJu4Vs2rmttFCdhPUM3bV0Yo/xPSdPw6ML9KHs/bjB4bLA5HXlbvYXPOD5yASodGod+krjYx21xm1QmL8dCJQ== dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-dotall-regex@^7.8.3": +"@babel/plugin-transform-dotall-regex@^7.4.4", "@babel/plugin-transform-dotall-regex@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz#c3c6ec5ee6125c6993c5cbca20dc8621a9ea7a6e" integrity sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw== @@ -471,10 +511,10 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-for-of@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.4.tgz#6fe8eae5d6875086ee185dd0b098a8513783b47d" - integrity sha512-iAXNlOWvcYUYoV8YIxwS7TxGRJcxyl8eQCfT+A5j8sKUzRFvJdcyjp97jL2IghWSRDaL2PU2O2tX8Cu9dTBq5A== +"@babel/plugin-transform-for-of@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz#0f260e27d3e29cd1bb3128da5e76c761aa6c108e" + integrity sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ== dependencies: "@babel/helper-plugin-utils" "^7.8.3" @@ -500,41 +540,41 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-modules-amd@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.8.3.tgz#65606d44616b50225e76f5578f33c568a0b876a5" - integrity sha512-MadJiU3rLKclzT5kBH4yxdry96odTUwuqrZM+GllFI/VhxfPz+k9MshJM+MwhfkCdxxclSbSBbUGciBngR+kEQ== +"@babel/plugin-transform-modules-amd@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.0.tgz#19755ee721912cf5bb04c07d50280af3484efef4" + integrity sha512-vZgDDF003B14O8zJy0XXLnPH4sg+9X5hFBBGN1V+B2rgrB+J2xIypSN6Rk9imB2hSTHQi5OHLrFWsZab1GMk+Q== dependencies: - "@babel/helper-module-transforms" "^7.8.3" + "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" babel-plugin-dynamic-import-node "^2.3.0" -"@babel/plugin-transform-modules-commonjs@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.8.3.tgz#df251706ec331bd058a34bdd72613915f82928a5" - integrity sha512-JpdMEfA15HZ/1gNuB9XEDlZM1h/gF/YOH7zaZzQu2xCFRfwc01NXBMHHSTT6hRjlXJJs5x/bfODM3LiCk94Sxg== +"@babel/plugin-transform-modules-commonjs@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz#e3e72f4cbc9b4a260e30be0ea59bdf5a39748940" + integrity sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g== dependencies: - "@babel/helper-module-transforms" "^7.8.3" + "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-simple-access" "^7.8.3" babel-plugin-dynamic-import-node "^2.3.0" -"@babel/plugin-transform-modules-systemjs@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.8.3.tgz#d8bbf222c1dbe3661f440f2f00c16e9bb7d0d420" - integrity sha512-8cESMCJjmArMYqa9AO5YuMEkE4ds28tMpZcGZB/jl3n0ZzlsxOAi3mC+SKypTfT8gjMupCnd3YiXCkMjj2jfOg== +"@babel/plugin-transform-modules-systemjs@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.0.tgz#e9fd46a296fc91e009b64e07ddaa86d6f0edeb90" + integrity sha512-FsiAv/nao/ud2ZWy4wFacoLOm5uxl0ExSQ7ErvP7jpoihLR6Cq90ilOFyX9UXct3rbtKsAiZ9kFt5XGfPe/5SQ== dependencies: "@babel/helper-hoist-variables" "^7.8.3" - "@babel/helper-module-transforms" "^7.8.3" + "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" babel-plugin-dynamic-import-node "^2.3.0" -"@babel/plugin-transform-modules-umd@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.8.3.tgz#592d578ce06c52f5b98b02f913d653ffe972661a" - integrity sha512-evhTyWhbwbI3/U6dZAnx/ePoV7H6OUG+OjiJFHmhr9FPn0VShjwC2kdxqIuQ/+1P50TMrneGzMeyMTFOjKSnAw== +"@babel/plugin-transform-modules-umd@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.9.0.tgz#e909acae276fec280f9b821a5f38e1f08b480697" + integrity sha512-uTWkXkIVtg/JGRSIABdBoMsoIeoHQHPTL0Y2E7xf5Oj7sLqwVsNXOkNk0VJc7vF0IMBsPeikHxFjGe+qmwPtTQ== dependencies: - "@babel/helper-module-transforms" "^7.8.3" + "@babel/helper-module-transforms" "^7.9.0" "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-transform-named-capturing-groups-regex@^7.8.3": @@ -559,12 +599,11 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/helper-replace-supers" "^7.8.3" -"@babel/plugin-transform-parameters@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.4.tgz#1d5155de0b65db0ccf9971165745d3bb990d77d3" - integrity sha512-IsS3oTxeTsZlE5KqzTbcC2sV0P9pXdec53SU+Yxv7o/6dvGM5AkTotQKhoSffhNgZ/dftsSiOoxy7evCYJXzVA== +"@babel/plugin-transform-parameters@^7.8.7": + version "7.9.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.3.tgz#3028d0cc20ddc733166c6e9c8534559cee09f54a" + integrity sha512-fzrQFQhp7mIhOzmOtPiKffvCYQSK10NR8t6BBz2yPbeUHb9OLW8RZGtgDRBn8z2hGcwvKDL3vC7ojPTLNxmqEg== dependencies: - "@babel/helper-call-delegate" "^7.8.3" "@babel/helper-get-function-arity" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" @@ -575,12 +614,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-regenerator@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.3.tgz#b31031e8059c07495bf23614c97f3d9698bc6ec8" - integrity sha512-qt/kcur/FxrQrzFR432FGZznkVAjiyFtCOANjkAKwCbt465L6ZCiUQh2oMYGU3Wo8LRFJxNDFwWn106S5wVUNA== +"@babel/plugin-transform-regenerator@^7.8.7": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz#5e46a0dca2bee1ad8285eb0527e6abc9c37672f8" + integrity sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA== dependencies: - regenerator-transform "^0.14.0" + regenerator-transform "^0.14.2" "@babel/plugin-transform-reserved-words@^7.8.3": version "7.8.3" @@ -589,6 +628,16 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" +"@babel/plugin-transform-runtime@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.9.0.tgz#45468c0ae74cc13204e1d3b1f4ce6ee83258af0b" + integrity sha512-pUu9VSf3kI1OqbWINQ7MaugnitRss1z533436waNXp+0N3ur3zfut37sXiQMxkuCF4VUjwZucen/quskCh7NHw== + dependencies: + "@babel/helper-module-imports" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + resolve "^1.8.1" + semver "^5.5.1" + "@babel/plugin-transform-shorthand-properties@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz#28545216e023a832d4d3a1185ed492bcfeac08c8" @@ -626,6 +675,15 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" +"@babel/plugin-transform-typescript@^7.9.0": + version "7.9.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.9.4.tgz#4bb4dde4f10bbf2d787fce9707fb09b483e33359" + integrity sha512-yeWeUkKx2auDbSxRe8MusAG+n4m9BFY/v+lPjmQDgOFX5qnySkUY5oXzkp6FwPdsYqnKay6lorXYdC0n3bZO7w== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-typescript" "^7.8.3" + "@babel/plugin-transform-unicode-regex@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz#0cef36e3ba73e5c57273effb182f46b91a1ecaad" @@ -635,26 +693,28 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/preset-env@^7.7.6": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.8.4.tgz#9dac6df5f423015d3d49b6e9e5fa3413e4a72c4e" - integrity sha512-HihCgpr45AnSOHRbS5cWNTINs0TwaR8BS8xIIH+QwiW8cKL0llV91njQMpeMReEPVs+1Ao0x3RLEBLtt1hOq4w== + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.9.0.tgz#a5fc42480e950ae8f5d9f8f2bbc03f52722df3a8" + integrity sha512-712DeRXT6dyKAM/FMbQTV/FvRCms2hPCx+3weRjZ8iQVQWZejWWk1wwG6ViWMyqb/ouBbGOl5b6aCk0+j1NmsQ== dependencies: - "@babel/compat-data" "^7.8.4" - "@babel/helper-compilation-targets" "^7.8.4" + "@babel/compat-data" "^7.9.0" + "@babel/helper-compilation-targets" "^7.8.7" "@babel/helper-module-imports" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-proposal-async-generator-functions" "^7.8.3" "@babel/plugin-proposal-dynamic-import" "^7.8.3" "@babel/plugin-proposal-json-strings" "^7.8.3" "@babel/plugin-proposal-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-proposal-object-rest-spread" "^7.8.3" + "@babel/plugin-proposal-numeric-separator" "^7.8.3" + "@babel/plugin-proposal-object-rest-spread" "^7.9.0" "@babel/plugin-proposal-optional-catch-binding" "^7.8.3" - "@babel/plugin-proposal-optional-chaining" "^7.8.3" + "@babel/plugin-proposal-optional-chaining" "^7.9.0" "@babel/plugin-proposal-unicode-property-regex" "^7.8.3" "@babel/plugin-syntax-async-generators" "^7.8.0" "@babel/plugin-syntax-dynamic-import" "^7.8.0" "@babel/plugin-syntax-json-strings" "^7.8.0" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.0" + "@babel/plugin-syntax-numeric-separator" "^7.8.0" "@babel/plugin-syntax-object-rest-spread" "^7.8.0" "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" "@babel/plugin-syntax-optional-chaining" "^7.8.0" @@ -663,26 +723,26 @@ "@babel/plugin-transform-async-to-generator" "^7.8.3" "@babel/plugin-transform-block-scoped-functions" "^7.8.3" "@babel/plugin-transform-block-scoping" "^7.8.3" - "@babel/plugin-transform-classes" "^7.8.3" + "@babel/plugin-transform-classes" "^7.9.0" "@babel/plugin-transform-computed-properties" "^7.8.3" "@babel/plugin-transform-destructuring" "^7.8.3" "@babel/plugin-transform-dotall-regex" "^7.8.3" "@babel/plugin-transform-duplicate-keys" "^7.8.3" "@babel/plugin-transform-exponentiation-operator" "^7.8.3" - "@babel/plugin-transform-for-of" "^7.8.4" + "@babel/plugin-transform-for-of" "^7.9.0" "@babel/plugin-transform-function-name" "^7.8.3" "@babel/plugin-transform-literals" "^7.8.3" "@babel/plugin-transform-member-expression-literals" "^7.8.3" - "@babel/plugin-transform-modules-amd" "^7.8.3" - "@babel/plugin-transform-modules-commonjs" "^7.8.3" - "@babel/plugin-transform-modules-systemjs" "^7.8.3" - "@babel/plugin-transform-modules-umd" "^7.8.3" + "@babel/plugin-transform-modules-amd" "^7.9.0" + "@babel/plugin-transform-modules-commonjs" "^7.9.0" + "@babel/plugin-transform-modules-systemjs" "^7.9.0" + "@babel/plugin-transform-modules-umd" "^7.9.0" "@babel/plugin-transform-named-capturing-groups-regex" "^7.8.3" "@babel/plugin-transform-new-target" "^7.8.3" "@babel/plugin-transform-object-super" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.8.4" + "@babel/plugin-transform-parameters" "^7.8.7" "@babel/plugin-transform-property-literals" "^7.8.3" - "@babel/plugin-transform-regenerator" "^7.8.3" + "@babel/plugin-transform-regenerator" "^7.8.7" "@babel/plugin-transform-reserved-words" "^7.8.3" "@babel/plugin-transform-shorthand-properties" "^7.8.3" "@babel/plugin-transform-spread" "^7.8.3" @@ -690,14 +750,41 @@ "@babel/plugin-transform-template-literals" "^7.8.3" "@babel/plugin-transform-typeof-symbol" "^7.8.4" "@babel/plugin-transform-unicode-regex" "^7.8.3" - "@babel/types" "^7.8.3" - browserslist "^4.8.5" + "@babel/preset-modules" "^0.1.3" + "@babel/types" "^7.9.0" + browserslist "^4.9.1" core-js-compat "^3.6.2" invariant "^2.2.2" levenary "^1.1.1" semver "^5.5.0" -"@babel/template@^7.7.4": +"@babel/preset-modules@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.3.tgz#13242b53b5ef8c883c3cf7dddd55b36ce80fbc72" + integrity sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" + "@babel/plugin-transform-dotall-regex" "^7.4.4" + "@babel/types" "^7.4.4" + esutils "^2.0.2" + +"@babel/preset-typescript@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.9.0.tgz#87705a72b1f0d59df21c179f7c3d2ef4b16ce192" + integrity sha512-S4cueFnGrIbvYJgwsVFKdvOmpiL0XGw9MFW9D0vgRys5g36PBhZRL8NX8Gr2akz8XRtzq6HuDXPD/1nniagNUg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-transform-typescript" "^7.9.0" + +"@babel/runtime@^7.8.4": + version "7.9.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.2.tgz#d90df0583a3a252f09aaa619665367bae518db06" + integrity sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q== + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6": version "7.8.6" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" integrity sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg== @@ -706,60 +793,36 @@ "@babel/parser" "^7.8.6" "@babel/types" "^7.8.6" -"@babel/template@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.3.tgz#e02ad04fe262a657809327f578056ca15fd4d1b8" - integrity sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ== - dependencies: - "@babel/code-frame" "^7.8.3" - "@babel/parser" "^7.8.3" - "@babel/types" "^7.8.3" - -"@babel/traverse@^7.1.0", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.4.tgz#f0845822365f9d5b0e312ed3959d3f827f869e3c" - integrity sha512-NGLJPZwnVEyBPLI+bl9y9aSnxMhsKz42so7ApAv9D+b4vAFPpY013FTS9LdKxcABoIYFU52HcYga1pPlx454mg== - dependencies: - "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.4" - "@babel/helper-function-name" "^7.8.3" - "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.8.4" - "@babel/types" "^7.8.3" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.13" - -"@babel/traverse@^7.7.4": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.6.tgz#acfe0c64e1cd991b3e32eae813a6eb564954b5ff" - integrity sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.0.tgz#d3882c2830e513f4fe4cec9fe76ea1cc78747892" + integrity sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.6" + "@babel/generator" "^7.9.0" "@babel/helper-function-name" "^7.8.3" "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.8.6" - "@babel/types" "^7.8.6" + "@babel/parser" "^7.9.0" + "@babel/types" "^7.9.0" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c" - integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg== +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.4", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.0.tgz#00b064c3df83ad32b2dbf5ff07312b15c7f1efb5" + integrity sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng== dependencies: - esutils "^2.0.2" + "@babel/helper-validator-identifier" "^7.9.0" lodash "^4.17.13" to-fast-properties "^2.0.0" -"@babel/types@^7.8.6", "@babel/types@^7.8.7": - version "7.8.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.7.tgz#1fc9729e1acbb2337d5b6977a63979b4819f5d1d" - integrity sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw== +"@babel/types@^7.9.5": + version "7.9.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.5.tgz#89231f82915a8a566a703b3b20133f73da6b9444" + integrity sha512-XjnvNqenk818r5zMaba+sLQjnbda31UfUURv3ei0qPQw4u+j2jMyJ5b11y8ZHYTRSI3NnInQkkkRT4fLqqPdHg== dependencies: - esutils "^2.0.2" + "@babel/helper-validator-identifier" "^7.9.5" lodash "^4.17.13" to-fast-properties "^2.0.0" @@ -776,9 +839,9 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@irisnet/amino-js@https://github.com/irisnet/amino-js": +"@irisnet/amino-js@https://github.com/irisnet/amino-js#ibc-alpha": version "0.6.2" - resolved "https://github.com/irisnet/amino-js#e3e1ebeca143450c3524f001552e80dd36fd1f28" + resolved "https://github.com/irisnet/amino-js#00a7966b21d0d8f642f5b9a847cdf17dd6c67b28" dependencies: "@tendermint/belt" "0.2.1" "@tendermint/types" "0.1.1" @@ -798,81 +861,80 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^25.1.0": - version "25.1.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-25.1.0.tgz#1fc765d44a1e11aec5029c08e798246bd37075ab" - integrity sha512-3P1DpqAMK/L07ag/Y9/Jup5iDEG9P4pRAuZiMQnU0JB3UOvCyYCjCoxr7sIA80SeyUCUKrr24fKAxVpmBgQonA== +"@jest/console@^25.2.6": + version "25.2.6" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-25.2.6.tgz#f594847ec8aef3cf27f448abe97e76e491212e97" + integrity sha512-bGp+0PicZVCEhb+ifnW9wpKWONNdkhtJsRE7ap729hiAfTvCN6VhGx0s/l/V/skA2pnyqq+N/7xl9ZWfykDpsg== dependencies: - "@jest/source-map" "^25.1.0" + "@jest/source-map" "^25.2.6" chalk "^3.0.0" - jest-util "^25.1.0" + jest-util "^25.2.6" slash "^3.0.0" -"@jest/core@^25.1.0": - version "25.1.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-25.1.0.tgz#3d4634fc3348bb2d7532915d67781cdac0869e47" - integrity sha512-iz05+NmwCmZRzMXvMo6KFipW7nzhbpEawrKrkkdJzgytavPse0biEnCNr2wRlyCsp3SmKaEY+SGv7YWYQnIdig== +"@jest/core@^25.2.7": + version "25.2.7" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-25.2.7.tgz#58d697687e94ee644273d15e4eed6a20e27187cd" + integrity sha512-Nd6ELJyR+j0zlwhzkfzY70m04hAur0VnMwJXVe4VmmD/SaQ6DEyal++ERQ1sgyKIKKEqRuui6k/R0wHLez4P+g== dependencies: - "@jest/console" "^25.1.0" - "@jest/reporters" "^25.1.0" - "@jest/test-result" "^25.1.0" - "@jest/transform" "^25.1.0" - "@jest/types" "^25.1.0" + "@jest/console" "^25.2.6" + "@jest/reporters" "^25.2.6" + "@jest/test-result" "^25.2.6" + "@jest/transform" "^25.2.6" + "@jest/types" "^25.2.6" ansi-escapes "^4.2.1" chalk "^3.0.0" exit "^0.1.2" graceful-fs "^4.2.3" - jest-changed-files "^25.1.0" - jest-config "^25.1.0" - jest-haste-map "^25.1.0" - jest-message-util "^25.1.0" - jest-regex-util "^25.1.0" - jest-resolve "^25.1.0" - jest-resolve-dependencies "^25.1.0" - jest-runner "^25.1.0" - jest-runtime "^25.1.0" - jest-snapshot "^25.1.0" - jest-util "^25.1.0" - jest-validate "^25.1.0" - jest-watcher "^25.1.0" + jest-changed-files "^25.2.6" + jest-config "^25.2.7" + jest-haste-map "^25.2.6" + jest-message-util "^25.2.6" + jest-regex-util "^25.2.6" + jest-resolve "^25.2.6" + jest-resolve-dependencies "^25.2.7" + jest-runner "^25.2.7" + jest-runtime "^25.2.7" + jest-snapshot "^25.2.7" + jest-util "^25.2.6" + jest-validate "^25.2.6" + jest-watcher "^25.2.7" micromatch "^4.0.2" p-each-series "^2.1.0" - realpath-native "^1.1.0" + realpath-native "^2.0.0" rimraf "^3.0.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^25.1.0": - version "25.1.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-25.1.0.tgz#4a97f64770c9d075f5d2b662b5169207f0a3f787" - integrity sha512-cTpUtsjU4cum53VqBDlcW0E4KbQF03Cn0jckGPW/5rrE9tb+porD3+hhLtHAwhthsqfyF+bizyodTlsRA++sHg== +"@jest/environment@^25.2.6": + version "25.2.6" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-25.2.6.tgz#8f7931e79abd81893ce88b7306f0cc4744835000" + integrity sha512-17WIw+wCb9drRNFw1hi8CHah38dXVdOk7ga9exThhGtXlZ9mK8xH4DjSB9uGDGXIWYSHmrxoyS6KJ7ywGr7bzg== dependencies: - "@jest/fake-timers" "^25.1.0" - "@jest/types" "^25.1.0" - jest-mock "^25.1.0" + "@jest/fake-timers" "^25.2.6" + "@jest/types" "^25.2.6" + jest-mock "^25.2.6" -"@jest/fake-timers@^25.1.0": - version "25.1.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-25.1.0.tgz#a1e0eff51ffdbb13ee81f35b52e0c1c11a350ce8" - integrity sha512-Eu3dysBzSAO1lD7cylZd/CVKdZZ1/43SF35iYBNV1Lvvn2Undp3Grwsv8PrzvbLhqwRzDd4zxrY4gsiHc+wygQ== +"@jest/fake-timers@^25.2.6": + version "25.2.6" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-25.2.6.tgz#239dbde3f56badf7d05bcf888f5d669296077cad" + integrity sha512-A6qtDIA2zg/hVgUJJYzQSHFBIp25vHdSxW/s4XmTJAYxER6eL0NQdQhe4+232uUSviKitubHGXXirt5M7blPiA== dependencies: - "@jest/types" "^25.1.0" - jest-message-util "^25.1.0" - jest-mock "^25.1.0" - jest-util "^25.1.0" + "@jest/types" "^25.2.6" + jest-message-util "^25.2.6" + jest-mock "^25.2.6" + jest-util "^25.2.6" lolex "^5.0.0" -"@jest/reporters@^25.1.0": - version "25.1.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-25.1.0.tgz#9178ecf136c48f125674ac328f82ddea46e482b0" - integrity sha512-ORLT7hq2acJQa8N+NKfs68ZtHFnJPxsGqmofxW7v7urVhzJvpKZG9M7FAcgh9Ee1ZbCteMrirHA3m5JfBtAaDg== +"@jest/reporters@^25.2.6": + version "25.2.6" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-25.2.6.tgz#6d87e40fb15adb69e22bb83aa02a4d88b2253b5f" + integrity sha512-DRMyjaxcd6ZKctiXNcuVObnPwB1eUs7xrUVu0J2V0p5/aZJei5UM9GL3s/bmN4hRV8Mt3zXh+/9X2o0Q4ClZIA== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^25.1.0" - "@jest/environment" "^25.1.0" - "@jest/test-result" "^25.1.0" - "@jest/transform" "^25.1.0" - "@jest/types" "^25.1.0" + "@jest/console" "^25.2.6" + "@jest/test-result" "^25.2.6" + "@jest/transform" "^25.2.6" + "@jest/types" "^25.2.6" chalk "^3.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" @@ -882,11 +944,10 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.0" - jest-haste-map "^25.1.0" - jest-resolve "^25.1.0" - jest-runtime "^25.1.0" - jest-util "^25.1.0" - jest-worker "^25.1.0" + jest-haste-map "^25.2.6" + jest-resolve "^25.2.6" + jest-util "^25.2.6" + jest-worker "^25.2.6" slash "^3.0.0" source-map "^0.6.0" string-length "^3.1.0" @@ -895,62 +956,61 @@ optionalDependencies: node-notifier "^6.0.0" -"@jest/source-map@^25.1.0": - version "25.1.0" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-25.1.0.tgz#b012e6c469ccdbc379413f5c1b1ffb7ba7034fb0" - integrity sha512-ohf2iKT0xnLWcIUhL6U6QN+CwFWf9XnrM2a6ybL9NXxJjgYijjLSitkYHIdzkd8wFliH73qj/+epIpTiWjRtAA== +"@jest/source-map@^25.2.6": + version "25.2.6" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-25.2.6.tgz#0ef2209514c6d445ebccea1438c55647f22abb4c" + integrity sha512-VuIRZF8M2zxYFGTEhkNSvQkUKafQro4y+mwUxy5ewRqs5N/ynSFUODYp3fy1zCnbCMy1pz3k+u57uCqx8QRSQQ== dependencies: callsites "^3.0.0" graceful-fs "^4.2.3" source-map "^0.6.0" -"@jest/test-result@^25.1.0": - version "25.1.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-25.1.0.tgz#847af2972c1df9822a8200457e64be4ff62821f7" - integrity sha512-FZzSo36h++U93vNWZ0KgvlNuZ9pnDnztvaM7P/UcTx87aPDotG18bXifkf1Ji44B7k/eIatmMzkBapnAzjkJkg== +"@jest/test-result@^25.2.6": + version "25.2.6" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-25.2.6.tgz#f6082954955313eb96f6cabf9fb14f8017826916" + integrity sha512-gmGgcF4qz/pkBzyfJuVHo2DA24kIgVQ5Pf/VpW4QbyMLSegi8z+9foSZABfIt5se6k0fFj/3p/vrQXdaOgit0w== dependencies: - "@jest/console" "^25.1.0" - "@jest/transform" "^25.1.0" - "@jest/types" "^25.1.0" + "@jest/console" "^25.2.6" + "@jest/types" "^25.2.6" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^25.1.0": - version "25.1.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-25.1.0.tgz#4df47208542f0065f356fcdb80026e3c042851ab" - integrity sha512-WgZLRgVr2b4l/7ED1J1RJQBOharxS11EFhmwDqknpknE0Pm87HLZVS2Asuuw+HQdfQvm2aXL2FvvBLxOD1D0iw== +"@jest/test-sequencer@^25.2.7": + version "25.2.7" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-25.2.7.tgz#e4331f7b4850e34289b9a5c8ec8a2c03b400da8f" + integrity sha512-s2uYGOXONDSTJQcZJ9A3Zkg3hwe53RlX1HjUNqjUy3HIqwgwCKJbnAKYsORPbhxXi3ARMKA7JNBi9arsTxXoYw== dependencies: - "@jest/test-result" "^25.1.0" - jest-haste-map "^25.1.0" - jest-runner "^25.1.0" - jest-runtime "^25.1.0" + "@jest/test-result" "^25.2.6" + jest-haste-map "^25.2.6" + jest-runner "^25.2.7" + jest-runtime "^25.2.7" -"@jest/transform@^25.1.0": - version "25.1.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-25.1.0.tgz#221f354f512b4628d88ce776d5b9e601028ea9da" - integrity sha512-4ktrQ2TPREVeM+KxB4zskAT84SnmG1vaz4S+51aTefyqn3zocZUnliLLm5Fsl85I3p/kFPN4CRp1RElIfXGegQ== +"@jest/transform@^25.2.6": + version "25.2.6" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-25.2.6.tgz#007fd946dedf12d2a9eb5d4154faf1991d5f61ff" + integrity sha512-rZnjCjZf9avPOf9q/w9RUZ9Uc29JmB53uIXNJmNz04QbDMD5cR/VjfikiMKajBsXe2vnFl5sJ4RTt+9HPicauQ== dependencies: "@babel/core" "^7.1.0" - "@jest/types" "^25.1.0" + "@jest/types" "^25.2.6" babel-plugin-istanbul "^6.0.0" chalk "^3.0.0" convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.3" - jest-haste-map "^25.1.0" - jest-regex-util "^25.1.0" - jest-util "^25.1.0" + jest-haste-map "^25.2.6" + jest-regex-util "^25.2.6" + jest-util "^25.2.6" micromatch "^4.0.2" pirates "^4.0.1" - realpath-native "^1.1.0" + realpath-native "^2.0.0" slash "^3.0.0" source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^25.1.0": - version "25.1.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.1.0.tgz#b26831916f0d7c381e11dbb5e103a72aed1b4395" - integrity sha512-VpOtt7tCrgvamWZh1reVsGADujKigBUFTi19mlRjqEGsE8qH4r3s+skY33dNdXOwyZIvuftZ5tqdF1IgsMejMA== +"@jest/types@^25.2.6": + version "25.2.6" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.2.6.tgz#c12f44af9bed444438091e4b59e7ed05f8659cb6" + integrity sha512-myJTTV37bxK7+3NgKc4Y/DlQ5q92/NOwZsZ+Uch7OXdElxOg61QYc72fPYNAjlvbnJ2YvbXLamIsa9tj48BmyQ== dependencies: "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^1.1.1" @@ -989,9 +1049,9 @@ integrity sha512-jMEz5tJ3ncA8903N2DoPD6EJawSyORRSyWvQbmxyz8ONiugjOKvoesMzz/xIioe1Ekzf6YJnw/3RI+kT9qdNyg== "@types/babel__core@^7.1.0": - version "7.1.5" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.5.tgz#e4d84704b4df868b3ad538365a13da2fa6dbc023" - integrity sha512-+ckxwNj892FWgvwrUWLOghQ2JDgOgeqTPwrcl+0t1pG59CP8qMJ6S/efmEd999vCFSJKOpyMakvU+w380rduUQ== + version "7.1.7" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.7.tgz#1dacad8840364a57c98d0dd4855c6dd3752c6b89" + integrity sha512-RL62NqSFPCDK2FM1pSDH0scHpJvsXtZNiYlMB73DgPBaG1E38ZYVL+ei5EkWRbr+KC4YNiAUNBnRj+bgwpgjMw== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" @@ -1015,9 +1075,9 @@ "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.0.9" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.9.tgz#be82fab304b141c3eee81a4ce3b034d0eba1590a" - integrity sha512-jEFQ8L1tuvPjOI8lnpaf73oCJe+aoxL6ygqSy6c8LcW98zaC+4mzWuQIRCEvKeCOu+lbqdXcg4Uqmm1S8AP1tw== + version "7.0.10" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.10.tgz#d9a99f017317d9b3d1abc2ced45d3bca68df0daf" + integrity sha512-74fNdUGrWsgIB/V9kTO5FGHPWYY6Eqn+3Z7L6Hc4e/BxjYV7puvBqp5HwsVYYfLm6iURYBNCx4Ut37OF9yitCw== dependencies: "@babel/types" "^7.3.0" @@ -1047,17 +1107,17 @@ "@types/istanbul-lib-report" "*" "@types/jest@^25.1.4": - version "25.1.4" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-25.1.4.tgz#9e9f1e59dda86d3fd56afce71d1ea1b331f6f760" - integrity sha512-QDDY2uNAhCV7TMCITrxz+MRk1EizcsevzfeS6LykIlq2V1E5oO4wXG8V2ZEd9w7Snxeeagk46YbMgZ8ESHx3sw== + version "25.2.1" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-25.2.1.tgz#9544cd438607955381c1bdbdb97767a249297db5" + integrity sha512-msra1bCaAeEdkSyA0CZ6gW1ukMIvZ5YoJkdXw/qhQdsuuDlFTcEUrUw8CLCPt2rVRUfXlClVvK2gvPs9IokZaA== dependencies: - jest-diff "^25.1.0" - pretty-format "^25.1.0" + jest-diff "^25.2.1" + pretty-format "^25.2.1" "@types/mathjs@^6.0.4": - version "6.0.4" - resolved "https://registry.yarnpkg.com/@types/mathjs/-/mathjs-6.0.4.tgz#0adf7335b27a5385e0dd4f766e0c53931c5c2375" - integrity sha512-hIxf6lfCuUbsI/iz5cevHQjKvSS+XIGPwUyYZ4GjUPrUCh9egUhLlK0d7V31jtSt1WGt6dlclnlYMNOov9JZAA== + version "6.0.5" + resolved "https://registry.yarnpkg.com/@types/mathjs/-/mathjs-6.0.5.tgz#c3ddcb6e283461e12a93943a5aca0588d1071c18" + integrity sha512-TqC+u57/XMwMoJB9KnvCj7sBoOBwLLS+O4kmBxy0cjkToPbKZt0jm0eYR2dbMKqvr/39ZdnoJ2qnK37qD0bp1A== dependencies: decimal.js "^10.0.0" @@ -1067,9 +1127,9 @@ integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== "@types/node@*": - version "13.7.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.7.tgz#1628e6461ba8cc9b53196dfeaeec7b07fa6eea99" - integrity sha512-Uo4chgKbnPNlxQwoFmYIwctkQVkMMmsAoGGU4JKwLuvBefF0pCq4FybNSnfkfRCpC7ZW7kttcC/TrRtAJsvGtg== + version "13.11.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.11.0.tgz#390ea202539c61c8fa6ba4428b57e05bc36dc47b" + integrity sha512-uM4mnmsIIPK/yeO+42F2RQhGUIs39K2RFmugcJANppXe6J1nvH87PvzPZYpza7Xhhs8Yn9yIAVdLZ84z61+0xQ== "@types/node@10.12.18": version "10.12.18" @@ -1082,9 +1142,14 @@ integrity sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ== "@types/node@^10.0.3": - version "10.17.16" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.16.tgz#ee96ddac1a38d98d2c8a71c7df0cdad5758e8993" - integrity sha512-A4283YSA1OmnIivcpy/4nN86YlnKRiQp8PYwI2KdPCONEBN093QTb0gCtERtkLyVNGKKIGazTZ2nAmVzQU51zA== + version "10.17.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.18.tgz#ae364d97382aacdebf583fa4e7132af2dfe56a0c" + integrity sha512-DQ2hl/Jl3g33KuAUOcMrcAOtsbzb+y/ufakzAdeK9z/H/xsvkpbETZZbPNMIiQuk24f5ZRMCcZIViAwyFIiKmg== + +"@types/prettier@^1.19.0": + version "1.19.1" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.19.1.tgz#33509849f8e679e4add158959fdb086440e9553f" + integrity sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ== "@types/stack-utils@^1.0.1": version "1.0.1" @@ -1092,9 +1157,9 @@ integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== "@types/ws@^7.2.2": - version "7.2.2" - resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.2.2.tgz#1bd2038bc80aea60f8a20b2dcf08602a72e65063" - integrity sha512-oqnI3DbGCVI9zJ/WHdFo3CUE8jQ8CVQDUIKaDtlTcNeT4zs6UCg9Gvk5QrFx2QPkRszpM6yc8o0p4aGjCsTi+w== + version "7.2.3" + resolved "https://registry.yarnpkg.com/@types/ws/-/ws-7.2.3.tgz#a3add56077ac6cc9396b9502c7252a1635922032" + integrity sha512-VT/GK7nvDA7lfHy40G3LKM+ICqmdIsBLBHGXcWD97MtqQEjNMX+7Gudo8YGpaSlYdTX7IFThhCE8Jx09HegymQ== dependencies: "@types/node" "*" @@ -1110,11 +1175,174 @@ dependencies: "@types/yargs-parser" "*" +"@webassemblyjs/ast@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" + integrity sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA== + dependencies: + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + +"@webassemblyjs/floating-point-hex-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" + integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== + +"@webassemblyjs/helper-api-error@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" + integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== + +"@webassemblyjs/helper-buffer@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" + integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== + +"@webassemblyjs/helper-code-frame@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" + integrity sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA== + dependencies: + "@webassemblyjs/wast-printer" "1.9.0" + +"@webassemblyjs/helper-fsm@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" + integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== + +"@webassemblyjs/helper-module-context@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" + integrity sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g== + dependencies: + "@webassemblyjs/ast" "1.9.0" + +"@webassemblyjs/helper-wasm-bytecode@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" + integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== + +"@webassemblyjs/helper-wasm-section@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" + integrity sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + +"@webassemblyjs/ieee754@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" + integrity sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" + integrity sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" + integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== + +"@webassemblyjs/wasm-edit@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" + integrity sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/helper-wasm-section" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-opt" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + "@webassemblyjs/wast-printer" "1.9.0" + +"@webassemblyjs/wasm-gen@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" + integrity sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + +"@webassemblyjs/wasm-opt@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" + integrity sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + +"@webassemblyjs/wasm-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" + integrity sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + +"@webassemblyjs/wast-parser@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" + integrity sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/floating-point-hex-parser" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-code-frame" "1.9.0" + "@webassemblyjs/helper-fsm" "1.9.0" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/wast-printer@1.9.0": + version "1.9.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" + integrity sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + "@xtuc/long" "4.2.2" + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + abab@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a" integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg== +accepts@~1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + acorn-globals@^4.3.2: version "4.3.4" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" @@ -1123,25 +1351,45 @@ acorn-globals@^4.3.2: acorn "^6.0.1" acorn-walk "^6.0.1" +acorn-jsx@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" + integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== + acorn-walk@^6.0.1: version "6.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== -acorn@^6.0.1: - version "6.4.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.0.tgz#b659d2ffbafa24baf5db1cdbb2c94a983ecd2784" - integrity sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw== +acorn-walk@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.1.1.tgz#345f0dffad5c735e7373d2fec9a1023e6a44b83e" + integrity sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ== + +acorn@^6.0.1, acorn@^6.2.1: + version "6.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" + integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== -acorn@^7.1.0: +acorn@^7.1.0, acorn@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== -ajv@^6.5.5: - version "6.11.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.11.0.tgz#c3607cbc8ae392d8a5a536f25b21f8e5f3f87fe9" - integrity sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA== +ajv-errors@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" + integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== + +ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" + integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== + +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.5.5: + version "6.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" + integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== dependencies: fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" @@ -1156,11 +1404,11 @@ ansi-align@^3.0.0: string-width "^3.0.0" ansi-escapes@^4.2.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.0.tgz#a4ce2b33d6b214b7950d8595c212f12ac9cc569d" - integrity sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg== + version "4.3.1" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" + integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== dependencies: - type-fest "^0.8.1" + type-fest "^0.11.0" ansi-regex@^3.0.0: version "3.0.0" @@ -1177,7 +1425,7 @@ ansi-regex@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== -ansi-styles@^3.2.1: +ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== @@ -1208,6 +1456,11 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" +aproba@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -1240,6 +1493,11 @@ array-find-index@^1.0.1: resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" @@ -1271,6 +1529,14 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= +assert@^1.1.1: + version "1.5.0" + resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" + integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== + dependencies: + object-assign "^4.1.1" + util "0.10.3" + assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -1281,11 +1547,26 @@ astral-regex@^1.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== +async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== + +async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" @@ -1308,19 +1589,30 @@ axios@^0.19.0: dependencies: follow-redirects "1.5.10" -babel-jest@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-25.1.0.tgz#206093ac380a4b78c4404a05b3277391278f80fb" - integrity sha512-tz0VxUhhOE2y+g8R2oFrO/2VtVjA1lkJeavlhExuRBg3LdNJY9gwQ+Vcvqt9+cqy71MCTJhewvTB7Qtnnr9SWg== +babel-jest@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-25.2.6.tgz#fe67ff4d0db3626ca8082da8881dd5e84e07ae75" + integrity sha512-MDJOAlwtIeIQiGshyX0d2PxTbV73xZMpNji40ivVTPQOm59OdRR9nYCkffqI7ugtsK4JR98HgNKbDbuVf4k5QQ== dependencies: - "@jest/transform" "^25.1.0" - "@jest/types" "^25.1.0" + "@jest/transform" "^25.2.6" + "@jest/types" "^25.2.6" "@types/babel__core" "^7.1.0" babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^25.1.0" + babel-preset-jest "^25.2.6" chalk "^3.0.0" slash "^3.0.0" +babel-loader@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.1.0.tgz#c611d5112bd5209abe8b9fa84c3e4da25275f1c3" + integrity sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw== + dependencies: + find-cache-dir "^2.1.0" + loader-utils "^1.4.0" + mkdirp "^0.5.3" + pify "^4.0.1" + schema-utils "^2.6.5" + babel-plugin-dynamic-import-node@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" @@ -1339,21 +1631,21 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-25.1.0.tgz#fb62d7b3b53eb36c97d1bc7fec2072f9bd115981" - integrity sha512-oIsopO41vW4YFZ9yNYoLQATnnN46lp+MZ6H4VvPKFkcc2/fkl3CfE/NZZSmnEIEsJRmJAgkVEK0R7Zbl50CpTw== +babel-plugin-jest-hoist@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-25.2.6.tgz#2af07632b8ac7aad7d414c1e58425d5fc8e84909" + integrity sha512-qE2xjMathybYxjiGFJg0mLFrz0qNp83aNZycWDY/SuHiZNq+vQfRQtuINqyXyue1ELd8Rd+1OhFSLjms8msMbw== dependencies: "@types/babel__traverse" "^7.0.6" -babel-preset-jest@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-25.1.0.tgz#d0aebfebb2177a21cde710996fce8486d34f1d33" - integrity sha512-eCGn64olaqwUMaugXsTtGAM2I0QTahjEtnRu0ql8Ie+gDWAc1N6wqN0k2NilnyTunM69Pad7gJY7LOtwLimoFQ== +babel-preset-jest@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-25.2.6.tgz#5d3f7c99e2a8508d61775c9d68506d143b7f71b5" + integrity sha512-Xh2eEAwaLY9+SyMt/xmGZDnXTW/7pSaBPG0EMo7EuhvosFKVWYB6CqwYD31DaEQuoTL090oDZ0FEqygffGRaSQ== dependencies: "@babel/plugin-syntax-bigint" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.0.0" - babel-plugin-jest-hoist "^25.1.0" + babel-plugin-jest-hoist "^25.2.6" backbone@^1.4.0: version "1.4.0" @@ -1368,12 +1660,17 @@ balanced-match@^1.0.0: integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= base-x@^3.0.2: - version "3.0.7" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.7.tgz#1c5a7fafe8f66b4114063e8da102799d4e7c408f" - integrity sha512-zAKJGuQPihXW22fkrfOclUUZXM2g92z5GzlSMHxhO6r6Qj+Nm0ccaGNBzDZojzwOMkpjAv4J0fOv1U4go+a4iw== + version "3.0.8" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d" + integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA== dependencies: safe-buffer "^5.0.1" +base64-js@^1.0.2: + version "1.3.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== + base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" @@ -1399,6 +1696,26 @@ bech32@^1.1.3: resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.3.tgz#bd47a8986bbb3eec34a56a097a84b8d3e9a2dfcd" integrity sha512-yuVFUvrNcoJi0sv5phmqc6P+Fl1HjRDRNOOkHY2X/3LBy2bIGNSFx4fZ95HMaXHupuS7cZR15AsvtmCIF4UEyg== +bfj@^6.1.1: + version "6.1.2" + resolved "https://registry.yarnpkg.com/bfj/-/bfj-6.1.2.tgz#325c861a822bcb358a41c78a33b8e6e2086dde7f" + integrity sha512-BmBJa4Lip6BPRINSZ0BPEIfB1wUY/9rwbwvIHQA1KjX9om29B6id0wnWXq7m3bn5JrUVjeOTnVuhPT1FiHwPGw== + dependencies: + bluebird "^3.5.5" + check-types "^8.0.3" + hoopy "^0.1.4" + tryer "^1.0.1" + +big.js@^5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" + integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== + +binary-extensions@^1.0.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" + integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== + bindings@^1.3.0, bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" @@ -1436,10 +1753,31 @@ bip66@^1.1.5: dependencies: safe-buffer "^5.0.1" +bluebird@^3.5.5: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.11.8, bn.js@^4.4.0: - version "4.11.9" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" - integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== + version "4.11.8" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" + integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== + +body-parser@1.19.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" boxen@^3.0.0: version "3.2.0" @@ -1463,7 +1801,7 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^2.3.1: +braces@^2.3.1, braces@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== @@ -1491,10 +1829,10 @@ brorand@^1.0.1: resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= -browser-process-hrtime@^0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" - integrity sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw== +browser-process-hrtime@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" + integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== browser-resolve@^1.11.3: version "1.11.3" @@ -1555,14 +1893,22 @@ browserify-sign@^4.0.0: inherits "^2.0.1" parse-asn1 "^5.0.0" -browserslist@^4.8.3, browserslist@^4.8.5: - version "4.8.7" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.7.tgz#ec8301ff415e6a42c949d0e66b405eb539c532d0" - integrity sha512-gFOnZNYBHrEyUML0xr5NJ6edFaaKbTFX9S9kQHlYfCP0Rit/boRIz4G+Avq6/4haEKJXdGGUnoolx+5MWW2BoA== +browserify-zlib@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" + integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== + dependencies: + pako "~1.0.5" + +browserslist@^4.8.3, browserslist@^4.9.1: + version "4.11.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.11.1.tgz#92f855ee88d6e050e7e7311d987992014f1a1f1b" + integrity sha512-DCTr3kDrKEYNw6Jb9HFxVLQNaue8z+0ZfRBRjmCunKDEXEBajKDj2Y+Uelg+Pi29OnvaSGwjOsnRyNEkXzHg5g== dependencies: - caniuse-lite "^1.0.30001027" - electron-to-chromium "^1.3.349" - node-releases "^1.1.49" + caniuse-lite "^1.0.30001038" + electron-to-chromium "^1.3.390" + node-releases "^1.1.53" + pkg-up "^2.0.0" bs-logger@0.x: version "0.2.6" @@ -1604,11 +1950,51 @@ buffer-xor@^1.0.3: resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= +buffer@^4.3.0: + version "4.9.2" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" + integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= +builtin-status-codes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" + integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= + +bytes@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== + +cacache@^12.0.2: + version "12.0.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" + integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== + dependencies: + bluebird "^3.5.5" + chownr "^1.1.1" + figgy-pudding "^3.5.1" + glob "^7.1.4" + graceful-fs "^4.1.15" + infer-owner "^1.0.3" + lru-cache "^5.1.1" + mississippi "^3.0.0" + mkdirp "^0.5.1" + move-concurrently "^1.0.1" + promise-inflight "^1.0.1" + rimraf "^2.6.3" + ssri "^6.0.1" + unique-filename "^1.1.1" + y18n "^4.0.0" + cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -1661,10 +2047,10 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@^1.0.30001027: - version "1.0.30001028" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001028.tgz#f2241242ac70e0fa9cda55c2776d32a0867971c2" - integrity sha512-Vnrq+XMSHpT7E+LWoIYhs3Sne8h9lx9YJV3acH3THNCwU/9zV93/ta4xVfzTtnqd3rvnuVpVjE3DFqf56tr3aQ== +caniuse-lite@^1.0.30001038: + version "1.0.30001039" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001039.tgz#b3814a1c38ffeb23567f8323500c09526a577bbe" + integrity sha512-SezbWCTT34eyFoWHgx8UWso7YtvtM7oosmFoXbCkdC6qJzRfBTeTgE9REtKtiuKXuMwWTZEvdnFNGAyVMorv8Q== capture-exit@^2.0.0: version "2.0.0" @@ -1678,7 +2064,7 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.4.2: +chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1700,6 +2086,42 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== +check-types@^8.0.3: + version "8.0.3" + resolved "https://registry.yarnpkg.com/check-types/-/check-types-8.0.3.tgz#3356cca19c889544f2d7a95ed49ce508a0ecf552" + integrity sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ== + +chokidar@^2.1.8: + version "2.1.8" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" + integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== + dependencies: + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + optionalDependencies: + fsevents "^1.2.7" + +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +chrome-trace-event@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" + integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== + dependencies: + tslib "^1.9.0" + ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" @@ -1740,6 +2162,15 @@ cli-width@^2.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + cliui@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" @@ -1762,9 +2193,9 @@ co@^4.6.0: integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= collect-v8-coverage@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.0.tgz#150ee634ac3650b71d9c985eb7f608942334feb1" - integrity sha512-VKIhJgvk8E1W28m5avZ2Gv2Ruv5YiF56ug2oclvaG9md69BuZImMG2sk9g7QNKLUbtYAKQjXjYxbYZVUlMMKmQ== + version "1.0.1" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" + integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg== collection-visit@^1.0.0: version "1.0.0" @@ -1805,11 +2236,16 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^2.12.1, commander@~2.20.3: +commander@^2.12.1, commander@^2.18.0, commander@^2.20.0, commander@~2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= + complex.js@^2.0.11: version "2.0.11" resolved "https://registry.yarnpkg.com/complex.js/-/complex.js-2.0.11.tgz#09a873fbf15ffd8c18c9c2201ccef425c32b8bf1" @@ -1825,6 +2261,16 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= +concat-stream@^1.5.0: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + configstore@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/configstore/-/configstore-4.0.0.tgz#5933311e95d3687efb592c528b922d9262d227e7" @@ -1837,6 +2283,28 @@ configstore@^4.0.0: write-file-atomic "^2.0.0" xdg-basedir "^3.0.0" +console-browserify@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" + integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== + +constants-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" + integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= + +content-disposition@0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" @@ -1844,6 +2312,28 @@ convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: dependencies: safe-buffer "~5.1.1" +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + +cookie@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" + integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== + +copy-concurrently@^1.0.0: + version "1.0.5" + resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" + integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== + dependencies: + aproba "^1.1.1" + fs-write-stream-atomic "^1.0.8" + iferr "^0.1.5" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.0" + copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" @@ -1893,16 +2383,7 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^6.0.0: +cross-spawn@6.0.5, cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -1913,16 +2394,25 @@ cross-spawn@^6.0.0: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + cross-spawn@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.1.tgz#0ab56286e0f7c24e153d04cc2aa027e43a9a5d14" - integrity sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg== + version "7.0.2" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.2.tgz#d0d7dcfa74e89115c7619f4f721a94e1fdb716d6" + integrity sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" which "^2.0.1" -crypto-browserify@^3.12.0: +crypto-browserify@^3.11.0, crypto-browserify@^3.12.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== @@ -1973,6 +2463,11 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" +cyclist@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" + integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -1989,6 +2484,13 @@ data-urls@^1.1.0: whatwg-mimetype "^2.2.0" whatwg-url "^7.0.0" +debug@2.6.9, debug@^2.2.0, debug@^2.3.3: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + debug@=3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" @@ -1996,14 +2498,7 @@ debug@=3.1.0: dependencies: ms "2.0.0" -debug@^2.2.0, debug@^2.3.3: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@^4.1.0, debug@^4.1.1: +debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== @@ -2050,12 +2545,17 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= +deepmerge@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" + integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== + defer-to-connect@^1.0.1: version "1.1.3" resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== -define-properties@^1.1.2, define-properties@^1.1.3: +define-properties@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== @@ -2089,6 +2589,11 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + des.js@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" @@ -2097,15 +2602,25 @@ des.js@^1.0.0: inherits "^2.0.1" minimalistic-assert "^1.0.0" +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +detect-file@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" + integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -diff-sequences@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.1.0.tgz#fd29a46f1c913fd66c22645dc75bffbe43051f32" - integrity sha512-nFIfVk5B/NStCsJ+zaPO4vYuLjlzQ6uFvPxzYyHlejNZ/UGa7G/n7peOXVrVNvRuyfstt+mZQYGpjxg9Z6N8Kw== +diff-sequences@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.2.6.tgz#5f467c00edd35352b7bca46d7927d60e687a76dd" + integrity sha512-Hq8o7+6GaZeoFjtpgvRBUknSXNeJiCx7V9Fr94ZMljNiCr9n9L8H8aJqgWOQiDDGdyn29fRNcDdRVJ5fdyihfg== diff@^4.0.1: version "4.0.2" @@ -2121,6 +2636,18 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +domain-browser@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" + integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== + domexception@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" @@ -2129,9 +2656,9 @@ domexception@^1.0.1: webidl-conversions "^4.0.2" dot-prop@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.1.tgz#45884194a71fc2cda71cbb4bceb3a4dd2f433ba4" - integrity sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ== + version "4.2.0" + resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" + integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ== dependencies: is-obj "^1.0.0" @@ -2149,6 +2676,21 @@ duplexer3@^0.1.4: resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= +duplexer@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" + integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E= + +duplexify@^3.4.2, duplexify@^3.6.0: + version "3.7.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" + integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + duplexify@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.1.tgz#7027dc374f157b122a8ae08c2d3ea4d2d953aa61" @@ -2167,15 +2709,25 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -electron-to-chromium@^1.3.349: - version "1.3.356" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.356.tgz#fb985ee0f3023e6e11b97547ff3f738bdd8643d2" - integrity sha512-qW4YHMfOFjvx0jkSK2vjaHoLjk1+uJIV5tqtLDo7P5y3/kM8KQP23YBU0Y5fCSW4jIbDvEzeHDaY4+4vEaqqOw== +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +ejs@^2.6.1: + version "2.7.4" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" + integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== + +electron-to-chromium@^1.3.390: + version "1.3.398" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.398.tgz#4c01e29091bf39e578ac3f66c1f157d92fa5725d" + integrity sha512-BJjxuWLKFbM5axH3vES7HKMQgAknq9PZHBkMK/rEXUQG9i1Iw5R+6hGkm6GtsQSANjSUrh/a6m32nzCNDNo/+w== elliptic@^6.0.0, elliptic@^6.4.0, elliptic@^6.5.2: - version "6.5.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.3.tgz#cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6" - integrity sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== + version "6.5.2" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" + integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== dependencies: bn.js "^4.4.0" brorand "^1.0.1" @@ -2195,13 +2747,53 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -end-of-stream@^1.1.0, end-of-stream@^1.4.1: +emojis-list@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" + integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= + +emojis-list@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" + integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== dependencies: once "^1.4.0" +enhanced-resolve@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" + integrity sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng== + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.4.0" + tapable "^1.0.0" + +enhanced-resolve@^4.0.0, enhanced-resolve@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz#2937e2b8066cd0fe7ce0990a98f0d71a35189f66" + integrity sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA== + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.5.0" + tapable "^1.0.0" + +errno@^0.1.3, errno@~0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" + integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== + dependencies: + prr "~1.0.1" + error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" @@ -2209,31 +2801,10 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.17.0-next.1, es-abstract@^1.17.2: - version "1.17.4" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.4.tgz#e3aedf19706b20e7c2594c35fc0d57605a79e184" - integrity sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.1.5" - is-regex "^1.0.5" - object-inspect "^1.7.0" - object-keys "^1.1.1" - object.assign "^4.1.0" - string.prototype.trimleft "^2.1.1" - string.prototype.trimright "^2.1.1" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= escape-latex@^1.2.0: version "1.2.0" @@ -2257,22 +2828,137 @@ escodegen@^1.11.1: optionalDependencies: source-map "~0.6.1" +eslint-loader@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-loader/-/eslint-loader-4.0.0.tgz#ab096ce9168fa167e4159afff66692c173fc7b79" + integrity sha512-QoaFRdh3oXt5i2uonSjO8dDnncsG05w7qvA7yYMvGDne8zAEk9R+R1rsfunp3OKVdO5mAJelf1x2Z1kYp664kA== + dependencies: + fs-extra "^9.0.0" + loader-fs-cache "^1.0.3" + loader-utils "^2.0.0" + object-hash "^2.0.3" + schema-utils "^2.6.5" + +eslint-scope@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" + integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-scope@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" + integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" + integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== + +eslint@^6.8.0: + version "6.8.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" + integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.10.0" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^5.0.0" + eslint-utils "^1.4.3" + eslint-visitor-keys "^1.1.0" + espree "^6.1.2" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.0.0" + globals "^12.1.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^7.0.0" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.14" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.3" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^6.1.2" + strip-ansi "^5.2.0" + strip-json-comments "^3.0.1" + table "^5.2.3" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^6.1.2: + version "6.2.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a" + integrity sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw== + dependencies: + acorn "^7.1.1" + acorn-jsx "^5.2.0" + eslint-visitor-keys "^1.1.0" + esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -estraverse@^4.2.0: +esquery@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.2.0.tgz#a010a519c0288f2530b3404124bfb5f02e9797fe" + integrity sha512-weltsSqdeWIX9G2qQZz7KlTRJdkkOCTPgLYJUz1Hacf48R4YOwGPHO3+ORfWedqJKbq5WQmsgK90n+pFLIKt/Q== + dependencies: + estraverse "^5.0.0" + +esrecurse@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== + dependencies: + estraverse "^4.1.0" + +estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== +estraverse@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.0.0.tgz#ac81750b482c11cca26e4b07e83ed8f75fbcdc22" + integrity sha512-j3acdrMzqrxmJTNj5dbr1YbjacrYgAxVMeF0gK16E3j494mOe7xygM/ZLIguEQ0ETwAg2hlJCtHRGav+y0Ny5A== + esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -events@^3.1.0: +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +events@^3.0.0, events@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/events/-/events-3.1.0.tgz#84279af1b34cb75aa88bf5ff291f6d0bd9b31a59" integrity sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg== @@ -2350,17 +3036,60 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expect@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-25.1.0.tgz#7e8d7b06a53f7d66ec927278db3304254ee683ee" - integrity sha512-wqHzuoapQkhc3OKPlrpetsfueuEiMf3iWh0R8+duCu9PIjXoP7HgD5aeypwTnXUAjC8aMsiVDaWwlbJ1RlQ38g== +expand-tilde@^2.0.0, expand-tilde@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" + integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= dependencies: - "@jest/types" "^25.1.0" + homedir-polyfill "^1.0.1" + +expect@^25.2.7: + version "25.2.7" + resolved "https://registry.yarnpkg.com/expect/-/expect-25.2.7.tgz#509b79f47502835f4071ff3ecc401f2eaecca709" + integrity sha512-yA+U2Ph0MkMsJ9N8q5hs9WgWI6oJYfecdXta6LkP/alY/jZZL1MHlJ2wbLh60Ucqf3G+51ytbqV3mlGfmxkpNw== + dependencies: + "@jest/types" "^25.2.6" ansi-styles "^4.0.0" - jest-get-type "^25.1.0" - jest-matcher-utils "^25.1.0" - jest-message-util "^25.1.0" - jest-regex-util "^25.1.0" + jest-get-type "^25.2.6" + jest-matcher-utils "^25.2.7" + jest-message-util "^25.2.6" + jest-regex-util "^25.2.6" + +express@^4.16.3: + version "4.17.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" extend-shallow@^2.0.1: version "2.0.1" @@ -2437,6 +3166,11 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" +figgy-pudding@^3.5.1: + version "3.5.2" + resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" + integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== + figures@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -2444,11 +3178,23 @@ figures@^3.0.0: dependencies: escape-string-regexp "^1.0.5" +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== + dependencies: + flat-cache "^2.0.1" + file-uri-to-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== +filesize@^3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" + integrity sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg== + fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" @@ -2466,13 +3212,59 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-up@^2.0.0: +finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-cache-dir@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" + integrity sha1-yN765XyKUqinhPnjHFfHQumToLk= + dependencies: + commondir "^1.0.1" + mkdirp "^0.5.1" + pkg-dir "^1.0.0" + +find-cache-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== + dependencies: + commondir "^1.0.1" + make-dir "^2.0.0" + pkg-dir "^3.0.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= dependencies: locate-path "^2.0.0" +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -2481,6 +3273,38 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" +findup-sync@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" + integrity sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg== + dependencies: + detect-file "^1.0.0" + is-glob "^4.0.0" + micromatch "^3.0.4" + resolve-dir "^1.0.1" + +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== + dependencies: + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flatted@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" + integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== + +flush-write-stream@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" + integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== + dependencies: + inherits "^2.0.3" + readable-stream "^2.3.6" + follow-redirects@1.5.10: version "1.5.10" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" @@ -2507,6 +3331,11 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" +forwarded@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" + integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= + fraction.js@^4.0.12: version "4.0.12" resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.0.12.tgz#0526d47c65a5fb4854df78bc77f7bec708d7b8c3" @@ -2519,6 +3348,19 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +from2@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= + dependencies: + inherits "^2.0.1" + readable-stream "^2.0.0" + fs-extra@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -2528,11 +3370,39 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" +fs-extra@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.0.tgz#b6afc31036e247b2466dc99c29ae797d5d4580a3" + integrity sha512-pmEYSk3vYsG/bF651KPUXZ+hvjpgWYw/Gc7W9NFUe3ZVLczKKWIij3IKpOrQcdw4TILtibFslZ0UmR8Vvzig4g== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^1.0.0" + +fs-write-stream-atomic@^1.0.8: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" + integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= + dependencies: + graceful-fs "^4.1.2" + iferr "^0.1.5" + imurmurhash "^0.1.4" + readable-stream "1 || 2" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= +fsevents@^1.2.7: + version "1.2.12" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.12.tgz#db7e0d8ec3b0b45724fd4d83d43554a8f1f0de5c" + integrity sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q== + dependencies: + bindings "^1.5.0" + nan "^2.12.1" + fsevents@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" @@ -2543,6 +3413,11 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + gensync@^1.0.0-beta.1: version "1.0.0-beta.1" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" @@ -2584,6 +3459,21 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" +glob-parent@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-parent@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" + integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== + dependencies: + is-glob "^4.0.1" + glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" @@ -2603,11 +3493,54 @@ global-dirs@^0.1.0: dependencies: ini "^1.3.4" +global-modules@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" + integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== + dependencies: + global-prefix "^3.0.0" + +global-modules@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" + integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== + dependencies: + global-prefix "^1.0.1" + is-windows "^1.0.1" + resolve-dir "^1.0.0" + +global-prefix@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" + integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= + dependencies: + expand-tilde "^2.0.2" + homedir-polyfill "^1.0.1" + ini "^1.3.4" + is-windows "^1.0.1" + which "^1.2.14" + +global-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" + integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== + dependencies: + ini "^1.3.5" + kind-of "^6.0.2" + which "^1.3.1" + globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +globals@^12.1.0: + version "12.4.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" + integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== + dependencies: + type-fest "^0.8.1" + got@^9.6.0: version "9.6.0" resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" @@ -2625,7 +3558,7 @@ got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.3: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== @@ -2652,14 +3585,23 @@ gts@^1.1.2: update-notifier "^3.0.0" write-file-atomic "^3.0.0" +gzip-size@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" + integrity sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA== + dependencies: + duplexer "^0.1.1" + pify "^4.0.1" + handlebars@^4.7.2: - version "4.7.3" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.3.tgz#8ece2797826886cf8082d1726ff21d2a022550ee" - integrity sha512-SRGwSYuNfx8DwHD/6InAPzD6RgeruWLT+B8e8a7gGs8FWgHzlExpTFMEq2IA6QpAfOClpKHy6+8IqTjeBCu6Kg== + version "4.7.6" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e" + integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== dependencies: + minimist "^1.2.5" neo-async "^2.6.0" - optimist "^0.6.1" source-map "^0.6.1" + wordwrap "^1.0.0" optionalDependencies: uglify-js "^3.1.4" @@ -2686,7 +3628,7 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-symbols@^1.0.0, has-symbols@^1.0.1: +has-symbols@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== @@ -2727,13 +3669,6 @@ has-yarn@^2.1.0: resolved "https://registry.yarnpkg.com/has-yarn/-/has-yarn-2.1.0.tgz#137e11354a7b5bf11aa5cb649cf0c6f3ff2b2e77" integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw== -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - hash-base@^3.0.0: version "3.0.4" resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" @@ -2751,9 +3686,9 @@ hash.js@^1.0.0, hash.js@^1.0.3: minimalistic-assert "^1.0.1" highlight.js@^9.17.1: - version "9.18.5" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.5.tgz#d18a359867f378c138d6819edfc2a8acd5f29825" - integrity sha512-a5bFyofd/BHCX52/8i8uJkjr9DYwXIPnM/plwI6W7ezItLGqzt7X2G2nXuYSfsIJdkwwj/g9DG1LkcGJI/dDoA== + version "9.18.1" + resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.18.1.tgz#ed21aa001fe6252bb10a3d76d47573c6539fe13c" + integrity sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg== hmac-drbg@^1.0.0: version "1.0.1" @@ -2764,10 +3699,22 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" +homedir-polyfill@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" + integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== + dependencies: + parse-passwd "^1.0.0" + +hoopy@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/hoopy/-/hoopy-0.1.4.tgz#609207d661100033a9a9402ad3dea677381c1b1d" + integrity sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ== + hosted-git-info@^2.1.4: - version "2.8.5" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" - integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg== + version "2.8.8" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" + integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== html-encoding-sniffer@^1.0.2: version "1.0.2" @@ -2777,14 +3724,36 @@ html-encoding-sniffer@^1.0.2: whatwg-encoding "^1.0.1" html-escaper@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.0.tgz#71e87f931de3fe09e56661ab9a29aadec707b491" - integrity sha512-a4u9BeERWGu/S8JiWEAQcdrg9v4QArtP9keViQjGMdff20fBdd8waotXaNmODqBe6uZ3Nafi7K/ho4gCQHV3Ig== + version "2.0.2" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== http-cache-semantics@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz#13eeb612424bb113d52172c28a13109c46fa85d7" - integrity sha512-Z2EICWNJou7Tr9Bd2M2UqDJq3A9F2ePG9w3lIpjoyuSyXFP9QbniJVu3XQYytuw5ebmG7dXSXO9PgAjJG8DDKA== + version "4.1.0" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" + integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== + +http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" http-signature@~1.2.0: version "1.2.0" @@ -2795,6 +3764,11 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= + human-signals@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -2807,11 +3781,42 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" +ieee754@^1.1.4: + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== + +iferr@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" + integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= + +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +import-fresh@^3.0.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" + integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + import-lazy@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= +import-local@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" + integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== + dependencies: + pkg-dir "^3.0.0" + resolve-cwd "^2.0.0" + import-local@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6" @@ -2830,6 +3835,11 @@ indent-string@^3.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= +infer-owner@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" + integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -2838,36 +3848,46 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@^1.3.4, ini@~1.3.0: - version "1.3.8" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" - integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== +inherits@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" + integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== inquirer@^7.0.0: - version "7.0.4" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.0.4.tgz#99af5bde47153abca23f5c7fc30db247f39da703" - integrity sha512-Bu5Td5+j11sCkqfqmUTiwv+tWisMtP0L7Q8WrqA2C/BbBhy1YTdFrvjjlrKq8oagA/tLQBski2Gcx/Sqyi2qSQ== + version "7.1.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.1.0.tgz#1298a01859883e17c7264b82870ae1034f92dd29" + integrity sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg== dependencies: ansi-escapes "^4.2.1" - chalk "^2.4.2" + chalk "^3.0.0" cli-cursor "^3.1.0" cli-width "^2.0.0" external-editor "^3.0.3" figures "^3.0.0" lodash "^4.17.15" mute-stream "0.0.8" - run-async "^2.2.0" + run-async "^2.4.0" rxjs "^6.5.3" string-width "^4.1.0" - strip-ansi "^5.1.0" + strip-ansi "^6.0.0" through "^2.3.6" -interpret@^1.0.0: +interpret@1.2.0, interpret@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== @@ -2879,11 +3899,21 @@ invariant@^2.2.2, invariant@^2.2.4: dependencies: loose-envify "^1.0.0" +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== + ip-regex@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" @@ -2903,16 +3933,18 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= +is-binary-path@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" + integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= + dependencies: + binary-extensions "^1.0.0" + is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-callable@^1.1.4, is-callable@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" - integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== - is-ci@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" @@ -2934,11 +3966,6 @@ is-data-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" -is-date-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e" - integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== - is-descriptor@^0.1.0: version "0.1.6" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" @@ -2969,6 +3996,11 @@ is-extendable@^1.0.1: dependencies: is-plain-object "^2.0.4" +is-extglob@^2.1.0, is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" @@ -2984,6 +4016,20 @@ is-generator-fn@^2.0.0: resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= + dependencies: + is-extglob "^2.1.0" + +is-glob@^4.0.0, is-glob@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + is-installed-globally@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80" @@ -3038,13 +4084,6 @@ is-promise@^2.1.0: resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= -is-regex@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" - integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== - dependencies: - has "^1.0.3" - is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -3055,23 +4094,21 @@ is-stream@^2.0.0: resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== -is-symbol@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" - integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== - dependencies: - has-symbols "^1.0.1" - is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= -is-windows@^1.0.2: +is-windows@^1.0.1, is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== +is-wsl@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" + integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= + is-wsl@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.1.1.tgz#4a1c152d429df3d441669498e2486d3596ebaf1d" @@ -3087,7 +4124,7 @@ is_js@^0.9.0: resolved "https://registry.yarnpkg.com/is_js/-/is_js-0.9.0.tgz#0ab94540502ba7afa24c856aa985561669e9c52d" integrity sha1-CrlFQFArp6+iTIVqqYVWFmnpxS0= -isarray@1.0.0, isarray@~1.0.0: +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= @@ -3156,9 +4193,9 @@ istanbul-lib-source-maps@^4.0.0: source-map "^0.6.1" istanbul-reports@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.0.tgz#d4d16d035db99581b6194e119bbf36c963c5eb70" - integrity sha512-2osTcC8zcOSUkImzN2EWQta3Vdi4WjjKw99P2yWx5mLnigAM0Rd5uYFn1cf2i/Ois45GkNjaoTqc5CxgMSX80A== + version "3.0.2" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.2.tgz#d593210e5000683750cb09fc0644e4b6e27fd53b" + integrity sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw== dependencies: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" @@ -3168,358 +4205,362 @@ javascript-natural-sort@^0.7.1: resolved "https://registry.yarnpkg.com/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz#f9e2303d4507f6d74355a73664d1440fb5a0ef59" integrity sha1-+eIwPUUH9tdDVac2ZNFED7Wg71k= -jest-changed-files@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-25.1.0.tgz#73dae9a7d9949fdfa5c278438ce8f2ff3ec78131" - integrity sha512-bdL1aHjIVy3HaBO3eEQeemGttsq1BDlHgWcOjEOIAcga7OOEGWHD2WSu8HhL7I1F0mFFyci8VKU4tRNk+qtwDA== +jest-changed-files@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-25.2.6.tgz#7d569cd6b265b1a84db3914db345d9c452f26b71" + integrity sha512-F7l2m5n55jFnJj4ItB9XbAlgO+6umgvz/mdK76BfTd2NGkvGf9x96hUXP/15a1K0k14QtVOoutwpRKl360msvg== dependencies: - "@jest/types" "^25.1.0" + "@jest/types" "^25.2.6" execa "^3.2.0" throat "^5.0.0" -jest-cli@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-25.1.0.tgz#75f0b09cf6c4f39360906bf78d580be1048e4372" - integrity sha512-p+aOfczzzKdo3AsLJlhs8J5EW6ffVidfSZZxXedJ0mHPBOln1DccqFmGCoO8JWd4xRycfmwy1eoQkMsF8oekPg== +jest-cli@^25.2.7: + version "25.2.7" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-25.2.7.tgz#515b61fee402c397ffa8d570532f7b039c3159f4" + integrity sha512-OOAZwY4Jkd3r5WhVM5L3JeLNFaylvHUczMLxQDVLrrVyb1Cy+DNJ6MVsb5TLh6iBklB42m5TOP+IbOgKGGOtMw== dependencies: - "@jest/core" "^25.1.0" - "@jest/test-result" "^25.1.0" - "@jest/types" "^25.1.0" + "@jest/core" "^25.2.7" + "@jest/test-result" "^25.2.6" + "@jest/types" "^25.2.6" chalk "^3.0.0" exit "^0.1.2" import-local "^3.0.2" is-ci "^2.0.0" - jest-config "^25.1.0" - jest-util "^25.1.0" - jest-validate "^25.1.0" + jest-config "^25.2.7" + jest-util "^25.2.6" + jest-validate "^25.2.6" prompts "^2.0.1" - realpath-native "^1.1.0" - yargs "^15.0.0" + realpath-native "^2.0.0" + yargs "^15.3.1" -jest-config@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-25.1.0.tgz#d114e4778c045d3ef239452213b7ad3ec1cbea90" - integrity sha512-tLmsg4SZ5H7tuhBC5bOja0HEblM0coS3Wy5LTCb2C8ZV6eWLewHyK+3qSq9Bi29zmWQ7ojdCd3pxpx4l4d2uGw== +jest-config@^25.2.7: + version "25.2.7" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-25.2.7.tgz#a14e5b96575987ce913dd9fc20ac8cd4b35a8c29" + integrity sha512-rIdPPXR6XUxi+7xO4CbmXXkE6YWprvlKc4kg1SrkCL2YV5m/8MkHstq9gBZJ19Qoa3iz/GP+0sTG/PcIwkFojg== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^25.1.0" - "@jest/types" "^25.1.0" - babel-jest "^25.1.0" + "@jest/test-sequencer" "^25.2.7" + "@jest/types" "^25.2.6" + babel-jest "^25.2.6" chalk "^3.0.0" + deepmerge "^4.2.2" glob "^7.1.1" - jest-environment-jsdom "^25.1.0" - jest-environment-node "^25.1.0" - jest-get-type "^25.1.0" - jest-jasmine2 "^25.1.0" - jest-regex-util "^25.1.0" - jest-resolve "^25.1.0" - jest-util "^25.1.0" - jest-validate "^25.1.0" + jest-environment-jsdom "^25.2.6" + jest-environment-node "^25.2.6" + jest-get-type "^25.2.6" + jest-jasmine2 "^25.2.7" + jest-regex-util "^25.2.6" + jest-resolve "^25.2.6" + jest-util "^25.2.6" + jest-validate "^25.2.6" micromatch "^4.0.2" - pretty-format "^25.1.0" - realpath-native "^1.1.0" + pretty-format "^25.2.6" + realpath-native "^2.0.0" -jest-diff@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.1.0.tgz#58b827e63edea1bc80c1de952b80cec9ac50e1ad" - integrity sha512-nepXgajT+h017APJTreSieh4zCqnSHEJ1iT8HDlewu630lSJ4Kjjr9KNzm+kzGwwcpsDE6Snx1GJGzzsefaEHw== +jest-diff@^25.2.1, jest-diff@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.2.6.tgz#a6d70a9ab74507715ea1092ac513d1ab81c1b5e7" + integrity sha512-KuadXImtRghTFga+/adnNrv9s61HudRMR7gVSbP35UKZdn4IK2/0N0PpGZIqtmllK9aUyye54I3nu28OYSnqOg== dependencies: chalk "^3.0.0" - diff-sequences "^25.1.0" - jest-get-type "^25.1.0" - pretty-format "^25.1.0" + diff-sequences "^25.2.6" + jest-get-type "^25.2.6" + pretty-format "^25.2.6" -jest-docblock@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-25.1.0.tgz#0f44bea3d6ca6dfc38373d465b347c8818eccb64" - integrity sha512-370P/mh1wzoef6hUKiaMcsPtIapY25suP6JqM70V9RJvdKLrV4GaGbfUseUVk4FZJw4oTZ1qSCJNdrClKt5JQA== +jest-docblock@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-25.2.6.tgz#4b09f1e7b7d6b3f39242ef3647ac7106770f722b" + integrity sha512-VAYrljEq0upq0oERfIaaNf28gC6p9gORndhHstCYF8NWGNQJnzoaU//S475IxfWMk4UjjVmS9rJKLe5Jjjbixw== dependencies: detect-newline "^3.0.0" -jest-each@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-25.1.0.tgz#a6b260992bdf451c2d64a0ccbb3ac25e9b44c26a" - integrity sha512-R9EL8xWzoPySJ5wa0DXFTj7NrzKpRD40Jy+zQDp3Qr/2QmevJgkN9GqioCGtAJ2bW9P/MQRznQHQQhoeAyra7A== +jest-each@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-25.2.6.tgz#026f6dea2ccc443c35cea793265620aab1b278b6" + integrity sha512-OgQ01VINaRD6idWJOhCYwUc5EcgHBiFlJuw+ON2VgYr7HLtMFyCcuo+3mmBvuLUH4QudREZN7cDCZviknzsaJQ== dependencies: - "@jest/types" "^25.1.0" + "@jest/types" "^25.2.6" chalk "^3.0.0" - jest-get-type "^25.1.0" - jest-util "^25.1.0" - pretty-format "^25.1.0" - -jest-environment-jsdom@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-25.1.0.tgz#6777ab8b3e90fd076801efd3bff8e98694ab43c3" - integrity sha512-ILb4wdrwPAOHX6W82GGDUiaXSSOE274ciuov0lztOIymTChKFtC02ddyicRRCdZlB5YSrv3vzr1Z5xjpEe1OHQ== - dependencies: - "@jest/environment" "^25.1.0" - "@jest/fake-timers" "^25.1.0" - "@jest/types" "^25.1.0" - jest-mock "^25.1.0" - jest-util "^25.1.0" - jsdom "^15.1.1" - -jest-environment-node@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-25.1.0.tgz#797bd89b378cf0bd794dc8e3dca6ef21126776db" - integrity sha512-U9kFWTtAPvhgYY5upnH9rq8qZkj6mYLup5l1caAjjx9uNnkLHN2xgZy5mo4SyLdmrh/EtB9UPpKFShvfQHD0Iw== - dependencies: - "@jest/environment" "^25.1.0" - "@jest/fake-timers" "^25.1.0" - "@jest/types" "^25.1.0" - jest-mock "^25.1.0" - jest-util "^25.1.0" - -jest-get-type@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-25.1.0.tgz#1cfe5fc34f148dc3a8a3b7275f6b9ce9e2e8a876" - integrity sha512-yWkBnT+5tMr8ANB6V+OjmrIJufHtCAqI5ic2H40v+tRqxDmE0PGnIiTyvRWFOMtmVHYpwRqyazDbTnhpjsGvLw== - -jest-haste-map@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-25.1.0.tgz#ae12163d284f19906260aa51fd405b5b2e5a4ad3" - integrity sha512-/2oYINIdnQZAqyWSn1GTku571aAfs8NxzSErGek65Iu5o8JYb+113bZysRMcC/pjE5v9w0Yz+ldbj9NxrFyPyw== - dependencies: - "@jest/types" "^25.1.0" + jest-get-type "^25.2.6" + jest-util "^25.2.6" + pretty-format "^25.2.6" + +jest-environment-jsdom@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-25.2.6.tgz#b7ae41c6035905b8e58d63a8f63cf8eaa00af279" + integrity sha512-/o7MZIhGmLGIEG5j7r5B5Az0umWLCHU+F5crwfbm0BzC4ybHTJZOQTFQWhohBg+kbTCNOuftMcqHlVkVduJCQQ== + dependencies: + "@jest/environment" "^25.2.6" + "@jest/fake-timers" "^25.2.6" + "@jest/types" "^25.2.6" + jest-mock "^25.2.6" + jest-util "^25.2.6" + jsdom "^15.2.1" + +jest-environment-node@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-25.2.6.tgz#ad4398432867113f474d94fe37b071ed04b30f3d" + integrity sha512-D1Ihj14fxZiMHGeTtU/LunhzSI+UeBvlr/rcXMTNyRMUMSz2PEhuqGbB78brBY6Dk3FhJDk7Ta+8reVaGjLWhA== + dependencies: + "@jest/environment" "^25.2.6" + "@jest/fake-timers" "^25.2.6" + "@jest/types" "^25.2.6" + jest-mock "^25.2.6" + jest-util "^25.2.6" + semver "^6.3.0" + +jest-get-type@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-25.2.6.tgz#0b0a32fab8908b44d508be81681487dbabb8d877" + integrity sha512-DxjtyzOHjObRM+sM1knti6or+eOgcGU4xVSb2HNP1TqO4ahsT+rqZg+nyqHWJSvWgKC5cG3QjGFBqxLghiF/Ig== + +jest-haste-map@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-25.2.6.tgz#4aa6bcfa15310afccdb9ca77af58a98add8cedb8" + integrity sha512-nom0+fnY8jwzelSDQnrqaKAcDZczYQvMEwcBjeL3PQ4MlcsqeB7dmrsAniUw/9eLkngT5DE6FhnenypilQFsgA== + dependencies: + "@jest/types" "^25.2.6" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.3" - jest-serializer "^25.1.0" - jest-util "^25.1.0" - jest-worker "^25.1.0" + jest-serializer "^25.2.6" + jest-util "^25.2.6" + jest-worker "^25.2.6" micromatch "^4.0.2" sane "^4.0.3" walker "^1.0.7" + which "^2.0.2" optionalDependencies: fsevents "^2.1.2" -jest-jasmine2@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-25.1.0.tgz#681b59158a430f08d5d0c1cce4f01353e4b48137" - integrity sha512-GdncRq7jJ7sNIQ+dnXvpKO2MyP6j3naNK41DTTjEAhLEdpImaDA9zSAZwDhijjSF/D7cf4O5fdyUApGBZleaEg== +jest-jasmine2@^25.2.7: + version "25.2.7" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-25.2.7.tgz#55ff87f8f462ef0e2f16fd19430b8be8bcebef0e" + integrity sha512-HeQxEbonp8fUvik9jF0lkU9ab1u5TQdIb7YSU9Fj7SxWtqHNDGyCpF6ZZ3r/5yuertxi+R95Ba9eA91GMQ38eA== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^25.1.0" - "@jest/source-map" "^25.1.0" - "@jest/test-result" "^25.1.0" - "@jest/types" "^25.1.0" + "@jest/environment" "^25.2.6" + "@jest/source-map" "^25.2.6" + "@jest/test-result" "^25.2.6" + "@jest/types" "^25.2.6" chalk "^3.0.0" co "^4.6.0" - expect "^25.1.0" + expect "^25.2.7" is-generator-fn "^2.0.0" - jest-each "^25.1.0" - jest-matcher-utils "^25.1.0" - jest-message-util "^25.1.0" - jest-runtime "^25.1.0" - jest-snapshot "^25.1.0" - jest-util "^25.1.0" - pretty-format "^25.1.0" + jest-each "^25.2.6" + jest-matcher-utils "^25.2.7" + jest-message-util "^25.2.6" + jest-runtime "^25.2.7" + jest-snapshot "^25.2.7" + jest-util "^25.2.6" + pretty-format "^25.2.6" throat "^5.0.0" -jest-leak-detector@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-25.1.0.tgz#ed6872d15aa1c72c0732d01bd073dacc7c38b5c6" - integrity sha512-3xRI264dnhGaMHRvkFyEKpDeaRzcEBhyNrOG5oT8xPxOyUAblIAQnpiR3QXu4wDor47MDTiHbiFcbypdLcLW5w== +jest-leak-detector@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-25.2.6.tgz#68fbaf651142292b03e30641f33e15af9b8c62b1" + integrity sha512-n+aJUM+j/x1kIaPVxzerMqhAUuqTU1PL5kup46rXh+l9SP8H6LqECT/qD1GrnylE1L463/0StSPkH4fUpkuEjA== dependencies: - jest-get-type "^25.1.0" - pretty-format "^25.1.0" + jest-get-type "^25.2.6" + pretty-format "^25.2.6" -jest-matcher-utils@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-25.1.0.tgz#fa5996c45c7193a3c24e73066fc14acdee020220" - integrity sha512-KGOAFcSFbclXIFE7bS4C53iYobKI20ZWleAdAFun4W1Wz1Kkej8Ng6RRbhL8leaEvIOjGXhGf/a1JjO8bkxIWQ== +jest-matcher-utils@^25.2.7: + version "25.2.7" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-25.2.7.tgz#53fad3c11fc42e92e374306df543026712c957a3" + integrity sha512-jNYmKQPRyPO3ny0KY1I4f0XW4XnpJ3Nx5ovT4ik0TYDOYzuXJW40axqOyS61l/voWbVT9y9nZ1THL1DlpaBVpA== dependencies: chalk "^3.0.0" - jest-diff "^25.1.0" - jest-get-type "^25.1.0" - pretty-format "^25.1.0" + jest-diff "^25.2.6" + jest-get-type "^25.2.6" + pretty-format "^25.2.6" -jest-message-util@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-25.1.0.tgz#702a9a5cb05c144b9aa73f06e17faa219389845e" - integrity sha512-Nr/Iwar2COfN22aCqX0kCVbXgn8IBm9nWf4xwGr5Olv/KZh0CZ32RKgZWMVDXGdOahicM10/fgjdimGNX/ttCQ== +jest-message-util@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-25.2.6.tgz#9d5523bebec8cd9cdef75f0f3069d6ec9a2252df" + integrity sha512-Hgg5HbOssSqOuj+xU1mi7m3Ti2nwSQJQf/kxEkrz2r2rp2ZLO1pMeKkz2WiDUWgSR+APstqz0uMFcE5yc0qdcg== dependencies: "@babel/code-frame" "^7.0.0" - "@jest/test-result" "^25.1.0" - "@jest/types" "^25.1.0" + "@jest/types" "^25.2.6" "@types/stack-utils" "^1.0.1" chalk "^3.0.0" micromatch "^4.0.2" slash "^3.0.0" stack-utils "^1.0.1" -jest-mock@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-25.1.0.tgz#411d549e1b326b7350b2e97303a64715c28615fd" - integrity sha512-28/u0sqS+42vIfcd1mlcg4ZVDmSUYuNvImP4X2lX5hRMLW+CN0BeiKVD4p+ujKKbSPKd3rg/zuhCF+QBLJ4vag== +jest-mock@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-25.2.6.tgz#8df66eaa55a713d0f2a7dfb4f14507289d24dfa3" + integrity sha512-vc4nibavi2RGPdj/MyZy/azuDjZhpYZLvpfgq1fxkhbyTpKVdG7CgmRVKJ7zgLpY5kuMjTzDYA6QnRwhsCU+tA== dependencies: - "@jest/types" "^25.1.0" + "@jest/types" "^25.2.6" jest-pnp-resolver@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a" integrity sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ== -jest-regex-util@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-25.1.0.tgz#efaf75914267741838e01de24da07b2192d16d87" - integrity sha512-9lShaDmDpqwg+xAd73zHydKrBbbrIi08Kk9YryBEBybQFg/lBWR/2BDjjiSE7KIppM9C5+c03XiDaZ+m4Pgs1w== +jest-regex-util@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-25.2.6.tgz#d847d38ba15d2118d3b06390056028d0f2fd3964" + integrity sha512-KQqf7a0NrtCkYmZZzodPftn7fL1cq3GQAFVMn5Hg8uKx/fIenLEobNanUxb7abQ1sjADHBseG/2FGpsv/wr+Qw== -jest-resolve-dependencies@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-25.1.0.tgz#8a1789ec64eb6aaa77fd579a1066a783437e70d2" - integrity sha512-Cu/Je38GSsccNy4I2vL12ZnBlD170x2Oh1devzuM9TLH5rrnLW1x51lN8kpZLYTvzx9j+77Y5pqBaTqfdzVzrw== +jest-resolve-dependencies@^25.2.7: + version "25.2.7" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-25.2.7.tgz#9ca4c62d67cce031a27fa5d5705b4b5b5c029d23" + integrity sha512-IrnMzCAh11Xd2gAOJL+ThEW6QO8DyqNdvNkQcaCticDrOAr9wtKT7yT6QBFFjqKFgjjvaVKDs59WdgUhgYnHnQ== dependencies: - "@jest/types" "^25.1.0" - jest-regex-util "^25.1.0" - jest-snapshot "^25.1.0" + "@jest/types" "^25.2.6" + jest-regex-util "^25.2.6" + jest-snapshot "^25.2.7" -jest-resolve@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-25.1.0.tgz#23d8b6a4892362baf2662877c66aa241fa2eaea3" - integrity sha512-XkBQaU1SRCHj2Evz2Lu4Czs+uIgJXWypfO57L7JYccmAXv4slXA6hzNblmcRmf7P3cQ1mE7fL3ABV6jAwk4foQ== +jest-resolve@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-25.2.6.tgz#84694ead5da13c2890ac04d4a78699ba937f3896" + integrity sha512-7O61GVdcAXkLz/vNGKdF+00A80/fKEAA47AEXVNcZwj75vEjPfZbXDaWFmAQCyXj4oo9y9dC9D+CLA11t8ieGw== dependencies: - "@jest/types" "^25.1.0" + "@jest/types" "^25.2.6" browser-resolve "^1.11.3" chalk "^3.0.0" jest-pnp-resolver "^1.2.1" - realpath-native "^1.1.0" - -jest-runner@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-25.1.0.tgz#fef433a4d42c89ab0a6b6b268e4a4fbe6b26e812" - integrity sha512-su3O5fy0ehwgt+e8Wy7A8CaxxAOCMzL4gUBftSs0Ip32S0epxyZPDov9Znvkl1nhVOJNf4UwAsnqfc3plfQH9w== - dependencies: - "@jest/console" "^25.1.0" - "@jest/environment" "^25.1.0" - "@jest/test-result" "^25.1.0" - "@jest/types" "^25.1.0" + realpath-native "^2.0.0" + resolve "^1.15.1" + +jest-runner@^25.2.7: + version "25.2.7" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-25.2.7.tgz#3676c01dc0104caa8a0ebb8507df382c88f2a1e2" + integrity sha512-RFEr71nMrtNwcpoHzie5+fe1w3JQCGMyT2xzNwKe3f88+bK+frM2o1v24gEcPxQ2QqB3COMCe2+1EkElP+qqqQ== + dependencies: + "@jest/console" "^25.2.6" + "@jest/environment" "^25.2.6" + "@jest/test-result" "^25.2.6" + "@jest/types" "^25.2.6" chalk "^3.0.0" exit "^0.1.2" graceful-fs "^4.2.3" - jest-config "^25.1.0" - jest-docblock "^25.1.0" - jest-haste-map "^25.1.0" - jest-jasmine2 "^25.1.0" - jest-leak-detector "^25.1.0" - jest-message-util "^25.1.0" - jest-resolve "^25.1.0" - jest-runtime "^25.1.0" - jest-util "^25.1.0" - jest-worker "^25.1.0" + jest-config "^25.2.7" + jest-docblock "^25.2.6" + jest-haste-map "^25.2.6" + jest-jasmine2 "^25.2.7" + jest-leak-detector "^25.2.6" + jest-message-util "^25.2.6" + jest-resolve "^25.2.6" + jest-runtime "^25.2.7" + jest-util "^25.2.6" + jest-worker "^25.2.6" source-map-support "^0.5.6" throat "^5.0.0" -jest-runtime@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-25.1.0.tgz#02683218f2f95aad0f2ec1c9cdb28c1dc0ec0314" - integrity sha512-mpPYYEdbExKBIBB16ryF6FLZTc1Rbk9Nx0ryIpIMiDDkOeGa0jQOKVI/QeGvVGlunKKm62ywcioeFVzIbK03bA== - dependencies: - "@jest/console" "^25.1.0" - "@jest/environment" "^25.1.0" - "@jest/source-map" "^25.1.0" - "@jest/test-result" "^25.1.0" - "@jest/transform" "^25.1.0" - "@jest/types" "^25.1.0" +jest-runtime@^25.2.7: + version "25.2.7" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-25.2.7.tgz#cb10e695d036671a83aec3a3803163c354043ac9" + integrity sha512-Gw3X8KxTTFylu2T/iDSNKRUQXQiPIYUY0b66GwVYa7W8wySkUljKhibQHSq0VhmCAN7vRBEQjlVQ+NFGNmQeBw== + dependencies: + "@jest/console" "^25.2.6" + "@jest/environment" "^25.2.6" + "@jest/source-map" "^25.2.6" + "@jest/test-result" "^25.2.6" + "@jest/transform" "^25.2.6" + "@jest/types" "^25.2.6" "@types/yargs" "^15.0.0" chalk "^3.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.3" - jest-config "^25.1.0" - jest-haste-map "^25.1.0" - jest-message-util "^25.1.0" - jest-mock "^25.1.0" - jest-regex-util "^25.1.0" - jest-resolve "^25.1.0" - jest-snapshot "^25.1.0" - jest-util "^25.1.0" - jest-validate "^25.1.0" - realpath-native "^1.1.0" + jest-config "^25.2.7" + jest-haste-map "^25.2.6" + jest-message-util "^25.2.6" + jest-mock "^25.2.6" + jest-regex-util "^25.2.6" + jest-resolve "^25.2.6" + jest-snapshot "^25.2.7" + jest-util "^25.2.6" + jest-validate "^25.2.6" + realpath-native "^2.0.0" slash "^3.0.0" strip-bom "^4.0.0" - yargs "^15.0.0" + yargs "^15.3.1" -jest-serializer@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-25.1.0.tgz#73096ba90e07d19dec4a0c1dd89c355e2f129e5d" - integrity sha512-20Wkq5j7o84kssBwvyuJ7Xhn7hdPeTXndnwIblKDR2/sy1SUm6rWWiG9kSCgJPIfkDScJCIsTtOKdlzfIHOfKA== +jest-serializer@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-25.2.6.tgz#3bb4cc14fe0d8358489dbbefbb8a4e708ce039b7" + integrity sha512-RMVCfZsezQS2Ww4kB5HJTMaMJ0asmC0BHlnobQC6yEtxiFKIxohFA4QSXSabKwSggaNkqxn6Z2VwdFCjhUWuiQ== -jest-snapshot@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-25.1.0.tgz#d5880bd4b31faea100454608e15f8d77b9d221d9" - integrity sha512-xZ73dFYN8b/+X2hKLXz4VpBZGIAn7muD/DAg+pXtDzDGw3iIV10jM7WiHqhCcpDZfGiKEj7/2HXAEPtHTj0P2A== +jest-snapshot@^25.2.7: + version "25.2.7" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-25.2.7.tgz#7eeafeef4dcbda1c47c8503d2bf5212b6430aac6" + integrity sha512-Rm8k7xpGM4tzmYhB6IeRjsOMkXaU8/FOz5XlU6oYwhy53mq6txVNqIKqN1VSiexzpC80oWVxVDfUDt71M6XPOA== dependencies: "@babel/types" "^7.0.0" - "@jest/types" "^25.1.0" + "@jest/types" "^25.2.6" + "@types/prettier" "^1.19.0" chalk "^3.0.0" - expect "^25.1.0" - jest-diff "^25.1.0" - jest-get-type "^25.1.0" - jest-matcher-utils "^25.1.0" - jest-message-util "^25.1.0" - jest-resolve "^25.1.0" - mkdirp "^0.5.1" + expect "^25.2.7" + jest-diff "^25.2.6" + jest-get-type "^25.2.6" + jest-matcher-utils "^25.2.7" + jest-message-util "^25.2.6" + jest-resolve "^25.2.6" + make-dir "^3.0.0" natural-compare "^1.4.0" - pretty-format "^25.1.0" - semver "^7.1.1" + pretty-format "^25.2.6" + semver "^6.3.0" -jest-util@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-25.1.0.tgz#7bc56f7b2abd534910e9fa252692f50624c897d9" - integrity sha512-7did6pLQ++87Qsj26Fs/TIwZMUFBXQ+4XXSodRNy3luch2DnRXsSnmpVtxxQ0Yd6WTipGpbhh2IFP1mq6/fQGw== +jest-util@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-25.2.6.tgz#3c1c95cdfd653126728b0ed861a86610e30d569c" + integrity sha512-gpXy0H5ymuQ0x2qgl1zzHg7LYHZYUmDEq6F7lhHA8M0eIwDB2WteOcCnQsohl9c/vBKZ3JF2r4EseipCZz3s4Q== dependencies: - "@jest/types" "^25.1.0" + "@jest/types" "^25.2.6" chalk "^3.0.0" is-ci "^2.0.0" - mkdirp "^0.5.1" + make-dir "^3.0.0" -jest-validate@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-25.1.0.tgz#1469fa19f627bb0a9a98e289f3e9ab6a668c732a" - integrity sha512-kGbZq1f02/zVO2+t1KQGSVoCTERc5XeObLwITqC6BTRH3Adv7NZdYqCpKIZLUgpLXf2yISzQ465qOZpul8abXA== +jest-validate@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-25.2.6.tgz#ab3631fb97e242c42b09ca53127abe0b12e9125e" + integrity sha512-a4GN7hYbqQ3Rt9iHsNLFqQz7HDV7KiRPCwPgo5nqtTIWNZw7gnT8KchG+Riwh+UTSn8REjFCodGp50KX/fRNgQ== dependencies: - "@jest/types" "^25.1.0" + "@jest/types" "^25.2.6" camelcase "^5.3.1" chalk "^3.0.0" - jest-get-type "^25.1.0" + jest-get-type "^25.2.6" leven "^3.1.0" - pretty-format "^25.1.0" + pretty-format "^25.2.6" -jest-watcher@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-25.1.0.tgz#97cb4a937f676f64c9fad2d07b824c56808e9806" - integrity sha512-Q9eZ7pyaIr6xfU24OeTg4z1fUqBF/4MP6J801lyQfg7CsnZ/TCzAPvCfckKdL5dlBBEKBeHV0AdyjFZ5eWj4ig== +jest-watcher@^25.2.7: + version "25.2.7" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-25.2.7.tgz#01db4332d34d14c03c9ef22255125a3b07f997bc" + integrity sha512-RdHuW+f49tahWtluTnUdZ2iPliebleROI2L/J5phYrUS6DPC9RB3SuUtqYyYhGZJsbvRSuLMIlY/cICJ+PIecw== dependencies: - "@jest/test-result" "^25.1.0" - "@jest/types" "^25.1.0" + "@jest/test-result" "^25.2.6" + "@jest/types" "^25.2.6" ansi-escapes "^4.2.1" chalk "^3.0.0" - jest-util "^25.1.0" + jest-util "^25.2.6" string-length "^3.1.0" -jest-worker@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.1.0.tgz#75d038bad6fdf58eba0d2ec1835856c497e3907a" - integrity sha512-ZHhHtlxOWSxCoNOKHGbiLzXnl42ga9CxDr27H36Qn+15pQZd3R/F24jrmjDelw9j/iHUIWMWs08/u2QN50HHOg== +jest-worker@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-25.2.6.tgz#d1292625326794ce187c38f51109faced3846c58" + integrity sha512-FJn9XDUSxcOR4cwDzRfL1z56rUofNTFs539FGASpd50RHdb6EVkhxQqktodW2mI49l+W3H+tFJDotCHUQF6dmA== dependencies: merge-stream "^2.0.0" supports-color "^7.0.0" jest@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-25.1.0.tgz#b85ef1ddba2fdb00d295deebbd13567106d35be9" - integrity sha512-FV6jEruneBhokkt9MQk0WUFoNTwnF76CLXtwNMfsc0um0TlB/LG2yxUd0KqaFjEJ9laQmVWQWS0sG/t2GsuI0w== + version "25.2.7" + resolved "https://registry.yarnpkg.com/jest/-/jest-25.2.7.tgz#3929a5f35cdd496f7756876a206b99a94e1e09ae" + integrity sha512-XV1n/CE2McCikl4tfpCY950RytHYvxdo/wvtgmn/qwA8z1s16fuvgFL/KoPrrmkqJTaPMUlLVE58pwiaTX5TdA== dependencies: - "@jest/core" "^25.1.0" + "@jest/core" "^25.2.7" import-local "^3.0.2" - jest-cli "^25.1.0" + jest-cli "^25.2.7" jquery@^3.4.1: - version "3.5.0" - resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.5.0.tgz#9980b97d9e4194611c36530e7dc46a58d7340fc9" - integrity sha512-Xb7SVYMvygPxbFMpTFQiHh1J7HClEaThguL15N/Gg37Lri/qKyhRGZYzHRyLH8Stq3Aow0LsHO2O2ci86fCrNQ== + version "3.4.1" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.4.1.tgz#714f1f8d9dde4bdfa55764ba37ef214630d80ef2" + integrity sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw== "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" @@ -3539,7 +4580,7 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jsdom@^15.1.1: +jsdom@^15.2.1: version "15.2.1" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-15.2.1.tgz#d2feb1aef7183f86be521b8c6833ff5296d07ec5" integrity sha512-fAl1W0/7T2G5vURSyxBzrJ1LSdQn6Tr5UX/xD4PXDx/PDgwygedfW6El/KIj3xJ7FU61TTYnc/l/B7P49Eqt6g== @@ -3586,7 +4627,7 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= -json-parse-better-errors@^1.0.1: +json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== @@ -3601,15 +4642,27 @@ json-schema@0.2.3: resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= -json5@2.x, json5@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.1.tgz#81b6cb04e9ba496f1c7005d07b4368a2638f90b6" - integrity sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ== +json5@2.x, json5@^2.1.2: + version "2.1.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" + integrity sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== + dependencies: + minimist "^1.2.5" + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== dependencies: minimist "^1.2.0" @@ -3620,6 +4673,15 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" +jsonfile@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" + integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg== + dependencies: + universalify "^1.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" @@ -3673,6 +4735,13 @@ latest-version@^5.0.0: dependencies: package-json "^6.3.0" +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== + dependencies: + invert-kv "^2.0.0" + leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -3685,7 +4754,7 @@ levenary@^1.1.1: dependencies: leven "^3.1.0" -levn@~0.3.0: +levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= @@ -3703,6 +4772,46 @@ load-json-file@^4.0.0: pify "^3.0.0" strip-bom "^3.0.0" +loader-fs-cache@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/loader-fs-cache/-/loader-fs-cache-1.0.3.tgz#f08657646d607078be2f0a032f8bd69dd6f277d9" + integrity sha512-ldcgZpjNJj71n+2Mf6yetz+c9bM4xpKtNds4LbqXzU/PTdeAX0g3ytnU1AJMEcTk2Lex4Smpe3Q/eCTsvUBxbA== + dependencies: + find-cache-dir "^0.1.1" + mkdirp "^0.5.1" + +loader-runner@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" + integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== + +loader-utils@1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" + integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== + dependencies: + big.js "^5.2.2" + emojis-list "^2.0.0" + json5 "^1.0.1" + +loader-utils@^1.0.2, loader-utils@^1.2.3, loader-utils@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" + integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^1.0.1" + +loader-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.0.tgz#e4cace5b816d425a166b5f097e10cd12b36064b0" + integrity sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ== + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^2.1.2" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -3711,6 +4820,14 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -3728,10 +4845,10 @@ lodash.sortby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= -lodash@^4.17.13, lodash@^4.17.15: - version "4.17.19" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" - integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== +lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== lolex@^5.0.0: version "5.1.2" @@ -3773,6 +4890,13 @@ lru-cache@^4.0.1: pseudomap "^1.0.2" yallist "^2.1.2" +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + lunr@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.8.tgz#a8b89c31f30b5a044b97d2d28e2da191b6ba2072" @@ -3785,6 +4909,14 @@ make-dir@^1.0.0: dependencies: pify "^3.0.0" +make-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + make-dir@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.2.tgz#04a1acbf22221e1d6ef43559f43e05a90dbb4392" @@ -3804,6 +4936,13 @@ makeerror@1.0.x: dependencies: tmpl "1.0.x" +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -3827,14 +4966,14 @@ map-visit@^1.0.0: object-visit "^1.0.0" marked@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.8.0.tgz#ec5c0c9b93878dc52dd54be8d0e524097bd81a99" - integrity sha512-MyUe+T/Pw4TZufHkzAfDj6HarCBWia2y27/bhuYkTaiUnfDYFnCP3KUN+9oM7Wi6JA2rymtVYbQu3spE0GCmxQ== + version "0.8.2" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.8.2.tgz#4faad28d26ede351a7a1aaa5fec67915c869e355" + integrity sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw== mathjs@^6.6.1: - version "6.6.1" - resolved "https://registry.yarnpkg.com/mathjs/-/mathjs-6.6.1.tgz#46675c9e97b8cb8cf9a66402b1360a6996abf103" - integrity sha512-RCFCYkf1IV3u0DAeqj2Rqqwyi302kFxHoYbfp/Bxm6kUg0ALYH7YT0bYzsO8qgCLv9RS3bWMZnAgUbLgiDjLcw== + version "6.6.2" + resolved "https://registry.yarnpkg.com/mathjs/-/mathjs-6.6.2.tgz#9411824ca113c158194ed55f47c816bafa63ec8d" + integrity sha512-kdAUnUbIwIkvd5ahUOFeZYZ6JfTSUDpQVsEkohWN7ZE5rTJgYsuIP7BWNswbHJt8a2C2zfSWS+7rMpDMLgJQhQ== dependencies: complex.js "^2.0.11" decimal.js "^10.2.0" @@ -3854,6 +4993,36 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + +mem@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== + dependencies: + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" + +memory-fs@^0.4.0, memory-fs@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" + integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + +memory-fs@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" + integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== + dependencies: + errno "^0.1.3" + readable-stream "^2.0.1" + meow@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4" @@ -3869,12 +5038,30 @@ meow@^5.0.0: trim-newlines "^2.0.0" yargs-parser "^10.0.0" +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -micromatch@^3.1.4: +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +micromatch@4.x, micromatch@^4.0.0, micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + +micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -3893,14 +5080,6 @@ micromatch@^3.1.4: snapdragon "^0.8.1" to-regex "^3.0.2" -micromatch@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" - integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== - dependencies: - braces "^3.0.1" - picomatch "^2.0.5" - miller-rabin@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" @@ -3914,14 +5093,19 @@ mime-db@1.43.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== -mime-types@^2.1.12, mime-types@~2.1.19: +mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24: version "2.1.26" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== dependencies: mime-db "1.43.0" -mimic-fn@^2.1.0: +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-fn@^2.0.0, mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== @@ -3956,20 +5140,26 @@ minimist-options@^3.0.1: arrify "^1.0.1" is-plain-obj "^1.1.0" -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - -minimist@^1.1.1, minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= +minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= +mississippi@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" + integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== + dependencies: + concat-stream "^1.5.0" + duplexify "^3.4.2" + end-of-stream "^1.1.0" + flush-write-stream "^1.0.0" + from2 "^2.1.0" + parallel-transform "^1.1.0" + pump "^3.0.0" + pumpify "^1.3.3" + stream-each "^1.1.0" + through2 "^2.0.0" mixin-deep@^1.2.0: version "1.3.2" @@ -3979,18 +5169,40 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.x, mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= +mkdirp@1.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mkdirp@^0.5.1, mkdirp@^0.5.3: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== dependencies: - minimist "0.0.8" + minimist "^1.2.5" + +move-concurrently@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" + integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= + dependencies: + aproba "^1.1.1" + copy-concurrently "^1.0.0" + fs-write-stream-atomic "^1.0.8" + mkdirp "^0.5.1" + rimraf "^2.5.4" + run-queue "^1.0.3" ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + ms@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" @@ -4001,7 +5213,7 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nan@^2.13.2, nan@^2.14.0: +nan@^2.12.1, nan@^2.13.2, nan@^2.14.0: version "2.14.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== @@ -4043,7 +5255,12 @@ ndjson@^1.5.0: split2 "^2.1.0" through2 "^2.0.3" -neo-async@^2.6.0: +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + +neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== @@ -4058,6 +5275,35 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= +node-libs-browser@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" + integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== + dependencies: + assert "^1.1.1" + browserify-zlib "^0.2.0" + buffer "^4.3.0" + console-browserify "^1.1.0" + constants-browserify "^1.0.0" + crypto-browserify "^3.11.0" + domain-browser "^1.1.1" + events "^3.0.0" + https-browserify "^1.0.0" + os-browserify "^0.3.0" + path-browserify "0.0.1" + process "^0.11.10" + punycode "^1.2.4" + querystring-es3 "^0.2.0" + readable-stream "^2.3.3" + stream-browserify "^2.0.1" + stream-http "^2.7.2" + string_decoder "^1.0.0" + timers-browserify "^2.0.4" + tty-browserify "0.0.0" + url "^0.11.0" + util "^0.11.0" + vm-browserify "^1.0.1" + node-modules-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" @@ -4074,12 +5320,10 @@ node-notifier@^6.0.0: shellwords "^0.1.1" which "^1.3.1" -node-releases@^1.1.49: - version "1.1.49" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.49.tgz#67ba5a3fac2319262675ef864ed56798bb33b93e" - integrity sha512-xH8t0LS0disN0mtRCh+eByxFPie+msJUBL/lJDBuap53QGiYPa9joh83K4pCZgWJ+2L4b9h88vCVdXQ60NO2bg== - dependencies: - semver "^6.3.0" +node-releases@^1.1.53: + version "1.1.53" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.53.tgz#2d821bfa499ed7c5dffc5e2f28c88e78a08ee3f4" + integrity sha512-wp8zyQVwef2hpZ/dJH7SfSrIPD6YoJz6BDQDpGEkcA0s3LpAQoxBIYmfIq6QAhC1DhwsyCgTaTTcONwX8qzCuQ== normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: version "2.5.0" @@ -4132,6 +5376,11 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== +object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + object-copy@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" @@ -4141,12 +5390,12 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" - integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== +object-hash@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.0.3.tgz#d12db044e03cd2ca3d77c0570d87225b02e1e6ea" + integrity sha512-JPKn0GMu+Fa3zt3Bmr66JhokJU5BaNBIh4ZeTlaCBzrBsOeXzwcKKAK1tbLiPKgvwmPXsDvvLHoWh5Bm7ofIYg== -object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: +object-keys@^1.0.11, object-keys@^1.0.12: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== @@ -4168,14 +5417,6 @@ object.assign@^4.1.0: has-symbols "^1.0.0" object-keys "^1.0.11" -object.getownpropertydescriptors@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" - integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" @@ -4183,6 +5424,13 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -4197,15 +5445,12 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" +opener@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" + integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA== -optionator@^0.8.1: +optionator@^0.8.1, optionator@^0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== @@ -4217,6 +5462,20 @@ optionator@^0.8.1: type-check "~0.3.2" word-wrap "~1.2.3" +os-browserify@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= + +os-locale@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== + dependencies: + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" + os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -4227,6 +5486,11 @@ p-cancelable@^1.0.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + p-each-series@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.1.0.tgz#961c8dd3f195ea96c747e636b262b800a6b1af48" @@ -4242,6 +5506,11 @@ p-finally@^2.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-2.0.1.tgz#bd6fcaa9c559a096b680806f4d657b3f0f240561" integrity sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw== +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== + p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" @@ -4249,10 +5518,10 @@ p-limit@^1.1.0: dependencies: p-try "^1.0.0" -p-limit@^2.2.0: - version "2.2.2" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e" - integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ== +p-limit@^2.0.0, p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" @@ -4263,6 +5532,13 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -4290,6 +5566,27 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" +pako@~1.0.5: + version "1.0.11" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" + integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== + +parallel-transform@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" + integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== + dependencies: + cyclist "^1.0.1" + inherits "^2.0.3" + readable-stream "^2.1.5" + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + parse-asn1@^5.0.0: version "5.1.5" resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e" @@ -4310,16 +5607,43 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" +parse-passwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= + parse5@5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.0.tgz#c59341c9723f414c452975564c7c00a68d58acd2" integrity sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ== +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= +path-browserify@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" + integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= + dependencies: + pinkie-promise "^2.0.0" + path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -4355,6 +5679,11 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" @@ -4379,15 +5708,32 @@ performance-now@^2.1.0: integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= picomatch@^2.0.4, picomatch@^2.0.5: - version "2.2.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.1.tgz#21bac888b6ed8601f831ce7816e335bc779f0a4a" - integrity sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA== + version "2.2.2" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" + integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= + pirates@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" @@ -4395,6 +5741,20 @@ pirates@^4.0.1: dependencies: node-modules-regexp "^1.0.0" +pkg-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" + integrity sha1-ektQio1bstYp1EcFb/TpyTFM89Q= + dependencies: + find-up "^1.0.0" + +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" @@ -4402,6 +5762,13 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" +pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" + integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= + dependencies: + find-up "^2.1.0" + pn@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" @@ -4427,17 +5794,17 @@ prettier@^1.19.1: resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== -pretty-format@^25.1.0: - version "25.1.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.1.0.tgz#ed869bdaec1356fc5ae45de045e2c8ec7b07b0c8" - integrity sha512-46zLRSGLd02Rp+Lhad9zzuNZ+swunitn8zIpfD2B4OPCRLXbM87RJT2aBLBWYOznNUML/2l/ReMyWNC80PJBUQ== +pretty-format@^25.2.1, pretty-format@^25.2.6: + version "25.2.6" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.2.6.tgz#542a1c418d019bbf1cca2e3620443bc1323cb8d7" + integrity sha512-DEiWxLBaCHneffrIT4B+TpMvkV9RNvvJrd3lY9ew1CEQobDzEXmYT1mg0hJhljZty7kCc10z13ohOFAE8jrUDg== dependencies: - "@jest/types" "^25.1.0" + "@jest/types" "^25.2.6" ansi-regex "^5.0.0" ansi-styles "^4.0.0" react-is "^16.12.0" -private@^0.1.6: +private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== @@ -4447,28 +5814,51 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -progress@^2.0.3: +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + +progress@^2.0.0, progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= + prompts@^2.0.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.3.1.tgz#b63a9ce2809f106fa9ae1277c275b167af46ea05" - integrity sha512-qIP2lQyCwYbdzcqHIUi2HAxiWixhoM9OdLCWf8txXsapC/X9YdsCoeyRIXE/GP+Q0J37Q7+XN/MFqbUa7IzXNA== + version "2.3.2" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.3.2.tgz#480572d89ecf39566d2bd3fe2c9fccb7c4c0b068" + integrity sha512-Q06uKs2CkNYVID0VqwfAl9mipo99zkBv/n2JtWY89Yxa3ZabWSrs0e2KTudKVa3peLUvYXMefDqIleLPVUBZMA== dependencies: kleur "^3.0.3" sisteransi "^1.0.4" +proxy-addr@~2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" + integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== + dependencies: + forwarded "~0.1.2" + ipaddr.js "1.9.1" + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= psl@^1.1.28: - version "1.7.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.7.0.tgz#f1c4c47a8ef97167dea5d6bbf4816d736e884a3c" - integrity sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ== + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== public-encrypt@^4.0.0: version "4.0.3" @@ -4482,6 +5872,14 @@ public-encrypt@^4.0.0: randombytes "^2.0.1" safe-buffer "^5.1.2" +pump@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" + integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -4490,6 +5888,15 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" +pumpify@^1.3.3: + version "1.5.1" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" + integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== + dependencies: + duplexify "^3.6.0" + inherits "^2.0.3" + pump "^2.0.0" + pumpify@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-2.0.1.tgz#abfc7b5a621307c728b551decbbefb51f0e4aa1e" @@ -4499,16 +5906,41 @@ pumpify@^2.0.1: inherits "^2.0.3" pump "^3.0.0" +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= + +punycode@^1.2.4: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= + punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +qs@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== + qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== +querystring-es3@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" + integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= + quick-lru@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" @@ -4529,6 +5961,21 @@ randomfill@^1.0.3: randombytes "^2.0.5" safe-buffer "^5.1.0" +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" + integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== + dependencies: + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" + unpipe "1.0.0" + rc@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" @@ -4540,9 +5987,9 @@ rc@^1.2.8: strip-json-comments "~2.0.1" react-is@^16.12.0: - version "16.13.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.0.tgz#0f37c3613c34fe6b37cd7f763a0d6293ab15c527" - integrity sha512-GFMtL0vHkiBv9HluwNZTggSn/sCyEt9n02aM0dSAjGGyqyNlAyftYm4phPxdvCigG15JreC5biwxCgTAJZ7yAA== + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== read-pkg-up@^3.0.0: version "3.0.0" @@ -4561,16 +6008,7 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -readable-stream@^3.1.1: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -4583,12 +6021,28 @@ readable-stream@~2.3.6: string_decoder "~1.1.1" util-deprecate "~1.0.1" -realpath-native@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.1.0.tgz#2003294fea23fb0672f2476ebe22fcf498a2d65c" - integrity sha512-wlgPA6cCIIg9gKz0fgAPjnzh4yR/LnXovwuo9hvyGvx3h8nX4+/iLZplfUWasXpqD8BdnGnP5njOFjkUwPzvjA== +readable-stream@^3.1.1: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== dependencies: - util.promisify "^1.0.0" + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + +realpath-native@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-2.0.0.tgz#7377ac429b6e1fd599dc38d08ed942d0d7beb866" + integrity sha512-v1SEYUOXXdbBZK8ZuNgO4TBjamPsiSgcFr0aP+tEKpQZK8vooEUqV6nm6Cv502mX4NF2EfsnVqtNAHG+/6Ur1Q== rechoir@^0.6.2: version "0.6.2" @@ -4605,10 +6059,10 @@ redent@^2.0.0: indent-string "^3.0.0" strip-indent "^2.0.0" -regenerate-unicode-properties@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz#ef51e0f0ea4ad424b77bf7cb41f3e015c70a3f0e" - integrity sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA== +regenerate-unicode-properties@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz#e5de7111d655e7ba60c057dbe9ff37c87e65cdec" + integrity sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA== dependencies: regenerate "^1.4.0" @@ -4617,12 +6071,18 @@ regenerate@^1.4.0: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== -regenerator-transform@^0.14.0: - version "0.14.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.1.tgz#3b2fce4e1ab7732c08f665dfdb314749c7ddd2fb" - integrity sha512-flVuee02C3FKRISbxhXl9mGzdbWUVHubl1SMaknjxkFB1/iqpJhArQUvRxOOPEc/9tAiX0BaQ28FJH10E4isSQ== +regenerator-runtime@^0.13.4: + version "0.13.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697" + integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA== + +regenerator-transform@^0.14.2: + version "0.14.4" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.4.tgz#5266857896518d1616a78a0479337a30ea974cc7" + integrity sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw== dependencies: - private "^0.1.6" + "@babel/runtime" "^7.8.4" + private "^0.1.8" regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" @@ -4632,17 +6092,22 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpu-core@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.6.0.tgz#2037c18b327cfce8a6fea2a4ec441f2432afb8b6" - integrity sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg== +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + +regexpu-core@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938" + integrity sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ== dependencies: regenerate "^1.4.0" - regenerate-unicode-properties "^8.1.0" - regjsgen "^0.5.0" - regjsparser "^0.6.0" + regenerate-unicode-properties "^8.2.0" + regjsgen "^0.5.1" + regjsparser "^0.6.4" unicode-match-property-ecmascript "^1.0.4" - unicode-match-property-value-ecmascript "^1.1.0" + unicode-match-property-value-ecmascript "^1.2.0" registry-auth-token@^4.0.0: version "4.1.1" @@ -4658,15 +6123,15 @@ registry-url@^5.0.0: dependencies: rc "^1.2.8" -regjsgen@^0.5.0: +regjsgen@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.1.tgz#48f0bf1a5ea205196929c0d9798b42d1ed98443c" integrity sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg== -regjsparser@^0.6.0: - version "0.6.3" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.3.tgz#74192c5805d35e9f5ebe3c1fb5b40d40a8a38460" - integrity sha512-8uZvYbnfAtEm9Ab8NTb3hdLwL4g/LQzEYP7Xs27T96abJCCE2d6r3cPZPQEsLKy0vRSGVNG+/zVGtLr86HQduA== +regjsparser@^0.6.4: + version "0.6.4" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.4.tgz#a769f8684308401a66e9b529d2436ff4d0666272" + integrity sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw== dependencies: jsesc "~0.5.0" @@ -4737,6 +6202,13 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== +resolve-cwd@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= + dependencies: + resolve-from "^3.0.0" + resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -4744,6 +6216,24 @@ resolve-cwd@^3.0.0: dependencies: resolve-from "^5.0.0" +resolve-dir@^1.0.0, resolve-dir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" + integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= + dependencies: + expand-tilde "^2.0.0" + global-modules "^1.0.0" + +resolve-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + resolve-from@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" @@ -4759,7 +6249,7 @@ resolve@1.1.7: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@1.x, resolve@^1.1.6, resolve@^1.10.0, resolve@^1.3.2: +resolve@1.x, resolve@^1.1.6, resolve@^1.10.0, resolve@^1.15.1, resolve@^1.3.2, resolve@^1.8.1: version "1.15.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== @@ -4786,6 +6276,20 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== +rimraf@2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + +rimraf@^2.5.4, rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + rimraf@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -4806,30 +6310,37 @@ rsvp@^4.8.4: resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== -run-async@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" - integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= +run-async@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8" + integrity sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg== dependencies: is-promise "^2.1.0" +run-queue@^1.0.0, run-queue@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" + integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= + dependencies: + aproba "^1.1.1" + rxjs@^6.5.3: - version "6.5.4" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c" - integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q== + version "6.5.5" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" + integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== dependencies: tslib "^1.9.0" +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== -safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -4864,6 +6375,23 @@ saxes@^3.1.9: dependencies: xmlchars "^2.1.1" +schema-utils@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" + integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== + dependencies: + ajv "^6.1.0" + ajv-errors "^1.0.0" + ajv-keywords "^3.1.0" + +schema-utils@^2.6.5: + version "2.6.5" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.5.tgz#c758f0a7e624263073d396e29cd40aa101152d8a" + integrity sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ== + dependencies: + ajv "^6.12.0" + ajv-keywords "^3.4.1" + secp256k1@^3.7.1: version "3.8.0" resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.8.0.tgz#28f59f4b01dbee9575f56a47034b7d2e3b3b352d" @@ -4895,25 +6423,54 @@ semver-diff@^2.0.0: dependencies: semver "^5.0.3" -"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.3.0, semver@^5.4.1, semver@^5.5, semver@^5.5.0: +"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== +semver@6.x, semver@^6.0.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + semver@7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +send@0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +serialize-javascript@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" + integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== -semver@^7.1.1: - version "7.1.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.3.tgz#e4345ce73071c53f336445cfc19efb1c311df2a6" - integrity sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA== +serve-static@1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" set-blocking@^2.0.0: version "2.0.0" @@ -4930,6 +6487,16 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" +setimmediate@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" @@ -4977,20 +6544,29 @@ shellwords@^0.1.1: integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== signal-exit@^3.0.0, signal-exit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== sisteransi@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.4.tgz#386713f1ef688c7c0304dc4c0632898941cad2e3" - integrity sha512-/ekMoM4NJ59ivGSfKapeG+FWtrmWvA1p6FBZwXrqojw90vJu8lBmrTxCMuBCydKtkaUe2zt4PlxeTKpjwMbyig== + version "1.0.5" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" + integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -5021,6 +6597,11 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" +source-list-map@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" + integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== + source-map-resolve@^0.5.0: version "0.5.3" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" @@ -5032,7 +6613,7 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.6: +source-map-support@^0.5.6, source-map-support@~0.5.12: version "0.5.16" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== @@ -5120,6 +6701,13 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" +ssri@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" + integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== + dependencies: + figgy-pudding "^3.5.1" + stack-utils@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" @@ -5133,11 +6721,43 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + stealthy-require@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= +stream-browserify@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" + integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== + dependencies: + inherits "~2.0.1" + readable-stream "^2.0.2" + +stream-each@^1.1.0: + version "1.2.3" + resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" + integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== + dependencies: + end-of-stream "^1.1.0" + stream-shift "^1.0.0" + +stream-http@^2.7.2: + version "2.8.3" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" + integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== + dependencies: + builtin-status-codes "^3.0.0" + inherits "^2.0.1" + readable-stream "^2.3.6" + to-arraybuffer "^1.0.0" + xtend "^4.0.0" + stream-shift@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" @@ -5159,7 +6779,7 @@ string-width@^2.1.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string-width@^3.0.0: +string-width@^3.0.0, string-width@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== @@ -5177,23 +6797,7 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" -string.prototype.trimleft@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74" - integrity sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag== - dependencies: - define-properties "^1.1.3" - function-bind "^1.1.1" - -string.prototype.trimright@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz#440314b15996c866ce8a0341894d45186200c5d9" - integrity sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g== - dependencies: - define-properties "^1.1.3" - function-bind "^1.1.1" - -string_decoder@^1.1.1: +string_decoder@^1.0.0, string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== @@ -5214,7 +6818,7 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.1.0, strip-ansi@^5.2.0: +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== @@ -5253,11 +6857,23 @@ strip-indent@^2.0.0: resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= +strip-json-comments@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.0.tgz#7638d31422129ecf4457440009fba03f9f9ac180" + integrity sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w== + strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +supports-color@6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" + integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== + dependencies: + has-flag "^3.0.0" + supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -5285,6 +6901,21 @@ symbol-tree@^3.2.2: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +table@^5.2.3: + version "5.4.6" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== + dependencies: + ajv "^6.10.2" + lodash "^4.17.14" + slice-ansi "^2.1.0" + string-width "^3.0.0" + +tapable@^1.0.0, tapable@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" + integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== + term-size@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" @@ -5300,6 +6931,30 @@ terminal-link@^2.0.0: ansi-escapes "^4.2.1" supports-hyperlinks "^2.0.0" +terser-webpack-plugin@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c" + integrity sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA== + dependencies: + cacache "^12.0.2" + find-cache-dir "^2.1.0" + is-wsl "^1.1.0" + schema-utils "^1.0.0" + serialize-javascript "^2.1.2" + source-map "^0.6.1" + terser "^4.1.2" + webpack-sources "^1.4.0" + worker-farm "^1.7.0" + +terser@^4.1.2: + version "4.6.11" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.11.tgz#12ff99fdd62a26de2a82f508515407eb6ccd8a9f" + integrity sha512-76Ynm7OXUG5xhOpblhytE7X58oeNSmC8xnNhjWVo8CksHit0U0kO4hfNbPrrYwowLWFgM2n9L176VNx2QaHmtA== + dependencies: + commander "^2.20.0" + source-map "~0.6.1" + source-map-support "~0.5.12" + test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -5309,12 +6964,17 @@ test-exclude@^6.0.0: glob "^7.1.4" minimatch "^3.0.4" +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + throat@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA== -through2@^2.0.2, through2@^2.0.3: +through2@^2.0.0, through2@^2.0.2, through2@^2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== @@ -5327,6 +6987,13 @@ through@^2.3.6: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= +timers-browserify@^2.0.4: + version "2.0.11" + resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f" + integrity sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ== + dependencies: + setimmediate "^1.0.4" + tiny-emitter@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" @@ -5355,6 +7022,11 @@ tmpl@1.0.x: resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= +to-arraybuffer@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" + integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= + to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" @@ -5397,6 +7069,11 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + tough-cookie@^2.3.3, tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" @@ -5426,10 +7103,15 @@ trim-newlines@^2.0.0: resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= +tryer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" + integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA== + ts-jest@^25.2.1: - version "25.2.1" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-25.2.1.tgz#49bf05da26a8b7fbfbc36b4ae2fcdc2fef35c85d" - integrity sha512-TnntkEEjuXq/Gxpw7xToarmHbAafgCaAzOpnajnFC6jI7oo1trMzAHA04eWpc3MhV6+yvhE8uUBAmN+teRJh0A== + version "25.3.1" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-25.3.1.tgz#58e2ed3506e4e4487c0b9b532846a5cade9656ba" + integrity sha512-O53FtKguoMUByalAJW+NWEv7c4tus5ckmhfa7/V0jBb2z8v5rDSLFC1Ate7wLknYPC1euuhY6eJjQq4FtOZrkg== dependencies: bs-logger "0.x" buffer-from "1.x" @@ -5437,21 +7119,28 @@ ts-jest@^25.2.1: json5 "2.x" lodash.memoize "4.x" make-error "1.x" - mkdirp "0.x" + micromatch "4.x" + mkdirp "1.x" resolve "1.x" - semver "^5.5" - yargs-parser "^16.1.0" + semver "6.x" + yargs-parser "18.x" + +ts-loader@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-6.2.2.tgz#dffa3879b01a1a1e0a4b85e2b8421dc0dfff1c58" + integrity sha512-HDo5kXZCBml3EUPcc7RlZOV/JGlLHwppTLEHb3SHnr5V7NXD4klMEkrhJe5wgRbaWsSXi+Y1SIBN/K9B6zWGWQ== + dependencies: + chalk "^2.3.0" + enhanced-resolve "^4.0.0" + loader-utils "^1.0.2" + micromatch "^4.0.0" + semver "^6.0.0" -tslib@^1.10.0: +tslib@^1.10.0, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: version "1.11.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== -tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.0.tgz#f1f3528301621a53220d58373ae510ff747a66bc" - integrity sha512-BmndXUtiTn/VDDrJzQE7Mm22Ix3PxgLltW9bSNLoeCY31gnG2OPx0QqJnuc9oMIKioYrz487i6K9o4Pdn0j+Kg== - tslint-config-prettier@^1.18.0: version "1.18.0" resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz#75f140bde947d35d8f0d238e0ebf809d64592c37" @@ -5477,9 +7166,9 @@ tslint@^5.12.0: tsutils "^2.29.0" tslint@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.0.tgz#c6c611b8ba0eed1549bf5a59ba05a7732133d851" - integrity sha512-fXjYd/61vU6da04E505OZQGb2VCN2Mq3doeWcOIryuG+eqdmFUXTYVwdhnbEu2k46LNLgUYt9bI5icQze/j0bQ== + version "6.1.1" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-6.1.1.tgz#ac03fbd17f85bfefaae348b353b25a88efe10cde" + integrity sha512-kd6AQ/IgPRpLn6g5TozqzPdGNZ0q0jtXW4//hRcj10qLYBaa3mTUU2y2MCG+RXZm8Zx+KZi0eA+YCrMyNlF4UA== dependencies: "@babel/code-frame" "^7.0.0" builtin-modules "^1.1.1" @@ -5489,7 +7178,7 @@ tslint@^6.1.0: glob "^7.1.1" js-yaml "^3.13.1" minimatch "^3.0.4" - mkdirp "^0.5.1" + mkdirp "^0.5.3" resolve "^1.3.2" semver "^5.3.0" tslib "^1.10.0" @@ -5502,6 +7191,11 @@ tsutils@^2.29.0: dependencies: tslib "^1.8.1" +tty-browserify@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" + integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -5526,6 +7220,11 @@ type-detect@4.0.8: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== +type-fest@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" + integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== + type-fest@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" @@ -5536,6 +7235,14 @@ type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== +type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + typed-function@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/typed-function/-/typed-function-1.1.1.tgz#a1316187ec3628c9e219b91ca96918660a10138e" @@ -5548,6 +7255,11 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + typedoc-default-themes@^0.7.2: version "0.7.2" resolved "https://registry.yarnpkg.com/typedoc-default-themes/-/typedoc-default-themes-0.7.2.tgz#1e9896f920b58e6da0bba9d7e643738d02405a5a" @@ -5559,9 +7271,9 @@ typedoc-default-themes@^0.7.2: underscore "^1.9.1" typedoc@^0.16.9: - version "0.16.10" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.16.10.tgz#217cd4243c9b4d85f49b94323c178f6d279bfb9c" - integrity sha512-Eo1+K+XTiqSi4lz5cPrV4RncLv6abjCd/jfL5tTueNZGO2p8x2yDIrXkxL9C+SoLjJm2xpMs3CXYmTnilxk1cA== + version "0.16.11" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.16.11.tgz#95f862c6eba78533edc9af7096d2295b718eddc1" + integrity sha512-YEa5i0/n0yYmLJISJ5+po6seYfJQJ5lQYcHCPF9ffTF92DB/TAZO/QrazX5skPHNPtmlIht5FdTXCM2kC7jQFQ== dependencies: "@types/minimatch" "3.0.3" fs-extra "^8.1.0" @@ -5591,17 +7303,17 @@ typescript@^3.8.3: integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== uglify-js@^3.1.4: - version "3.8.0" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.8.0.tgz#f3541ae97b2f048d7e7e3aa4f39fd8a1f5d7a805" - integrity sha512-ugNSTT8ierCsDHso2jkBHXYrU8Y5/fY2ZUprfrJUiD7YpuFvV4jODLFmb3h4btQjqr5Nh4TX4XtgDfCU1WdioQ== + version "3.8.1" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.8.1.tgz#43bb15ce6f545eaa0a64c49fd29375ea09fa0f93" + integrity sha512-W7KxyzeaQmZvUFbGj4+YFshhVrMBGSg2IbcYAjGWGvx8DHvJMclbTDMpffdxFUGPBHjIytk7KJUR/KUXstUGDw== dependencies: commander "~2.20.3" source-map "~0.6.1" underscore@>=1.8.3, underscore@^1.9.1: - version "1.9.2" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.2.tgz#0c8d6f536d6f378a5af264a72f7bec50feb7cf2f" - integrity sha512-D39qtimx0c1fI3ya1Lnhk3E9nONswSKhnffBI0gME9C99fYOkNi04xs8K6pePLhvl1frbDemkaBQ5ikWllR2HQ== + version "1.10.2" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.10.2.tgz#73d6aa3668f3188e4adb0f1943bd12cfd7efaaaf" + integrity sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg== unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" @@ -5616,15 +7328,15 @@ unicode-match-property-ecmascript@^1.0.4: unicode-canonical-property-names-ecmascript "^1.0.4" unicode-property-aliases-ecmascript "^1.0.4" -unicode-match-property-value-ecmascript@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277" - integrity sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g== +unicode-match-property-value-ecmascript@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz#0d91f600eeeb3096aa962b1d6fc88876e64ea531" + integrity sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ== unicode-property-aliases-ecmascript@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57" - integrity sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw== + version "1.1.0" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz#dd57a99f6207bedff4628abefb94c50db941c8f4" + integrity sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg== union-value@^1.0.0: version "1.0.1" @@ -5636,6 +7348,20 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^2.0.1" +unique-filename@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" + integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== + dependencies: + unique-slug "^2.0.0" + +unique-slug@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" + integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== + dependencies: + imurmurhash "^0.1.4" + unique-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" @@ -5648,6 +7374,16 @@ universalify@^0.1.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" + integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + unset-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" @@ -5656,6 +7392,11 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" +upath@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" + integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== + update-notifier@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-3.0.1.tgz#78ecb68b915e2fd1be9f767f6e298ce87b736250" @@ -5693,6 +7434,14 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" +url@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" + integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= + dependencies: + punycode "1.3.2" + querystring "0.2.0" + use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" @@ -5703,25 +7452,44 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -util.promisify@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.1.tgz#6baf7774b80eeb0f7520d8b81d07982a59abbaee" - integrity sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA== +util@0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" + integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.2" - has-symbols "^1.0.1" - object.getownpropertydescriptors "^2.1.0" + inherits "2.0.1" + +util@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" + integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== + dependencies: + inherits "2.0.3" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +v8-compile-cache@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe" + integrity sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w== + +v8-compile-cache@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" + integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== + v8-to-istanbul@^4.0.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-4.1.2.tgz#387d173be5383dbec209d21af033dcb892e3ac82" - integrity sha512-G9R+Hpw0ITAmPSr47lSlc5A1uekSYzXxTMlFxso2xoffwo4jQnzbv1p9yXIinO8UMZKfAFewaCHwWvnH4Jb4Ug== + version "4.1.3" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-4.1.3.tgz#22fe35709a64955f49a08a7c7c959f6520ad6f20" + integrity sha512-sAjOC+Kki6aJVbUOXJbcR0MnbfjvBzwKZazEJymA2IX49uoOdEdk+4fBq5cXgYgiyKtAyrrJNtBZdOeDIF+Fng== dependencies: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" @@ -5735,6 +7503,11 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" +vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -5744,12 +7517,17 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +vm-browserify@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" + integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== + w3c-hr-time@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" - integrity sha1-gqwr/2PZUOqeMYmlimViX+3xkEU= + version "1.0.2" + resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" + integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== dependencies: - browser-process-hrtime "^0.1.2" + browser-process-hrtime "^1.0.0" w3c-xmlserializer@^1.1.2: version "1.1.2" @@ -5767,11 +7545,100 @@ walker@^1.0.7, walker@~1.0.5: dependencies: makeerror "1.0.x" +watchpack@^1.6.0: + version "1.6.1" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.1.tgz#280da0a8718592174010c078c7585a74cd8cd0e2" + integrity sha512-+IF9hfUFOrYOOaKyfaI7h7dquUIOgyEMoQMLA7OP5FxegKA2+XdXThAZ9TU2kucfhDH7rfMHs1oPYziVGWRnZA== + dependencies: + chokidar "^2.1.8" + graceful-fs "^4.1.2" + neo-async "^2.5.0" + webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== +webpack-bundle-analyzer@^3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.6.1.tgz#bdb637c2304424f2fbff9a950c7be42a839ae73b" + integrity sha512-Nfd8HDwfSx1xBwC+P8QMGvHAOITxNBSvu/J/mCJvOwv+G4VWkU7zir9SSenTtyCi0LnVtmsc7G5SZo1uV+bxRw== + dependencies: + acorn "^7.1.1" + acorn-walk "^7.1.1" + bfj "^6.1.1" + chalk "^2.4.1" + commander "^2.18.0" + ejs "^2.6.1" + express "^4.16.3" + filesize "^3.6.1" + gzip-size "^5.0.0" + lodash "^4.17.15" + mkdirp "^0.5.1" + opener "^1.5.1" + ws "^6.0.0" + +webpack-cli@^3.3.11: + version "3.3.11" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.11.tgz#3bf21889bf597b5d82c38f215135a411edfdc631" + integrity sha512-dXlfuml7xvAFwYUPsrtQAA9e4DOe58gnzSxhgrO/ZM/gyXTBowrsYeubyN4mqGhYdpXMFNyQ6emjJS9M7OBd4g== + dependencies: + chalk "2.4.2" + cross-spawn "6.0.5" + enhanced-resolve "4.1.0" + findup-sync "3.0.0" + global-modules "2.0.0" + import-local "2.0.0" + interpret "1.2.0" + loader-utils "1.2.3" + supports-color "6.1.0" + v8-compile-cache "2.0.3" + yargs "13.2.4" + +webpack-merge@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" + integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g== + dependencies: + lodash "^4.17.15" + +webpack-sources@^1.4.0, webpack-sources@^1.4.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" + integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== + dependencies: + source-list-map "^2.0.0" + source-map "~0.6.1" + +webpack@^4.42.1: + version "4.42.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.42.1.tgz#ae707baf091f5ca3ef9c38b884287cfe8f1983ef" + integrity sha512-SGfYMigqEfdGchGhFFJ9KyRpQKnipvEvjc1TwrXEPCM6H5Wywu10ka8o3KGrMzSMxMQKt8aCHUFh5DaQ9UmyRg== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/wasm-edit" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + acorn "^6.2.1" + ajv "^6.10.2" + ajv-keywords "^3.4.1" + chrome-trace-event "^1.0.2" + enhanced-resolve "^4.1.0" + eslint-scope "^4.0.3" + json-parse-better-errors "^1.0.2" + loader-runner "^2.4.0" + loader-utils "^1.2.3" + memory-fs "^0.4.1" + micromatch "^3.1.10" + mkdirp "^0.5.3" + neo-async "^2.6.1" + node-libs-browser "^2.2.1" + schema-utils "^1.0.0" + tapable "^1.1.3" + terser-webpack-plugin "^1.4.3" + watchpack "^1.6.0" + webpack-sources "^1.4.1" + whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" @@ -5798,14 +7665,14 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@^1.2.9, which@^1.3.1: +which@^1.2.14, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" -which@^2.0.1: +which@^2.0.1, which@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== @@ -5831,10 +7698,26 @@ word-wrap@~1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= +wordwrap@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= + +worker-farm@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" + integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== + dependencies: + errno "~0.1.7" + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" wrap-ansi@^6.2.0: version "6.2.0" @@ -5860,19 +7743,33 @@ write-file-atomic@^2.0.0: signal-exit "^3.0.2" write-file-atomic@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.1.tgz#558328352e673b5bb192cf86500d60b230667d4b" - integrity sha512-JPStrIyyVJ6oCSz/691fAjFtefZ6q+fP6tm+OS4Qw6o+TGQxNp1ziY2PgS+X/m0V8OWhZiO/m4xSj+Pr4RrZvw== + version "3.0.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" + integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== dependencies: imurmurhash "^0.1.4" is-typedarray "^1.0.0" signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" +write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== + dependencies: + mkdirp "^0.5.1" + +ws@^6.0.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" + integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== + dependencies: + async-limiter "~1.0.0" + ws@^7.0.0: - version "7.2.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.2.tgz#36df62f68f0d1a6ec66d3f880a02476f3a81f24f" - integrity sha512-2qj/tYkDPDSVf7JiHanwEBwkhxi7DchFewIsSnR33MQtG3O/BPAJjqs4g6XEuayuRqIExSQMHZlmyDLbuSrXYw== + version "7.2.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.3.tgz#a5411e1fb04d5ed0efee76d26d5c46d830c39b46" + integrity sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ== xdg-basedir@^3.0.0: version "3.0.0" @@ -5889,7 +7786,7 @@ xmlchars@^2.1.1: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== -xtend@~4.0.1: +xtend@^4.0.0, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== @@ -5904,6 +7801,19 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= +yallist@^3.0.2: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yargs-parser@18.x, yargs-parser@^18.1.1: + version "18.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.2.tgz#2f482bea2136dbde0861683abea7756d30b504f1" + integrity sha512-hlIPNR3IzC1YuL1c2UwwDKpXlNFBqD1Fswwh1khz5+d8Cq/8yc/Mn0i+rQXduu8hcrFKvO7Eryk+09NecTQAAQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-parser@^10.0.0: version "10.1.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" @@ -5911,26 +7821,35 @@ yargs-parser@^10.0.0: dependencies: camelcase "^4.1.0" -yargs-parser@^16.1.0: - version "16.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-16.1.0.tgz#73747d53ae187e7b8dbe333f95714c76ea00ecf1" - integrity sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg== +yargs-parser@^13.1.0: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== dependencies: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^18.1.0: - version "18.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.0.tgz#1b0ab1118ebd41f68bb30e729f4c83df36ae84c3" - integrity sha512-o/Jr6JBOv6Yx3pL+5naWSoIA2jJ+ZkMYQG/ie9qFbukBe4uzmBatlXFOiu/tNKRWEtyf+n5w7jc/O16ufqOTdQ== +yargs@13.2.4: + version "13.2.4" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" + integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.0" -yargs@^15.0.0: - version "15.3.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.0.tgz#403af6edc75b3ae04bf66c94202228ba119f0976" - integrity sha512-g/QCnmjgOl1YJjGsnUg2SatC7NUYEiLXJqxNOQU9qSpjzGtGXda9b+OKccr1kLTy8BN9yqEyqfq5lxlwdc13TA== +yargs@^15.3.1: + version "15.3.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.1.tgz#9505b472763963e54afe60148ad27a330818e98b" + integrity sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA== dependencies: cliui "^6.0.0" decamelize "^1.2.0" @@ -5942,4 +7861,4 @@ yargs@^15.0.0: string-width "^4.2.0" which-module "^2.0.0" y18n "^4.0.0" - yargs-parser "^18.1.0" + yargs-parser "^18.1.1" From fc54ab755019ac6765867dc5783817a047be5ed4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Jan 2021 07:31:18 +0000 Subject: [PATCH 11/15] Bump axios from 0.19.2 to 0.21.1 Bumps [axios](https://github.com/axios/axios) from 0.19.2 to 0.21.1. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v0.19.2...v0.21.1) Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 1876 ++++++++++---------------------------------------- 2 files changed, 380 insertions(+), 1498 deletions(-) diff --git a/package.json b/package.json index 652c25cf..63946fc6 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "@babel/runtime": "^7.0.0", "@types/mathjs": "^6.0.4", "@types/ws": "^7.2.2", - "axios": "^0.19.0", + "axios": "^0.21.1", "bech32": "^1.1.3", "bip32": "^2.0.4", "bip39": "^3.0.2", diff --git a/yarn.lock b/yarn.lock index 5e78d18a..5deef3e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,23 @@ # yarn lockfile v1 +"@babel/cli@^7.0.0": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.12.10.tgz#67a1015b1cd505bde1696196febf910c4c339a48" + integrity sha512-+y4ZnePpvWs1fc/LhZRTHkTesbXkyBYuOB+5CyodZqrEuETXi3zOVfpAQIdgC3lXbHLTDG9dQosxR9BhvLKDLQ== + dependencies: + commander "^4.0.1" + convert-source-map "^1.1.0" + fs-readdir-recursive "^1.1.0" + glob "^7.0.0" + lodash "^4.17.19" + make-dir "^2.1.0" + slash "^2.0.0" + source-map "^0.5.0" + optionalDependencies: + "@nicolo-ribaudo/chokidar-2" "2.1.8-no-fsevents" + chokidar "^3.4.0" + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e" @@ -9,6 +26,13 @@ dependencies: "@babel/highlight" "^7.8.3" +"@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + "@babel/compat-data@^7.8.6", "@babel/compat-data@^7.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.9.0.tgz#04815556fc90b0c174abd2c0c1bb966faa036a6c" @@ -18,6 +42,27 @@ invariant "^2.2.4" semver "^5.5.0" +"@babel/core@^7.0.0": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.10.tgz#b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd" + integrity sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w== + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/generator" "^7.12.10" + "@babel/helper-module-transforms" "^7.12.1" + "@babel/helpers" "^7.12.5" + "@babel/parser" "^7.12.10" + "@babel/template" "^7.12.7" + "@babel/traverse" "^7.12.10" + "@babel/types" "^7.12.10" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.2" + lodash "^4.17.19" + semver "^5.4.1" + source-map "^0.5.0" + "@babel/core@^7.1.0", "@babel/core@^7.7.5": version "7.9.0" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e" @@ -40,6 +85,15 @@ semver "^5.4.1" source-map "^0.5.0" +"@babel/generator@^7.12.10", "@babel/generator@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.11.tgz#98a7df7b8c358c9a37ab07a24056853016aba3af" + integrity sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA== + dependencies: + "@babel/types" "^7.12.11" + jsesc "^2.5.1" + source-map "^0.5.0" + "@babel/generator@^7.9.0": version "7.9.4" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.4.tgz#12441e90c3b3c4159cdecf312075bf1a8ce2dbce" @@ -114,6 +168,15 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" +"@babel/helper-function-name@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz#1fd7738aee5dcf53c3ecff24f1da9c511ec47b42" + integrity sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA== + dependencies: + "@babel/helper-get-function-arity" "^7.12.10" + "@babel/template" "^7.12.7" + "@babel/types" "^7.12.11" + "@babel/helper-function-name@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz#eeeb665a01b1f11068e9fb86ad56a1cb1a824cca" @@ -132,6 +195,13 @@ "@babel/template" "^7.8.3" "@babel/types" "^7.9.5" +"@babel/helper-get-function-arity@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz#b158817a3165b5faa2047825dfa61970ddcc16cf" + integrity sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag== + dependencies: + "@babel/types" "^7.12.10" + "@babel/helper-get-function-arity@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz#b894b947bd004381ce63ea1db9f08547e920abd5" @@ -146,6 +216,13 @@ dependencies: "@babel/types" "^7.8.3" +"@babel/helper-member-expression-to-functions@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz#aa77bd0396ec8114e5e30787efa78599d874a855" + integrity sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw== + dependencies: + "@babel/types" "^7.12.7" + "@babel/helper-member-expression-to-functions@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz#659b710498ea6c1d9907e0c73f206eee7dadc24c" @@ -153,6 +230,13 @@ dependencies: "@babel/types" "^7.8.3" +"@babel/helper-module-imports@^7.12.1": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz#1bfc0229f794988f76ed0a4d4e90860850b54dfb" + integrity sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA== + dependencies: + "@babel/types" "^7.12.5" + "@babel/helper-module-imports@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498" @@ -160,6 +244,21 @@ dependencies: "@babel/types" "^7.8.3" +"@babel/helper-module-transforms@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz#7954fec71f5b32c48e4b303b437c34453fd7247c" + integrity sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w== + dependencies: + "@babel/helper-module-imports" "^7.12.1" + "@babel/helper-replace-supers" "^7.12.1" + "@babel/helper-simple-access" "^7.12.1" + "@babel/helper-split-export-declaration" "^7.11.0" + "@babel/helper-validator-identifier" "^7.10.4" + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.12.1" + "@babel/types" "^7.12.1" + lodash "^4.17.19" + "@babel/helper-module-transforms@^7.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz#43b34dfe15961918707d247327431388e9fe96e5" @@ -173,6 +272,13 @@ "@babel/types" "^7.9.0" lodash "^4.17.13" +"@babel/helper-optimise-call-expression@^7.12.10": + version "7.12.10" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz#94ca4e306ee11a7dd6e9f42823e2ac6b49881e2d" + integrity sha512-4tpbU0SrSTjjt65UMWSrUOPZTsgvPgGG4S8QSTNHacKzpS51IVWGDj0yCwyeZND/i+LSN2g/O63jEXEWm49sYQ== + dependencies: + "@babel/types" "^7.12.10" + "@babel/helper-optimise-call-expression@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz#7ed071813d09c75298ef4f208956006b6111ecb9" @@ -203,6 +309,16 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" +"@babel/helper-replace-supers@^7.12.1": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.11.tgz#ea511658fc66c7908f923106dd88e08d1997d60d" + integrity sha512-q+w1cqmhL7R0FNzth/PLLp2N+scXEK/L2AHbXUyydxp828F4FEa5WcVoqui9vFRiHDQErj9Zof8azP32uGVTRA== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.12.7" + "@babel/helper-optimise-call-expression" "^7.12.10" + "@babel/traverse" "^7.12.10" + "@babel/types" "^7.12.11" + "@babel/helper-replace-supers@^7.8.3", "@babel/helper-replace-supers@^7.8.6": version "7.8.6" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8" @@ -213,6 +329,13 @@ "@babel/traverse" "^7.8.6" "@babel/types" "^7.8.6" +"@babel/helper-simple-access@^7.12.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz#32427e5aa61547d38eb1e6eaf5fd1426fdad9136" + integrity sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA== + dependencies: + "@babel/types" "^7.12.1" + "@babel/helper-simple-access@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz#7f8109928b4dab4654076986af575231deb639ae" @@ -221,6 +344,13 @@ "@babel/template" "^7.8.3" "@babel/types" "^7.8.3" +"@babel/helper-split-export-declaration@^7.11.0", "@babel/helper-split-export-declaration@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz#1b4cc424458643c47d37022223da33d76ea4603a" + integrity sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g== + dependencies: + "@babel/types" "^7.12.11" + "@babel/helper-split-export-declaration@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" @@ -228,6 +358,11 @@ dependencies: "@babel/types" "^7.8.3" +"@babel/helper-validator-identifier@^7.10.4", "@babel/helper-validator-identifier@^7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed" + integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw== + "@babel/helper-validator-identifier@^7.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz#ad53562a7fc29b3b9a91bbf7d10397fd146346ed" @@ -248,6 +383,15 @@ "@babel/traverse" "^7.8.3" "@babel/types" "^7.8.3" +"@babel/helpers@^7.12.5": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.12.5.tgz#1a1ba4a768d9b58310eda516c449913fe647116e" + integrity sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA== + dependencies: + "@babel/template" "^7.10.4" + "@babel/traverse" "^7.12.5" + "@babel/types" "^7.12.5" + "@babel/helpers@^7.9.0": version "7.9.2" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.2.tgz#b42a81a811f1e7313b88cba8adc66b3d9ae6c09f" @@ -257,6 +401,15 @@ "@babel/traverse" "^7.9.0" "@babel/types" "^7.9.0" +"@babel/highlight@^7.10.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.10.4.tgz#7d1bdfd65753538fabe6c38596cdb76d9ac60143" + integrity sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== + dependencies: + "@babel/helper-validator-identifier" "^7.10.4" + chalk "^2.0.0" + js-tokens "^4.0.0" + "@babel/highlight@^7.8.3": version "7.9.0" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.9.0.tgz#4e9b45ccb82b79607271b2979ad82c7b68163079" @@ -271,6 +424,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.4.tgz#68a35e6b0319bbc014465be43828300113f2f2e8" integrity sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA== +"@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.11.tgz#9ce3595bcd74bc5c466905e86c535b8b25011e79" + integrity sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg== + "@babel/plugin-proposal-async-generator-functions@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz#bad329c670b382589721b27540c7d288601c6e6f" @@ -777,6 +935,13 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-transform-typescript" "^7.9.0" +"@babel/runtime@^7.0.0": + version "7.12.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.12.5.tgz#410e7e487441e1b360c29be715d870d9b985882e" + integrity sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/runtime@^7.8.4": version "7.9.2" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.9.2.tgz#d90df0583a3a252f09aaa619665367bae518db06" @@ -784,6 +949,15 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/template@^7.10.4", "@babel/template@^7.12.7": + version "7.12.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.7.tgz#c817233696018e39fbb6c491d2fb684e05ed43bc" + integrity sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow== + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/parser" "^7.12.7" + "@babel/types" "^7.12.7" + "@babel/template@^7.7.4", "@babel/template@^7.8.3", "@babel/template@^7.8.6": version "7.8.6" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.8.6.tgz#86b22af15f828dfb086474f964dcc3e39c43ce2b" @@ -808,6 +982,21 @@ globals "^11.1.0" lodash "^4.17.13" +"@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.12.tgz#d0cd87892704edd8da002d674bc811ce64743376" + integrity sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w== + dependencies: + "@babel/code-frame" "^7.12.11" + "@babel/generator" "^7.12.11" + "@babel/helper-function-name" "^7.12.11" + "@babel/helper-split-export-declaration" "^7.12.11" + "@babel/parser" "^7.12.11" + "@babel/types" "^7.12.12" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.19" + "@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.4", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0": version "7.9.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.0.tgz#00b064c3df83ad32b2dbf5ff07312b15c7f1efb5" @@ -817,6 +1006,15 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" +"@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.11", "@babel/types@^7.12.12", "@babel/types@^7.12.5", "@babel/types@^7.12.7": + version "7.12.12" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.12.tgz#4608a6ec313abbd87afa55004d373ad04a96c299" + integrity sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ== + dependencies: + "@babel/helper-validator-identifier" "^7.12.11" + lodash "^4.17.19" + to-fast-properties "^2.0.0" + "@babel/types@^7.9.5": version "7.9.5" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.5.tgz#89231f82915a8a566a703b3b20133f73da6b9444" @@ -839,13 +1037,6 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@irisnet/amino-js@https://github.com/irisnet/amino-js#ibc-alpha": - version "0.6.2" - resolved "https://github.com/irisnet/amino-js#00a7966b21d0d8f642f5b9a847cdf17dd6c67b28" - dependencies: - "@tendermint/belt" "0.2.1" - "@tendermint/types" "0.1.1" - "@istanbuljs/load-nyc-config@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.0.0.tgz#10602de5570baea82f8afbfa2630b24e7a8cfe5b" @@ -1017,6 +1208,23 @@ "@types/yargs" "^15.0.0" chalk "^3.0.0" +"@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents": + version "2.1.8-no-fsevents" + resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.tgz#da7c3996b8e6e19ebd14d82eaced2313e7769f9b" + integrity sha512-+nb9vWloHNNMFHjGofEam3wopE3m1yuambrrd/fnPc+lFOMB9ROTqQlche9ByFWNkdNqfSgR/kkQtQ8DzEWt2w== + dependencies: + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -1036,18 +1244,6 @@ dependencies: defer-to-connect "^1.0.1" -"@tendermint/belt@0.2.1": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@tendermint/belt/-/belt-0.2.1.tgz#f1f0df8f2c1847d175b5aa6968b3389de34f3f2b" - integrity sha512-Z3byTEpbSfrMaNx431pr8P4nrFshWz7WiFqxv/cTVgRENCVfndygOz0W15qC1pgqBhhnQPLEnmdP/GIyiS7JWg== - dependencies: - "@tendermint/types" "0.1.1" - -"@tendermint/types@0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@tendermint/types/-/types-0.1.1.tgz#7e50643a6e634d9a47aa746c50653811a83c72e2" - integrity sha512-jMEz5tJ3ncA8903N2DoPD6EJawSyORRSyWvQbmxyz8ONiugjOKvoesMzz/xIioe1Ekzf6YJnw/3RI+kT9qdNyg== - "@types/babel__core@^7.1.0": version "7.1.7" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.7.tgz#1dacad8840364a57c98d0dd4855c6dd3752c6b89" @@ -1175,174 +1371,11 @@ dependencies: "@types/yargs-parser" "*" -"@webassemblyjs/ast@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" - integrity sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA== - dependencies: - "@webassemblyjs/helper-module-context" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/wast-parser" "1.9.0" - -"@webassemblyjs/floating-point-hex-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" - integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== - -"@webassemblyjs/helper-api-error@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" - integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== - -"@webassemblyjs/helper-buffer@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" - integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== - -"@webassemblyjs/helper-code-frame@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" - integrity sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA== - dependencies: - "@webassemblyjs/wast-printer" "1.9.0" - -"@webassemblyjs/helper-fsm@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" - integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== - -"@webassemblyjs/helper-module-context@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" - integrity sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g== - dependencies: - "@webassemblyjs/ast" "1.9.0" - -"@webassemblyjs/helper-wasm-bytecode@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" - integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== - -"@webassemblyjs/helper-wasm-section@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" - integrity sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - -"@webassemblyjs/ieee754@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" - integrity sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" - integrity sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" - integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== - -"@webassemblyjs/wasm-edit@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" - integrity sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/helper-wasm-section" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - "@webassemblyjs/wasm-opt" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - "@webassemblyjs/wast-printer" "1.9.0" - -"@webassemblyjs/wasm-gen@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" - integrity sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/ieee754" "1.9.0" - "@webassemblyjs/leb128" "1.9.0" - "@webassemblyjs/utf8" "1.9.0" - -"@webassemblyjs/wasm-opt@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" - integrity sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - -"@webassemblyjs/wasm-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" - integrity sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-api-error" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/ieee754" "1.9.0" - "@webassemblyjs/leb128" "1.9.0" - "@webassemblyjs/utf8" "1.9.0" - -"@webassemblyjs/wast-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" - integrity sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/floating-point-hex-parser" "1.9.0" - "@webassemblyjs/helper-api-error" "1.9.0" - "@webassemblyjs/helper-code-frame" "1.9.0" - "@webassemblyjs/helper-fsm" "1.9.0" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/wast-printer@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" - integrity sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/wast-parser" "1.9.0" - "@xtuc/long" "4.2.2" - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - abab@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a" integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg== -accepts@~1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" - integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" - acorn-globals@^4.3.2: version "4.3.4" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" @@ -1361,12 +1394,7 @@ acorn-walk@^6.0.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== -acorn-walk@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.1.1.tgz#345f0dffad5c735e7373d2fec9a1023e6a44b83e" - integrity sha512-wdlPY2tm/9XBr7QkKlq0WQVgiuGTX6YWPyRyBviSoScBuLfTVQhvwg6wJ369GJ/1nPfTLMfnrFIfjqVg6d+jQQ== - -acorn@^6.0.1, acorn@^6.2.1: +acorn@^6.0.1: version "6.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== @@ -1376,17 +1404,12 @@ acorn@^7.1.0, acorn@^7.1.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== -ajv-errors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" - integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== - -ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: +ajv-keywords@^3.4.1: version "3.4.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.5.5: +ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.5.5: version "6.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== @@ -1448,7 +1471,7 @@ anymatch@^2.0.0: micromatch "^3.1.4" normalize-path "^2.1.1" -anymatch@^3.0.3: +anymatch@^3.0.3, anymatch@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== @@ -1456,11 +1479,6 @@ anymatch@^3.0.3: normalize-path "^3.0.0" picomatch "^2.0.4" -aproba@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -1493,11 +1511,6 @@ array-find-index@^1.0.1: resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" @@ -1529,14 +1542,6 @@ assert-plus@1.0.0, assert-plus@^1.0.0: resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= -assert@^1.1.1: - version "1.5.0" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" - integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== - dependencies: - object-assign "^4.1.1" - util "0.10.3" - assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -1552,11 +1557,6 @@ async-each@^1.0.1: resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -1582,12 +1582,12 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e" integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug== -axios@^0.19.0: - version "0.19.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27" - integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA== +axios@^0.21.1: + version "0.21.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" + integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== dependencies: - follow-redirects "1.5.10" + follow-redirects "^1.10.0" babel-jest@^25.2.6: version "25.2.6" @@ -1666,11 +1666,6 @@ base-x@^3.0.2: dependencies: safe-buffer "^5.0.1" -base64-js@^1.0.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" - integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== - base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" @@ -1696,16 +1691,6 @@ bech32@^1.1.3: resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.3.tgz#bd47a8986bbb3eec34a56a097a84b8d3e9a2dfcd" integrity sha512-yuVFUvrNcoJi0sv5phmqc6P+Fl1HjRDRNOOkHY2X/3LBy2bIGNSFx4fZ95HMaXHupuS7cZR15AsvtmCIF4UEyg== -bfj@^6.1.1: - version "6.1.2" - resolved "https://registry.yarnpkg.com/bfj/-/bfj-6.1.2.tgz#325c861a822bcb358a41c78a33b8e6e2086dde7f" - integrity sha512-BmBJa4Lip6BPRINSZ0BPEIfB1wUY/9rwbwvIHQA1KjX9om29B6id0wnWXq7m3bn5JrUVjeOTnVuhPT1FiHwPGw== - dependencies: - bluebird "^3.5.5" - check-types "^8.0.3" - hoopy "^0.1.4" - tryer "^1.0.1" - big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" @@ -1716,6 +1701,11 @@ binary-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + bindings@^1.3.0, bindings@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" @@ -1753,31 +1743,15 @@ bip66@^1.1.5: dependencies: safe-buffer "^5.0.1" -bluebird@^3.5.5: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.11.8, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== -body-parser@1.19.0: - version "1.19.0" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" - integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== - dependencies: - bytes "3.1.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "1.7.2" - iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.7.0" - raw-body "2.4.0" - type-is "~1.6.17" +bn.js@^4.11.6: + version "4.11.9" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" + integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== boxen@^3.0.0: version "3.2.0" @@ -1817,7 +1791,7 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" -braces@^3.0.1: +braces@^3.0.1, braces@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -1893,13 +1867,6 @@ browserify-sign@^4.0.0: inherits "^2.0.1" parse-asn1 "^5.0.0" -browserify-zlib@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== - dependencies: - pako "~1.0.5" - browserslist@^4.8.3, browserslist@^4.9.1: version "4.11.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.11.1.tgz#92f855ee88d6e050e7e7311d987992014f1a1f1b" @@ -1950,51 +1917,11 @@ buffer-xor@^1.0.3: resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= -buffer@^4.3.0: - version "4.9.2" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" - integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= - -bytes@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" - integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== - -cacache@^12.0.2: - version "12.0.4" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.4.tgz#668bcbd105aeb5f1d92fe25570ec9525c8faa40c" - integrity sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== - dependencies: - bluebird "^3.5.5" - chownr "^1.1.1" - figgy-pudding "^3.5.1" - glob "^7.1.4" - graceful-fs "^4.1.15" - infer-owner "^1.0.3" - lru-cache "^5.1.1" - mississippi "^3.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.3" - ssri "^6.0.1" - unique-filename "^1.1.1" - y18n "^4.0.0" - cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -2064,7 +1991,7 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2086,41 +2013,20 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -check-types@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/check-types/-/check-types-8.0.3.tgz#3356cca19c889544f2d7a95ed49ce508a0ecf552" - integrity sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ== - -chokidar@^2.1.8: - version "2.1.8" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" - integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== - dependencies: - anymatch "^2.0.0" - async-each "^1.0.1" - braces "^2.3.2" - glob-parent "^3.1.0" - inherits "^2.0.3" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^3.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.2.1" - upath "^1.1.1" +chokidar@^3.4.0: + version "3.5.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" + integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.5.0" optionalDependencies: - fsevents "^1.2.7" - -chownr@^1.1.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - -chrome-trace-event@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" - integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== - dependencies: - tslib "^1.9.0" + fsevents "~2.3.1" ci-info@^2.0.0: version "2.0.0" @@ -2162,15 +2068,6 @@ cli-width@^2.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - cliui@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" @@ -2236,11 +2133,16 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^2.12.1, commander@^2.18.0, commander@^2.20.0, commander@~2.20.3: +commander@^2.12.1, commander@~2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commander@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" + integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -2261,16 +2163,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -concat-stream@^1.5.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - configstore@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/configstore/-/configstore-4.0.0.tgz#5933311e95d3687efb592c528b922d9262d227e7" @@ -2283,56 +2175,22 @@ configstore@^4.0.0: write-file-atomic "^2.0.0" xdg-basedir "^3.0.0" -console-browserify@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" - integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== - -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= - -content-disposition@0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" - integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== - dependencies: - safe-buffer "5.1.2" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== +convert-hex@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/convert-hex/-/convert-hex-0.1.0.tgz#08c04568922c27776b8a2e81a95d393362ea0b65" + integrity sha1-CMBFaJIsJ3drii6BqV05M2LqC2U= -convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== dependencies: safe-buffer "~5.1.1" -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" - integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== - -copy-concurrently@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" - integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== - dependencies: - aproba "^1.1.1" - fs-write-stream-atomic "^1.0.8" - iferr "^0.1.5" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.0" +convert-string@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/convert-string/-/convert-string-0.1.0.tgz#79ce41a9bb0d03bcf72cdc6a8f3c56fbbc64410a" + integrity sha1-ec5BqbsNA7z3LNxqjzxW+7xkQQo= copy-descriptor@^0.1.0: version "0.1.1" @@ -2383,7 +2241,16 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" -cross-spawn@6.0.5, cross-spawn@^6.0.0, cross-spawn@^6.0.5: +cross-spawn@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + +cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -2394,15 +2261,6 @@ cross-spawn@6.0.5, cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - cross-spawn@^7.0.0: version "7.0.2" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.2.tgz#d0d7dcfa74e89115c7619f4f721a94e1fdb716d6" @@ -2412,7 +2270,7 @@ cross-spawn@^7.0.0: shebang-command "^2.0.0" which "^2.0.1" -crypto-browserify@^3.11.0, crypto-browserify@^3.12.0: +crypto-browserify@^3.12.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== @@ -2463,11 +2321,6 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" -cyclist@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" - integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= - dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -2484,20 +2337,13 @@ data-urls@^1.1.0: whatwg-mimetype "^2.2.0" whatwg-url "^7.0.0" -debug@2.6.9, debug@^2.2.0, debug@^2.3.3: +debug@^2.2.0, debug@^2.3.3: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@=3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" @@ -2589,11 +2435,6 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - des.js@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" @@ -2602,16 +2443,6 @@ des.js@^1.0.0: inherits "^2.0.1" minimalistic-assert "^1.0.0" -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - -detect-file@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" - integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= - detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -2643,11 +2474,6 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -domain-browser@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" - integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== - domexception@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" @@ -2676,21 +2502,6 @@ duplexer3@^0.1.4: resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= -duplexer@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" - integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E= - -duplexify@^3.4.2, duplexify@^3.6.0: - version "3.7.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" - integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - duplexify@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.1.tgz#7027dc374f157b122a8ae08c2d3ea4d2d953aa61" @@ -2709,16 +2520,6 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -ejs@^2.6.1: - version "2.7.4" - resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" - integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== - electron-to-chromium@^1.3.390: version "1.3.398" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.398.tgz#4c01e29091bf39e578ac3f66c1f157d92fa5725d" @@ -2747,38 +2548,19 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= - emojis-list@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: +end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== dependencies: once "^1.4.0" -enhanced-resolve@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" - integrity sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng== - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.4.0" - tapable "^1.0.0" - -enhanced-resolve@^4.0.0, enhanced-resolve@^4.1.0: +enhanced-resolve@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz#2937e2b8066cd0fe7ce0990a98f0d71a35189f66" integrity sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA== @@ -2787,7 +2569,7 @@ enhanced-resolve@^4.0.0, enhanced-resolve@^4.1.0: memory-fs "^0.5.0" tapable "^1.0.0" -errno@^0.1.3, errno@~0.1.7: +errno@^0.1.3: version "0.1.7" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== @@ -2801,11 +2583,6 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - escape-latex@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/escape-latex/-/escape-latex-1.2.0.tgz#07c03818cf7dac250cce517f4fda1b001ef2bca1" @@ -2839,14 +2616,6 @@ eslint-loader@^4.0.0: object-hash "^2.0.3" schema-utils "^2.6.5" -eslint-scope@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" - integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - eslint-scope@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" @@ -2953,12 +2722,7 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -events@^3.0.0, events@^3.1.0: +events@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/events/-/events-3.1.0.tgz#84279af1b34cb75aa88bf5ff291f6d0bd9b31a59" integrity sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg== @@ -3036,13 +2800,6 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expand-tilde@^2.0.0, expand-tilde@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" - integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= - dependencies: - homedir-polyfill "^1.0.1" - expect@^25.2.7: version "25.2.7" resolved "https://registry.yarnpkg.com/expect/-/expect-25.2.7.tgz#509b79f47502835f4071ff3ecc401f2eaecca709" @@ -3055,42 +2812,6 @@ expect@^25.2.7: jest-message-util "^25.2.6" jest-regex-util "^25.2.6" -express@^4.16.3: - version "4.17.1" - resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" - integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== - dependencies: - accepts "~1.3.7" - array-flatten "1.1.1" - body-parser "1.19.0" - content-disposition "0.5.3" - content-type "~1.0.4" - cookie "0.4.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "~1.1.2" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.5" - qs "6.7.0" - range-parser "~1.2.1" - safe-buffer "5.1.2" - send "0.17.1" - serve-static "1.14.1" - setprototypeof "1.1.1" - statuses "~1.5.0" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" @@ -3166,11 +2887,6 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" -figgy-pudding@^3.5.1: - version "3.5.2" - resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" - integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== - figures@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -3190,11 +2906,6 @@ file-uri-to-path@1.0.0: resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== -filesize@^3.6.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" - integrity sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg== - fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" @@ -3212,19 +2923,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -finalhandler@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.3" - statuses "~1.5.0" - unpipe "~1.0.0" - find-cache-dir@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" @@ -3273,16 +2971,6 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -findup-sync@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" - integrity sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg== - dependencies: - detect-file "^1.0.0" - is-glob "^4.0.0" - micromatch "^3.0.4" - resolve-dir "^1.0.1" - flat-cache@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" @@ -3297,20 +2985,10 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== -flush-write-stream@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" - integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== - dependencies: - inherits "^2.0.3" - readable-stream "^2.3.6" - -follow-redirects@1.5.10: - version "1.5.10" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" - integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== - dependencies: - debug "=3.1.0" +follow-redirects@^1.10.0: + version "1.13.2" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.2.tgz#dd73c8effc12728ba5cf4259d760ea5fb83e3147" + integrity sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA== for-in@^1.0.2: version "1.0.2" @@ -3331,11 +3009,6 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" - integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= - fraction.js@^4.0.12: version "4.0.12" resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.0.12.tgz#0526d47c65a5fb4854df78bc77f7bec708d7b8c3" @@ -3348,19 +3021,6 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -from2@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.0" - fs-extra@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" @@ -3380,34 +3040,26 @@ fs-extra@^9.0.0: jsonfile "^6.0.1" universalify "^1.0.0" -fs-write-stream-atomic@^1.0.8: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" - integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= - dependencies: - graceful-fs "^4.1.2" - iferr "^0.1.5" - imurmurhash "^0.1.4" - readable-stream "1 || 2" +fs-readdir-recursive@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + integrity sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA== fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^1.2.7: - version "1.2.12" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.12.tgz#db7e0d8ec3b0b45724fd4d83d43554a8f1f0de5c" - integrity sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q== - dependencies: - bindings "^1.5.0" - nan "^2.12.1" - fsevents@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== +fsevents@~2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.1.tgz#b209ab14c61012636c8863507edf7fb68cc54e9f" + integrity sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -3467,7 +3119,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.0.0: +glob-parent@^5.0.0, glob-parent@~5.1.0: version "5.1.1" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== @@ -3493,42 +3145,6 @@ global-dirs@^0.1.0: dependencies: ini "^1.3.4" -global-modules@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" - integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== - dependencies: - global-prefix "^3.0.0" - -global-modules@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" - integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== - dependencies: - global-prefix "^1.0.1" - is-windows "^1.0.1" - resolve-dir "^1.0.0" - -global-prefix@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" - integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= - dependencies: - expand-tilde "^2.0.2" - homedir-polyfill "^1.0.1" - ini "^1.3.4" - is-windows "^1.0.1" - which "^1.2.14" - -global-prefix@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" - integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== - dependencies: - ini "^1.3.5" - kind-of "^6.0.2" - which "^1.3.1" - globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" @@ -3541,6 +3157,11 @@ globals@^12.1.0: dependencies: type-fest "^0.8.1" +google-protobuf@3.13.0: + version "3.13.0" + resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.13.0.tgz#909c5983d75dd6101ed57c79e0528d000cdc3251" + integrity sha512-ZIf3qfLFayVrPvAjeKKxO5FRF1/NwRxt6Dko+fWEMuHwHbZx8/fcaAao9b0wCM6kr8qeg2te8XTpyuvKuD9aKw== + got@^9.6.0: version "9.6.0" resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" @@ -3558,7 +3179,7 @@ got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.3: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== @@ -3568,6 +3189,11 @@ growly@^1.3.0: resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= +grpc-web@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/grpc-web/-/grpc-web-1.2.1.tgz#860051d705bf5baa7b81fcbd14030060bf16b7b9" + integrity sha512-ibBaJPzfMVuLPgaST9w0kZl60s+SnkPBQp6QKdpEr85tpc1gXW2QDqSne9xiyiym0logDfdUSm4aX5h9YBA2mw== + gts@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/gts/-/gts-1.1.2.tgz#970003f6633c9c384705dab60251b58f6d659c78" @@ -3585,14 +3211,6 @@ gts@^1.1.2: update-notifier "^3.0.0" write-file-atomic "^3.0.0" -gzip-size@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" - integrity sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA== - dependencies: - duplexer "^0.1.1" - pify "^4.0.1" - handlebars@^4.7.2: version "4.7.6" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e" @@ -3699,18 +3317,6 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -homedir-polyfill@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" - integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== - dependencies: - parse-passwd "^1.0.0" - -hoopy@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/hoopy/-/hoopy-0.1.4.tgz#609207d661100033a9a9402ad3dea677381c1b1d" - integrity sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ== - hosted-git-info@^2.1.4: version "2.8.8" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" @@ -3733,28 +3339,6 @@ http-cache-semantics@^4.0.0: resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== -http-errors@1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" - integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-errors@~1.7.2: - version "1.7.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" - integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -3764,11 +3348,6 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= - human-signals@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -3781,16 +3360,6 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -ieee754@^1.1.4: - version "1.1.13" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" - integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== - -iferr@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" - integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= - ignore@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" @@ -3809,14 +3378,6 @@ import-lazy@^2.1.0: resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= -import-local@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" - integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== - dependencies: - pkg-dir "^3.0.0" - resolve-cwd "^2.0.0" - import-local@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6" @@ -3835,11 +3396,6 @@ indent-string@^3.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= -infer-owner@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" - integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -3848,22 +3404,12 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: +ini@^1.3.4, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== @@ -3887,7 +3433,7 @@ inquirer@^7.0.0: strip-ansi "^6.0.0" through "^2.3.6" -interpret@1.2.0, interpret@^1.0.0: +interpret@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== @@ -3899,21 +3445,11 @@ invariant@^2.2.2, invariant@^2.2.4: dependencies: loose-envify "^1.0.0" -invert-kv@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" - integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== - ip-regex@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" @@ -3940,6 +3476,13 @@ is-binary-path@^1.0.0: dependencies: binary-extensions "^1.0.0" +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -4023,7 +3566,7 @@ is-glob@^3.1.0: dependencies: is-extglob "^2.1.0" -is-glob@^4.0.0, is-glob@^4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -4099,16 +3642,11 @@ is-typedarray@^1.0.0, is-typedarray@~1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= -is-windows@^1.0.1, is-windows@^1.0.2: +is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= - is-wsl@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.1.1.tgz#4a1c152d429df3d441669498e2486d3596ebaf1d" @@ -4124,7 +3662,7 @@ is_js@^0.9.0: resolved "https://registry.yarnpkg.com/is_js/-/is_js-0.9.0.tgz#0ab94540502ba7afa24c856aa985561669e9c52d" integrity sha1-CrlFQFArp6+iTIVqqYVWFmnpxS0= -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: +isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= @@ -4575,6 +4113,11 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +jsbn@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" + integrity sha1-sBMHyym2GKHtJux56RH4A8TaAEA= + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -4627,7 +4170,7 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= -json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: +json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== @@ -4735,13 +4278,6 @@ latest-version@^5.0.0: dependencies: package-json "^6.3.0" -lcid@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" - integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== - dependencies: - invert-kv "^2.0.0" - leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -4780,21 +4316,7 @@ loader-fs-cache@^1.0.3: find-cache-dir "^0.1.1" mkdirp "^0.5.1" -loader-runner@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" - integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== - -loader-utils@1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" - integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== - dependencies: - big.js "^5.2.2" - emojis-list "^2.0.0" - json5 "^1.0.1" - -loader-utils@^1.0.2, loader-utils@^1.2.3, loader-utils@^1.4.0: +loader-utils@^1.0.2, loader-utils@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== @@ -4850,6 +4372,11 @@ lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== +lodash@^4.17.19: + version "4.17.20" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" + integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== + lolex@^5.0.0: version "5.1.2" resolved "https://registry.yarnpkg.com/lolex/-/lolex-5.1.2.tgz#953694d098ce7c07bc5ed6d0e42bc6c0c6d5a367" @@ -4890,13 +4417,6 @@ lru-cache@^4.0.1: pseudomap "^1.0.2" yallist "^2.1.2" -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - lunr@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.8.tgz#a8b89c31f30b5a044b97d2d28e2da191b6ba2072" @@ -4909,7 +4429,7 @@ make-dir@^1.0.0: dependencies: pify "^3.0.0" -make-dir@^2.0.0: +make-dir@^2.0.0, make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== @@ -4936,13 +4456,6 @@ makeerror@1.0.x: dependencies: tmpl "1.0.x" -map-age-cleaner@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" - integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== - dependencies: - p-defer "^1.0.0" - map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -4993,28 +4506,6 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -mem@^4.0.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" - integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== - dependencies: - map-age-cleaner "^0.1.1" - mimic-fn "^2.0.0" - p-is-promise "^2.0.0" - -memory-fs@^0.4.0, memory-fs@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" - integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - memory-fs@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" @@ -5038,21 +4529,11 @@ meow@^5.0.0: trim-newlines "^2.0.0" yargs-parser "^10.0.0" -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - micromatch@4.x, micromatch@^4.0.0, micromatch@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" @@ -5061,7 +4542,7 @@ micromatch@4.x, micromatch@^4.0.0, micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" -micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: +micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -5093,19 +4574,14 @@ mime-db@1.43.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58" integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ== -mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24: +mime-types@^2.1.12, mime-types@~2.1.19: version "2.1.26" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06" integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ== dependencies: mime-db "1.43.0" -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mimic-fn@^2.0.0, mimic-fn@^2.1.0: +mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== @@ -5145,22 +4621,6 @@ minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== -mississippi@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" - integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== - dependencies: - concat-stream "^1.5.0" - duplexify "^3.4.2" - end-of-stream "^1.1.0" - flush-write-stream "^1.0.0" - from2 "^2.1.0" - parallel-transform "^1.1.0" - pump "^3.0.0" - pumpify "^1.3.3" - stream-each "^1.1.0" - through2 "^2.0.0" - mixin-deep@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" @@ -5181,28 +4641,11 @@ mkdirp@^0.5.1, mkdirp@^0.5.3: dependencies: minimist "^1.2.5" -move-concurrently@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" - integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= - dependencies: - aproba "^1.1.1" - copy-concurrently "^1.0.0" - fs-write-stream-atomic "^1.0.8" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.3" - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - ms@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" @@ -5213,7 +4656,7 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nan@^2.12.1, nan@^2.13.2, nan@^2.14.0: +nan@^2.13.2, nan@^2.14.0: version "2.14.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== @@ -5255,12 +4698,7 @@ ndjson@^1.5.0: split2 "^2.1.0" through2 "^2.0.3" -negotiator@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" - integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== - -neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1: +neo-async@^2.6.0: version "2.6.1" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== @@ -5275,35 +4713,6 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= -node-libs-browser@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" - integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== - dependencies: - assert "^1.1.1" - browserify-zlib "^0.2.0" - buffer "^4.3.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.11.0" - domain-browser "^1.1.1" - events "^3.0.0" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "0.0.1" - process "^0.11.10" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.3.3" - stream-browserify "^2.0.1" - stream-http "^2.7.2" - string_decoder "^1.0.0" - timers-browserify "^2.0.4" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.11.0" - vm-browserify "^1.0.1" - node-modules-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" @@ -5342,7 +4751,7 @@ normalize-path@^2.1.1: dependencies: remove-trailing-separator "^1.0.1" -normalize-path@^3.0.0: +normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== @@ -5376,11 +4785,6 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - object-copy@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" @@ -5424,13 +4828,6 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -5445,11 +4842,6 @@ onetime@^5.1.0: dependencies: mimic-fn "^2.1.0" -opener@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" - integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA== - optionator@^0.8.1, optionator@^0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -5462,20 +4854,6 @@ optionator@^0.8.1, optionator@^0.8.3: type-check "~0.3.2" word-wrap "~1.2.3" -os-browserify@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= - -os-locale@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" - integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== - dependencies: - execa "^1.0.0" - lcid "^2.0.0" - mem "^4.0.0" - os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -5486,11 +4864,6 @@ p-cancelable@^1.0.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== -p-defer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" - integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= - p-each-series@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.1.0.tgz#961c8dd3f195ea96c747e636b262b800a6b1af48" @@ -5506,11 +4879,6 @@ p-finally@^2.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-2.0.1.tgz#bd6fcaa9c559a096b680806f4d657b3f0f240561" integrity sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw== -p-is-promise@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" - integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== - p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" @@ -5566,20 +4934,6 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" -pako@~1.0.5: - version "1.0.11" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" - integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== - -parallel-transform@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" - integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== - dependencies: - cyclist "^1.0.1" - inherits "^2.0.3" - readable-stream "^2.1.5" - parent-module@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" @@ -5607,31 +4961,16 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -parse-passwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" - integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= - parse5@5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-5.1.0.tgz#c59341c9723f414c452975564c7c00a68d58acd2" integrity sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ== -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= -path-browserify@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" - integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== - path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" @@ -5679,11 +5018,6 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" @@ -5707,7 +5041,7 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4, picomatch@^2.0.5: +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: version "2.2.2" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== @@ -5814,21 +5148,11 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - progress@^2.0.0, progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== -promise-inflight@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" - integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= - prompts@^2.0.1: version "2.3.2" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.3.2.tgz#480572d89ecf39566d2bd3fe2c9fccb7c4c0b068" @@ -5837,14 +5161,6 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.4" -proxy-addr@~2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" - integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.9.1" - prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -5872,14 +5188,6 @@ public-encrypt@^4.0.0: randombytes "^2.0.1" safe-buffer "^5.1.2" -pump@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" - integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -5888,15 +5196,6 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" -pumpify@^1.3.3: - version "1.5.1" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" - integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== - dependencies: - duplexify "^3.6.0" - inherits "^2.0.3" - pump "^2.0.0" - pumpify@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-2.0.1.tgz#abfc7b5a621307c728b551decbbefb51f0e4aa1e" @@ -5906,41 +5205,16 @@ pumpify@^2.0.1: inherits "^2.0.3" pump "^3.0.0" -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - -punycode@^1.2.4: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= - punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -qs@6.7.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" - integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== - qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== -querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - quick-lru@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" @@ -5961,21 +5235,6 @@ randomfill@^1.0.3: randombytes "^2.0.5" safe-buffer "^5.1.0" -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" - integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== - dependencies: - bytes "3.1.0" - http-errors "1.7.2" - iconv-lite "0.4.24" - unpipe "1.0.0" - rc@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" @@ -6008,7 +5267,7 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: +readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -6039,6 +5298,13 @@ readdirp@^2.2.1: micromatch "^3.1.10" readable-stream "^2.0.2" +readdirp@~3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" + integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== + dependencies: + picomatch "^2.2.1" + realpath-native@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-2.0.0.tgz#7377ac429b6e1fd599dc38d08ed942d0d7beb866" @@ -6202,13 +5468,6 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== -resolve-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" - integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= - dependencies: - resolve-from "^3.0.0" - resolve-cwd@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" @@ -6216,19 +5475,6 @@ resolve-cwd@^3.0.0: dependencies: resolve-from "^5.0.0" -resolve-dir@^1.0.0, resolve-dir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" - integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= - dependencies: - expand-tilde "^2.0.0" - global-modules "^1.0.0" - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha1-six699nWiBvItuZTM17rywoYh0g= - resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" @@ -6283,13 +5529,6 @@ rimraf@2.6.3: dependencies: glob "^7.1.3" -rimraf@^2.5.4, rimraf@^2.6.3: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - rimraf@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -6317,13 +5556,6 @@ run-async@^2.4.0: dependencies: is-promise "^2.1.0" -run-queue@^1.0.0, run-queue@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" - integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= - dependencies: - aproba "^1.1.1" - rxjs@^6.5.3: version "6.5.5" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" @@ -6331,16 +5563,16 @@ rxjs@^6.5.3: dependencies: tslib "^1.9.0" -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -6375,15 +5607,6 @@ saxes@^3.1.9: dependencies: xmlchars "^2.1.1" -schema-utils@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" - integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== - dependencies: - ajv "^6.1.0" - ajv-errors "^1.0.0" - ajv-keywords "^3.1.0" - schema-utils@^2.6.5: version "2.6.5" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.5.tgz#c758f0a7e624263073d396e29cd40aa101152d8a" @@ -6438,40 +5661,6 @@ semver@7.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== -send@0.17.1: - version "0.17.1" - resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" - integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.7.2" - mime "1.6.0" - ms "2.1.1" - on-finished "~2.3.0" - range-parser "~1.2.1" - statuses "~1.5.0" - -serialize-javascript@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" - integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== - -serve-static@1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" - integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.17.1" - set-blocking@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" @@ -6487,16 +5676,6 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" -setimmediate@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= - -setprototypeof@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" - integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== - sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" @@ -6505,6 +5684,14 @@ sha.js@^2.4.0, sha.js@^2.4.8: inherits "^2.0.1" safe-buffer "^5.0.1" +sha256@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/sha256/-/sha256-0.2.0.tgz#73a0b418daab7035bff86e8491e363412fc2ab05" + integrity sha1-c6C0GNqrcDW/+G6EkeNjQS/CqwU= + dependencies: + convert-hex "~0.1.0" + convert-string "~0.1.0" + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -6553,6 +5740,11 @@ sisteransi@^1.0.4: resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -6567,6 +5759,14 @@ slice-ansi@^2.1.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" +"sm-crypto@git+https://github.com/bianjieai/sm-crypto-js.git#main": + version "0.2.1" + uid def39a846c0b87fc27f6e63ee90d2149c2590a57 + resolved "git+https://github.com/bianjieai/sm-crypto-js.git#def39a846c0b87fc27f6e63ee90d2149c2590a57" + dependencies: + bn.js "^4.11.6" + jsbn "^1.1.0" + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -6597,11 +5797,6 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -source-list-map@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" - integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== - source-map-resolve@^0.5.0: version "0.5.3" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" @@ -6613,7 +5808,7 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.6, source-map-support@~0.5.12: +source-map-support@^0.5.6: version "0.5.16" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== @@ -6701,13 +5896,6 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" -ssri@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" - integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== - dependencies: - figgy-pudding "^3.5.1" - stack-utils@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" @@ -6721,43 +5909,11 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" -"statuses@>= 1.5.0 < 2", statuses@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - stealthy-require@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= -stream-browserify@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" - integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-each@^1.1.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" - integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== - dependencies: - end-of-stream "^1.1.0" - stream-shift "^1.0.0" - -stream-http@^2.7.2: - version "2.8.3" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" - integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.3.6" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - stream-shift@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" @@ -6779,7 +5935,7 @@ string-width@^2.1.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string-width@^3.0.0, string-width@^3.1.0: +string-width@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== @@ -6797,7 +5953,7 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" -string_decoder@^1.0.0, string_decoder@^1.1.1: +string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== @@ -6818,7 +5974,7 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: +strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== @@ -6867,13 +6023,6 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -supports-color@6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - dependencies: - has-flag "^3.0.0" - supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -6911,7 +6060,7 @@ table@^5.2.3: slice-ansi "^2.1.0" string-width "^3.0.0" -tapable@^1.0.0, tapable@^1.1.3: +tapable@^1.0.0: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== @@ -6931,30 +6080,6 @@ terminal-link@^2.0.0: ansi-escapes "^4.2.1" supports-hyperlinks "^2.0.0" -terser-webpack-plugin@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz#5ecaf2dbdc5fb99745fd06791f46fc9ddb1c9a7c" - integrity sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA== - dependencies: - cacache "^12.0.2" - find-cache-dir "^2.1.0" - is-wsl "^1.1.0" - schema-utils "^1.0.0" - serialize-javascript "^2.1.2" - source-map "^0.6.1" - terser "^4.1.2" - webpack-sources "^1.4.0" - worker-farm "^1.7.0" - -terser@^4.1.2: - version "4.6.11" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.11.tgz#12ff99fdd62a26de2a82f508515407eb6ccd8a9f" - integrity sha512-76Ynm7OXUG5xhOpblhytE7X58oeNSmC8xnNhjWVo8CksHit0U0kO4hfNbPrrYwowLWFgM2n9L176VNx2QaHmtA== - dependencies: - commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" - test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -6974,7 +6099,7 @@ throat@^5.0.0: resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA== -through2@^2.0.0, through2@^2.0.2, through2@^2.0.3: +through2@^2.0.2, through2@^2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== @@ -6987,13 +6112,6 @@ through@^2.3.6: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= -timers-browserify@^2.0.4: - version "2.0.11" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f" - integrity sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ== - dependencies: - setimmediate "^1.0.4" - tiny-emitter@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" @@ -7022,11 +6140,6 @@ tmpl@1.0.x: resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= - to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" @@ -7069,11 +6182,6 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -toidentifier@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" - integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== - tough-cookie@^2.3.3, tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" @@ -7103,11 +6211,6 @@ trim-newlines@^2.0.0: resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= -tryer@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" - integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA== - ts-jest@^25.2.1: version "25.3.1" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-25.3.1.tgz#58e2ed3506e4e4487c0b9b532846a5cade9656ba" @@ -7191,11 +6294,6 @@ tsutils@^2.29.0: dependencies: tslib "^1.8.1" -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= - tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -7235,14 +6333,6 @@ type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== -type-is@~1.6.17, type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - typed-function@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/typed-function/-/typed-function-1.1.1.tgz#a1316187ec3628c9e219b91ca96918660a10138e" @@ -7255,11 +6345,6 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - typedoc-default-themes@^0.7.2: version "0.7.2" resolved "https://registry.yarnpkg.com/typedoc-default-themes/-/typedoc-default-themes-0.7.2.tgz#1e9896f920b58e6da0bba9d7e643738d02405a5a" @@ -7348,20 +6433,6 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^2.0.1" -unique-filename@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" - integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== - dependencies: - unique-slug "^2.0.0" - -unique-slug@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" - integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== - dependencies: - imurmurhash "^0.1.4" - unique-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" @@ -7379,11 +6450,6 @@ universalify@^1.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - unset-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" @@ -7434,14 +6500,6 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" @@ -7452,35 +6510,11 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -util@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= - dependencies: - inherits "2.0.1" - -util@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" - integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== - dependencies: - inherits "2.0.3" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - uuid@^3.3.2: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -v8-compile-cache@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe" - integrity sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w== - v8-compile-cache@^2.0.3: version "2.1.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" @@ -7503,11 +6537,6 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" @@ -7517,11 +6546,6 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -vm-browserify@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" - integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== - w3c-hr-time@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" @@ -7545,100 +6569,11 @@ walker@^1.0.7, walker@~1.0.5: dependencies: makeerror "1.0.x" -watchpack@^1.6.0: - version "1.6.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.1.tgz#280da0a8718592174010c078c7585a74cd8cd0e2" - integrity sha512-+IF9hfUFOrYOOaKyfaI7h7dquUIOgyEMoQMLA7OP5FxegKA2+XdXThAZ9TU2kucfhDH7rfMHs1oPYziVGWRnZA== - dependencies: - chokidar "^2.1.8" - graceful-fs "^4.1.2" - neo-async "^2.5.0" - webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webpack-bundle-analyzer@^3.6.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.6.1.tgz#bdb637c2304424f2fbff9a950c7be42a839ae73b" - integrity sha512-Nfd8HDwfSx1xBwC+P8QMGvHAOITxNBSvu/J/mCJvOwv+G4VWkU7zir9SSenTtyCi0LnVtmsc7G5SZo1uV+bxRw== - dependencies: - acorn "^7.1.1" - acorn-walk "^7.1.1" - bfj "^6.1.1" - chalk "^2.4.1" - commander "^2.18.0" - ejs "^2.6.1" - express "^4.16.3" - filesize "^3.6.1" - gzip-size "^5.0.0" - lodash "^4.17.15" - mkdirp "^0.5.1" - opener "^1.5.1" - ws "^6.0.0" - -webpack-cli@^3.3.11: - version "3.3.11" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.11.tgz#3bf21889bf597b5d82c38f215135a411edfdc631" - integrity sha512-dXlfuml7xvAFwYUPsrtQAA9e4DOe58gnzSxhgrO/ZM/gyXTBowrsYeubyN4mqGhYdpXMFNyQ6emjJS9M7OBd4g== - dependencies: - chalk "2.4.2" - cross-spawn "6.0.5" - enhanced-resolve "4.1.0" - findup-sync "3.0.0" - global-modules "2.0.0" - import-local "2.0.0" - interpret "1.2.0" - loader-utils "1.2.3" - supports-color "6.1.0" - v8-compile-cache "2.0.3" - yargs "13.2.4" - -webpack-merge@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d" - integrity sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g== - dependencies: - lodash "^4.17.15" - -webpack-sources@^1.4.0, webpack-sources@^1.4.1: - version "1.4.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" - integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== - dependencies: - source-list-map "^2.0.0" - source-map "~0.6.1" - -webpack@^4.42.1: - version "4.42.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.42.1.tgz#ae707baf091f5ca3ef9c38b884287cfe8f1983ef" - integrity sha512-SGfYMigqEfdGchGhFFJ9KyRpQKnipvEvjc1TwrXEPCM6H5Wywu10ka8o3KGrMzSMxMQKt8aCHUFh5DaQ9UmyRg== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-module-context" "1.9.0" - "@webassemblyjs/wasm-edit" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - acorn "^6.2.1" - ajv "^6.10.2" - ajv-keywords "^3.4.1" - chrome-trace-event "^1.0.2" - enhanced-resolve "^4.1.0" - eslint-scope "^4.0.3" - json-parse-better-errors "^1.0.2" - loader-runner "^2.4.0" - loader-utils "^1.2.3" - memory-fs "^0.4.1" - micromatch "^3.1.10" - mkdirp "^0.5.3" - neo-async "^2.6.1" - node-libs-browser "^2.2.1" - schema-utils "^1.0.0" - tapable "^1.1.3" - terser-webpack-plugin "^1.4.3" - watchpack "^1.6.0" - webpack-sources "^1.4.1" - whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" @@ -7665,7 +6600,7 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@^1.2.14, which@^1.2.9, which@^1.3.1: +which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -7703,22 +6638,6 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= -worker-farm@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" - integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== - dependencies: - errno "~0.1.7" - -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" @@ -7759,13 +6678,6 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" -ws@^6.0.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" - integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== - dependencies: - async-limiter "~1.0.0" - ws@^7.0.0: version "7.2.3" resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.3.tgz#a5411e1fb04d5ed0efee76d26d5c46d830c39b46" @@ -7786,7 +6698,7 @@ xmlchars@^2.1.1: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== -xtend@^4.0.0, xtend@~4.0.1: +xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== @@ -7801,11 +6713,6 @@ yallist@^2.1.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - yargs-parser@18.x, yargs-parser@^18.1.1: version "18.1.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.2.tgz#2f482bea2136dbde0861683abea7756d30b504f1" @@ -7821,31 +6728,6 @@ yargs-parser@^10.0.0: dependencies: camelcase "^4.1.0" -yargs-parser@^13.1.0: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs@13.2.4: - version "13.2.4" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" - integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - os-locale "^3.1.0" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.0" - yargs@^15.3.1: version "15.3.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.3.1.tgz#9505b472763963e54afe60148ad27a330818e98b" From 2df3592ce1c3b2a74b870ae0fd5e72f159a83299 Mon Sep 17 00:00:00 2001 From: hangTaishan Date: Thu, 18 Feb 2021 13:54:33 +0800 Subject: [PATCH 12/15] build --- dist/src/client.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/dist/src/client.d.ts b/dist/src/client.d.ts index a5093a2e..5a6abbfa 100644 --- a/dist/src/client.d.ts +++ b/dist/src/client.d.ts @@ -26,6 +26,7 @@ export declare class Client { /** Tx module */ tx: modules.Tx; /** Gov module */ + gov: modules.Gov; /** Slashing module */ slashing: modules.Slashing; /** Distribution module */ From e07d85a8e85142ccd314bb7ff1bd67c0d5fc4065 Mon Sep 17 00:00:00 2001 From: Yelong Zhang Date: Thu, 18 Feb 2021 19:40:24 +0800 Subject: [PATCH 13/15] Update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 63946fc6..bf301ca5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@irisnet/irishub-sdk", - "version": "0.0.1", + "version": "v1.0.0-rc1", "description": "IRISHub JavaScript SDK", "main": "index.js", "typings": "src/index.ts", From 6c520c96492045cf83b289eb4a9eec9d980d5332 Mon Sep 17 00:00:00 2001 From: Yelong Zhang Date: Wed, 24 Feb 2021 23:34:41 +0800 Subject: [PATCH 14/15] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bf301ca5..896322db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@irisnet/irishub-sdk", - "version": "v1.0.0-rc1", + "version": "v1.0.0-rc2", "description": "IRISHub JavaScript SDK", "main": "index.js", "typings": "src/index.ts", From 2383789f43ce1a58b6e47a0346d328b88c524c70 Mon Sep 17 00:00:00 2001 From: lsc949982212 <949982212@qq.com> Date: Thu, 25 Feb 2021 10:23:08 +0800 Subject: [PATCH 15/15] update v1.0.0-rc2 to 1.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c83720c7..72c819c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@irisnet/irishub-sdk", - "version": "v1.0.0-rc2", + "version": "1.0.0", "description": "IRISHub JavaScript SDK", "main": "index.js", "typings": "src/index.ts",